Class EntityDecl
java.lang.Object
org.codehaus.stax2.ri.evt.BaseEventImpl
com.ctc.wstx.evt.WEntityDeclaration
com.ctc.wstx.ent.EntityDecl
- All Implemented Interfaces:
EntityDeclaration, XMLEvent, XMLStreamConstants, org.codehaus.stax2.evt.XMLEvent2
Abstract base class for various entity declarations DTD reader
has parsed from DTD subsets.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final URLContext that is to be used to resolve references encountered from expanded contents of this entity.protected booleanFlag that can be set to indicate that the declaration was in the external DTD subset.(package private) final StringName/id of the entity used to reference it.Fields inherited from class org.codehaus.stax2.ri.evt.BaseEventImpl
mLocationFields inherited from interface XMLStreamConstants
ATTRIBUTE, CDATA, CHARACTERS, COMMENT, DTD, END_DOCUMENT, END_ELEMENT, ENTITY_DECLARATION, ENTITY_REFERENCE, NAMESPACE, NOTATION_DECLARATION, PROCESSING_INSTRUCTION, SPACE, START_DOCUMENT, START_ELEMENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract WstxInputSourceexpand(WstxInputSource parent, XMLResolver res, ReaderConfig cfg, int xmlVersion) Method called to create the new input source through which expansion value of the entity can be read.final Stringfinal StringgetName()abstract Stringabstract Stringabstract char[]abstract Stringabstract intfinal intabstract Stringabstract booleanabstract booleanisParsed()voidbooleanabstract voidMethods inherited from class WEntityDeclaration
equals, getEventType, hashCode, writeAsEncodedUnicode, writeUsingMethods inherited from class org.codehaus.stax2.ri.evt.BaseEventImpl
addHash, asCharacters, asEndElement, asStartElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement, iteratedEquals, stringsWithNullsEqual, throwFromIOE, toStringMethods inherited from interface XMLEvent
asCharacters, asEndElement, asStartElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement
-
Field Details
-
mName
Name/id of the entity used to reference it. -
mContext
Context that is to be used to resolve references encountered from expanded contents of this entity. -
mDeclaredExternally
protected boolean mDeclaredExternallyFlag that can be set to indicate that the declaration was in the external DTD subset. Default is false.
-
-
Constructor Details
-
EntityDecl
-
-
Method Details
-
markAsExternallyDeclared
public void markAsExternallyDeclared() -
getBaseURI
- Specified by:
getBaseURIin interfaceEntityDeclaration- Specified by:
getBaseURIin classWEntityDeclaration
-
getName
- Specified by:
getNamein interfaceEntityDeclaration- Specified by:
getNamein classWEntityDeclaration
-
getNotationName
- Specified by:
getNotationNamein interfaceEntityDeclaration- Specified by:
getNotationNamein classWEntityDeclaration
-
getPublicId
- Specified by:
getPublicIdin interfaceEntityDeclaration- Specified by:
getPublicIdin classWEntityDeclaration
-
getReplacementText
- Specified by:
getReplacementTextin interfaceEntityDeclaration- Specified by:
getReplacementTextin classWEntityDeclaration
-
getReplacementText
- Throws:
IOException
-
getSystemId
- Specified by:
getSystemIdin interfaceEntityDeclaration- Specified by:
getSystemIdin classWEntityDeclaration
-
wasDeclaredExternally
public boolean wasDeclaredExternally()- Returns:
- True, if the declaration occured in the external DTD subset; false if not (internal subset, custom declaration)
-
writeEnc
- Specified by:
writeEncin classWEntityDeclaration- Throws:
IOException
-
getReplacementChars
public abstract char[] getReplacementChars() -
getReplacementTextLength
public final int getReplacementTextLength() -
isExternal
public abstract boolean isExternal() -
isParsed
public abstract boolean isParsed() -
expand
public abstract WstxInputSource expand(WstxInputSource parent, XMLResolver res, ReaderConfig cfg, int xmlVersion) throws IOException, XMLStreamException Method called to create the new input source through which expansion value of the entity can be read.- Throws:
IOExceptionXMLStreamException
-