org.sbml.jsbml.ext.comp
public abstract class AbstractNamedSBaseRef extends SBaseRef implements NamedSBase
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
id
id of the SBML component (can be optional depending on the level and
version).
|
private java.lang.String |
name
name of the SBML component (can be optional depending on the level and
version).
|
private static long |
serialVersionUID
Generated serial version identifier.
|
ignoredExtensions, ignoredXMLElementslistOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS| Constructor and Description |
|---|
AbstractNamedSBaseRef()
Creates an
AbstractNamedSBase. |
AbstractNamedSBaseRef(AbstractNamedSBaseRef nsb)
Creates an
AbstractNamedSBase from a given AbstractNamedSBase. |
AbstractNamedSBaseRef(int level,
int version)
Creates an
AbstractNamedSBase from a level and version. |
AbstractNamedSBaseRef(java.lang.String id)
Creates an
AbstractNamedSBase with the given identifier. |
AbstractNamedSBaseRef(java.lang.String id,
int level,
int version)
Creates an AbctractNamedSBase from an id, level and version.
|
AbstractNamedSBaseRef(java.lang.String id,
java.lang.String name,
int level,
int version)
Creates an AbctractNamedSBase from an id, name, level and version.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) boolean |
checkIdentifier(java.lang.String sID)
Checks if the sID is a valid identifier.
|
boolean |
equals(java.lang.Object object)
|
java.lang.String |
getId() |
java.lang.String |
getName() |
int |
hashCode()
Returns a hash code value for this
SBase instance. |
boolean |
isSetId() |
boolean |
isSetName() |
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
Sets the given attribute in this
SBase. |
void |
setId(java.lang.String id)
sets the id value with 'id'
|
void |
setName(java.lang.String name)
sets the name value with 'name'.
|
java.lang.String |
toString()
Returns the name of the component, if it is available.
|
void |
unsetId()
sets the id value to
null. |
void |
unsetName()
sets the name value to
null. |
java.util.Map<java.lang.String,java.lang.String> |
writeXMLAttributes()
Returns a map with all the attributes of this
SBase that
need to be written out in XML. |
clone, createSBaseRef, getAllowsChildren, getChildAt, getChildCount, getIdRef, getMetaIdRef, getPortRef, getSBaseRef, getUnitRef, isSetIdRef, isSetMetaIdRef, isSetPortRef, isSetSBaseRef, isSetUnitRef, setIdRef, setMetaIdRef, setPortRef, setSBaseRef, setUnitRef, unsetIdRef, unsetMetaIdRef, unsetPortRef, unsetSBaseRef, unsetUnitRefaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, checkLevelAndVersionCompatibility, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getIdManager, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, notifyChildChange, registerChild, removeCVTerm, removeCVTerm, setAnnotation, setHistory, setLevel, setMetaId, setNamespace, setNotes, setNotes, setParentSBML, setParentSBMLObject, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNamespace, unsetNotes, unsetPlugin, unsetSBOTermaddAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySetfinalize, getClass, notify, notifyAll, wait, wait, waitisIdMandatoryaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, clone, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, registerChild, removeCVTerm, removeCVTerm, removeTreeNodeChangeListener, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNotes, unsetPlugin, unsetSBOTermaddAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySetprivate static final long serialVersionUID
private java.lang.String id
private java.lang.String name
public AbstractNamedSBaseRef()
AbstractNamedSBase. By default, id and name are null.public AbstractNamedSBaseRef(AbstractNamedSBaseRef nsb)
AbstractNamedSBase from a given AbstractNamedSBase.nsb - an AbstractNamedSBase object to clonepublic AbstractNamedSBaseRef(int level,
int version)
AbstractNamedSBase from a level and version. By default, id
and name are null.level - the SBML levelversion - the SBML versionpublic AbstractNamedSBaseRef(java.lang.String id)
AbstractNamedSBase with the given identifier. Note
that with this constructor the level and version of the element are not
specified. These elements are however required to ensure the validity of
the SBML data structure. Without level and version, it may not be
possible to serialize this class to SBML.id - the id of this AbstractNamedSBasepublic AbstractNamedSBaseRef(java.lang.String id,
int level,
int version)
id - the id of this AbstractNamedSBaselevel - the SBML levelversion - the SBML versionpublic AbstractNamedSBaseRef(java.lang.String id,
java.lang.String name,
int level,
int version)
id - the id of this AbstractNamedSBasename - the name of this AbstractNamedSBaselevel - the SBML levelversion - the SBML versionboolean checkIdentifier(java.lang.String sID)
sID - the identifier to be checked. If null or an invalid
identifier, an exception will be thrown.true only if the sID is a valid identifier.
Otherwise this method throws an IllegalArgumentException.
This is an intended behavior.java.lang.IllegalArgumentException - if the given id is not valid in this model.public boolean equals(java.lang.Object object)
SBasepublic java.lang.String getId()
getId in interface NamedSBasepublic java.lang.String getName()
getName in interface NamedSBasepublic int hashCode()
SBaseSBase instance.public boolean isSetId()
isSetId in interface NamedSBasetrue if the id is not null.public boolean isSetName()
isSetName in interface NamedSBasetrue if the name is not null.public boolean readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
SBaseSBase.
If the given attribute name is not recognized, nothing is done and
false is returned.
readAttribute in interface SBasereadAttribute in class SBaseRefattributeName - localName of the XML attributeprefix - prefix of the XML attributevalue - value of the XML attributetrue if the attribute has been successfully read.public void setId(java.lang.String id)
NamedSBasesetId in interface NamedSBasepublic void setName(java.lang.String name)
NamedSBasesetName in interface NamedSBasepublic java.lang.String toString()
public void unsetId()
NamedSBasenull.unsetId in interface NamedSBasepublic void unsetName()
NamedSBasenull.unsetName in interface NamedSBasepublic java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
SBaseSBase that
need to be written out in XML.
The attribute name is used as a key and the attribute value as value. If a prefix is needed for the attribute name, it need to be set directly in this map.
writeXMLAttributes in interface SBasewriteXMLAttributes in class SBaseRefMap containing the XML attributes of this object.