Package org.iso_relax.dispatcher.impl
Class DispatcherImpl
- java.lang.Object
-
- org.iso_relax.dispatcher.impl.DispatcherImpl
-
- All Implemented Interfaces:
Dispatcher
public class DispatcherImpl extends java.lang.Object implements Dispatcher
reference implementation of Dispatcher interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classDispatcherImpl.Context-
Nested classes/interfaces inherited from interface org.iso_relax.dispatcher.Dispatcher
Dispatcher.NotationDecl, Dispatcher.UnparsedEntityDecl
-
-
Field Summary
Fields Modifier and Type Field Description protected DispatcherImpl.ContextcontextStackprotected org.xml.sax.LocatordocumentLocatorprotected org.xml.sax.ErrorHandlererrorHandlerprotected java.util.VectornotationDeclsprotected org.xml.sax.helpers.NamespaceSupportnsMapprotected SchemaProviderschemaDispatcher will consult this object about schema informationprotected org.iso_relax.dispatcher.impl.DispatcherImpl.Transpondertransponderthis object passes SAX events to IslandVerifier.protected java.util.VectorunparsedEntityDecls
-
Constructor Summary
Constructors Constructor Description DispatcherImpl(SchemaProvider schema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattachXMLReader(org.xml.sax.XMLReader reader)configure XMLReader to use this Dispatcher as a ContentHandler.intcountNotationDecls()counts notation declarations found in this XML instance.intcountUnparsedEntityDecls()counts unparsed entities found in this XML instance.org.xml.sax.ErrorHandlergetErrorHandler()gets ErrorHandler to which IslandVerifier reports validation errors.Dispatcher.NotationDeclgetNotationDecl(int index)gets ith notation declaration found in this XML instance.SchemaProvidergetSchemaProvider()get ShcmeaProvider object which is attached to this Dispatcher.Dispatcher.UnparsedEntityDeclgetUnparsedEntityDecl(int index)gets ith unparsed entity found in this XML instance.voidsetErrorHandler(org.xml.sax.ErrorHandler handler)sets application-implemented ErrorHandler, which will receive all validation errors.voidswitchVerifier(IslandVerifier newVerifier)switches to the child IslandVerifier.
-
-
-
Field Detail
-
documentLocator
protected org.xml.sax.Locator documentLocator
-
nsMap
protected final org.xml.sax.helpers.NamespaceSupport nsMap
-
errorHandler
protected org.xml.sax.ErrorHandler errorHandler
-
schema
protected final SchemaProvider schema
Dispatcher will consult this object about schema information
-
transponder
protected org.iso_relax.dispatcher.impl.DispatcherImpl.Transponder transponder
this object passes SAX events to IslandVerifier.
-
contextStack
protected DispatcherImpl.Context contextStack
-
unparsedEntityDecls
protected final java.util.Vector unparsedEntityDecls
-
notationDecls
protected final java.util.Vector notationDecls
-
-
Constructor Detail
-
DispatcherImpl
public DispatcherImpl(SchemaProvider schema)
-
-
Method Detail
-
getSchemaProvider
public SchemaProvider getSchemaProvider()
Description copied from interface:Dispatcherget ShcmeaProvider object which is attached to this Dispatcher.- Specified by:
getSchemaProviderin interfaceDispatcher
-
attachXMLReader
public void attachXMLReader(org.xml.sax.XMLReader reader)
Description copied from interface:Dispatcherconfigure XMLReader to use this Dispatcher as a ContentHandler.- Specified by:
attachXMLReaderin interfaceDispatcher
-
switchVerifier
public void switchVerifier(IslandVerifier newVerifier) throws org.xml.sax.SAXException
Description copied from interface:Dispatcherswitches to the child IslandVerifier. this method can only be called during startElement method.- Specified by:
switchVerifierin interfaceDispatcher- Throws:
org.xml.sax.SAXException
-
setErrorHandler
public void setErrorHandler(org.xml.sax.ErrorHandler handler)
Description copied from interface:Dispatchersets application-implemented ErrorHandler, which will receive all validation errors.- Specified by:
setErrorHandlerin interfaceDispatcher
-
getErrorHandler
public org.xml.sax.ErrorHandler getErrorHandler()
Description copied from interface:Dispatchergets ErrorHandler to which IslandVerifier reports validation errors. the caller may not assume that this method returns the same object that was passed to setErrorHandler method. this method cannot return null.- Specified by:
getErrorHandlerin interfaceDispatcher
-
countUnparsedEntityDecls
public int countUnparsedEntityDecls()
Description copied from interface:Dispatchercounts unparsed entities found in this XML instance.- Specified by:
countUnparsedEntityDeclsin interfaceDispatcher
-
getUnparsedEntityDecl
public Dispatcher.UnparsedEntityDecl getUnparsedEntityDecl(int index)
Description copied from interface:Dispatchergets ith unparsed entity found in this XML instance. IslandVerifiers can not receive DTDHandler events. Those who need DTD information should call this method.- Specified by:
getUnparsedEntityDeclin interfaceDispatcher
-
countNotationDecls
public int countNotationDecls()
Description copied from interface:Dispatchercounts notation declarations found in this XML instance.- Specified by:
countNotationDeclsin interfaceDispatcher
-
getNotationDecl
public Dispatcher.NotationDecl getNotationDecl(int index)
Description copied from interface:Dispatchergets ith notation declaration found in this XML instance. IslandVerifiers can not receive DTDHandler events. Those who need DTD information should call this method.- Specified by:
getNotationDeclin interfaceDispatcher
-
-