Contents | Package | Class | Tree | Deprecated | Index | Help | XML for Java 1.0.4 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
java.lang.Object | +----com.ibm.xml.parser.Child | +----com.ibm.xml.parser.Entity
Internal entities have a value that is directly given in the entity declaration. For example:
<!ENTITY IBM "International Business Machines">
External entities refer to declarations to a storage unit by means of a SYSTEM or PUBLIC identifier. For example:
<!ENTITY IBM SYSTEM "ibm.xml">
..associates the name IBM
with the URL "ibm.xml"
.
XML4J must read the file referenced in order to find out the content of that entity.
As you might expect, external Entities contain External IDs in order to provide access to the resource. External entities can can be either text or binary resources. Text resources are XML-encoded resources, and are illustrated by this example:
<!ENTITY IBM SYSTEM "ibm.xml">
Binary entities are anything that is not XML-encoded. Binary entities always include a notation (ndata) which describes the type of resource. For example:
<!ENTITY IBMLogo SYSTEM "ibm.jpg" NDATA JPEG>
Fields inherited from class com.ibm.xml.parser.Child |
ATTDEF, ATTLIST, DOCUMENTTYPE, ELEMENTDEFINITION, ENTITY, GENERALREFERENCE, NOTATION, PSEUDONODE |
Constructor Summary | |
Entity(java.lang.String name,
java.lang.String value,
boolean isParameter)
|
|
Entity(java.lang.String name,
ExternalID externalID,
boolean isParameter,
java.lang.String ndata)
|
Method Summary | |
void | acceptPost(Visitor visitor)
|
void | acceptPre(Visitor visitor)
|
java.lang.Object | clone()
|
ExternalID | getExternalID()
|
java.lang.String | getName()
|
java.lang.String | getNDATAType()
|
int | getNodeType()
|
java.lang.String | getValue()
|
boolean | isExternal()
|
boolean | isNDATA()
|
boolean | isParameter()
|
Methods inherited from class com.ibm.xml.parser.Child |
clearDigest, clone, getChildNodes, getDigest, getFactory, getFirstChild, getNextSibling, getParentNode, getPreviousSibling, getText, hasChildNodes, insertBefore, makeXPointer, print, print, removeChild, replaceChild, searchAncestors, searchAncestors, setFactory, toXMLString, toXMLString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Entity(java.lang.String name, java.lang.String value, boolean isParameter)
name
- Name of this Entity.
value
- The XML-encoded value that was directly assigned to the Entity.
isParameter
- =true if a parameter Entity; otherwise =false.
public Entity(java.lang.String name, ExternalID externalID, boolean isParameter, java.lang.String ndata)
name
- Name of the Entity.
externalID
- The reference(s) to the external entity to retrieve.
isParameter
- =true if a parameter Entity; otherwise =false.
ndata
- The notation associated with the binary Entity, or null if
the Entity is a text Entity.
Method Detail |
public java.lang.Object clone()
This method is defined by Child.
public int getNodeType()
This method is defined by DOM.
public java.lang.String getName()
public boolean isParameter()
public java.lang.String getValue()
public ExternalID getExternalID()
public boolean isExternal()
public java.lang.String getNDATAType()
public boolean isNDATA()
public void acceptPre(Visitor visitor) throws java.lang.Exception
visitor
- The implemention of the Visitor operation (toXMLString, digest, ...)
public void acceptPost(Visitor visitor) throws java.lang.Exception
visitor
- The implemention of the Visitor operation (toXMLString, digest, ...)
Contents | Package | Class | Tree | Deprecated | Index | Help | |||
PREV | NEXT | SHOW LISTS | HIDE LISTS |