public class Submodel extends AbstractNamedSBase implements UniqueNamedSBase
Submodels are instantiations of models contained within other models.
Submodel instances represent submodels contained within CompModelPlugin.JSBML_WRONG_SBO_TERM| Constructor and 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 and 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. |
boolean |
removeDeletion(Deletion deletion)
Removes an element from the listOfDeletions.
|
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.
|
void |
setExtentConversionFactor(java.lang.String extentConversionFactor)
Sets the value of the optional 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.
|
void |
setListOfDeletions(ListOf<Deletion> listOfDeletions)
Sets the given
ListOf<Deletion>. |
void |
setModelRef(java.lang.String modelRef)
|
void |
setTimeConversionFactor(java.lang.String timeConversionFactor)
Sets the value of the optional 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. |
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. |
isValidIdaddCVTerm, addDeclaredNamespace, addExtension, addPlugin, 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, 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, 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, unsetSBOTermaddAllChangeListeners, 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 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 SBaseclone in class AbstractSBasepublic void initDefaults()
public int hashCode()
SBaseSBase instance.hashCode in interface SBasehashCode in class AbstractSBaseSBase instance.Object.hashCode()public boolean equals(java.lang.Object obj)
SBasepublic 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 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 falsepublic 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 falsepublic 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 falsepublic boolean isSetListOfDeletions()
true, if listOfDeletions contains at least one element.true, if listOfDeletions contains at least one element,
otherwise falsepublic 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 Deletionspublic boolean unsetListOfDeletions()
true, if listOfDeletions contain at least one element,
otherwise falsetrue, if listOfDeletions contain at least one element,
otherwise falsepublic 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 Deletionjava.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.TreeNodegetAllowsChildren in class AbstractSBasepublic int getChildCount()
getChildCount in interface javax.swing.tree.TreeNodegetChildCount in class AbstractSBasepublic javax.swing.tree.TreeNode getChildAt(int index)
getChildAt in interface javax.swing.tree.TreeNodegetChildAt in class AbstractSBasepublic 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 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.