|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cdmckay.coffeedom.Content org.cdmckay.coffeedom.EntityRef
public class EntityRef
An XML entity reference. Methods allow the user to manage its name, public id, and system id.
Field Summary | |
---|---|
protected String |
name
The name of the EntityRef |
protected String |
publicID
The PublicID of the EntityRef |
protected String |
systemID
The SystemID of the EntityRef |
Fields inherited from class org.cdmckay.coffeedom.Content |
---|
parent |
Constructor Summary | |
---|---|
protected |
EntityRef()
Default, no-args constructor for implementations to use if needed. |
|
EntityRef(String name)
This will create a new EntityRef with the supplied name. |
|
EntityRef(String name,
String systemID)
This will create a new EntityRef with the supplied name and system id. |
|
EntityRef(String name,
String publicID,
String systemID)
This will create a new EntityRef with the supplied name, public id, and system id. |
Method Summary | |
---|---|
EntityRef |
clone()
Returns a deep, unattached copy of this child and its descendants detached from any parent or document. |
EntityRef |
detach()
Detaches this child from its parent or does nothing if the child has no parent. |
String |
getName()
This returns the name of the EntityRef . |
Element |
getParent()
Return this child's parent, or null if this child is currently not attached. |
String |
getPublicID()
This will return the publid ID of this EntityRef . |
String |
getSystemID()
This will return the system ID of this EntityRef . |
String |
getValue()
Returns the empty string since entity references don't have an XPath 1.0 string value. |
EntityRef |
setName(String name)
This will set the name of this EntityRef . |
protected EntityRef |
setParent(Parent parent)
Sets the parent of this Content. |
EntityRef |
setPublicID(String publicID)
This will set the public ID of this EntityRef . |
EntityRef |
setSystemID(String systemID)
This will set the system ID of this EntityRef . |
String |
toString()
This returns a String representation of the EntityRef , suitable for debugging. |
Methods inherited from class org.cdmckay.coffeedom.Content |
---|
equals, getDocument, getParentElement, hashCode |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String name
EntityRef
protected String publicID
EntityRef
protected String systemID
EntityRef
Constructor Detail |
---|
protected EntityRef()
public EntityRef(String name)
EntityRef
with the supplied name.
name
- String
name of element.
IllegalNameException
- if the given name is not a legal XML name.public EntityRef(String name, String systemID)
EntityRef
with the supplied name and system id.
name
- String
name of element.systemID
- system id of the entity reference being constructed
IllegalNameException
- if the given name is not a legal XML name.
IllegalDataException
- if the given system ID is not a legal system literal.public EntityRef(String name, String publicID, String systemID)
EntityRef
with the supplied name, public id, and system id.
name
- String
name of element.publicID
- public id of the entity reference being constructedsystemID
- system id of the entity reference being constructed
IllegalDataException
- if the given system ID is not a legal system literal or the the given public ID is
not a legal public ID
IllegalNameException
- if the given name is not a legal XML name.Method Detail |
---|
public String getName()
EntityRef
.
String
- entity name.public String getValue()
getValue
in class Content
public String getPublicID()
EntityRef
. If there is no public ID, then this returns
null
.
EntityRef
public String getSystemID()
EntityRef
. If there is no system ID, then this returns
null
.
EntityRef
public EntityRef setName(String name)
EntityRef
.
name
- new name of the entity
EntityRef
modified.
IllegalNameException
- if the given name is not a legal XML name.public EntityRef setPublicID(String publicID)
EntityRef
.
publicID
- new public id
EntityRef
modified.
IllegalDataException
- if the given public ID is not a legal public ID.public EntityRef setSystemID(String systemID)
EntityRef
.
systemID
- new system id
EntityRef
modified.
IllegalDataException
- if the given system ID is not a legal system literal.public Element getParent()
Content
Element
or a Document
.
getParent
in class Content
protected EntityRef setParent(Parent parent)
Content
setParent
in class Content
parent
- new parent element
public EntityRef clone()
Content
clone
in class Content
public EntityRef detach()
Content
detach
in class Content
public String toString()
String
representation of the EntityRef
, suitable for debugging.
toString
in class Object
String
- information about the EntityRef
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |