org.sbml.jsbml.ext.comp
public class CompSBMLDocumentPlugin extends CompSBasePlugin
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 more, an object of class Model
. The
Hierarchical Model Composition package allows SBML documents to
contain more than one model.Modifier and Type | Field and Description |
---|---|
private ListOf<ExternalModelDefinition> |
listOfExternalModelDefinitions |
private ListOf<ModelDefinition> |
listOfModelDefinitions |
private static long |
serialVersionUID
Generated serial version identifier.
|
listOfReplacedElements, replacedBy
extendedSBase, packageVersion
listOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS
Constructor and Description |
---|
CompSBMLDocumentPlugin(CompSBMLDocumentPlugin compSBMLDocumentPlugin) |
CompSBMLDocumentPlugin(SBMLDocument doc) |
Modifier and Type | Method and 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 |
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 . |
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 . |
boolean |
removeExternalModelDefinition(ExternalModelDefinition externalModelDefinition)
Removes an element from the listOfExternalModelDefinitions.
|
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.
|
void |
removeModelDefinition(int i)
Removes an element from the listOfModelDefinitions at the given index.
|
boolean |
removeModelDefinition(ModelDefinition modelDefinition)
Removes an element from the listOfModelDefinitions.
|
void |
removeModelDefinition(java.lang.String id)
Removes an element from the listOfModelDefinitions with the given id.
|
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. |
addReplacedElement, createReplacedBy, createReplacedElement, getElementNamespace, getListOfReplacedElements, getNumReplacedElements, getPackageName, getParent, getParentSBMLObject, getPrefix, getReplacedBy, getReplacedElement, getReplacedElement, getReplacedElementCount, getURI, initDefaults, isSetListOfReplacedElements, isSetReplacedBy, removeReplacedElement, removeReplacedElement, setListOfReplacedElements, setReplacedBy, toString, unsetListOfReplacedElements, unsetReplacedBy
equals, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getExtendedSBase, getLevel, getPackageVersion, getSBMLDocument, getVersion, hashCode, isSetExtendedSBase, removeFromParent, setExtendedSBase
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, notifyChildChange, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySet
finalize, getClass, notify, notifyAll, wait, wait, wait
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
private static final long serialVersionUID
private ListOf<ModelDefinition> listOfModelDefinitions
private ListOf<ExternalModelDefinition> listOfExternalModelDefinitions
public CompSBMLDocumentPlugin(SBMLDocument doc)
doc
- public CompSBMLDocumentPlugin(CompSBMLDocumentPlugin compSBMLDocumentPlugin)
compSBMLDocumentPlugin
- public ExternalModelDefinition getExternalModelDefinition(int index)
ExternalModelDefinition
object in this CompSBMLDocumentPlugin
.n
- an indexExternalModelDefinition
with the given index if it exists.java.lang.IndexOutOfBoundsException
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 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
- public 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
)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
.n
- an indexModelDefinition
with the given index if it exists.java.lang.IndexOutOfBoundsException
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
.public int getNumModelDefinitions()
ModelDefinition
of this CompSBMLDocumentPlugin
.ModelDefinition
of this CompSBMLDocumentPlugin
.public ExternalModelDefinition createExternalModelDefinition()
public ExternalModelDefinition createExternalModelDefinition(java.lang.String id)
ExternalModelDefinition
element and adds it to the ListOfExternalModelDefinitions listExternalModelDefinition
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
- public 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
)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()
public Model createModelDefinition(java.lang.String id)
ModelDefinition
element and adds it to the ListOfModelDefinitions listModelDefinition
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