Package com.ctc.wstx.ent
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,XMLEvent2
public abstract class EntityDecl extends WEntityDeclaration
Abstract base class for various entity declarations DTD reader has parsed from DTD subsets.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanmDeclaredExternallyFlag that can be set to indicate that the declaration was in the external DTD subset.-
Fields inherited from class org.codehaus.stax2.ri.evt.BaseEventImpl
mLocation
-
Fields inherited from interface javax.xml.stream.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 Constructor Description EntityDecl(Location loc, String name, URL ctxt)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract 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.StringgetBaseURI()StringgetName()abstract StringgetNotationName()abstract StringgetPublicId()abstract char[]getReplacementChars()abstract StringgetReplacementText()abstract intgetReplacementText(Writer w)intgetReplacementTextLength()abstract StringgetSystemId()abstract booleanisExternal()abstract booleanisParsed()voidmarkAsExternallyDeclared()booleanwasDeclaredExternally()abstract voidwriteEnc(Writer w)-
Methods inherited from class com.ctc.wstx.evt.WEntityDeclaration
equals, getEventType, hashCode, writeAsEncodedUnicode, writeUsing
-
Methods 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, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.xml.stream.events.XMLEvent
asCharacters, asEndElement, asStartElement, getLocation, getSchemaType, isAttribute, isCharacters, isEndDocument, isEndElement, isEntityReference, isNamespace, isProcessingInstruction, isStartDocument, isStartElement
-
-
-
-
Method Detail
-
markAsExternallyDeclared
public void markAsExternallyDeclared()
-
getBaseURI
public final String getBaseURI()
- Specified by:
getBaseURIin interfaceEntityDeclaration- Specified by:
getBaseURIin classWEntityDeclaration
-
getName
public final String getName()
- Specified by:
getNamein interfaceEntityDeclaration- Specified by:
getNamein classWEntityDeclaration
-
getNotationName
public abstract String getNotationName()
- Specified by:
getNotationNamein interfaceEntityDeclaration- Specified by:
getNotationNamein classWEntityDeclaration
-
getPublicId
public abstract String getPublicId()
- Specified by:
getPublicIdin interfaceEntityDeclaration- Specified by:
getPublicIdin classWEntityDeclaration
-
getReplacementText
public abstract String getReplacementText()
- Specified by:
getReplacementTextin interfaceEntityDeclaration- Specified by:
getReplacementTextin classWEntityDeclaration
-
getReplacementText
public abstract int getReplacementText(Writer w) throws IOException
- Throws:
IOException
-
getSystemId
public abstract String 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
public abstract void writeEnc(Writer w) throws IOException
- 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
-
-