Top Description Fields Constructors Methods
org.jdom

public Class EntityRef

extends Content
Class Inheritance

An XML entity reference. Methods allow the user to manage its name, public id, and system id.
Authors
Brett McLaughlin, Jason Hunter, Philip Nelson
Version
$Revision: 1.22 $, $Date: 2007/11/10 05:28:59 $

Field Summary

Modifier and TypeField and Description
private static final String
protected String
name

The name of the EntityRef

protected String
publicID

The PublicID of the EntityRef

protected String
systemID

The SystemID of the EntityRef

Inherited from org.jdom.Content:
parent

Constructor Summary

AccessConstructor and Description
protected
EntityRef()

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

public
EntityRef(String
String name of element.
name
)

This will create a new EntityRef with the supplied name.

public
EntityRef(String
String name of element.
name
,
String
system id of the entity reference being constructed
systemID
)

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

public
EntityRef(String
String name of element.
name
,
String
public id of the entity reference being constructed
publicID
,
String
system id of the entity reference being constructed
systemID
)

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

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

String - entity name.
getName
()

This returns the name of the EntityRef.

public String

Returns:

public ID of this EntityRef
getPublicID
()

This will return the publid ID of this EntityRef.

public String

Returns:

system ID of this EntityRef
getSystemID
()

This will return the system ID of this EntityRef.

public String

Returns:

the empty string
getValue
()

Implements abstract org.jdom.Content.getValue.

Returns the empty string since entity references don't have an XPath 1.0 string value.
public EntityRef

Returns:

this EntityRef modified.
setName
(String
new name of the entity
name
)

This will set the name of this EntityRef.

public EntityRef

Returns:

this EntityRef modified.
setPublicID
(String
new public id
publicID
)

This will set the public ID of this EntityRef.

public EntityRef

Returns:

this EntityRef modified.
setSystemID
(String
new system id
systemID
)

This will set the system ID of this EntityRef.

public String

Returns:

String - information about the EntityRef
toString
()

Overrides java.lang.Object.toString.

This returns a String representation of the EntityRef, suitable for debugging.
Inherited from org.jdom.Content:
clonedetachequalsgetDocumentgetParentgetParentElementhashCodesetParent

Field Detail

CVS_IDback to summary
private static final String CVS_ID
nameback to summary
protected String name

The name of the EntityRef

publicIDback to summary
protected String publicID

The PublicID of the EntityRef

systemIDback to summary
protected String systemID

The SystemID of the EntityRef

Constructor Detail

EntityRefback to summary
protected EntityRef()

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

EntityRefback to summary
public EntityRef(String name)

This will create a new EntityRef with the supplied name.

Parameters
name:String

String name of element.

Exceptions
IllegalNameException:
if the given name is not a legal XML name.
EntityRefback to summary
public EntityRef(String name, String systemID)

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

Parameters
name:String

String name of element.

systemID:String

system id of the entity reference being constructed

Exceptions
IllegalNameException:
if the given name is not a legal XML name.
IllegalDataException:
if the given system ID is not a legal system literal.
EntityRefback to summary
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

String name of element.

publicID:String

public id of the entity reference being constructed

systemID:String

system id of the entity reference being constructed

Exceptions
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

getNameback to summary
public String getName()

This returns the name of the EntityRef.

Returns:String

String - entity name.

getPublicIDback to summary
public String getPublicID()

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

Returns:String

public ID of this EntityRef

getSystemIDback to summary
public String getSystemID()

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

Returns:String

system ID of this EntityRef

getValueback to summary
public String getValue()

Implements abstract org.jdom.Content.getValue.

Returns the empty string since entity references don't have an XPath 1.0 string value.

Returns:String

the empty string

setNameback to summary
public EntityRef setName(String name)

This will set the name of this EntityRef.

Parameters
name:String

new name of the entity

Returns:EntityRef

this EntityRef modified.

Exceptions
IllegalNameException:
if the given name is not a legal XML name.
setPublicIDback to summary
public EntityRef setPublicID(String publicID)

This will set the public ID of this EntityRef.

Parameters
publicID:String

new public id

Returns:EntityRef

this EntityRef modified.

Exceptions
IllegalDataException:
if the given public ID is not a legal public ID.
setSystemIDback to summary
public EntityRef setSystemID(String systemID)

This will set the system ID of this EntityRef.

Parameters
systemID:String

new system id

Returns:EntityRef

this EntityRef modified.

Exceptions
IllegalDataException:
if the given system ID is not a legal system literal.
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

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

Returns:String

String - information about the EntityRef