public class SimpleNamespace extends AbstractChangeable implements Namespace
ACRONYM, AUTHORITY, DESCRIPTION, NAME| Modifier | Constructor and Description |
|---|---|
protected |
SimpleNamespace() |
|
SimpleNamespace(java.lang.String name)
Creates a new instance of SimpleNamespace with the given name,
which cannot be null.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Object o)
Namespaces are compared only by name.
|
boolean |
equals(java.lang.Object obj)
Namespaces are equal only by name.
|
java.lang.String |
getAcronym()
If the namespace has an acronym, this will return it.
|
java.lang.String |
getAuthority()
This method will return the authority that governs the namespace.
|
java.lang.String |
getDescription()
Returns a description of this namespace.
|
java.lang.Integer |
getId()
Gets the Hibernate ID.
|
java.lang.String |
getName()
The name of the namespace is immutable and must be set by the constructor
of the instantiating class.
|
java.net.URI |
getURI()
If the namespace has a URI, this will return it.
|
int |
hashCode() |
void |
setAcronym(java.lang.String acronym)
Sets an optional acronym for the namespace.
|
void |
setAuthority(java.lang.String authority)
This method sets the authority that governs the namespace.
|
void |
setDescription(java.lang.String description)
This method sets a description for the namespace.
|
void |
setId(java.lang.Integer id)
Sets the Hibernate ID.
|
void |
setURI(java.net.URI URI)
Sets an optional URI for the namespace.
|
java.lang.String |
toString()
Form: "name"
|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerpublic SimpleNamespace(java.lang.String name)
name - the name of the namespace.protected SimpleNamespace()
public void setAcronym(java.lang.String acronym)
throws ChangeVetoException
setAcronym in interface Namespaceacronym - the acronym for the namespace.ChangeVetoException - in case of objections.public void setAuthority(java.lang.String authority)
throws ChangeVetoException
setAuthority in interface Namespaceauthority - the name of the namespace authority.ChangeVetoException - in case of objections.public void setDescription(java.lang.String description)
throws ChangeVetoException
setDescription in interface Namespacedescription - the description of the namespace.ChangeVetoException - in case of objections.public void setURI(java.net.URI URI)
throws ChangeVetoException
setURI in interface NamespaceURI - the URI of the authority.ChangeVetoException - in case of objections.public java.lang.String getAcronym()
getAcronym in interface Namespacepublic java.lang.String getAuthority()
getAuthority in interface Namespacepublic java.lang.String getDescription()
getDescription in interface Namespacepublic java.lang.String getName()
public java.net.URI getURI()
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Integer getId()
public void setId(java.lang.Integer id)
id - the Hibernate ID, if using Hibernate.