|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the interface used for entity management. This interface is typically implemented by the "parser" class to provide entity management services for the scanner classes.
Inner Class Summary | |
static interface |
XMLEntityHandler.CharBuffer
This interface is used to store and retrieve character sequences. |
static interface |
XMLEntityHandler.EntityReader
This is the interface for scanners to process input data from entities without needing to know the details of the underlying storage of those entities, or their encodings. |
Field Summary | |
static int |
ATTVALUE_RESULT_COMPLEX
Special return values for scanAttValue method. |
static int |
ATTVALUE_RESULT_INVALID_CHAR
Special return values for scanAttValue method. |
static int |
ATTVALUE_RESULT_LESSTHAN
Special return values for scanAttValue method. |
static int |
CHARREF_RESULT_INVALID_CHAR
Special return values for scanCharRef method. |
static int |
CHARREF_RESULT_OUT_OF_RANGE
Special return values for scanCharRef method. |
static int |
CHARREF_RESULT_SEMICOLON_REQUIRED
Special return values for scanCharRef method. |
static int |
CONTENT_RESULT_END_OF_CDSECT
Return values for the scanContent method. |
static int |
CONTENT_RESULT_INVALID_CHAR
Return values for the scanContent method. |
static int |
CONTENT_RESULT_MARKUP_END_OF_INPUT
Return values for the scanContent method. |
static int |
CONTENT_RESULT_MARKUP_NOT_RECOGNIZED
Return values for the scanContent method. |
static int |
CONTENT_RESULT_MATCHING_ETAG
Return values for the scanContent method. |
static int |
CONTENT_RESULT_REFERENCE_END_OF_INPUT
Return values for the scanContent method. |
static int |
CONTENT_RESULT_START_OF_CDSECT
Return values for the scanContent method. |
static int |
CONTENT_RESULT_START_OF_CHARREF
Return values for the scanContent method. |
static int |
CONTENT_RESULT_START_OF_COMMENT
Return values for the scanContent method. |
static int |
CONTENT_RESULT_START_OF_ELEMENT
Return values for the scanContent method. |
static int |
CONTENT_RESULT_START_OF_ENTITYREF
Return values for the scanContent method. |
static int |
CONTENT_RESULT_START_OF_ETAG
Return values for the scanContent method. |
static int |
CONTENT_RESULT_START_OF_PI
Return values for the scanContent method. |
static int |
CONTEXT_DOCUMENT
This is an enumeration of all the defined contexts in which an entity reference may appear. |
static int |
CONTEXT_EXTERNAL_SUBSET
This is an enumeration of all the defined contexts in which an entity reference may appear. |
static int |
CONTEXT_IN_ATTVALUE
This is an enumeration of all the defined contexts in which an entity reference may appear. |
static int |
CONTEXT_IN_CONTENT
This is an enumeration of all the defined contexts in which an entity reference may appear. |
static int |
CONTEXT_IN_DEFAULTATTVALUE
This is an enumeration of all the defined contexts in which an entity reference may appear. |
static int |
CONTEXT_IN_DTD_AS_MARKUP
This is an enumeration of all the defined contexts in which an entity reference may appear. |
static int |
CONTEXT_IN_DTD_WITHIN_MARKUP
This is an enumeration of all the defined contexts in which an entity reference may appear. |
static int |
CONTEXT_IN_ENTITYVALUE
This is an enumeration of all the defined contexts in which an entity reference may appear. |
static int |
ENTITYTYPE_DOCUMENT
This is an enumeration of all the defined entity types. |
static int |
ENTITYTYPE_EXTERNAL
This is an enumeration of all the defined entity types. |
static int |
ENTITYTYPE_EXTERNAL_PE
This is an enumeration of all the defined entity types. |
static int |
ENTITYTYPE_EXTERNAL_SUBSET
This is an enumeration of all the defined entity types. |
static int |
ENTITYTYPE_INTERNAL
This is an enumeration of all the defined entity types. |
static int |
ENTITYTYPE_INTERNAL_PE
This is an enumeration of all the defined entity types. |
static int |
ENTITYTYPE_UNPARSED
This is an enumeration of all the defined entity types. |
static int |
ENTITYVALUE_RESULT_END_OF_INPUT
Special return values for scanEntityValue method. |
static int |
ENTITYVALUE_RESULT_FINISHED
Special return values for scanEntityValue method. |
static int |
ENTITYVALUE_RESULT_INVALID_CHAR
Special return values for scanEntityValue method. |
static int |
ENTITYVALUE_RESULT_PEREF
Special return values for scanEntityValue method. |
static int |
ENTITYVALUE_RESULT_REFERENCE
Special return values for scanEntityValue method. |
static int |
STRINGLIT_RESULT_INVALID_CHAR
Special return values for scanStringLiteral method. |
static int |
STRINGLIT_RESULT_QUOTE_REQUIRED
Special return values for scanStringLiteral method. |
Method Summary | |
XMLEntityHandler.EntityReader |
changeReaders()
This method is called by the reader subclasses at the end of input. |
void |
endEntityDecl()
End the scope of an entity declaration. |
java.lang.String |
expandSystemId(java.lang.String systemId)
Expand the system identifier relative to the entity that we are processing. |
XMLEntityHandler.EntityReader |
getEntityReader()
Return the current reader. |
java.lang.String |
getPublicId()
Return the public identifier of the entity that we are processing. |
int |
getReaderDepth()
Return the depth set for the current reader. |
int |
getReaderId()
Return a unique identifier for the current reader. |
java.lang.String |
getSystemId()
Return the system identifier of the entity that we are processing. |
void |
processCharacters(char[] chars,
int offset,
int length)
Process character data, character array version |
void |
processCharacters(int stringHandle)
Process character data, StringPool handle version |
void |
processWhitespace(char[] chars,
int offset,
int length)
Process white space data, character array version |
void |
processWhitespace(int stringHandle)
Process white space data, StringPool handle version |
void |
setReaderDepth(int depth)
Set the depth for the current reader. |
boolean |
startEntityDecl(boolean isPE,
int entityName)
Start the scope of an entity declaration. |
boolean |
startReadingFromDocument(InputSource source)
Start reading from source. |
boolean |
startReadingFromEntity(int entityName,
int readerDepth,
int context)
Start reading from this entity. |
void |
startReadingFromExternalSubset(java.lang.String publicId,
java.lang.String systemId,
int readerDepth)
Start reading from the external subset of the DTD. |
void |
stopReadingFromExternalSubset()
Finished reading from the external subset of the DTD. |
Field Detail |
public static final int CHARREF_RESULT_SEMICOLON_REQUIRED
public static final int CHARREF_RESULT_INVALID_CHAR
public static final int CHARREF_RESULT_OUT_OF_RANGE
public static final int STRINGLIT_RESULT_QUOTE_REQUIRED
public static final int STRINGLIT_RESULT_INVALID_CHAR
public static final int ATTVALUE_RESULT_COMPLEX
public static final int ATTVALUE_RESULT_LESSTHAN
public static final int ATTVALUE_RESULT_INVALID_CHAR
public static final int ENTITYVALUE_RESULT_FINISHED
public static final int ENTITYVALUE_RESULT_REFERENCE
public static final int ENTITYVALUE_RESULT_PEREF
public static final int ENTITYVALUE_RESULT_INVALID_CHAR
public static final int ENTITYVALUE_RESULT_END_OF_INPUT
public static final int CONTENT_RESULT_START_OF_PI
public static final int CONTENT_RESULT_START_OF_COMMENT
public static final int CONTENT_RESULT_START_OF_CDSECT
public static final int CONTENT_RESULT_END_OF_CDSECT
public static final int CONTENT_RESULT_START_OF_ETAG
public static final int CONTENT_RESULT_MATCHING_ETAG
public static final int CONTENT_RESULT_START_OF_ELEMENT
public static final int CONTENT_RESULT_START_OF_CHARREF
public static final int CONTENT_RESULT_START_OF_ENTITYREF
public static final int CONTENT_RESULT_INVALID_CHAR
public static final int CONTENT_RESULT_MARKUP_NOT_RECOGNIZED
public static final int CONTENT_RESULT_MARKUP_END_OF_INPUT
public static final int CONTENT_RESULT_REFERENCE_END_OF_INPUT
public static final int ENTITYTYPE_INTERNAL_PE
public static final int ENTITYTYPE_EXTERNAL_PE
public static final int ENTITYTYPE_INTERNAL
public static final int ENTITYTYPE_EXTERNAL
public static final int ENTITYTYPE_UNPARSED
public static final int ENTITYTYPE_DOCUMENT
public static final int ENTITYTYPE_EXTERNAL_SUBSET
public static final int CONTEXT_IN_ATTVALUE
startReadingFromEntity(int, int, int)
public static final int CONTEXT_IN_DEFAULTATTVALUE
startReadingFromEntity(int, int, int)
public static final int CONTEXT_IN_CONTENT
startReadingFromEntity(int, int, int)
public static final int CONTEXT_IN_DTD_AS_MARKUP
startReadingFromEntity(int, int, int)
public static final int CONTEXT_IN_ENTITYVALUE
startReadingFromEntity(int, int, int)
public static final int CONTEXT_IN_DTD_WITHIN_MARKUP
startReadingFromEntity(int, int, int)
public static final int CONTEXT_DOCUMENT
startReadingFromEntity(int, int, int)
public static final int CONTEXT_EXTERNAL_SUBSET
startReadingFromEntity(int, int, int)
Method Detail |
public boolean startReadingFromDocument(InputSource source) throws java.lang.Exception
source
- The input source for the document to process.true
if we were able to open the document source;
false
otherwise.public boolean startReadingFromEntity(int entityName, int readerDepth, int context) throws java.lang.Exception
entityName
- 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 CONTEXT_IN_*.true
if the entity might start with a TextDecl;
false
otherwise.public void startReadingFromExternalSubset(java.lang.String publicId, java.lang.String systemId, int readerDepth) throws java.lang.Exception
publicId
- 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.public void stopReadingFromExternalSubset() throws java.lang.Exception
public boolean startEntityDecl(boolean isPE, int entityName) throws java.lang.Exception
true
on success; otherwise
false
if the entity declaration is recursive.public void endEntityDecl() throws java.lang.Exception
public java.lang.String getPublicId()
public java.lang.String getSystemId()
public java.lang.String expandSystemId(java.lang.String systemId)
public void processCharacters(char[] chars, int offset, int length) throws java.lang.Exception
chars
- character buffer to be processedoffset
- offset in buffer where the data startslength
- length of characters to be processedpublic void processCharacters(int stringHandle) throws java.lang.Exception
StringPool
handle versionstringHandle
- StringPool
handle to the character datapublic void processWhitespace(char[] chars, int offset, int length) throws java.lang.Exception
chars
- character buffer to be processedoffset
- offset in buffer where the data startslength
- length of whitespace to be processedpublic void processWhitespace(int stringHandle) throws java.lang.Exception
StringPool
handle versionstringHandle
- StringPool
handle to the whitespacepublic int getReaderId()
public void setReaderDepth(int depth)
public int getReaderDepth()
public XMLEntityHandler.EntityReader getEntityReader()
public XMLEntityHandler.EntityReader changeReaders() throws java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |