java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, SBasePlugin
, TreeNodeWithChangeSupport
public class CompSBMLDocumentPlugin extends CompSBasePlugin
The top level of an SBMLDocument
is a container whose
structure is defined by the object class SBML in the SBML Level
3 Version 1 Core specification. In Level 3 Core, this container
can contain only one object of class Model
. The
Hierarchical Model Composition package allows SBML documents to
contain more than one model.
Constructor | Description |
---|---|
CompSBMLDocumentPlugin(CompSBMLDocumentPlugin compSBMLDocumentPlugin) |
Creates a new
CompSBMLDocumentPlugin instance. |
CompSBMLDocumentPlugin(SBMLDocument doc) |
Creates a new
CompSBMLDocumentPlugin instance. |
Modifier and Type | Method | Description |
---|---|---|
boolean |
addExternalModelDefinition(ExternalModelDefinition externalModelDefinition) |
Adds a new
ExternalModelDefinition to the listOfExternalModelDefinitions. |
boolean |
addModelDefinition(ModelDefinition modelDefinition) |
Adds a new
ModelDefinition to the listOfModelDefinitions. |
CompSBMLDocumentPlugin |
clone() |
clones this class
|
ExternalModelDefinition |
createExternalModelDefinition() |
Creates a new ExternalModelDefinition element and adds it to the ListOfExternalModelDefinitions list
|
ExternalModelDefinition |
createExternalModelDefinition(java.lang.String id) |
Creates a new
ExternalModelDefinition element and adds it to the ListOfExternalModelDefinitions list |
Model |
createModelDefinition() |
Creates a new ModelDefinition element and adds it to the ListOfModelDefinitions list
|
Model |
createModelDefinition(java.lang.String id) |
Creates a new
ModelDefinition element and adds it to the ListOfModelDefinitions list |
boolean |
equals(java.lang.Object obj) |
|
boolean |
getAllowsChildren() |
|
javax.swing.tree.TreeNode |
getChildAt(int childIndex) |
|
int |
getChildCount() |
|
ExternalModelDefinition |
getExternalModelDefinition(int index) |
Returns the n-th
ExternalModelDefinition object in this CompSBMLDocumentPlugin . |
ExternalModelDefinition |
getExternalModelDefinition(java.lang.String id) |
Returns a
ExternalModelDefinition element that has the given 'id' within
this CompSBMLDocumentPlugin or null if no such element can be found. |
int |
getExternalModelDefinitionCount() |
Returns the number of
ExternalModelDefinition objects in this CompSBMLDocumentPlugin . |
ListOf<ExternalModelDefinition> |
getListOfExternalModelDefinitions() |
Returns the listOfExternalModelDefinitions.
|
ListOf<ModelDefinition> |
getListOfModelDefinitions() |
Returns the listOfModelDefinitions.
|
ModelDefinition |
getModelDefinition(int index) |
Returns the n-th
ModelDefinition object in this CompSBMLDocumentPlugin . |
ModelDefinition |
getModelDefinition(java.lang.String id) |
Returns a
ModelDefinition element that has the given 'id' within
this CompSBMLDocumentPlugin or null if no such element can be found. |
int |
getModelDefinitionCount() |
Returns the number of
ModelDefinition objects in this CompSBMLDocumentPlugin . |
int |
getNumExternalModelDefinitions() |
Returns the number of
ExternalModelDefinition of this CompSBMLDocumentPlugin . |
int |
getNumModelDefinitions() |
Returns the number of
ModelDefinition of this CompSBMLDocumentPlugin . |
int |
hashCode() |
|
boolean |
isSetListOfExternalModelDefinitions() |
Returns
true , if listOfExternalModelDefinitions contains at least one element. |
boolean |
isSetListOfModelDefinitions() |
Returns
true , if listOfModelDefinitions contains at least one element. |
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value) |
Reads and sets the attribute if it is know from this
SBasePlugin . |
void |
removeExternalModelDefinition(int i) |
Removes an element from the listOfExternalModelDefinitions at the given index.
|
void |
removeExternalModelDefinition(java.lang.String id) |
Removes an element from the listOfExternalModelDefinitions with the given id.
|
boolean |
removeExternalModelDefinition(ExternalModelDefinition externalModelDefinition) |
Removes an element from the listOfExternalModelDefinitions.
|
void |
removeModelDefinition(int i) |
Removes an element from the listOfModelDefinitions at the given index.
|
void |
removeModelDefinition(java.lang.String id) |
Removes an element from the listOfModelDefinitions with the given id.
|
boolean |
removeModelDefinition(ModelDefinition modelDefinition) |
Removes an element from the listOfModelDefinitions.
|
void |
setListOfExternalModelDefinitions(ListOf<ExternalModelDefinition> listOfExternalModelDefinitions) |
The listOfExternamModelDefinitions is an optional element of
CompSBMLDocumentPlugin
and defines external SBML document references within the ExternalModelDefinition
object. |
void |
setListOfModelDefinitions(ListOf<ModelDefinition> listOfModelDefinitions) |
listOfModelDefinitions is an optional list of
CompSBMLDocumentPlugin
which specifies ModelDefinition s for the SBML document. |
boolean |
unsetListOfExternalModelDefinitions() |
Returns
true , if listOfExternalModelDefinitions contain at least one element,
otherwise false |
boolean |
unsetListOfModelDefinitions() |
Returns
true , if listOfModelDefinitions contain at least one element,
otherwise false |
java.util.Map<java.lang.String,java.lang.String> |
writeXMLAttributes() |
Returns a
Map containing the XML attributes of this object. |
fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getElementNamespace, getExtendedSBase, getLevel, getPackageVersion, getSBMLDocument, getVersion, isSetExtendedSBase, isSetPackageVersion, removeFromParent, setExtendedSBase, setNamespace, setPackageVersion
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, toString, userObjectKeySet
addReplacedElement, createReplacedBy, createReplacedElement, getListOfReplacedElements, getNumReplacedElements, getPackageName, getParent, getParentSBMLObject, getPrefix, getReplacedBy, getReplacedElement, getReplacedElement, getReplacedElementCount, getURI, initDefaults, isSetListOfReplacedElements, isSetReplacedBy, removeReplacedElement, removeReplacedElement, setListOfReplacedElements, setReplacedBy, unsetListOfReplacedElements, unsetReplacedBy
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
public CompSBMLDocumentPlugin(SBMLDocument doc)
CompSBMLDocumentPlugin
instance.doc
- the core SBMLDocument
to is extendedpublic CompSBMLDocumentPlugin(CompSBMLDocumentPlugin compSBMLDocumentPlugin)
CompSBMLDocumentPlugin
instance.compSBMLDocumentPlugin
- the instance to clonepublic ExternalModelDefinition getExternalModelDefinition(int index)
ExternalModelDefinition
object in this CompSBMLDocumentPlugin
.index
- an indexExternalModelDefinition
with the given index if it exists.java.lang.IndexOutOfBoundsException
- if the index is out of range: (index < 0 || index >= size())public ExternalModelDefinition getExternalModelDefinition(java.lang.String id)
ExternalModelDefinition
element that has the given 'id' within
this CompSBMLDocumentPlugin
or null
if no such element can be found.id
- an id indicating a ExternalModelDefinition
element of the
CompSBMLDocumentPlugin
.ExternalModelDefinition
element of the CompSBMLDocumentPlugin
that has
the given 'id' as id or null
if no element with this
'id' can be found.public int getExternalModelDefinitionCount()
ExternalModelDefinition
objects in this CompSBMLDocumentPlugin
.ExternalModelDefinition
objects in this CompSBMLDocumentPlugin
.public ListOf<ExternalModelDefinition> getListOfExternalModelDefinitions()
public CompSBMLDocumentPlugin clone()
CompSBasePlugin
clone
in interface SBasePlugin
clone
in class CompSBasePlugin
SBasePlugin
from this SBasePlugin
.public int hashCode()
hashCode
in interface SBasePlugin
hashCode
in class CompSBasePlugin
public boolean equals(java.lang.Object obj)
equals
in interface SBasePlugin
equals
in class CompSBasePlugin
public boolean isSetListOfExternalModelDefinitions()
true
, if listOfExternalModelDefinitions contains at least one element.true
, if listOfExternalModelDefinitions contains at least one element,
otherwise false
public void setListOfExternalModelDefinitions(ListOf<ExternalModelDefinition> listOfExternalModelDefinitions)
CompSBMLDocumentPlugin
and defines external SBML document references within the ExternalModelDefinition
object.
Sets the given ListOf<ExternalModelDefinition>
. If listOfExternalModelDefinitions
was defined before and contains some elements, they are all unset.listOfExternalModelDefinitions
- the list of ExternalModelDefinition
spublic boolean unsetListOfExternalModelDefinitions()
true
, if listOfExternalModelDefinitions contain at least one element,
otherwise false
true
, if listOfExternalModelDefinitions contain at least one element,
otherwise false
public boolean addExternalModelDefinition(ExternalModelDefinition externalModelDefinition)
ExternalModelDefinition
to the listOfExternalModelDefinitions.
The listOfExternalModelDefinitions is initialized if necessary.
externalModelDefinition
- the element to add to the listtrue
(as specified by Collection.add(E)
)public boolean removeExternalModelDefinition(ExternalModelDefinition externalModelDefinition)
externalModelDefinition
- the element to be removed from the listtrue
if the list contained the specified elementList.remove(Object)
public void removeExternalModelDefinition(int i)
i
- the index where to remove the ExternalModelDefinition
java.lang.IndexOutOfBoundsException
- if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size)public void removeExternalModelDefinition(java.lang.String id)
id
- the id of the ExternalModelDefinition
to removepublic ModelDefinition getModelDefinition(int index)
ModelDefinition
object in this CompSBMLDocumentPlugin
.index
- an indexModelDefinition
with the given index if it exists.java.lang.IndexOutOfBoundsException
- if the index is out of range: (index < 0 || index >= size())public ModelDefinition getModelDefinition(java.lang.String id)
ModelDefinition
element that has the given 'id' within
this CompSBMLDocumentPlugin
or null
if no such element can be found.id
- an id indicating a ModelDefinition
element of the
CompSBMLDocumentPlugin
.ModelDefinition
element of the CompSBMLDocumentPlugin
that has
the given 'id' as id or null
if no element with this
'id' can be found.public int getModelDefinitionCount()
ModelDefinition
objects in this CompSBMLDocumentPlugin
.ModelDefinition
objects in this CompSBMLDocumentPlugin
.public int getNumExternalModelDefinitions()
ExternalModelDefinition
of this CompSBMLDocumentPlugin
.ExternalModelDefinition
of this CompSBMLDocumentPlugin
.getExternalModelDefinitionCount()
public int getNumModelDefinitions()
ModelDefinition
of this CompSBMLDocumentPlugin
.ModelDefinition
of this CompSBMLDocumentPlugin
.getModelDefinitionCount()
public ExternalModelDefinition createExternalModelDefinition()
ExternalModelDefinition
elementpublic ExternalModelDefinition createExternalModelDefinition(java.lang.String id)
ExternalModelDefinition
element and adds it to the ListOfExternalModelDefinitions listid
- the idExternalModelDefinition
elementpublic boolean isSetListOfModelDefinitions()
true
, if listOfModelDefinitions contains at least one element.true
, if listOfModelDefinitions contains at least one element,
otherwise false
public ListOf<ModelDefinition> getListOfModelDefinitions()
public void setListOfModelDefinitions(ListOf<ModelDefinition> listOfModelDefinitions)
CompSBMLDocumentPlugin
which specifies ModelDefinition
s for the SBML document.
Sets the given ListOf<ModelDefinition>
. If listOfModelDefinitions
was defined before and contains some elements, they are all unset.listOfModelDefinitions
- the list of ModelDefinition
spublic boolean unsetListOfModelDefinitions()
true
, if listOfModelDefinitions contain at least one element,
otherwise false
true
, if listOfModelDefinitions contain at least one element,
otherwise false
public boolean addModelDefinition(ModelDefinition modelDefinition)
ModelDefinition
to the listOfModelDefinitions.
The listOfModelDefinitions is initialized if necessary.
modelDefinition
- the element to add to the listtrue
(as specified by Collection.add(E)
)public boolean removeModelDefinition(ModelDefinition modelDefinition)
modelDefinition
- the element to be removed from the listtrue
if the list contained the specified elementList.remove(Object)
public void removeModelDefinition(int i)
i
- the index where to remove the ModelDefinition
java.lang.IndexOutOfBoundsException
- if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size)public void removeModelDefinition(java.lang.String id)
id
- the id of the ModelDefinition
to removepublic Model createModelDefinition()
ModelDefinition
elementpublic Model createModelDefinition(java.lang.String id)
ModelDefinition
element and adds it to the ListOfModelDefinitions listid
- the idModelDefinition
elementpublic boolean readAttribute(java.lang.String attributeName, java.lang.String prefix, java.lang.String value)
SBasePlugin
SBasePlugin
.readAttribute
in interface SBasePlugin
readAttribute
in class CompSBasePlugin
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.public java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
SBasePlugin
Map
containing the XML attributes of this object.writeXMLAttributes
in interface SBasePlugin
writeXMLAttributes
in class CompSBasePlugin
Map
containing the XML attributes of this object.public javax.swing.tree.TreeNode getChildAt(int childIndex)
getChildAt
in interface javax.swing.tree.TreeNode
getChildAt
in class CompSBasePlugin
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
getChildCount
in class CompSBasePlugin
public boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
getAllowsChildren
in class CompSBasePlugin