org.sbml.jsbml.ext.comp
public class CompModelPlugin extends CompSBasePlugin
Modifier and Type | Field and Description |
---|---|
private ListOf<Port> |
listOfPorts |
private ListOf<Submodel> |
listOfSubmodels |
private static long |
serialVersionUID
Generated serial version identifier.
|
listOfReplacedElements, replacedBy
extendedSBase, packageVersion
listOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS
Constructor and Description |
---|
CompModelPlugin(CompModelPlugin obj)
Creates a new
CompModelPlugin instance that is a copy of the current CompModelPlugin . |
CompModelPlugin(Model model)
Creates a new
CompModelPlugin instance, associated with the given Model |
Modifier and Type | Method and Description |
---|---|
boolean |
addPort(Port port)
Adds a new
Port to the listOfPorts. |
boolean |
addSubmodel(Submodel submodel)
Adds a new
Submodel to the listOfSubmodels. |
CompModelPlugin |
clone()
clones this class
|
Port |
createPort()
Creates a new Port element and adds it to the ListOfPorts list
|
Port |
createPort(java.lang.String id)
Creates a new
Port element and adds it to the ListOfPorts list |
Submodel |
createSubmodel()
Creates a new Submodel element and adds it to the ListOfSubmodels list
|
Submodel |
createSubmodel(java.lang.String id)
Creates a new
Submodel element and adds it to the ListOfSubmodels list |
boolean |
getAllowsChildren() |
javax.swing.tree.TreeNode |
getChildAt(int childIndex) |
int |
getChildCount() |
ListOf<Port> |
getListOfPorts()
Returns the listOfPorts.
|
ListOf<Submodel> |
getListOfSubmodels()
Returns the listOfSubmodels.
|
int |
getPortCount()
Returns the number of
Port objects in this CompModelPlugin . |
int |
getSubmodelCount()
Returns the number of
Submodel objects in this CompModelPlugin . |
boolean |
isSetListOfPorts()
Returns
true , if listOfPorts contains at least one element. |
boolean |
isSetListOfSubmodels()
Returns
true , if listOfSubmodels contains at least one element. |
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
TODO: optionally, create additional create methods with more
variables, for instance "bar" variable
|
void |
removePort(int i)
Removes an element from the listOfPorts at the given index.
|
boolean |
removePort(Port port)
Removes an element from the listOfPorts.
|
void |
removeSubmodel(int i)
Removes an element from the listOfSubmodels at the given index.
|
boolean |
removeSubmodel(java.lang.String id)
Removes an element from the listOfSubmodels.
|
boolean |
removeSubmodel(Submodel submodel)
Removes an element from the listOfSubmodels.
|
void |
setListOfPorts(ListOf<Port> listOfPorts)
Sets the given
ListOf<Port> . |
void |
setListOfSubmodels(ListOf<Submodel> listOfSubmodels)
Sets the given
ListOf<Submodel> . |
boolean |
unsetListOfPorts()
Returns
true , if listOfPorts contain at least one element,
otherwise false |
boolean |
unsetListOfSubmodels()
Returns
true , if listOfSubmodels 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, getPackageName, getParent, getParentSBMLObject, getPrefix, getReplacedBy, getReplacedElementCount, getURI, initDefaults, isSetListOfReplacedElements, isSetReplacedBy, removeReplacedElement, removeReplacedElement, setListOfReplacedElements, setReplacedBy, toString, unsetListOfReplacedElements, unsetReplacedBy
equals, getExtendedSBase, getLevel, getPackageVersion, getSBMLDocument, getVersion, hashCode, isSetExtendedSBase
addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, notifyChildChange, putUserObject, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySet
finalize, getClass, notify, notifyAll, wait, wait, wait
addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
private static final long serialVersionUID
public CompModelPlugin(CompModelPlugin obj)
CompModelPlugin
instance that is a copy of the current CompModelPlugin
.obj
- the CompModelPlugin
to clone.public CompModelPlugin(Model model)
CompModelPlugin
instance, associated with the given Model
model
- public boolean addPort(Port port)
Port
to the listOfPorts.
The listOfPorts is initialized if necessary.
port
- the element to add to the listtrue
(as specified by Collection.add
)public boolean addSubmodel(Submodel submodel)
Submodel
to the listOfSubmodels.
The listOfSubmodels is initialized if necessary.
submodel
- the element to add to the listtrue
(as specified by Collection.add
)public CompModelPlugin clone()
CompSBasePlugin
clone
in interface SBasePlugin
clone
in class CompSBasePlugin
public Port createPort()
public Port createPort(java.lang.String id)
Port
element and adds it to the ListOfPorts listPort
elementpublic Submodel createSubmodel()
public Submodel createSubmodel(java.lang.String id)
Submodel
element and adds it to the ListOfSubmodels listSubmodel
elementpublic boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
getAllowsChildren
in class CompSBasePlugin
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 ListOf<Port> getListOfPorts()
public ListOf<Submodel> getListOfSubmodels()
public int getPortCount()
Port
objects in this CompModelPlugin
.Port
objects in this CompModelPlugin
.public int getSubmodelCount()
Submodel
objects in this CompModelPlugin
.Submodel
objects in this CompModelPlugin
.public boolean isSetListOfPorts()
true
, if listOfPorts contains at least one element.true
, if listOfPorts contains at least one element,
otherwise false
public boolean isSetListOfSubmodels()
true
, if listOfSubmodels contains at least one element.true
, if listOfSubmodels contains at least one element,
otherwise false
public boolean readAttribute(java.lang.String attributeName, java.lang.String prefix, java.lang.String value)
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 void removePort(int i)
i
- the index where to remove the Port
java.lang.IndexOutOfBoundsException
- if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size)public boolean removePort(Port port)
port
- the element to be removed from the listtrue
if the list contained the specified elementList.remove(Object)
public void removeSubmodel(int i)
i
- the index where to remove the Submodel
java.lang.IndexOutOfBoundsException
- if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size)public boolean removeSubmodel(java.lang.String id)
id
- the id of the element to be removed from the listtrue
if the list contained the specified elementList.remove(Object)
public boolean removeSubmodel(Submodel submodel)
submodel
- the element to be removed from the listtrue
if the list contained the specified elementList.remove(Object)
public void setListOfPorts(ListOf<Port> listOfPorts)
ListOf<Port>
. If listOfPorts
was defined before and contains some elements, they are all unset.listOfPorts
- public void setListOfSubmodels(ListOf<Submodel> listOfSubmodels)
ListOf<Submodel>
. If listOfSubmodels
was defined before and contains some elements, they are all unset.listOfSubmodels
- public boolean unsetListOfPorts()
true
, if listOfPorts contain at least one element,
otherwise false
true
, if listOfPorts contain at least one element,
otherwise false
public boolean unsetListOfSubmodels()
true
, if listOfSubmodels contain at least one element,
otherwise false
true
, if listOfSubmodels contain at least one element,
otherwise false
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.