public class EntityRef extends Content
Content.CType| Modifier and Type | Field and Description | 
|---|---|
| protected java.lang.String | nameThe name of the  EntityRef | 
| protected java.lang.String | publicIDThe PublicID of the  EntityRef | 
| protected java.lang.String | systemIDThe SystemID of the  EntityRef | 
| Modifier | Constructor and Description | 
|---|---|
| protected  | EntityRef()Default, no-args constructor for implementations to use if needed. | 
|   | EntityRef(java.lang.String name)This will create a new  EntityRefwith the supplied name. | 
|   | EntityRef(java.lang.String name,
         java.lang.String systemID)This will create a new  EntityRefwith the supplied name and system id. | 
|   | EntityRef(java.lang.String name,
         java.lang.String publicID,
         java.lang.String systemID)This will create a new  EntityRefwith the supplied name, public id, and system id. | 
| Modifier and Type | Method and Description | 
|---|---|
| EntityRef | clone()Return a deep clone of this instance. | 
| EntityRef | detach()Detaches this child from its parent or does nothing if the child
 has no parent. | 
| java.lang.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. | 
| java.lang.String | getPublicID()This will return the publid ID of this  EntityRef. | 
| java.lang.String | getSystemID()This will return the system ID of this  EntityRef. | 
| java.lang.String | getValue()Returns the empty string since entity references don't have an XPath
 1.0 string value. | 
| EntityRef | setName(java.lang.String name)This will set the name of this  EntityRef. | 
| protected EntityRef | setParent(Parent parent)Sets the parent of this Content. | 
| EntityRef | setPublicID(java.lang.String publicID)This will set the public ID of this  EntityRef. | 
| EntityRef | setSystemID(java.lang.String systemID)This will set the system ID of this  EntityRef. | 
| java.lang.String | toString()This returns a  Stringrepresentation of theEntityRef, suitable for debugging. | 
equals, getCType, getDocument, getNamespacesInherited, getNamespacesInScope, getNamespacesIntroduced, getParentElement, hashCodeprotected java.lang.String name
EntityRefprotected java.lang.String publicID
EntityRefprotected java.lang.String systemID
EntityRefprotected EntityRef()
public EntityRef(java.lang.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(java.lang.String name,
                 java.lang.String systemID)
EntityRef
 with the supplied name and system id.name - String name of element.systemID - system id of the entity reference being constructedIllegalNameException - if the given name is not a legal
         XML name.IllegalDataException - if the given system ID is not a legal
         system literal.public EntityRef(java.lang.String name,
                 java.lang.String publicID,
                 java.lang.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 constructedIllegalDataException - if the given system ID is not a legal
         system literal or the the given public ID is not a
         legal public IDIllegalNameException - if the given name is not a legal
         XML name.public java.lang.String getName()
EntityRef.String - entity name.public java.lang.String getValue()
public java.lang.String getPublicID()
EntityRef.
 If there is no public ID, then this returns null.EntityRefpublic java.lang.String getSystemID()
EntityRef.
 If there is no system ID, then this returns null.EntityRefpublic EntityRef setName(java.lang.String name)
EntityRef.name - new name of the entityEntityRef modified.IllegalNameException - if the given name is not a legal
         XML name.public EntityRef setPublicID(java.lang.String publicID)
EntityRef.publicID - new public idEntityRef modified.IllegalDataException - if the given public ID is not a legal
         public ID.public EntityRef setSystemID(java.lang.String systemID)
EntityRef.systemID - new system idEntityRef modified.IllegalDataException - if the given system ID is not a legal
         system literal.public java.lang.String toString()
String representation of the
 EntityRef, suitable for debugging.toString in class java.lang.ObjectString - information about the
         EntityRefpublic EntityRef detach()
Content
 This method can be overridden by particular Content subclasses to return
 a specific type of Content (co-variant return type). All overriding
 subclasses must call super.detach();
protected EntityRef setParent(Parent parent)
Content
 This method can be overridden by particular Content subclasses to return
 a specific type of Content (co-variant return type). All overriding
 subclasses must call super.setParent(Parent);
public Element getParent()
ContentElement
 or a Document.
 
 This method can be overridden by particular Content subclasses to return
 a specific type of Parent (co-variant return type). All overriding
 subclasses must call super.getParent();
public EntityRef clone()
All JDOM core classes are Cloneable, and never throw CloneNotSupportedException. Additionally all Cloneable JDOM classes return the correct type of instance from this method and there is no need to cast the result (co-variant return value).
Subclasses of this should still call super.clone() in their clone method.
Copyright © 2021 Jason Hunter, Brett McLaughlin. All Rights Reserved.