gnu.xml.dom

Class Consumer.Backdoor

Enclosing Class:
Consumer
Implemented Interfaces:
ContentHandler, DeclHandler, DTDHandler, LexicalHandler

public static class Consumer.Backdoor
extends DomConsumer.Handler

Implements the backdoors needed by DOM. All methods in this class use implementation-specific APIs that are implied by the DOM specification (needed to implement testable behavior) but which are excluded from the DOM specification.

Field Summary

Fields inherited from class gnu.xml.pipeline.DomConsumer.Handler

consumer

Constructor Summary

Backdoor(DomConsumer consumer)
Constructor.

Method Summary

void
attributeDecl(String ename, String aname, String type, String mode, String value)
boolean
canPopulateEntityRefs()
protected Text
createText(boolean isCDATA, buf[] , int off, int len)
void
elementDecl(String name, String model)
void
endDTD()
void
endDocument()
void
endElement(String uri, String localName, String qName)
void
endEntity(String name)
void
externalEntityDecl(String name, String publicId, String systemId)
void
internalEntityDecl(String name, String value)
void
notationDecl(String name, String publicId, String systemId)
void
startDTD(String name, String publicId, String systemId)
void
startDocument()
void
startElement(String uri, String localName, String qName, Attributes atts)
void
startEntity(String name)
void
unparsedEntityDecl(String name, String publicId, String systemId, String notationName)

Methods inherited from class gnu.xml.pipeline.DomConsumer.Handler

attributeDecl, canPopulateEntityRefs, characters, comment, createText, elementDecl, endCDATA, endDTD, endDocument, endElement, endEntity, endPrefixMapping, externalEntityDecl, getDocument, getTop, ignorableWhitespace, internalEntityDecl, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDTD, startDocument, startElement, startEntity, startPrefixMapping, unparsedEntityDecl

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

Backdoor

protected Backdoor(DomConsumer consumer)
            throws SAXException
Constructor.
Parameters:
consumer - must have been initialized to use the DomDocument class (or a subclass) for constructing DOM trees

Method Details

attributeDecl

public void attributeDecl(String ename,
                          String aname,
                          String type,
                          String mode,
                          String value)
            throws SAXException
Specified by:
attributeDecl in interface DeclHandler
Overrides:
attributeDecl in interface DomConsumer.Handler

canPopulateEntityRefs

public boolean canPopulateEntityRefs()
Overrides:
canPopulateEntityRefs in interface DomConsumer.Handler

createText

protected Text createText(boolean isCDATA,
                          buf[] ,
                          int off,
                          int len)

elementDecl

public void elementDecl(String name,
                        String model)
            throws SAXException
Specified by:
elementDecl in interface DeclHandler
Overrides:
elementDecl in interface DomConsumer.Handler

endDTD

public void endDTD()
            throws SAXException
Specified by:
endDTD in interface LexicalHandler
Overrides:
endDTD in interface DomConsumer.Handler

endDocument

public void endDocument()
            throws SAXException
Specified by:
endDocument in interface ContentHandler
Overrides:
endDocument in interface DomConsumer.Handler

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
            throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in interface DomConsumer.Handler

endEntity

public void endEntity(String name)
            throws SAXException
Specified by:
endEntity in interface LexicalHandler
Overrides:
endEntity in interface DomConsumer.Handler

externalEntityDecl

public void externalEntityDecl(String name,
                               String publicId,
                               String systemId)
            throws SAXException
Specified by:
externalEntityDecl in interface DeclHandler
Overrides:
externalEntityDecl in interface DomConsumer.Handler

internalEntityDecl

public void internalEntityDecl(String name,
                               String value)
            throws SAXException
Specified by:
internalEntityDecl in interface DeclHandler
Overrides:
internalEntityDecl in interface DomConsumer.Handler

notationDecl

public void notationDecl(String name,
                         String publicId,
                         String systemId)
            throws SAXException
Specified by:
notationDecl in interface DTDHandler
Overrides:
notationDecl in interface DomConsumer.Handler

startDTD

public void startDTD(String name,
                     String publicId,
                     String systemId)
            throws SAXException
Specified by:
startDTD in interface LexicalHandler
Overrides:
startDTD in interface DomConsumer.Handler

startDocument

public void startDocument()
            throws SAXException
Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in interface DomConsumer.Handler

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes atts)
            throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in interface DomConsumer.Handler

startEntity

public void startEntity(String name)
            throws SAXException
Specified by:
startEntity in interface LexicalHandler
Overrides:
startEntity in interface DomConsumer.Handler

unparsedEntityDecl

public void unparsedEntityDecl(String name,
                               String publicId,
                               String systemId,
                               String notationName)
            throws SAXException
Specified by:
unparsedEntityDecl in interface DTDHandler
Overrides:
unparsedEntityDecl in interface DomConsumer.Handler

Consumer.java -- Copyright (C) 2001,2004 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.