|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.apache.xerces.readers.DefaultEntityHandler
Default entity handler implementation.
| Inner Class Summary | |
|---|---|
class |
DefaultEntityHandler.EntityPool
|
static interface |
DefaultEntityHandler.EventHandler
|
| Inner classes inherited from class org.apache.xerces.readers.XMLEntityHandler |
|---|
XMLEntityHandler.CharBuffer, XMLEntityHandler.CharDataHandler, XMLEntityHandler.DTDHandler, XMLEntityHandler.EntityReader |
| Field Summary | |
|---|---|
protected XMLEntityReaderFactory |
fReaderFactory
|
| Constructor Summary | |
|---|---|
DefaultEntityHandler(StringPool stringPool,
XMLErrorReporter errorReporter)
|
|
| Method Summary | |
|---|---|
int |
addExternalEntityDecl(int name,
int publicId,
int systemId,
boolean isExternal)
|
int |
addExternalPEDecl(int name,
int publicId,
int systemId,
boolean isExternal)
|
int |
addInternalEntityDecl(int name,
int value,
boolean isExternal)
|
int |
addInternalPEDecl(int name,
int value,
boolean isExternal)
Declare entities and notations. |
int |
addNotationDecl(int notationName,
int publicId,
int systemId,
boolean isExternal)
|
void |
addRecognizer(XMLDeclRecognizer recognizer)
Adds a recognizer. |
void |
addRequiredNotation(int notationName,
Locator locator,
int majorCode,
int minorCode,
java.lang.Object[] args)
Remember a required but undeclared notation. |
int |
addUnparsedEntityDecl(int name,
int publicId,
int systemId,
int notationName,
boolean isExternal)
|
XMLEntityHandler.EntityReader |
changeReaders()
This method is called by the reader subclasses at the end of input, and also by the scanner directly to force a reader change during error recovery. |
void |
checkRequiredNotations()
Check required but undeclared notations. |
void |
endEntityDecl()
end an entity declaration |
java.lang.String |
expandSystemId(java.lang.String systemId)
Expands a system id and returns the system id as a URI, if it can be expanded. |
boolean |
externalReferenceInContent(int entityHandle)
|
boolean |
getAllowJavaEncodings()
|
XMLEntityHandler.CharDataHandler |
getCharDataHandler()
Get the character data handler. |
int |
getColumnNumber()
Return the column number of the current position within the document that we are processing. |
XMLEntityHandler.EntityReader |
getEntityReader()
get the Entity reader. |
EntityResolver |
getEntityResolver()
Gets the resolver used to resolve external entities. |
protected int |
getEntityValue(int entityHandle)
|
int |
getLineNumber()
Return the line number of the current position within the document that we are processing. |
protected int |
getParameterEntityValue(int peIndex)
|
java.lang.String |
getPublicId()
Return the public identifier of the InputSource that we are processing. |
protected java.lang.String |
getPublicIdOfEntity(int entityHandle)
|
protected java.lang.String |
getPublicIdOfParameterEntity(int peIndex)
|
int |
getReaderDepth()
This method is provided for scanner implementations. |
int |
getReaderId()
This method is provided for scanner implementations. |
java.lang.String |
getSystemId()
Return the system identifier of the InputSource that we are processing. |
protected java.lang.String |
getSystemIdOfEntity(int entityHandle)
|
protected java.lang.String |
getSystemIdOfParameterEntity(int peIndex)
|
protected boolean |
isExternalEntity(int entityHandle)
|
protected boolean |
isExternalParameterEntity(int peIndex)
|
boolean |
isNotationDeclared(int notationName)
Check for declared notation. |
boolean |
isUnparsedEntity(int entityName)
Check for unparsed entity. |
protected int |
lookupEntity(int entityNameIndex)
|
protected int |
lookupParameterEntity(int peName)
|
void |
reset(StringPool stringPool)
Reset the entity handler. |
void |
setAllowJavaEncodings(boolean flag)
|
void |
setCharDataHandler(XMLEntityHandler.CharDataHandler charDataHandler)
Set the character data handler. |
void |
setEntityResolver(EntityResolver resolver)
Sets the resolver used to resolve external entities. |
void |
setEventHandler(DefaultEntityHandler.EventHandler eventHandler)
|
void |
setReaderDepth(int depth)
This method is provided for scanner implementations. |
void |
setReaderFactory(XMLEntityReaderFactory readerFactory)
Set the reader factory. |
void |
setSendCharDataAsCharArray(boolean flag)
Set char data processing preference. |
boolean |
startEntityDecl(boolean isPE,
int entityName)
start an entity declaration |
boolean |
startReadingFromDocument(InputSource source)
Start reading document from an InputSource. |
boolean |
startReadingFromEntity(int entityName,
int readerDepth,
int context)
start reading from an external entity |
void |
startReadingFromExternalSubset(java.lang.String publicId,
java.lang.String systemId,
int readerDepth)
start reading from an external DTD subset |
void |
stopReadingFromExternalSubset()
stop reading from an external DTD subset |
protected int |
valueOfReferenceInAttValue(int entityHandle)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected XMLEntityReaderFactory fReaderFactory
| Constructor Detail |
public DefaultEntityHandler(StringPool stringPool,
XMLErrorReporter errorReporter)
| Method Detail |
public void setEventHandler(DefaultEntityHandler.EventHandler eventHandler)
public void setCharDataHandler(XMLEntityHandler.CharDataHandler charDataHandler)
XMLEntityHandlersetCharDataHandler in interface XMLEntityHandlerpublic XMLEntityHandler.CharDataHandler getCharDataHandler()
XMLEntityHandlergetCharDataHandler in interface XMLEntityHandlerpublic void setSendCharDataAsCharArray(boolean flag)
public void setReaderFactory(XMLEntityReaderFactory readerFactory)
public void reset(StringPool stringPool)
public void setAllowJavaEncodings(boolean flag)
public boolean getAllowJavaEncodings()
public int addInternalPEDecl(int name,
int value,
boolean isExternal)
throws java.lang.Exception
XMLEntityHandler.DTDHandleraddInternalPEDecl in interface XMLEntityHandler.DTDHandler
public int addExternalPEDecl(int name,
int publicId,
int systemId,
boolean isExternal)
throws java.lang.Exception
addExternalPEDecl in interface XMLEntityHandler.DTDHandler
public int addInternalEntityDecl(int name,
int value,
boolean isExternal)
throws java.lang.Exception
addInternalEntityDecl in interface XMLEntityHandler.DTDHandler
public int addExternalEntityDecl(int name,
int publicId,
int systemId,
boolean isExternal)
throws java.lang.Exception
addExternalEntityDecl in interface XMLEntityHandler.DTDHandler
public int addUnparsedEntityDecl(int name,
int publicId,
int systemId,
int notationName,
boolean isExternal)
throws java.lang.Exception
addUnparsedEntityDecl in interface XMLEntityHandler.DTDHandler
public int addNotationDecl(int notationName,
int publicId,
int systemId,
boolean isExternal)
throws java.lang.Exception
addNotationDecl in interface XMLEntityHandler.DTDHandlerpublic boolean isUnparsedEntity(int entityName)
XMLEntityHandler.DTDHandlerisUnparsedEntity in interface XMLEntityHandler.DTDHandlerorg.apache.xerces.readers.XMLEntityHandler.DTDHandlerentityName - The string handle for the entity name.true if entityName is an unparsed entity; otherwise
false if entityName is not declared or not an unparsed entity.public boolean isNotationDeclared(int notationName)
XMLEntityHandler.DTDHandlerisNotationDeclared in interface XMLEntityHandler.DTDHandlerorg.apache.xerces.readers.XMLEntityHandler.DTDHandlernotationName - The string handle for the notation name.true if notationName is a declared notation; otherwise
false if notationName is not declared.
public void addRequiredNotation(int notationName,
Locator locator,
int majorCode,
int minorCode,
java.lang.Object[] args)
XMLEntityHandler.DTDHandleraddRequiredNotation in interface XMLEntityHandler.DTDHandler
public void checkRequiredNotations()
throws java.lang.Exception
XMLEntityHandler.DTDHandlercheckRequiredNotations in interface XMLEntityHandler.DTDHandlerprotected int lookupEntity(int entityNameIndex)
public boolean externalReferenceInContent(int entityHandle)
throws java.lang.Exception
protected int valueOfReferenceInAttValue(int entityHandle)
throws java.lang.Exception
protected boolean isExternalEntity(int entityHandle)
protected int getEntityValue(int entityHandle)
protected java.lang.String getPublicIdOfEntity(int entityHandle)
protected java.lang.String getSystemIdOfEntity(int entityHandle)
protected int lookupParameterEntity(int peName)
throws java.lang.Exception
protected boolean isExternalParameterEntity(int peIndex)
protected int getParameterEntityValue(int peIndex)
protected java.lang.String getPublicIdOfParameterEntity(int peIndex)
protected java.lang.String getSystemIdOfParameterEntity(int peIndex)
public XMLEntityHandler.EntityReader getEntityReader()
getEntityReader in interface XMLEntityHandlerpublic void addRecognizer(XMLDeclRecognizer recognizer)
recognizer - The XML recognizer to add.public void setEntityResolver(EntityResolver resolver)
resolver - The new entity resolver. Passing a null value will
uninstall the currently installed resolver.public EntityResolver getEntityResolver()
public java.lang.String expandSystemId(java.lang.String systemId)
expandSystemId in interface XMLEntityHandlersystemId - The systemId to be expanded.
public boolean startReadingFromDocument(InputSource source)
throws java.lang.Exception
XMLEntityHandlerstartReadingFromDocument in interface XMLEntityHandlerorg.apache.xerces.readers.XMLEntityHandlersource - The input source for the document to process.true if we were able to open the document source;
false otherwise.java.lang.Exception -
public void startReadingFromExternalSubset(java.lang.String publicId,
java.lang.String systemId,
int readerDepth)
throws java.lang.Exception
startReadingFromExternalSubset in interface XMLEntityHandler.DTDHandlerorg.apache.xerces.readers.XMLEntityHandler.DTDHandlerpublicId - The public identifier for the external subset.systemId - The system identifier for the external subset.readerDepth - The depth to associate with the reader for the external subset.java.lang.Exception -
public void stopReadingFromExternalSubset()
throws java.lang.Exception
stopReadingFromExternalSubset in interface XMLEntityHandler.DTDHandlerorg.apache.xerces.readers.XMLEntityHandler.DTDHandlerjava.lang.Exception -
public boolean startReadingFromEntity(int entityName,
int readerDepth,
int context)
throws java.lang.Exception
startReadingFromEntity in interface XMLEntityHandlerorg.apache.xerces.readers.XMLEntityHandlerentityName - The entity name handle in the string pool.readerDepth - The depth to associate with the reader for this entity.context - The context of the entity reference; see ENTITYREF_IN_*.true if the entity might start with a TextDecl;
false otherwise.java.lang.Exception -
public boolean startEntityDecl(boolean isPE,
int entityName)
throws java.lang.Exception
startEntityDecl in interface XMLEntityHandler.DTDHandlerorg.apache.xerces.readers.XMLEntityHandler.DTDHandlertrue on success; otherwise
false if the entity declaration is recursive.java.lang.Exception -
public void endEntityDecl()
throws java.lang.Exception
endEntityDecl in interface XMLEntityHandler.DTDHandlerorg.apache.xerces.readers.XMLEntityHandler.DTDHandlerjava.lang.Exception - public int getReaderId()
getReaderId in interface XMLEntityHandlerpublic void setReaderDepth(int depth)
setReaderDepth in interface XMLEntityHandlerpublic int getReaderDepth()
getReaderDepth in interface XMLEntityHandlerpublic java.lang.String getPublicId()
InputSource that we are processing.getPublicId in interface Locatorpublic java.lang.String getSystemId()
InputSource that we are processing.getSystemId in interface Locatorpublic int getLineNumber()
getLineNumber in interface Locatorpublic int getColumnNumber()
getColumnNumber in interface Locator
public XMLEntityHandler.EntityReader changeReaders()
throws java.lang.Exception
changeReaders in interface XMLEntityHandlerorg.apache.xerces.readers.XMLEntityHandlerjava.lang.Exception -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||