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:
javax.xml.stream.events.EntityDeclaration,javax.xml.stream.events.XMLEvent,javax.xml.stream.XMLStreamConstants,org.codehaus.stax2.evt.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 (package private) java.net.URLmContextContext that is to be used to resolve references encountered from expanded contents of this entity.protected booleanmDeclaredExternallyFlag that can be set to indicate that the declaration was in the external DTD subset.(package private) java.lang.StringmNameName/id of the entity used to reference it.
-
Constructor Summary
Constructors Constructor Description EntityDecl(javax.xml.stream.Location loc, java.lang.String name, java.net.URL ctxt)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract WstxInputSourceexpand(WstxInputSource parent, javax.xml.stream.XMLResolver res, ReaderConfig cfg, int xmlVersion)Method called to create the new input source through which expansion value of the entity can be read.java.lang.StringgetBaseURI()java.lang.StringgetName()abstract java.lang.StringgetNotationName()abstract java.lang.StringgetPublicId()abstract char[]getReplacementChars()abstract java.lang.StringgetReplacementText()abstract intgetReplacementText(java.io.Writer w)intgetReplacementTextLength()abstract java.lang.StringgetSystemId()abstract booleanisExternal()abstract booleanisParsed()voidmarkAsExternallyDeclared()booleanwasDeclaredExternally()abstract voidwriteEnc(java.io.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
-
-
-
-
Field Detail
-
mName
final java.lang.String mName
Name/id of the entity used to reference it.
-
mContext
final java.net.URL mContext
Context that is to be used to resolve references encountered from expanded contents of this entity.
-
mDeclaredExternally
protected boolean mDeclaredExternally
Flag that can be set to indicate that the declaration was in the external DTD subset. Default is false.
-
-
Method Detail
-
markAsExternallyDeclared
public void markAsExternallyDeclared()
-
getBaseURI
public final java.lang.String getBaseURI()
- Specified by:
getBaseURIin interfacejavax.xml.stream.events.EntityDeclaration- Specified by:
getBaseURIin classWEntityDeclaration
-
getName
public final java.lang.String getName()
- Specified by:
getNamein interfacejavax.xml.stream.events.EntityDeclaration- Specified by:
getNamein classWEntityDeclaration
-
getNotationName
public abstract java.lang.String getNotationName()
- Specified by:
getNotationNamein interfacejavax.xml.stream.events.EntityDeclaration- Specified by:
getNotationNamein classWEntityDeclaration
-
getPublicId
public abstract java.lang.String getPublicId()
- Specified by:
getPublicIdin interfacejavax.xml.stream.events.EntityDeclaration- Specified by:
getPublicIdin classWEntityDeclaration
-
getReplacementText
public abstract java.lang.String getReplacementText()
- Specified by:
getReplacementTextin interfacejavax.xml.stream.events.EntityDeclaration- Specified by:
getReplacementTextin classWEntityDeclaration
-
getReplacementText
public abstract int getReplacementText(java.io.Writer w) throws java.io.IOException- Throws:
java.io.IOException
-
getSystemId
public abstract java.lang.String getSystemId()
- Specified by:
getSystemIdin interfacejavax.xml.stream.events.EntityDeclaration- 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(java.io.Writer w) throws java.io.IOException- Specified by:
writeEncin classWEntityDeclaration- Throws:
java.io.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, javax.xml.stream.XMLResolver res, ReaderConfig cfg, int xmlVersion) throws java.io.IOException, javax.xml.stream.XMLStreamException
Method called to create the new input source through which expansion value of the entity can be read.- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
-