java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, SpatialNamedSBase
, NamedSBase
, SBase
, SBaseWithDerivedUnit
, SBaseWithUnit
, TreeNodeWithChangeSupport
public class CoordinateComponent extends AbstractSpatialNamedSBase implements SBaseWithUnit
JSBML_WRONG_SBO_TERM
Constructor | Description |
---|---|
CoordinateComponent() |
Creates a new
CoordinateComponent instance. |
CoordinateComponent(int level,
int version) |
Creates a new
CoordinateComponent instance. |
CoordinateComponent(java.lang.String id,
int level,
int version) |
Creates a new
CoordinateComponent instance. |
CoordinateComponent(CoordinateComponent coordComp) |
Creates a new
CoordinateComponent instance copied from the given CoordinateComponent . |
Modifier and Type | Method | Description |
---|---|---|
CoordinateComponent |
clone() |
Creates a deep copy of this object, i.e., a new
SBase with the same
properties
like this one. |
boolean |
containsUndeclaredUnits() |
Returns
true or false depending on whether this
SBaseWithDerivedUnit refers to elements such as parameters or
numbers with undeclared units. |
boolean |
equals(java.lang.Object object) |
|
Boundary |
getBoundaryMaximum() |
Returns the value of boundaryMaximum
|
Boundary |
getBoundaryMinimum() |
Returns the value of boundaryMinimum
|
javax.swing.tree.TreeNode |
getChildAt(int childIndex) |
|
int |
getChildCount() |
|
UnitDefinition |
getDerivedUnitDefinition() |
Derives the unit of this quantity and tries to identify an
equivalent
UnitDefinition within the corresponding Model . |
java.lang.String |
getDerivedUnits() |
Derives the unit of this quantity.
|
CoordinateKind |
getType() |
Returns the value of type
|
java.lang.String |
getUnits() |
Returns the value of unit
|
UnitDefinition |
getUnitsInstance() |
|
int |
hashCode() |
Returns a hash code value for this
SBase instance. |
boolean |
isSetBoundaryMaximum() |
Returns whether boundaryMaximum is set
|
boolean |
isSetBoundaryMinimum() |
Returns whether boundaryMinimum is set
|
boolean |
isSetType() |
Returns whether type is set
|
boolean |
isSetUnits() |
Returns whether unit is set
|
boolean |
isSetUnitsInstance() |
Checks whether the element referenced by the
unitsID
attribute of this SBaseWithUnit is either an existing base
Unit , i.e., a simple Unit that can directly be addressed
via its Unit.Kind element, or the identifier of an existing
UnitDefinition in the Model to which this
SBaseWithUnit belongs. |
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value) |
Sets the given attribute in this
SBase . |
void |
setBoundaryMaximum(Boundary boundaryMaximum) |
Sets the value of boundaryMaximum
|
void |
setBoundaryMinimum(Boundary boundaryMinimum) |
Sets the value of boundaryMinimum
|
void |
setType(CoordinateKind type) |
Sets the value of type
|
void |
setUnits(java.lang.String unit) |
Sets the value of unit
|
void |
setUnits(Unit unit) |
Sets the
Unit of this SBaseWithUnit . |
void |
setUnits(Unit.Kind unitKind) |
Sets the unit of this
SBaseWithUnit . |
void |
setUnits(UnitDefinition units) |
Set the unit attribute of this
SBaseWithUnit to the given
unit definition. |
boolean |
unsetBoundaryMaximum() |
Unsets the variable boundaryMaximum
|
boolean |
unsetBoundaryMinimum() |
Unsets the variable boundaryMinimum
|
boolean |
unsetType() |
Unsets the variable type
|
void |
unsetUnits() |
Unsets the variable unit
|
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
getAllowsChildren, getSpatialId, initDefaults, isSetSpatialId, setSpatialId, unsetSpatialId
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
getId, getName, isIdMandatory, isSetId, isSetName, setId, setName, unsetId, unsetName
addCVTerm, 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, getId, getLevel, getLevelAndVersion, getMetaId, getModel, getName, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, 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, registerChild, removeCVTerm, removeCVTerm, removeDeclaredNamespaceByNamespace, removeDeclaredNamespaceByPrefix, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTreeNodeChangeListener, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setAnnotation, setHistory, setId, setLevel, setMetaId, setName, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetId, unsetMetaId, unsetName, unsetNotes, unsetPlugin, unsetSBOTerm
children, getAllowsChildren, getIndex, getParent, isLeaf
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
public CoordinateComponent()
CoordinateComponent
instance.public CoordinateComponent(CoordinateComponent coordComp)
CoordinateComponent
instance copied from the given CoordinateComponent
.coordComp
- the CoordinateComponent
to clone or copypublic CoordinateComponent(int level, int version)
CoordinateComponent
instance.level
- the SBML levelversion
- the SBML versionpublic CoordinateComponent(java.lang.String id, int level, int version)
CoordinateComponent
instance.id
- the element idlevel
- the SBML levelversion
- the SBML versionpublic CoordinateComponent clone()
SBase
SBase
with the same
properties
like this one.clone
in interface SBase
clone
in class AbstractSpatialNamedSBase
public Boundary getBoundaryMinimum()
public boolean isSetBoundaryMinimum()
public void setBoundaryMinimum(Boundary boundaryMinimum)
boundaryMinimum
- the minimum boundarypublic boolean unsetBoundaryMinimum()
true
, if boundaryMinimum was set before,
otherwise false
public Boundary getBoundaryMaximum()
public boolean isSetBoundaryMaximum()
public void setBoundaryMaximum(Boundary boundaryMaximum)
boundaryMaximum
- the maximum boundarypublic boolean unsetBoundaryMaximum()
true
, if boundaryMaximum was set before,
otherwise false
public CoordinateKind getType()
public boolean isSetType()
public void setType(CoordinateKind type)
type
- the typepublic boolean unsetType()
true
, if type was set before,
otherwise false
public boolean containsUndeclaredUnits()
SBaseWithDerivedUnit
true
or false
depending on whether this
SBaseWithDerivedUnit
refers to elements such as parameters or
numbers with undeclared units.
A return value of true indicates that the UnitDefinition
returned by SBaseWithDerivedUnit.getDerivedUnitDefinition()
may not accurately
represent the units of the expression.containsUndeclaredUnits
in interface SBaseWithDerivedUnit
true
if the math expression of this SBaseWithDerivedUnit
includes parameters/numbers with undeclared units,
false
otherwise.public boolean equals(java.lang.Object object)
SBase
public javax.swing.tree.TreeNode getChildAt(int childIndex)
getChildAt
in interface javax.swing.tree.TreeNode
getChildAt
in class AbstractSpatialNamedSBase
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
getChildCount
in class AbstractSpatialNamedSBase
public java.lang.String getUnits()
getUnits
in interface SBaseWithUnit
public boolean isSetUnits()
isSetUnits
in interface SBaseWithUnit
public void setUnits(java.lang.String unit)
setUnits
in interface SBaseWithUnit
unit
- the identifier of an already existing UnitDefinition
or an Unit.Kind
identifier for the current
level/version combination of this unit. Passing a null value
to this method is equivalent to calling SBaseWithUnit.unsetUnits()
.public void unsetUnits()
unsetUnits
in interface SBaseWithUnit
public UnitDefinition getDerivedUnitDefinition()
SBaseWithDerivedUnit
UnitDefinition
within the corresponding Model
.
If no equivalent unit definition can be found, a new unit definition will
be created that is not part of the model but represents the unit of this
quantity. If it is not possible to derive a unit for this quantity, null
will be returned.getDerivedUnitDefinition
in interface SBaseWithDerivedUnit
UnitDefinition
that represent the derived unit of this quantity, or null
if it is not possible to derive a unit.public java.lang.String getDerivedUnits()
SBaseWithDerivedUnit
Unit.Kind
this
method will return the String
representation of this
Unit.Kind
.getDerivedUnits
in interface SBaseWithDerivedUnit
String
that represent the id of a UnitDefinition
. This UnitDefinition
represent the derived unit of this quantity. If it is not possible to derive a unit for this quantity
or if no equivalent UnitDefinition
can be found in the Model
, null is returned.public UnitDefinition getUnitsInstance()
getUnitsInstance
in interface SBaseWithUnit
UnitDefinition
instance which has the unitsID
of
this SBaseWithUnit
as id. Null if it doesn't
exist. In case that the unit of this SBaseWithUnit
represents a base Unit
, a new UnitDefinition
will
be created and returned by this method. This new
UnitDefinition
will only contain the one unit represented
by the unit identifier in this SBaseWithUnit
. Note
that the corresponding model will not contain this
UnitDefinition
. The identifier of this new
UnitDefinition
will be set to the same value as the name
of the base Unit
.public int hashCode()
SBase
SBase
instance.hashCode
in interface SBase
hashCode
in class AbstractSpatialNamedSBase
SBase
instance.Object.hashCode()
public boolean isSetUnitsInstance()
SBaseWithUnit
unitsID
attribute of this SBaseWithUnit
is either an existing base
Unit
, i.e., a simple Unit
that can directly be addressed
via its Unit.Kind
element, or the identifier of an existing
UnitDefinition
in the Model
to which this
SBaseWithUnit
belongs.isSetUnitsInstance
in interface SBaseWithUnit
true
if either a UnitDefinition
, which has the
unitsID
of this SBaseWithUnit
, can be
found in the Model
to which this
SBaseWithUnit
belongs, or if this element's
unitsID
as a corresponding base Unit
for the
given Level/Version combination.public void setUnits(Unit.Kind unitKind)
SBaseWithUnit
SBaseWithUnit
.
A new unit will be created base on this kind.setUnits
in interface SBaseWithUnit
public void setUnits(Unit unit)
SBaseWithUnit
Unit
of this SBaseWithUnit
.setUnits
in interface SBaseWithUnit
public void setUnits(UnitDefinition units)
SBaseWithUnit
SBaseWithUnit
to the given
unit definition.setUnits
in interface SBaseWithUnit
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 AbstractSpatialNamedSBase
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.