|
Matra DTD Parser 0.8b | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.conradroche.matra.decl.Entity
Class to hold an entity declaration.
Field Summary | |
static int |
EXT_ID_NONE
Constant to indicate that this attribute has no external id. |
static int |
EXT_ID_PUBLIC
Constant to indicate that this attribute has a public id. |
static int |
EXT_ID_SYSTEM
Constant to indicate that this attribute has a system id. |
static int |
GLOBAL_ENTITY
Constant to indicate that this is a global entity. |
static int |
PARAMETER_ENTITY
Constant to indicate that this is a parameter entity. |
Constructor Summary | |
Entity()
Entity constructor. |
|
Entity(String content)
Entity Constructor. |
|
Entity(String content,
Hashtable EntityList)
Entity Constructor. |
|
Entity(String name,
String value,
int type)
Entity constructor. |
Method Summary | |
String |
getEntityName()
Returns the Entity Name. |
int |
getExternalIDType()
Returns the external ID type for this entity. |
String |
getLiteralValue()
Returns the literal value of this entity. |
String |
getPublicIdentifier()
Returns the public identifier for this entity. |
String |
getReplacementText()
Returns the replacement text for this Entity. |
String |
getResolvedValue(Hashtable EntityList)
Returns the resolved value for this entity. |
String |
getSystemIdentifier()
Returns the system identifier. |
int |
getType()
Returns the entity type. |
boolean |
hasPublicIdentifier()
Returns true if the
Public Identifier is specified. |
boolean |
hasSystemIdentifier()
Returns true if the
System Identifier is specified. |
boolean |
isExternalEntity()
Returns true if this entity is an
external entity; false otherwise. |
boolean |
isGeneralEntity()
Returns true if the Entity is
a General Entity and false otherwise. |
boolean |
isInternalEntity()
Returns true if this entity is an
internal entity; false otherwise. |
boolean |
isParameterEntity()
Returns true if the Entity is
a Parameter Entity and false otherwise. |
boolean |
isParsedEntity()
Returns true if this entity is an
parsed entity; false otherwise. |
boolean |
isResolved()
Checks if this entity value is resolved. |
boolean |
isUnparsedEntity()
Returns true if this entity is an
parsed entity; false otherwise. |
void |
resolveValue(Hashtable entityList)
Insert the method's description here. |
void |
setEntityName(String newName)
Sets the Entity Name. |
void |
setLiteralValue(String newValue)
Sets the literal value of this entity. |
void |
setPublicIdentifier(String publicId)
Sets the Public Identifier. |
void |
setSystemIdentifier(String systemId)
Sets the System Identifier. |
void |
setType(int newType)
Sets the entity type. |
String |
toString()
Returns a DTD String representation for this entity. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int PARAMETER_ENTITY
public static final int GLOBAL_ENTITY
public static final int EXT_ID_NONE
public static final int EXT_ID_SYSTEM
public static final int EXT_ID_PUBLIC
Constructor Detail |
public Entity()
public Entity(String name, String value, int type)
name
- The name of the entity.value
- The value of the enetity.type
- an int specifying the entity type.public Entity(String content) throws DTDException
content
- The entity declaration.DTDException
- If any syntax error is encountered.public Entity(String content, Hashtable EntityList) throws DTDException
content
- The entity declaration.EntityList
- a Hashtable objectDTDException
- If any syntax error is encountered.Method Detail |
public int getExternalIDType()
#setExternalIDType
public String getEntityName()
getEntityName
in interface Entity
setEntityName(java.lang.String)
public String getPublicIdentifier()
getPublicIdentifier
in interface ExternalID
setPublicIdentifier(java.lang.String)
public void setPublicIdentifier(String publicId)
setPublicIdentifier
in interface ExternalID
publicId
- The Public IdentifiergetPublicIdentifier()
public String getResolvedValue(Hashtable EntityList)
EntityList
- All the declared entities in this DTD.public String getSystemIdentifier()
getSystemIdentifier
in interface ExternalID
setSystemIdentifier(java.lang.String)
public void setSystemIdentifier(String systemId)
setSystemIdentifier
in interface ExternalID
systemId
- The System IdentifiergetSystemIdentifier()
public int getType()
setType(int)
public String getLiteralValue()
getLiteralValue
in interface Entity
setLiteralValue(java.lang.String)
public String getReplacementText()
getReplacementText
in interface Entity
public boolean isInternalEntity()
true
if this entity is an
internal entity; false
otherwise.
From the XML 1.0 Specifications -
[Definition: If the entity definition is an
EntityValue, the defined entity is called an
internal entity. There is no separate physical
storage object, and the content of the entity
is given in the declaration.] Note that some
processing of entity and character references in
the literal entity literalValue may be required to
produce the correct replacement textisInternalEntity
in interface Entity
true
if this entity is an
internal entity; false
otherwise.public boolean isExternalEntity()
true
if this entity is an
external entity; false
otherwise.
Add javadoc for Entity::isExternalEntity
From the XML 1.0 Specifications -
Definition: If the entity is not internal,
it is an external entityisExternalEntity
in interface Entity
true
if this entity is an
external entity; false
otherwise.public boolean isParsedEntity()
true
if this entity is an
parsed entity; false
otherwise.
From XML 1.0 Specifications -
[Definition: A parsed entity's contents are
referred to as its replacement text; this text
is considered an integral part of the document.]isParsedEntity
in interface Entity
true
if this entity is an
parsed entity; false
otherwise.public boolean isUnparsedEntity()
true
if this entity is an
parsed entity; false
otherwise.
From XML 1.0 Specifications -
[Definition: An unparsed entity is a resource
whose contents may or may not be text, and if
text, may be other than XML. Each unparsed
entity has an associated notation, identified
by name. Beyond a requirement that an XML
processor make the identifiers for the entity
and notation available to the application,
XML places no constraints on the contents of
unparsed entities.]isUnparsedEntity
in interface Entity
true
if this entity is an
parsed entity; false
otherwise.public boolean isResolved()
true
if the entity is resolved;
false
otherwise.public void resolveValue(Hashtable entityList) throws DTDException
entityList
- DTDException
- public void setEntityName(String newName)
setEntityName
in interface Entity
newName
- the Entity Name.getEntityName()
public void setType(int newType)
newType
- the entity type.getType()
public void setLiteralValue(String newValue)
setLiteralValue
in interface Entity
newValue
- The literal value of this entity.getLiteralValue()
public String toString()
toString
in class Object
public boolean isGeneralEntity()
true
if the Entity is
a General Entity and false
otherwise.isGeneralEntity
in interface Entity
true
for General Entity
and false
otherwise.Entity.isGeneralEntity()
public boolean isParameterEntity()
true
if the Entity is
a Parameter Entity and false
otherwise.isParameterEntity
in interface Entity
true
for Parameter Entity
and false
otherwise.Entity.isParameterEntity()
public boolean hasSystemIdentifier()
true
if the
System Identifier is specified.hasSystemIdentifier
in interface ExternalID
true
if the
System Identifier is specified
false
otherwise.ExternalID.hasSystemIdentifier()
public boolean hasPublicIdentifier()
true
if the
Public Identifier is specified.hasPublicIdentifier
in interface ExternalID
true
if the
Public Identifier is specified
false
otherwise.ExternalID.hasPublicIdentifier()
|
Matra DTD Parser 0.8b | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |