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 Object implements Dispatcher
reference implementation of Dispatcher interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
DispatcherImpl.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.Context
contextStack
protected Locator
documentLocator
protected ErrorHandler
errorHandler
protected Vector
notationDecls
protected NamespaceSupport
nsMap
protected SchemaProvider
schema
Dispatcher will consult this object about schema informationprotected org.iso_relax.dispatcher.impl.DispatcherImpl.Transponder
transponder
this object passes SAX events to IslandVerifier.protected Vector
unparsedEntityDecls
-
Constructor Summary
Constructors Constructor Description DispatcherImpl(SchemaProvider schema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attachXMLReader(XMLReader reader)
configure XMLReader to use this Dispatcher as a ContentHandler.int
countNotationDecls()
counts notation declarations found in this XML instance.int
countUnparsedEntityDecls()
counts unparsed entities found in this XML instance.ErrorHandler
getErrorHandler()
gets ErrorHandler to which IslandVerifier reports validation errors.Dispatcher.NotationDecl
getNotationDecl(int index)
gets ith notation declaration found in this XML instance.SchemaProvider
getSchemaProvider()
get ShcmeaProvider object which is attached to this Dispatcher.Dispatcher.UnparsedEntityDecl
getUnparsedEntityDecl(int index)
gets ith unparsed entity found in this XML instance.void
setErrorHandler(ErrorHandler handler)
sets application-implemented ErrorHandler, which will receive all validation errors.void
switchVerifier(IslandVerifier newVerifier)
switches to the child IslandVerifier.
-
-
-
Field Detail
-
documentLocator
protected Locator documentLocator
-
nsMap
protected final NamespaceSupport nsMap
-
errorHandler
protected 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 Vector unparsedEntityDecls
-
notationDecls
protected final Vector notationDecls
-
-
Constructor Detail
-
DispatcherImpl
public DispatcherImpl(SchemaProvider schema)
-
-
Method Detail
-
getSchemaProvider
public SchemaProvider getSchemaProvider()
Description copied from interface:Dispatcher
get ShcmeaProvider object which is attached to this Dispatcher.- Specified by:
getSchemaProvider
in interfaceDispatcher
-
attachXMLReader
public void attachXMLReader(XMLReader reader)
Description copied from interface:Dispatcher
configure XMLReader to use this Dispatcher as a ContentHandler.- Specified by:
attachXMLReader
in interfaceDispatcher
-
switchVerifier
public void switchVerifier(IslandVerifier newVerifier) throws SAXException
Description copied from interface:Dispatcher
switches to the child IslandVerifier. this method can only be called during startElement method.- Specified by:
switchVerifier
in interfaceDispatcher
- Throws:
SAXException
-
setErrorHandler
public void setErrorHandler(ErrorHandler handler)
Description copied from interface:Dispatcher
sets application-implemented ErrorHandler, which will receive all validation errors.- Specified by:
setErrorHandler
in interfaceDispatcher
-
getErrorHandler
public ErrorHandler getErrorHandler()
Description copied from interface:Dispatcher
gets 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:
getErrorHandler
in interfaceDispatcher
-
countUnparsedEntityDecls
public int countUnparsedEntityDecls()
Description copied from interface:Dispatcher
counts unparsed entities found in this XML instance.- Specified by:
countUnparsedEntityDecls
in interfaceDispatcher
-
getUnparsedEntityDecl
public Dispatcher.UnparsedEntityDecl getUnparsedEntityDecl(int index)
Description copied from interface:Dispatcher
gets 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:
getUnparsedEntityDecl
in interfaceDispatcher
-
countNotationDecls
public int countNotationDecls()
Description copied from interface:Dispatcher
counts notation declarations found in this XML instance.- Specified by:
countNotationDecls
in interfaceDispatcher
-
getNotationDecl
public Dispatcher.NotationDecl getNotationDecl(int index)
Description copied from interface:Dispatcher
gets 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:
getNotationDecl
in interfaceDispatcher
-
-