org.sbml.jsbml
public interface SBaseWithUnit extends SBaseWithDerivedUnit
SBase that is equipped with a defined unit. This
means, instances of this interface have a derived unit and a defined unit and
provide methods to manipulate the kind of Unit or
UnitDefinition associated with this data type.| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getUnits() |
UnitDefinition |
getUnitsInstance() |
boolean |
isSetUnits() |
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. |
void |
setUnits(java.lang.String units)
Sets the unitsID of this
SBaseWithUnit. |
void |
setUnits(Unit.Kind unitKind)
Sets the unit of this
SBaseWithUnit. |
void |
setUnits(Unit unit)
Sets the
Unit of this SBaseWithUnit. |
void |
setUnits(UnitDefinition units)
Set the unit attribute of this
SBaseWithUnit to the given
unit definition. |
void |
unsetUnits()
Sets the unitsID of this
SBaseWithUnit to null. |
containsUndeclaredUnits, getDerivedUnitDefinition, getDerivedUnitsaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, clone, createPlugin, disablePackage, enablePackage, enablePackage, equals, 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, hashCode, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, readAttribute, registerChild, removeCVTerm, removeCVTerm, removeTreeNodeChangeListener, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNotes, unsetPlugin, unsetSBOTerm, writeXMLAttributesaddAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySetjava.lang.String getUnits()
SBaseWithUnit. The empty
String if it is not set.UnitDefinition getUnitsInstance()
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.boolean isSetUnits()
true if the unitsID of this element is not null.boolean isSetUnitsInstance()
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.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.void setUnits(java.lang.String units)
SBaseWithUnit. Only valid unit
kind names or identifiers of already existing UnitDefinitions are
allowed arguments of this function.units - 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 unsetUnits().void setUnits(Unit unit)
Unit of this SBaseWithUnit.unit - void setUnits(Unit.Kind unitKind)
SBaseWithUnit.
A new unit will be created base on this kind.unitKind - void setUnits(UnitDefinition units)
SBaseWithUnit to the given
unit definition.units - void unsetUnits()
SBaseWithUnit to null.