java.io.Serializable, java.lang.Cloneable, javax.swing.tree.TreeNode, CompartmentalizedSBase, NamedSBase, SBase, UniqueNamedSBase, UniqueSId, TreeNodeWithChangeSupportpublic class CompartmentReference extends AbstractNamedSBase implements CompartmentalizedSBase, UniqueNamedSBase
JSBML_WRONG_SBO_TERM| Constructor | Description |
|---|---|
CompartmentReference() |
Creates a new
CompartmentReference instance. |
CompartmentReference(int level,
int version) |
Creates a CompartmentReference instance with a level and version.
|
CompartmentReference(java.lang.String id) |
Creates a CompartmentReference instance with an id.
|
CompartmentReference(java.lang.String id,
int level,
int version) |
Creates a CompartmentReference instance with an id, level, and version.
|
CompartmentReference(java.lang.String id,
java.lang.String name,
int level,
int version) |
Creates a CompartmentReference instance with an id, name, level, and version.
|
CompartmentReference(CompartmentReference obj) |
Creates a new
CompartmentReference instance, cloned from the given object. |
| Modifier and Type | Method | Description |
|---|---|---|
CompartmentReference |
clone() |
Creates a deep copy of this object, i.e., a new
SBase with the same
properties
like this one. |
boolean |
equals(java.lang.Object obj) |
|
java.lang.String |
getCompartment() |
Returns the value of the referenced compartment.
|
Compartment |
getCompartmentInstance() |
Returns the
Compartment that is referenced by this SBase. |
int |
hashCode() |
Returns a hash code value for this
SBase instance. |
void |
initDefaults() |
Initializes the default values using the namespace.
|
boolean |
isCompartmentMandatory() |
|
boolean |
isIdMandatory() |
Returns
true if the identifier of this
SBase is required to be defined (i.e., not null)
in the definition of SBML. |
boolean |
isSetCompartment() |
Returns whether
compartment is set. |
boolean |
isSetCompartmentInstance() |
|
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value) |
Sets the given attribute in this
SBase. |
boolean |
setCompartment(java.lang.String compartment) |
Sets the compartment attribute.
|
boolean |
setCompartment(Compartment compartment) |
Sets the compartment identifiers of this
CompartmentalizedSBase to
the id of the Compartment 'compartment'. |
boolean |
unsetCompartment() |
Remove the reference to a compartment, i.e., unset the value of the
variable 'compartment'.
|
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. |
isValidIdaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, addResources, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAllDeclaredNamespaces, getAllowsChildren, getAnnotation, getAnnotationString, getChildAt, getChildCount, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementBySId, getElementName, getExtension, getExtensionCount, getExtensionPackages, getFirstElementIndex, getHistory, getId, getLevel, getLevelAndVersion, getMetaId, getModel, getName, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetId, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetName, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, registerChild, removeCVTerm, removeCVTerm, removeDeclaredNamespaceByNamespace, removeDeclaredNamespaceByPrefix, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setAnnotation, setHistory, setId, setLevel, setMetaId, setName, setNamespace, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, toString, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetId, unsetMetaId, unsetName, 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, userObjectKeySetgetId, getName, isSetId, isSetName, setId, setName, unsetId, unsetNameaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementBySId, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, registerChild, removeCVTerm, removeCVTerm, removeDeclaredNamespaceByNamespace, removeDeclaredNamespaceByPrefix, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTreeNodeChangeListener, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNotes, unsetPlugin, unsetSBOTermchildren, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeafaddAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySetpublic CompartmentReference()
CompartmentReference instance.public CompartmentReference(CompartmentReference obj)
CompartmentReference instance, cloned from the given object.obj - the CompartmentReference to clonepublic CompartmentReference(int level,
int version)
level - SBML Levelversion - SBML Versionpublic CompartmentReference(java.lang.String id)
id - the identifier for the new element.public CompartmentReference(java.lang.String id,
int level,
int version)
id - the identifier for this element.level - the SBML Levelversion - the SBML Versionpublic CompartmentReference(java.lang.String id,
java.lang.String name,
int level,
int version)
id - the identifier for this element.name - a human-readable name for this element that can be used for display purposes.level - the SBML Levelversion - the SBML Versionpublic CompartmentReference clone()
SBaseSBase with the same
properties
like this one.clone in interface SBaseclone in class AbstractSBasepublic java.lang.String getCompartment()
CompartmentalizedSBasegetCompartment in interface CompartmentalizedSBaseString
if it is not set.public Compartment getCompartmentInstance()
CompartmentalizedSBaseCompartment that is referenced by this SBase.
Note that the return type of this method is NamedSBase because it
could be possible that some subclasses link other elements than
Compartment.getCompartmentInstance in interface CompartmentalizedSBaseModel that represents the linked
Compartment or null if it does not exist or cannot
be retrieved (e.g., if this component has not yet been linked to a
Model).public void initDefaults()
public boolean isCompartmentMandatory()
isCompartmentMandatory in interface CompartmentalizedSBasetrue if for this object the compartment attribute is
mandatory, false otherwise.public boolean isIdMandatory()
SBasetrue if the identifier of this
SBase is required to be defined (i.e., not null)
in the definition of SBML.isIdMandatory in interface NamedSBaseisIdMandatory in interface SBaseisIdMandatory in class AbstractSBasetrue if the identifier of this element must be set in
order to create a valid SBML representation. false
otherwise, i.e., if the identifier can be understood as an optional
attribute.public boolean isSetCompartment()
compartment is set.isSetCompartment in interface CompartmentalizedSBasecompartment is set.public boolean isSetCompartmentInstance()
isSetCompartmentInstance in interface CompartmentalizedSBasetrue if the Compartment which has the compartment
identifier stored in this CompartmentalizedSBase as id is
not null and this Compartment can be retrieved from
the Model that contains this CompartmentalizedSBase.
In other words, this method also returns false if the
this object is not linked to any model.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 AbstractSBaseattributeName - localName of the XML attributeprefix - prefix of the XML attributevalue - value of the XML attributetrue if the attribute has been successfully read.public boolean setCompartment(Compartment compartment)
CompartmentalizedSBaseCompartmentalizedSBase to
the id of the Compartment 'compartment'.
The compartment attribute is used to add a reference to the id of
the corresponding Compartment in the Model.
In some situations, the compartment might be optional, so that the user can
even specify Compartments that are not part of the Model.
setCompartment in interface CompartmentalizedSBasecompartment - the Compartment whose identifier should be referenced.true if this operation caused any change.CompartmentalizedSBase.setCompartment(String),
CompartmentalizedSBase.isCompartmentMandatory()public boolean setCompartment(java.lang.String compartment)
CompartmentalizedSBase
The required attribute compartment is used to identify the
Compartment in which the CompartmentalizedSBase is located.
The attribute's value should be the identifier of an existing
Compartment object in the model.
setCompartment in interface CompartmentalizedSBasecompartment - the identifier of the compartment to be set.true if this operation caused any change.CompartmentalizedSBase.setCompartment(Compartment),
CompartmentalizedSBase.isCompartmentMandatory()public boolean unsetCompartment()
CompartmentalizedSBaseunsetCompartment in interface CompartmentalizedSBasetrue if compartment was set before, otherwise false.public 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 AbstractSBaseMap containing the XML attributes of this object.public int hashCode()
SBaseSBase instance.hashCode in interface SBasehashCode in class AbstractSBaseSBase instance.Object.hashCode()public boolean equals(java.lang.Object obj)
SBase