org.menagery.dtd
Class Entity

java.lang.Object
  |
  +--org.menagery.dtd.Entity

public class Entity
extends java.lang.Object


Field Summary
static int EXT_NONE
          Indicator that this is NOT an external entity type.
static int EXT_PUBLIC
          The PUBLIC external entity type.
static int EXT_SYSTEM
          The SYSTEM external entity type.
 java.lang.String sValue
          The entity value (if type is EXT_NONE).
 
Constructor Summary
Entity(java.lang.String entityName, java.lang.String entityContents, DTD dtd, boolean bResolve)
          Creates a new Entity from the DTD data.
 
Method Summary
 int getExternalType()
          Indicates the type of entity: EXT_NONE, EXT_SYSTEM or EXT_PUBLIC.
 java.lang.String getName()
          Get the entity's name.
 java.lang.String getNotation()
          Get the notation name.
 java.lang.String getPublicId()
          Get the public id of the entity.
 java.lang.String getUri()
          Get the URI of the entity.
 java.lang.String getValue()
          Get the value of the entity.
 boolean isNdata()
          Indicates that this is a NDATA entity.
 java.lang.String toString()
          Show the ENTITY in DTD format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXT_NONE

public static final int EXT_NONE
Indicator that this is NOT an external entity type.

EXT_SYSTEM

public static final int EXT_SYSTEM
The SYSTEM external entity type.

EXT_PUBLIC

public static final int EXT_PUBLIC
The PUBLIC external entity type.

sValue

public java.lang.String sValue
The entity value (if type is EXT_NONE).
Constructor Detail

Entity

public Entity(java.lang.String entityName,
              java.lang.String entityContents,
              DTD dtd,
              boolean bResolve)
Creates a new Entity from the DTD data.
Parameters:
entityName - The entity name from the DTD.
entityContents - The entity contents from the DTD.
dtd - The DTD.
bResolve - The Entity should resolve external entities.
Method Detail

getName

public java.lang.String getName()
Get the entity's name.
Returns:
A String containing the entity name.

getExternalType

public int getExternalType()
Indicates the type of entity: EXT_NONE, EXT_SYSTEM or EXT_PUBLIC.
Returns:
An integer indicating EXT_NONE, EXT_SYSTEM, or EXT_PUBLIC.

isNdata

public boolean isNdata()
Indicates that this is a NDATA entity.
Returns:
True if these has notation data.

getValue

public java.lang.String getValue()
Get the value of the entity.
Returns:
A String containing the value.

getPublicId

public java.lang.String getPublicId()
Get the public id of the entity.
Returns:
A String containing the public id.

getUri

public java.lang.String getUri()
Get the URI of the entity.
Returns:
A String containing the URI.

getNotation

public java.lang.String getNotation()
Get the notation name.
Returns:
A String containing the notation name.

toString

public java.lang.String toString()
Show the ENTITY in DTD format.
Overrides:
toString in class java.lang.Object