src/java.xml/share/classes/com/sun/org/apache/xerces/internal/util/XMLDocumentFilterImpl.java
author joehw
Thu, 21 Dec 2017 17:08:05 -0800
changeset 48412 d4412e380f6b
parent 47216 71c04702a3d5
permissions -rw-r--r--
8184431: References to @sun.com Reviewed-by: lancea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6
7f561c08de6b Initial load
duke
parents:
diff changeset
     1
/*
7f561c08de6b Initial load
duke
parents:
diff changeset
     2
 * reserved comment block
7f561c08de6b Initial load
duke
parents:
diff changeset
     3
 * DO NOT REMOVE OR ALTER!
7f561c08de6b Initial load
duke
parents:
diff changeset
     4
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
     5
/*
44797
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
     6
 * Licensed to the Apache Software Foundation (ASF) under one or more
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
     7
 * contributor license agreements.  See the NOTICE file distributed with
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
     8
 * this work for additional information regarding copyright ownership.
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
     9
 * The ASF licenses this file to You under the Apache License, Version 2.0
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
    10
 * (the "License"); you may not use this file except in compliance with
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
    11
 * the License.  You may obtain a copy of the License at
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    12
 *
44797
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
    13
 *      http://www.apache.org/licenses/LICENSE-2.0
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    14
 *
44797
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
    15
 * Unless required by applicable law or agreed to in writing, software
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
    16
 * distributed under the License is distributed on an "AS IS" BASIS,
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
    17
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
    18
 * See the License for the specific language governing permissions and
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
    19
 * limitations under the License.
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    20
 */
44797
8b3b3b911b8a 8162572: Update License Header for all JAXP sources
joehw
parents: 25868
diff changeset
    21
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    22
package com.sun.org.apache.xerces.internal.util;
7f561c08de6b Initial load
duke
parents:
diff changeset
    23
7f561c08de6b Initial load
duke
parents:
diff changeset
    24
import com.sun.org.apache.xerces.internal.xni.Augmentations;
7f561c08de6b Initial load
duke
parents:
diff changeset
    25
import com.sun.org.apache.xerces.internal.xni.NamespaceContext;
7f561c08de6b Initial load
duke
parents:
diff changeset
    26
import com.sun.org.apache.xerces.internal.xni.QName;
7f561c08de6b Initial load
duke
parents:
diff changeset
    27
import com.sun.org.apache.xerces.internal.xni.XMLAttributes;
7f561c08de6b Initial load
duke
parents:
diff changeset
    28
import com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler;
7f561c08de6b Initial load
duke
parents:
diff changeset
    29
import com.sun.org.apache.xerces.internal.xni.XMLLocator;
7f561c08de6b Initial load
duke
parents:
diff changeset
    30
import com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier;
7f561c08de6b Initial load
duke
parents:
diff changeset
    31
import com.sun.org.apache.xerces.internal.xni.XMLString;
7f561c08de6b Initial load
duke
parents:
diff changeset
    32
import com.sun.org.apache.xerces.internal.xni.XNIException;
7f561c08de6b Initial load
duke
parents:
diff changeset
    33
import com.sun.org.apache.xerces.internal.xni.parser.XMLDocumentFilter;
7f561c08de6b Initial load
duke
parents:
diff changeset
    34
import com.sun.org.apache.xerces.internal.xni.parser.XMLDocumentSource;
7f561c08de6b Initial load
duke
parents:
diff changeset
    35
7f561c08de6b Initial load
duke
parents:
diff changeset
    36
/**
7f561c08de6b Initial load
duke
parents:
diff changeset
    37
 * Default implementation of {@link XMLDocumentFilter}
7f561c08de6b Initial load
duke
parents:
diff changeset
    38
 * that simply passes through events to the next component.
7f561c08de6b Initial load
duke
parents:
diff changeset
    39
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    40
 * <p>
7f561c08de6b Initial load
duke
parents:
diff changeset
    41
 * Can be used as a base implementation of other more sophisticated
7f561c08de6b Initial load
duke
parents:
diff changeset
    42
 * {@link XMLDocumentFilter}s.
7f561c08de6b Initial load
duke
parents:
diff changeset
    43
 *
7f561c08de6b Initial load
duke
parents:
diff changeset
    44
 * @author
48412
d4412e380f6b 8184431: References to @sun.com
joehw
parents: 47216
diff changeset
    45
 *     Kohsuke Kawaguchi
6
7f561c08de6b Initial load
duke
parents:
diff changeset
    46
 */
