All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.jdom.EntityRef

java.lang.Object
   |
   +----org.jdom.EntityRef

public class EntityRef
extends Object
implements Serializable, Cloneable

EntityRef Defines an XML entity reference in Java.

Version:
$Revision: 1.8 $, $Date: 2002/03/12 07:11:39 $
Author:
Brett McLaughlin, Jason Hunter, Philip Nelson

Variable Index

 o name
The name of the EntityRef
 o parent
Parent element or null if none
 o publicID
The PublicID of the EntityRef
 o systemID
The SystemID of the EntityRef

Constructor Index

 o EntityRef()

Default, no-args constructor for implementations to use if needed.

 o EntityRef(String)

This will create a new EntityRef with the supplied name.

 o EntityRef(String, String)

This will create a new EntityRef with the supplied name and system id.

 o EntityRef(String, String, String)

This will create a new EntityRef with the supplied name, public id, and system id.

Method Index

 o clone()

This will return a clone of this EntityRef.

 o detach()

This detaches the Entity from its parent, or does nothing if the Entity has no parent.

 o equals(Object)

This tests for equality of this Entity to the supplied Object.

 o getDocument()

This retrieves the owning {

 o getName()

This returns the name of the EntityRef.

 o getParent()

This will return the parent of this EntityRef.

 o getPublicID()

This will return the publid ID of this EntityRef.

 o getSystemID()

This will return the system ID of this EntityRef.

 o hashCode()

This returns the hash code for this Entity.

 o setName(String)

This will set the name of this EntityRef.

 o setParent(Element)

This will set the parent of this Entity.

 o setPublicID(String)

This will set the public ID of this EntityRef.

 o setSystemID(String)

This will set the system ID of this EntityRef.

 o toString()

This returns a String representation of the EntityRef, suitable for debugging.

Variables

 o name
 protected String name
The name of the EntityRef

 o publicID
 protected String publicID
The PublicID of the EntityRef

 o systemID
 protected String systemID
The SystemID of the EntityRef

 o parent
 protected Object parent
Parent element or null if none

Constructors

 o EntityRef
 protected EntityRef()

Default, no-args constructor for implementations to use if needed.

 o EntityRef
 public EntityRef(String name)

This will create a new EntityRef with the supplied name.

Parameters:
name - String name of element.
Throws: IllegalNameException
if the given name is not a legal XML name.
 o EntityRef
 public EntityRef(String name,
                  String systemID)

This will create a new EntityRef with the supplied name and system id.

Parameters:
name - String name of element.
Throws: IllegalNameException
if the given name is not a legal XML name.
Throws: IllegalDataException
if the given system ID is not a legal system literal.
 o EntityRef
 public EntityRef(String name,
                  String publicID,
                  String systemID)

This will create a new EntityRef with the supplied name, public id, and system id.

Parameters:
name - String name of element.
Throws: IllegalDataException
if the given system ID is not a legal system literal or the the given public ID is not a legal public ID
Throws: IllegalNameException
if the given name is not a legal XML name.

Methods

 o clone
 public Object clone()

This will return a clone of this EntityRef.

Returns:
Object - clone of this EntityRef.
Overrides:
clone in class Object
 o detach
 public EntityRef detach()

This detaches the Entity from its parent, or does nothing if the Entity has no parent.

Returns:
Entity - this Entity modified.
 o equals
 public final boolean equals(Object ob)

This tests for equality of this Entity to the supplied Object.

Parameters:
ob - Object to compare to.
Returns:
boolean - whether the Entity is equal to the supplied Object.
Overrides:
equals in class Object
 o getDocument
 public Document getDocument()

This retrieves the owning {@link Document} for this Entity, or null if not a currently a member of a {@link Document}.

Returns:
Document owning this Entity, or null.
 o getName
 public String getName()

This returns the name of the EntityRef.

Returns:
String - entity name.
 o getParent
 public Element getParent()

This will return the parent of this EntityRef. If there is no parent, then this returns null.

Returns:
parent of this EntityRef
 o getPublicID
 public String getPublicID()

This will return the publid ID of this EntityRef. If there is no public ID, then this returns null.

Returns:
public ID of this EntityRef
 o getSystemID
 public String getSystemID()

This will return the system ID of this EntityRef. If there is no system ID, then this returns null.

Returns:
system ID of this EntityRef
 o hashCode
 public final int hashCode()

This returns the hash code for this Entity.

Returns:
int - hash code.
Overrides:
hashCode in class Object
 o setParent
 protected EntityRef setParent(Element parent)

This will set the parent of this Entity.

Parameters:
parent - Element to be new parent.
Returns:
this Entity modified.
 o setName
 public EntityRef setName(String name)

This will set the name of this EntityRef.

Parameters:
name - new name of the entity
Returns:
this EntityRef modified.
Throws: IllegalNameException
if the given name is not a legal XML name.
 o setPublicID
 public EntityRef setPublicID(String newPublicID)

This will set the public ID of this EntityRef.

Parameters:
newPublicID - new public id
Returns:
this EntityRef modified.
Throws: IllegalDataException
if the given public ID is not a legal public ID.
 o setSystemID
 public EntityRef setSystemID(String newSystemID)

This will set the system ID of this EntityRef.

Parameters:
newSystemID - new system id
Returns:
this EntityRef modified.
Throws: IllegalDataException
if the given system ID is not a legal system literal.
 o toString
 public String toString()

This returns a String representation of the EntityRef, suitable for debugging.

Returns:
String - information about the EntityRef
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index