java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, NamedSBase
, SBase
, UniqueNamedSBase
, UniqueSId
, TreeNodeWithChangeSupport
public class Submodel extends AbstractNamedSBase implements UniqueNamedSBase
Submodel
s are instantiations of models contained within other models.
Submodel instances represent submodels contained within CompModelPlugin
.JSBML_WRONG_SBO_TERM
Constructor | Description |
---|---|
Submodel() |
Creates an Submodel instance
|
Submodel(int level,
int version) |
Creates a Submodel instance with a level and version.
|
Submodel(java.lang.String id) |
Creates a Submodel instance with an id.
|
Submodel(java.lang.String id,
int level,
int version) |
Creates a Submodel instance with an id, level, and version.
|
Submodel(java.lang.String id,
java.lang.String name,
int level,
int version) |
Creates a Submodel instance with an id, name, level, and version.
|
Submodel(Submodel obj) |
Clone constructor
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
addDeletion(Deletion deletion) |
Adds a new
Deletion to the listOfDeletions. |
Submodel |
clone() |
clones this class
|
Deletion |
createDeletion() |
Creates a new Deletion element and adds it to the ListOfDeletions list
|
Deletion |
createDeletion(java.lang.String id) |
Creates a new
Deletion element and adds it to the ListOfDeletions list |
boolean |
equals(java.lang.Object obj) |
|
boolean |
getAllowsChildren() |
|
javax.swing.tree.TreeNode |
getChildAt(int index) |
|
int |
getChildCount() |
|
int |
getDeletionCount() |
|
java.lang.String |
getExtentConversionFactor() |
Returns the value of extentConversionFactor
|
ListOf<Deletion> |
getListOfDeletions() |
Returns the listOfDeletions.
|
java.lang.String |
getModelRef() |
Returns the value of modelRef
|
java.lang.String |
getTimeConversionFactor() |
Returns the value of timeConversionFactor
|
int |
hashCode() |
Returns a hash code value for this
SBase instance. |
void |
initDefaults() |
Initializes the default values using the namespace.
|
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 |
isSetExtentConversionFactor() |
Returns whether extentConversionFactor is set
|
boolean |
isSetListOfDeletions() |
Returns
true , if listOfDeletions contains at least one element. |
boolean |
isSetModelRef() |
Returns whether modelRef is set
|
boolean |
isSetTimeConversionFactor() |
Returns whether timeConversionFactor is set
|
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value) |
Sets the given attribute in this
SBase . |
void |
removeDeletion(int i) |
Removes an element from the listOfDeletions at the given index.
|
void |
removeDeletion(java.lang.String id) |
Removes an element from the listOfDeletions with the given id.
|
boolean |
removeDeletion(Deletion deletion) |
Removes an element from the listOfDeletions.
|
void |
setExtentConversionFactor(java.lang.String extentConversionFactor) |
Sets the value of the optional extentConversionFactor
|
void |
setListOfDeletions(ListOf<Deletion> listOfDeletions) |
Sets the given
ListOf<Deletion> . |
void |
setModelRef(java.lang.String modelRef) |
Sets the value of the required modelRef
|
void |
setTimeConversionFactor(java.lang.String timeConversionFactor) |
Sets the value of the optional timeConversionFactor
|
boolean |
unsetExtentConversionFactor() |
Unsets the variable extentConversionFactor
|
boolean |
unsetListOfDeletions() |
Returns
true , if listOfDeletions contain at least one element,
otherwise false |
boolean |
unsetModelRef() |
Unsets the variable modelRef
|
boolean |
unsetTimeConversionFactor() |
Unsets the variable timeConversionFactor
|
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. |
isValidId
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, 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
getId, getName, 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, 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, unsetSBOTerm
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 Submodel()
public Submodel(java.lang.String id)
id
- the idpublic Submodel(int level, int version)
level
- the SBML levelversion
- the SBML versionpublic Submodel(java.lang.String id, int level, int version)
id
- the idlevel
- the SBML levelversion
- the SBML versionpublic Submodel(java.lang.String id, java.lang.String name, int level, int version)
id
- the idname
- the namelevel
- the SBML levelversion
- the SBML versionpublic Submodel(Submodel obj)
obj
- the instance to clonepublic Submodel clone()
clone
in interface SBase
clone
in class AbstractSBase
public void initDefaults()
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
public boolean isIdMandatory()
SBase
true
if the identifier of this
SBase
is required to be defined (i.e., not null
)
in the definition of SBML.isIdMandatory
in interface NamedSBase
isIdMandatory
in interface SBase
isIdMandatory
in class AbstractSBase
true
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 java.lang.String getModelRef()
public boolean isSetModelRef()
public void setModelRef(java.lang.String modelRef)
The whole purpose of a Submodel
object
is to instantiate a model definition, which is
to say, either a Model
object defined
in the same enclosing SBML document, or a model
defined in an external SBML document. The modelRef
attribute is the means by which that model is
identified. This required attribute must refer to
the identifier of a Model or ExternalModelDefinition
object within the enclosing SBML document (i.e., in the
model namespace of the document).
modelRef
- the value of modelRefpublic boolean unsetModelRef()
true
, if modelRef was set before,
otherwise false
public java.lang.String getTimeConversionFactor()
public boolean isSetTimeConversionFactor()
public void setTimeConversionFactor(java.lang.String timeConversionFactor)
The optional timeConversionFactor attribute is provided to allow
references and assumptions about the scale of time in the Submodel
to be converted to the scale of time in the containing model. If set, it
must be the identifier of a Parameter
object in the parent Model
object. The units of that Parameter
object, if present, should reduce to
being dimensionless, and the Parameter
must be constant.
timeConversionFactor
- the value of timeConversionFactorpublic boolean unsetTimeConversionFactor()
true
, if timeConversionFactor was set before,
otherwise false
public java.lang.String getExtentConversionFactor()
public boolean isSetExtentConversionFactor()
public void setExtentConversionFactor(java.lang.String extentConversionFactor)
The optional extentConversionFactor attribute is provided to allow
references and assumptions about the scale of a model's reaction
extent to be converted to the scale of the containing model. If set,
it must be the identifier of a Parameter
object in the
parent Model
object. The units of that Parameter
object, if present, should reduce to being dimensionless, and the
Parameter
must be constant.
extentConversionFactor
- the value of the optional extentConversionFactorpublic boolean unsetExtentConversionFactor()
true
, if extentConversionFactor was set before,
otherwise false
public boolean isSetListOfDeletions()
true
, if listOfDeletions contains at least one element.true
, if listOfDeletions contains at least one element,
otherwise false
public int getDeletionCount()
public ListOf<Deletion> getListOfDeletions()
public void setListOfDeletions(ListOf<Deletion> listOfDeletions)
ListOf<Deletion>
.
If listOfDeletions was defined before and contains some elements, they are all unset.
This list specifies objects to be removed from the submodel when composing the overall model. (The "removal" is mathematical and conceptual, not physical.)
listOfDeletions
- the list of Deletion
spublic boolean unsetListOfDeletions()
true
, if listOfDeletions contain at least one element,
otherwise false
true
, if listOfDeletions contain at least one element,
otherwise false
public boolean addDeletion(Deletion deletion)
Deletion
to the listOfDeletions.
The listOfDeletions is initialized if necessary.
deletion
- the element to add to the listtrue
(as specified by Collection.add(E)
)public boolean removeDeletion(Deletion deletion)
deletion
- the element to be removed from the listtrue
if the list contained the specified elementList.remove(Object)
public void removeDeletion(int i)
i
- the index where to remove the Deletion
java.lang.IndexOutOfBoundsException
- if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size)public void removeDeletion(java.lang.String id)
id
- the id of the Deletion
element to remove.public Deletion createDeletion()
Deletion
elementpublic Deletion createDeletion(java.lang.String id)
Deletion
element and adds it to the ListOfDeletions listid
- the idDeletion
elementpublic 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.