java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, SBase
, TreeNodeWithChangeSupport
AbstractNamedSBaseRef
, ReplacedBy
, ReplacedElement
public class SBaseRef extends AbstractSBase
The four different attributes on SBaseRef are mutually exclusive: only one of the attributes can have a value at any given time, and exactly one must have a value in a given SBaseRef object instance.
JSBML_WRONG_SBO_TERM
Constructor | Description |
---|---|
SBaseRef() |
Creates a
SBaseRef instance. |
SBaseRef(int level,
int version) |
Creates a SBaseRef instance with a level and version.
|
SBaseRef(SBaseRef obj) |
Clone constructor
|
Modifier and Type | Method | Description |
---|---|---|
SBaseRef |
clone() |
Creates a deep copy of this object, i.e., a new
SBase with the same
properties
like this one. |
SBaseRef |
createSBaseRef() |
|
boolean |
equals(java.lang.Object obj) |
|
boolean |
getAllowsChildren() |
|
javax.swing.tree.TreeNode |
getChildAt(int index) |
|
int |
getChildCount() |
|
java.lang.String |
getIdRef() |
Returns the value of idRef
|
java.lang.String |
getMetaIdRef() |
Returns the value of metaIdRef
|
java.lang.String |
getPortRef() |
Returns the value of portRef
|
SBaseRef |
getSBaseRef() |
Returns the value of sBaseRef
|
java.lang.String |
getUnitRef() |
Returns the value of unitRef
|
int |
hashCode() |
Returns a hash code value for this
SBase instance. |
void |
initDefaults() |
Initializes the default values.
|
boolean |
isSetIdRef() |
Returns whether idRef is set
|
boolean |
isSetMetaIdRef() |
Returns whether metaIdRef is set
|
boolean |
isSetPortRef() |
Returns whether portRef is set
|
boolean |
isSetSBaseRef() |
Returns whether sBaseRef is set
|
boolean |
isSetUnitRef() |
Returns whether unitRef is set
|
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value) |
Sets the given attribute in this
SBase . |
void |
setIdRef(java.lang.String idRef) |
Sets the value of the optional idRef attribute.
|
void |
setMetaIdRef(java.lang.String metaIdRef) |
Sets the value of the optional metaIdRef attribute.
|
void |
setPortRef(java.lang.String portRef) |
Sets the value of the optional portRef attribute.
|
void |
setSBaseRef(SBaseRef sBaseRef) |
Sets the value of the optional sBaseRef element.
|
void |
setUnitRef(java.lang.String unitRef) |
Sets the value of the optional unitRef attribute
|
boolean |
unsetIdRef() |
Unsets the variable idRef
|
boolean |
unsetMetaIdRef() |
Unsets the variable metaIdRef
|
boolean |
unsetPortRef() |
Unsets the variable portRef
|
boolean |
unsetSBaseRef() |
Unsets the variable sBaseRef
|
boolean |
unsetUnitRef() |
Unsets the variable unitRef
|
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. |
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, addResources, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAllDeclaredNamespaces, getAnnotation, getAnnotationString, 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, isIdMandatory, 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, unsetSBOTerm
addAllChangeListeners, 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, userObjectKeySet
removeTreeNodeChangeListener
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
public SBaseRef()
SBaseRef
instance.public SBaseRef(int level, int version)
level
- the SBML levelversion
- the SBML versionpublic SBaseRef(SBaseRef obj)
obj
- the instance to clonepublic SBaseRef clone()
SBase
SBase
with the same
properties
like this one.clone
in interface SBase
clone
in class AbstractSBase
public void initDefaults()
public java.lang.String getPortRef()
public boolean isSetPortRef()
public void setPortRef(java.lang.String portRef)
As its name implies, this attribute is used to refer
to a port identifier, in the case when the reference
being constructed with the SBaseRef
is
intended to refer to a port on a submodel.
portRef
- the value of portRefpublic boolean unsetPortRef()
true
, if portRef was set before,
otherwise false
public java.lang.String getIdRef()
public boolean isSetIdRef()
public void setIdRef(java.lang.String idRef)
As its name implies, this attribute is used to
refer to a regular identifier (i.e., the value of
an id attribute on some other object), in the case
when the reference being constructed with the
SBaseRef
is intended to refer to an object
that does not have a port identifier.
idRef
- the value of idRefpublic boolean unsetIdRef()
true
, if idRef was set before,
otherwise false
public java.lang.String getUnitRef()
public boolean isSetUnitRef()
public void setUnitRef(java.lang.String unitRef)
This attribute is used to refer to the identifier of a
UnitDefinition
object. The namespace of the
UnitSIdRef value is the set of unit identifiers defined
in the submodel, not the parent model.
Note that even though this attribute is of type UnitSIdRef, the reserved unit identifiers that are defined by SBML Level 3 are not permitted as values of unitRef. Reserved unit identifiers may not be replaced or deleted.
unitRef
- the value of unitRefpublic boolean unsetUnitRef()
true
, if unitRef was set before,
otherwise false
public java.lang.String getMetaIdRef()
public boolean isSetMetaIdRef()
public void setMetaIdRef(java.lang.String metaIdRef)
This attribute is used to refer to a metaid attribute value on some
other object, in the case when the reference being constructed with
the SBaseRef
is intended to refer to an object that does not
have a port identifier. The namespace of the metaIdRef value is the
entire document in which the referenced model resides, but must refer
to a sub-element of the referenced model. Since meta identifiers are
optional attributes of SBase, all SBML objects have the potential to
have a meta identifier value.
metaIdRef
- the value of metaIdRefpublic boolean unsetMetaIdRef()
true
, if metaIdRef was set before,
otherwise false
public SBaseRef createSBaseRef()
public SBaseRef getSBaseRef()
public boolean isSetSBaseRef()
public void setSBaseRef(SBaseRef sBaseRef)
An SBaseRef
object may have up to one subcomponent named
sBaseRef, of type SBaseRef
. This permits recursive structures
to be constructed so that objects inside submodels can be referenced.
sBaseRef
- the value of sBaseRefpublic boolean unsetSBaseRef()
true
, if sBaseRef was set before,
otherwise false
public boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
getAllowsChildren
in class AbstractSBase
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
getChildCount
in class AbstractSBase
public javax.swing.tree.TreeNode getChildAt(int index)
getChildAt
in interface javax.swing.tree.TreeNode
getChildAt
in class AbstractSBase
public java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
SBase
SBase
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 SBase
writeXMLAttributes
in class AbstractSBase
Map
containing the XML attributes of this object.public boolean readAttribute(java.lang.String attributeName, java.lang.String prefix, java.lang.String value)
SBase
SBase
.
If the given attribute name is not recognized, nothing is done and
false
is returned.
readAttribute
in interface SBase
readAttribute
in class AbstractSBase
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.public int hashCode()
SBase
SBase
instance.hashCode
in interface SBase
hashCode
in class AbstractSBase
SBase
instance.Object.hashCode()
public boolean equals(java.lang.Object obj)
SBase