Top Description Fields Constructors Methods
com.ctc.wstx.ent

public abstract Class EntityDecl

extends WEntityDeclaration
Class Inheritance
Known Direct Subclasses
com.ctc.wstx.ent.ExtEntity, com.ctc.wstx.ent.IntEntity
Imports
java.io.IOException, .Writer, java.net.URL, javax.xml.stream.Location, .XMLResolver, .XMLStreamException, com.ctc.wstx.api.ReaderConfig, com.ctc.wstx.evt.WEntityDeclaration, com.ctc.wstx.io.WstxInputSource

Abstract base class for various entity declarations DTD reader has parsed from DTD subsets.

Field Summary

Modifier and TypeField and Description
pack-priv final URL
mContext

Context that is to be used to resolve references encountered from expanded contents of this entity.

protected boolean
mDeclaredExternally

Flag that can be set to indicate that the declaration was in the external DTD subset.

pack-priv final String
mName

Name/id of the entity used to reference it.

Constructor Summary

AccessConstructor and Description
public
EntityDecl(Location loc, String name, URL ctxt)

Method Summary

Modifier and TypeMethod and Description
public abstract WstxInputSource
expand(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.

public final String
getBaseURI()

Implements abstract com.ctc.wstx.evt.WEntityDeclaration.getBaseURI.

Implements javax.xml.stream.events.EntityDeclaration.getBaseURI.

Get the base URI for this reference or null if this information is not available

public final String
public abstract String
public abstract String
getPublicId()

Redeclares javax.xml.stream.events.EntityDeclaration.getPublicId.

Implements abstract com.ctc.wstx.evt.WEntityDeclaration.getPublicId.

The entity's public identifier, or null if none was given

public abstract char[]
public abstract String
public abstract int
public final int
public abstract String
public abstract boolean
public abstract boolean
public void
public boolean

Returns:

True, if the declaration occured in the external DTD subset; false if not (internal subset, custom declaration)
wasDeclaredExternally
()

public abstract void
Inherited from com.ctc.wstx.evt.WEntityDeclaration:
equalsgetEventTypehashCodewriteAsEncodedUnicodewriteUsing

Field Detail

mContextback to summary
pack-priv final URL mContext

Context that is to be used to resolve references encountered from expanded contents of this entity.

mDeclaredExternallyback to summary
protected boolean mDeclaredExternally

Flag that can be set to indicate that the declaration was in the external DTD subset. Default is false.

mNameback to summary
pack-priv final String mName

Name/id of the entity used to reference it.

Constructor Detail

EntityDeclback to summary
public EntityDecl(Location loc, String name, URL ctxt)

Method Detail

expandback to summary
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.

getBaseURIback to summary
public final String getBaseURI()

Implements abstract com.ctc.wstx.evt.WEntityDeclaration.getBaseURI.

Implements javax.xml.stream.events.EntityDeclaration.getBaseURI.

Doc from javax.xml.stream.events.EntityDeclaration.getBaseURI.

Get the base URI for this reference or null if this information is not available

Returns:String

the base URI or null

Annotations
@Override
getNameback to summary
public final String getName()

Implements abstract com.ctc.wstx.evt.WEntityDeclaration.getName.

Implements javax.xml.stream.events.EntityDeclaration.getName.

Doc from javax.xml.stream.events.EntityDeclaration.getName.

The entity's name

Returns:String

the name, may not be null

Annotations
@Override
getNotationNameback to summary
public abstract String getNotationName()

Redeclares javax.xml.stream.events.EntityDeclaration.getNotationName.

Implements abstract com.ctc.wstx.evt.WEntityDeclaration.getNotationName.

Doc from javax.xml.stream.events.EntityDeclaration.getNotationName.

The name of the associated notation.

Returns:String

the notation name

Annotations
@Override
getPublicIdback to summary
public abstract String getPublicId()

Redeclares javax.xml.stream.events.EntityDeclaration.getPublicId.

Implements abstract com.ctc.wstx.evt.WEntityDeclaration.getPublicId.

Doc from javax.xml.stream.events.EntityDeclaration.getPublicId.

The entity's public identifier, or null if none was given

Returns:String

the public ID for this declaration or null

Annotations
@Override
getReplacementCharsback to summary
public abstract char[] getReplacementChars()
getReplacementTextback to summary
public abstract String getReplacementText()

Redeclares javax.xml.stream.events.EntityDeclaration.getReplacementText.

Implements abstract com.ctc.wstx.evt.WEntityDeclaration.getReplacementText.

Doc from javax.xml.stream.events.EntityDeclaration.getReplacementText.

The replacement text of the entity. This method will only return non-null if this is an internal entity.

Returns:String

null or the replacement text

Annotations
@Override
getReplacementTextback to summary
public abstract int getReplacementText(Writer w) throws IOException
getReplacementTextLengthback to summary
public final int getReplacementTextLength()
getSystemIdback to summary
public abstract String getSystemId()

Redeclares javax.xml.stream.events.EntityDeclaration.getSystemId.

Implements abstract com.ctc.wstx.evt.WEntityDeclaration.getSystemId.

Doc from javax.xml.stream.events.EntityDeclaration.getSystemId.

The entity's system identifier.

Returns:String

the system ID for this declaration or null

Annotations
@Override
isExternalback to summary
public abstract boolean isExternal()
isParsedback to summary
public abstract boolean isParsed()
markAsExternallyDeclaredback to summary
public void markAsExternallyDeclared()
wasDeclaredExternallyback to summary
public boolean wasDeclaredExternally()
Returns:boolean

True, if the declaration occured in the external DTD subset; false if not (internal subset, custom declaration)

writeEncback to summary
public abstract void writeEnc(Writer w) throws IOException

Implements abstract com.ctc.wstx.evt.WEntityDeclaration.writeEnc.

Annotations
@Override