gnu.xml.dom

Class Consumer.Backdoor

Enclosing Class:
Consumer
Implemented Interfaces:
ContentHandler, ContentHandler2, 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)
void
xmlDecl(String version, String encoding, boolean standalone, String inputEncoding)
Required by DOM Level 3 to report document parameters

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, xmlDecl

Constructor Details

Backdoor

protected Backdoor(DomConsumer consumer)
            throws SAXException
Constructor. DomDocument class (or a subclass) for constructing DOM trees

Parameters:
consumer - must have been initialized to use the

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


xmlDecl

public void xmlDecl(String version,
                    String encoding,
                    boolean standalone,
                    String inputEncoding)
            throws SAXException
Required by DOM Level 3 to report document parameters
Specified by:
xmlDecl in interface ContentHandler2
Overrides:
xmlDecl in interface DomConsumer.Handler