286N/A/*
286N/A * reserved comment block
286N/A * DO NOT REMOVE OR ALTER!
286N/A */
286N/A/*
286N/A * The Apache Software License, Version 1.1
286N/A *
286N/A *
286N/A * Copyright (c) 2000-2002 The Apache Software Foundation. All rights
286N/A * reserved.
286N/A *
286N/A * Redistribution and use in source and binary forms, with or without
286N/A * modification, are permitted provided that the following conditions
286N/A * are met:
286N/A *
286N/A * 1. Redistributions of source code must retain the above copyright
286N/A * notice, this list of conditions and the following disclaimer.
286N/A *
286N/A * 2. Redistributions in binary form must reproduce the above copyright
286N/A * notice, this list of conditions and the following disclaimer in
286N/A * the documentation and/or other materials provided with the
286N/A * distribution.
286N/A *
286N/A * 3. The end-user documentation included with the redistribution,
286N/A * if any, must include the following acknowledgment:
286N/A * "This product includes software developed by the
286N/A * Apache Software Foundation (http://www.apache.org/)."
286N/A * Alternately, this acknowledgment may appear in the software itself,
286N/A * if and wherever such third-party acknowledgments normally appear.
286N/A *
286N/A * 4. The names "Xerces" and "Apache Software Foundation" must
286N/A * not be used to endorse or promote products derived from this
286N/A * software without prior written permission. For written
286N/A * permission, please contact apache@apache.org.
286N/A *
286N/A * 5. Products derived from this software may not be called "Apache",
286N/A * nor may "Apache" appear in their name, without prior written
286N/A * permission of the Apache Software Foundation.
286N/A *
286N/A * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
286N/A * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
286N/A * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
286N/A * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
286N/A * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
286N/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
286N/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
286N/A * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
286N/A * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
286N/A * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
286N/A * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
286N/A * SUCH DAMAGE.
286N/A * ====================================================================
286N/A *
286N/A * This software consists of voluntary contributions made by many
286N/A * individuals on behalf of the Apache Software Foundation and was
286N/A * originally based on software copyright (c) 1999, International
286N/A * Business Machines, Inc., http://www.apache.org. For more
286N/A * information on the Apache Software Foundation, please see
286N/A * <http://www.apache.org/>.
286N/A */
286N/Apackage com.sun.org.apache.xerces.internal.util;
286N/A
286N/Aimport com.sun.org.apache.xerces.internal.xni.Augmentations;
286N/Aimport com.sun.org.apache.xerces.internal.xni.NamespaceContext;
286N/Aimport com.sun.org.apache.xerces.internal.xni.QName;
286N/Aimport com.sun.org.apache.xerces.internal.xni.XMLAttributes;
286N/Aimport com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler;
286N/Aimport com.sun.org.apache.xerces.internal.xni.XMLLocator;
286N/Aimport com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier;
286N/Aimport com.sun.org.apache.xerces.internal.xni.XMLString;
286N/Aimport com.sun.org.apache.xerces.internal.xni.XNIException;
286N/Aimport com.sun.org.apache.xerces.internal.xni.parser.XMLDocumentFilter;
286N/Aimport com.sun.org.apache.xerces.internal.xni.parser.XMLDocumentSource;
286N/A
286N/A/**
286N/A * Default implementation of {@link XMLDocumentFilter}
286N/A * that simply passes through events to the next component.
286N/A *
286N/A * <p>
286N/A * Can be used as a base implementation of other more sophisticated
286N/A * {@link XMLDocumentFilter}s.
286N/A *
286N/A * @author
286N/A * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
286N/A */
286N/Apublic class XMLDocumentFilterImpl implements XMLDocumentFilter {
286N/A private XMLDocumentHandler next;
286N/A private XMLDocumentSource source;
286N/A
286N/A
286N/A public void setDocumentHandler(XMLDocumentHandler handler) {
286N/A this.next = handler;
286N/A }
286N/A
286N/A public XMLDocumentHandler getDocumentHandler() {
286N/A return next;
286N/A }
286N/A
286N/A public void setDocumentSource(XMLDocumentSource source) {
286N/A this.source = source;
286N/A }
286N/A
286N/A public XMLDocumentSource getDocumentSource() {
286N/A return source;
286N/A }
286N/A
286N/A
286N/A
286N/A
286N/A
286N/A
286N/A public void characters(XMLString text, Augmentations augs) throws XNIException {
286N/A next.characters(text, augs);
286N/A }
286N/A
286N/A public void comment(XMLString text, Augmentations augs) throws XNIException {
286N/A next.comment(text, augs);
286N/A }
286N/A
286N/A public void doctypeDecl(String rootElement, String publicId, String systemId, Augmentations augs)
286N/A throws XNIException {
286N/A next.doctypeDecl(rootElement, publicId, systemId, augs);
286N/A }
286N/A
286N/A public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException {
286N/A next.emptyElement(element, attributes, augs);
286N/A }
286N/A
286N/A public void endCDATA(Augmentations augs) throws XNIException {
286N/A next.endCDATA(augs);
286N/A }
286N/A
286N/A public void endDocument(Augmentations augs) throws XNIException {
286N/A next.endDocument(augs);
286N/A }
286N/A
286N/A public void endElement(QName element, Augmentations augs) throws XNIException {
286N/A next.endElement(element, augs);
286N/A }
286N/A
286N/A public void endGeneralEntity(String name, Augmentations augs) throws XNIException {
286N/A next.endGeneralEntity(name, augs);
286N/A }
286N/A
286N/A public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException {
286N/A next.ignorableWhitespace(text, augs);
286N/A }
286N/A
286N/A public void processingInstruction(String target, XMLString data, Augmentations augs) throws XNIException {
286N/A next.processingInstruction(target, data, augs);
286N/A }
286N/A
286N/A public void startCDATA(Augmentations augs) throws XNIException {
286N/A next.startCDATA(augs);
286N/A }
286N/A
286N/A public void startDocument(
286N/A XMLLocator locator,
286N/A String encoding,
286N/A NamespaceContext namespaceContext,
286N/A Augmentations augs)
286N/A throws XNIException {
286N/A next.startDocument(locator, encoding, namespaceContext, augs);
286N/A }
286N/A
286N/A public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException {
286N/A next.startElement(element, attributes, augs);
286N/A }
286N/A
286N/A public void startGeneralEntity(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs)
286N/A throws XNIException {
286N/A next.startGeneralEntity(name, identifier, encoding, augs);
286N/A }
286N/A
286N/A public void textDecl(String version, String encoding, Augmentations augs) throws XNIException {
286N/A next.textDecl(version, encoding, augs);
286N/A }
286N/A
286N/A public void xmlDecl(String version, String encoding, String standalone, Augmentations augs) throws XNIException {
286N/A next.xmlDecl(version, encoding, standalone, augs);
286N/A }
286N/A}