org.sbml.jsbml.ext.comp
public class Submodel extends AbstractNamedSBase implements UniqueNamedSBase
Submodel
s are instantiations of models contained within other models.
Submodel instances represent submodels contained within CompModelPlugin
.Modifier and Type | Field and Description |
---|---|
private java.lang.String |
extentConversionFactor |
private ListOf<Deletion> |
listOfDeletions |
private java.lang.String |
modelRef |
private static long |
serialVersionUID
Generated serial version identifier.
|
private java.lang.String |
timeConversionFactor |
ignoredExtensions, ignoredXMLElements
listOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS
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 |
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
|
void |
initDefaults()
Initializes the default values using the namespace.
|
boolean |
isIdMandatory()
This method can be used to query if the identifier of this
NamedSBase 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)
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)
This list specifies objects to be removed from the submodel when
composing the overall model.
|
void |
setModelRef(java.lang.String modelRef)
|
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. |
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. |
equals, getId, getName, hashCode, isSetId, isSetName, isValidId, setId, setName, toString, unsetId, unsetName
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, checkLevelAndVersionCompatibility, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getIdManager, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getVersion, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, notifyChildChange, registerChild, removeCVTerm, removeCVTerm, setAnnotation, setHistory, setLevel, setMetaId, setNamespace, setNotes, setNotes, setParentSBML, setParentSBMLObject, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, 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
finalize, getClass, notify, notifyAll, wait, wait, wait
getId, getName, isSetId, isSetName, setId, setName, unsetId, unsetName
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendNotes, appendNotes, 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, registerChild, removeCVTerm, removeCVTerm, removeTreeNodeChangeListener, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, 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
private static final long serialVersionUID
private java.lang.String modelRef
private java.lang.String timeConversionFactor
private java.lang.String extentConversionFactor
public Submodel()
public Submodel(java.lang.String id)
id
- public Submodel(int level, int version)
level
- version
- public Submodel(java.lang.String id, int level, int version)
id
- level
- version
- public Submodel(java.lang.String id, java.lang.String name, int level, int version)
id
- name
- level
- version
- public Submodel(Submodel obj)
public Submodel clone()
clone
in interface SBase
clone
in class AbstractSBase
public void initDefaults()
public boolean isIdMandatory()
NamedSBase
NamedSBase
is required to be defined (i.e., not null
)
in the definition of SBML.isIdMandatory
in interface NamedSBase
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)
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).
Sets the value of the required 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)
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.
Sets the value of the optional 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)
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.
Sets 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.listOfDeletions
- public 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
)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)
i
- the id of the Deletion
element to remove.public Deletion createDeletion()
public Deletion createDeletion(java.lang.String id)
Deletion
element and adds it to the ListOfDeletions listDeletion
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 AbstractNamedSBase
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 AbstractNamedSBase
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.