7f561c08de6b Initial load
duke
parents:
diff changeset
    47
public class XMLDocumentFilterImpl implements XMLDocumentFilter {
7f561c08de6b Initial load
duke
parents:
diff changeset
    48
    private XMLDocumentHandler next;
7f561c08de6b Initial load
duke
parents:
diff changeset
    49
    private XMLDocumentSource source;
7f561c08de6b Initial load
duke
parents:
diff changeset
    50
7f561c08de6b Initial load
duke
parents:
diff changeset
    51
7f561c08de6b Initial load
duke
parents:
diff changeset
    52
    public void setDocumentHandler(XMLDocumentHandler handler) {
7f561c08de6b Initial load
duke
parents:
diff changeset
    53
        this.next = handler;
7f561c08de6b Initial load
duke
parents:
diff changeset
    54
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    55
7f561c08de6b Initial load
duke
parents:
diff changeset
    56
    public XMLDocumentHandler getDocumentHandler() {
7f561c08de6b Initial load
duke
parents:
diff changeset
    57
        return next;
7f561c08de6b Initial load
duke
parents:
diff changeset
    58
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    59
7f561c08de6b Initial load
duke
parents:
diff changeset
    60
    public void setDocumentSource(XMLDocumentSource source) {
7f561c08de6b Initial load
duke
parents:
diff changeset
    61
        this.source = source;
7f561c08de6b Initial load
duke
parents:
diff changeset
    62
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    63
7f561c08de6b Initial load
duke
parents:
diff changeset
    64
    public XMLDocumentSource getDocumentSource() {
7f561c08de6b Initial load
duke
parents:
diff changeset
    65
        return source;
7f561c08de6b Initial load
duke
parents:
diff changeset
    66
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    67
7f561c08de6b Initial load
duke
parents:
diff changeset
    68
7f561c08de6b Initial load
duke
parents:
diff changeset
    69
7f561c08de6b Initial load
duke
parents:
diff changeset
    70
7f561c08de6b Initial load
duke
parents:
diff changeset
    71
7f561c08de6b Initial load
duke
parents:
diff changeset
    72
7f561c08de6b Initial load
duke
parents:
diff changeset
    73
    public void characters(XMLString text, Augmentations augs) throws XNIException {
7f561c08de6b Initial load
duke
parents:
diff changeset
    74
        next.characters(text, augs);
7f561c08de6b Initial load
duke
parents:
diff changeset
    75
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    76
7f561c08de6b Initial load
duke
parents:
diff changeset
    77
    public void comment(XMLString text, Augmentations augs) throws XNIException {
7f561c08de6b Initial load
duke
parents:
diff changeset
    78
        next.comment(text, augs);
7f561c08de6b Initial load
duke
parents:
diff changeset
    79
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    80
7f561c08de6b Initial load
duke
parents:
diff changeset
    81
    public void doctypeDecl(String rootElement, String publicId, String systemId, Augmentations augs)
7f561c08de6b Initial load
duke
parents:
diff changeset
    82
        throws XNIException {
7f561c08de6b Initial load
duke
parents:
diff changeset
    83
        next.doctypeDecl(rootElement, publicId, systemId, augs);
7f561c08de6b Initial load
duke
parents:
diff changeset
    84
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    85
7f561c08de6b Initial load
duke
parents:
diff changeset
    86
    public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException {
7f561c08de6b Initial load
duke
parents:
diff changeset
    87
        next.emptyElement(element, attributes, augs);
7f561c08de6b Initial load
duke
parents:
diff changeset
    88
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    89
7f561c08de6b Initial load
duke
parents:
diff changeset
    90
    public void endCDATA(Augmentations augs) throws XNIException {
7f561c08de6b Initial load
duke
parents:
diff changeset
    91
        next.endCDATA(augs);
7f561c08de6b Initial load
duke
parents:
diff changeset
    92
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    93
7f561c08de6b Initial load
duke
parents:
diff changeset
    94
    public void endDocument(Augmentations augs) throws XNIException {
7f561c08de6b Initial load
duke
parents:
diff changeset
    95
        next.endDocument(augs);
7f561c08de6b Initial load
duke
parents:
diff changeset
    96
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
    97
7f561c08de6b Initial load
duke
parents:
diff changeset
    98
    public void endElement(QName element, Augmentations augs) throws XNIException {
7f561c08de6b Initial load
duke
parents:
diff changeset
    99
        next.endElement(element, augs);
7f561c08de6b Initial load
duke
parents:
diff changeset
   100
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   101
7f561c08de6b Initial load
duke
parents:
diff changeset
   102
    public void endGeneralEntity(String name, Augmentations augs) throws XNIException {
7f561c08de6b Initial load
duke
parents:
diff changeset
   103
        next.endGeneralEntity(name, augs);
7f561c08de6b Initial load
duke
parents:
diff changeset
   104
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   105
7f561c08de6b Initial load
duke
parents:
diff changeset
   106
    public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
7f561c08de6b Initial load
duke
parents:
diff changeset
   107
        next.ignorableWhitespace(text, augs);
7f561c08de6b Initial load
duke
parents:
diff changeset
   108
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   109
7f561c08de6b Initial load
duke
parents:
diff changeset
   110
    public void processingInstruction(String target, XMLString data, Augmentations augs) throws XNIException {
7f561c08de6b Initial load
duke
parents:
diff changeset
   111
        next.processingInstruction(target, data, augs);
7f561c08de6b Initial load
duke
parents:
diff changeset
   112
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   113
7f561c08de6b Initial load
duke
parents:
diff changeset
   114
    public void startCDATA(Augmentations augs) throws XNIException {
7f561c08de6b Initial load
duke
parents:
diff changeset
   115
        next.startCDATA(augs);
7f561c08de6b Initial load
duke
parents:
diff changeset
   116
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   117
7f561c08de6b Initial load
duke
parents:
diff changeset
   118
    public void startDocument(
7f561c08de6b Initial load
duke
parents:
diff changeset
   119
        XMLLocator locator,
7f561c08de6b Initial load
duke
parents:
diff changeset
   120
        String encoding,
7f561c08de6b Initial load
duke
parents:
diff changeset
   121
        NamespaceContext namespaceContext,
7f561c08de6b Initial load
duke
parents:
diff changeset
   122
        Augmentations augs)
7f561c08de6b Initial load
duke
parents:
diff changeset
   123
        throws XNIException {
7f561c08de6b Initial load
duke
parents:
diff changeset
   124
        next.startDocument(locator, encoding, namespaceContext, augs);
7f561c08de6b Initial load
duke
parents:
diff changeset
   125
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   126
7f561c08de6b Initial load
duke
parents:
diff changeset
   127
    public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException {
7f561c08de6b Initial load
duke
parents:
diff changeset
   128
        next.startElement(element, attributes, augs);
7f561c08de6b Initial load
duke
parents:
diff changeset
   129
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   130
7f561c08de6b Initial load
duke
parents:
diff changeset
   131
    public void startGeneralEntity(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs)
7f561c08de6b Initial load
duke
parents:
diff changeset
   132
        throws XNIException {
7f561c08de6b Initial load
duke
parents:
diff changeset
   133
        next.startGeneralEntity(name, identifier, encoding, augs);
7f561c08de6b Initial load
duke
parents:
diff changeset
   134
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   135
7f561c08de6b Initial load
duke
parents:
diff changeset
   136
    public void textDecl(String version, String encoding, Augmentations augs) throws XNIException {
7f561c08de6b Initial load
duke
parents:
diff changeset
   137
        next.textDecl(version, encoding, augs);
7f561c08de6b Initial load
duke
parents:
diff changeset
   138
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   139
7f561c08de6b Initial load
duke
parents:
diff changeset
   140
    public void xmlDecl(String version, String encoding, String standalone, Augmentations augs) throws XNIException {
7f561c08de6b Initial load
duke
parents:
diff changeset
   141
        next.xmlDecl(version, encoding, standalone, augs);
7f561c08de6b Initial load
duke
parents:
diff changeset
   142
    }
7f561c08de6b Initial load
duke
parents:
diff changeset
   143
}