Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jdom
Class EntityRef

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

public class EntityRef
extends Object
implements Serializable, Cloneable

`EntityRef` Defines an XML entity in Java.

Version:
  1.0
Author:
  Brett McLaughlin, Jason Hunter, Philip Nelson
See Also:
  Serialized Form

Field Summary
`protected Document` | `document` Containing document node, or null if none
`protected String` | `name` The name of the `EntityRef`
`protected Element` | `parent` Parent element, or null if none
`protected String` | `publicID` The PublicID of the `EntityRef`
`protected String` | `systemID` The SystemID of the `EntityRef`

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 publicID, String systemID)` This will create a new `EntityRef` with the supplied name, public id, and system id.

Method Summary
`Object` | `clone()` This will return a clone of this `EntityRef`.
`EntityRef` | `detach()` This detaches the `Entity` from its parent, or does nothing if the `Entity` has no parent.
`boolean` | `equals(Object ob)` This tests for equality of this `Entity` to the supplied `Object`.
`Document` | `getDocument()` This retrieves the owning ``Document`` for this Entity, or null if not a currently a member of a ``Document``.
`String` | `getName()` This returns the name of the `EntityRef`.
`Element` | `getParent()` This will return the parent of this `EntityRef`.
`String` | `getPublicID()` This will return the publid ID of this `EntityRef`.
`String` | `getSystemID()` This will return the system ID of this `EntityRef`.
`int` | `hashCode()` This returns the hash code for this `Entity`.
`EntityRef` | `setName(String name)` This will set the name of this `EntityRef`.
`protected EntityRef` | `setParent(Element parent)` This will set the parent of this `Entity`.
`EntityRef` | `setPublicID(String newPublicID)` This will set the public ID of this `EntityRef`.
`EntityRef` | `setSystemID(String newSystemID)` 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 java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### name

    protected String name

  The name of the `EntityRef`

### publicID

    protected String publicID

  The PublicID of the `EntityRef`

### systemID

    protected String systemID

  The SystemID of the `EntityRef`

### parent

    protected Element parent

  Parent element, or null if none

### document

    protected Document document

  Containing document node, or null if none

Constructor Detail

### EntityRef

    protected EntityRef()

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

### EntityRef

    public EntityRef(String name)

  This will create a new `EntityRef` with the supplied name.

  Parameters:
    `name` - `String` name of element.

### 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.

Method Detail

### clone

    public Object clone()

  This will return a clone of this `EntityRef`.

  Overrides:
    clone in class Object
  Returns:
    `Object` - clone of this `EntityRef`.

### 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.

### equals

    public final boolean equals(Object ob)

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

  Overrides:
    equals in class Object
  Parameters:
    `ob` - `Object` to compare to.
  Returns:
    `boolean` - whether the `Entity` is equal to the supplied `Object`.

### getDocument

    public Document getDocument()

  This retrieves the owning ``Document`` for this Entity, or null if not a currently a member of a ``Document``.

  Returns:
    `Document` owning this Entity, or null.

### getName

    public String getName()

  This returns the name of the `EntityRef`.

  Returns:
    `String` - entity name.

### 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`

### 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`

### 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`

### hashCode

    public final int hashCode()

  This returns the hash code for this `Entity`.

  Overrides:
    hashCode in class Object
  Returns:
    `int` - hash code.

### 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.

### 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.

### setPublicID

    public EntityRef setPublicID(String newPublicID)

  This will set the public ID of this `EntityRef`.

  Parameters:
    `newPublicID` - new public id
  Returns:
    this `EntityRef` modified.

### setSystemID

    public EntityRef setSystemID(String newSystemID)

  This will set the system ID of this `EntityRef`.

  Parameters:
    `newSystemID` - new system id
  Returns:
    this `EntityRef` modified.

### toString

    public String toString()

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

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 Jason Hunter, Brett McLaughlin. All Rights Reserved.