java.lang.Object
com.hexidec.ekit.component.parser.Entity
- All Implemented Interfaces:
- DTDConstants
- public final class Entity
- extends java.lang.Object
- implements DTDConstants
An entity is described in a DTD using the ENTITY construct.
It defines the type and value of the the entity.
- Version:
- 1.8, 12/03/01
| Fields inherited from interface com.hexidec.ekit.component.parser.DTDConstants |
ANY, CDATA, CONREF, CURRENT, DEFAULT, EMPTY, ENDTAG, ENTITIES, ENTITY, FIXED, GENERAL, ID, IDREF, IDREFS, IMPLIED, MD, MODEL, MS, NAME, NAMES, NMTOKEN, NMTOKENS, NOTATION, NUMBER, NUMBERS, NUTOKEN, NUTOKENS, PARAMETER, PI, PUBLIC, RCDATA, REQUIRED, SDATA, STARTTAG, SYSTEM |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
public java.lang.String name
type
public int type
data
public char[] data
entityTypes
static java.util.Hashtable entityTypes
Entity
public Entity(java.lang.String name,
int type,
char[] data)
- Creates an entity.
getName
public java.lang.String getName()
- Gets the name of the entity.
getType
public int getType()
- Gets the type of the entity.
isParameter
public boolean isParameter()
- Returns
true if it is a parameter entity.
isGeneral
public boolean isGeneral()
- Returns
true if it is a general entity.
getData
public char[] getData()
- Returns the
data.
getString
public java.lang.String getString()
- Returns the data as a
String.
name2type
public static int name2type(java.lang.String nm)
- Converts
nm string to the corresponding
entity type. If the string does not have a corresponding
entity type, returns the type corresponding to "CDATA".
Valid entity types are: "PUBLIC", "CDATA", "SDATA", "PI",
"STARTTAG", "ENDTAG", "MS", "MD", "SYSTEM".