public class CompModelPlugin extends CompSBasePlugin implements IdManager
elementNamespace, extendedSBase, packageVersionlistOfListeners, parent, resourceBundle| 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 |
accept(SBase sbase) |
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(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(String id)
Creates a new
Submodel element and adds it to the ListOfSubmodels
list |
boolean |
equals(Object obj) |
Port |
findPort(String id)
|
boolean |
getAllowsChildren() |
TreeNode |
getChildAt(int childIndex) |
int |
getChildCount() |
ListOf<Port> |
getListOfPorts()
Returns the listOfPorts.
|
ListOf<Submodel> |
getListOfSubmodels()
Returns the listOfSubmodels.
|
int |
getNumPorts()
Returns the number of
Port of this CompModelPlugin. |
int |
getNumSubmodels()
Returns the number of
Submodel of this CompModelPlugin. |
Port |
getPort(int index)
Returns the n-th
Port object in this CompModelPlugin. |
Port |
getPort(String id)
Returns a
Port element that has the given 'id' within
this CompModelPlugin or null if no such element can be found. |
int |
getPortCount()
Returns the number of
Port objects in this CompModelPlugin. |
Submodel |
getSubmodel(int index)
Returns the n-th
Submodel object in this CompModelPlugin. |
Submodel |
getSubmodel(String id)
Returns a
Submodel element that has the given 'id' within
this CompModelPlugin or null if no such element can be found. |
int |
getSubmodelCount()
Returns the number of
Submodel objects in this CompModelPlugin. |
int |
hashCode() |
boolean |
isSetListOfPorts()
Returns
true, if listOfPorts contains at least one element. |
boolean |
isSetListOfSubmodels()
Returns
true, if listOfSubmodels contains at least one element. |
boolean |
readAttribute(String attributeName,
String prefix,
String value) |
boolean |
register(SBase sbase) |
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(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 optional
ListOf<Port>. |
void |
setListOfSubmodels(ListOf<Submodel> listOfSubmodels)
Sets the optional
ListOf<Submodel>. |
boolean |
unregister(SBase sbase) |
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 |
Map<String,String> |
writeXMLAttributes() |
addReplacedElement, createReplacedBy, createReplacedElement, getListOfReplacedElements, getNumReplacedElements, getPackageName, getParent, getParentSBMLObject, getPrefix, getReplacedBy, getReplacedElement, getReplacedElement, getReplacedElementCount, getURI, initDefaults, isSetListOfReplacedElements, isSetReplacedBy, removeReplacedElement, removeReplacedElement, setListOfReplacedElements, setReplacedBy, unsetListOfReplacedElements, unsetReplacedByfireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getElementNamespace, getExtendedSBase, getLevel, getPackageVersion, getSBMLDocument, getVersion, isSetExtendedSBase, isSetPackageVersion, removeFromParent, setExtendedSBase, setNamespace, setPackageVersionaddAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isCloningInProgress, isInvalidSBMLAllowed, isLeaf, isReadingInProgress, isRoot, isSetParent, isSetUserObjects, notifyChildChange, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, toString, userObjectKeySetfinalize, getClass, notify, notifyAll, wait, wait, waitaddAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, userObjectKeySetpublic 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 Modelmodel - the extended core Modelpublic 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(E))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(E))public CompModelPlugin clone()
CompSBasePluginclone in interface SBasePluginclone in class CompSBasePluginpublic int hashCode()
hashCode in interface SBasePluginhashCode in class CompSBasePluginpublic boolean equals(Object obj)
equals in interface SBasePluginequals in class CompSBasePluginpublic Port createPort()
Port element and adds it to the ListOfPorts listPort instance.public Port createPort(String id)
Port element and adds it to the ListOfPorts listid - the idPort elementpublic Submodel createSubmodel()
Submodel element and adds it to the ListOfSubmodels listSubmodel elementpublic Submodel createSubmodel(String id)
Submodel element and adds it to the ListOfSubmodels
listid - the idSubmodel elementpublic boolean getAllowsChildren()
getAllowsChildren in interface TreeNodegetAllowsChildren in class CompSBasePluginpublic TreeNode getChildAt(int childIndex)
getChildAt in interface TreeNodegetChildAt in class CompSBasePluginpublic int getChildCount()
getChildCount in interface TreeNodegetChildCount in class CompSBasePluginpublic ListOf<Port> getListOfPorts()
public ListOf<Submodel> getListOfSubmodels()
public int getNumPorts()
Port of this CompModelPlugin.Port of this CompModelPlugin.getPortCount()public int getNumSubmodels()
Submodel of this CompModelPlugin.Submodel of this CompModelPlugin.getSubmodelCount()public Port getPort(int index)
Port object in this CompModelPlugin.index - an indexPort with the given index if it exists.IndexOutOfBoundsException - if the index is out of range: (index < 0 || index >= size())public Port getPort(String id)
Port element that has the given 'id' within
this CompModelPlugin or null if no such element can be found.id - an id indicating a Port element of the
CompModelPlugin.Port element of the CompModelPlugin that has
the given 'id' as id or null if no element with this
'id' can be found.public int getPortCount()
Port objects in this CompModelPlugin.Port objects in this CompModelPlugin.public Submodel getSubmodel(int index)
Submodel object in this CompModelPlugin.index - an indexSubmodel with the given index if it exists.IndexOutOfBoundsException - if the index is out of range: (index < 0 || index >= size())public Submodel getSubmodel(String id)
Submodel element that has the given 'id' within
this CompModelPlugin or null if no such element can be found.id - an id indicating a Submodel element of the
CompModelPlugin.Submodel element of the CompModelPlugin that has
the given 'id' as id or null if no element with this
'id' can be found.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 falsepublic boolean isSetListOfSubmodels()
true, if listOfSubmodels contains at least one element.true, if listOfSubmodels contains at least one element,
otherwise falsepublic boolean readAttribute(String attributeName, String prefix, String value)
readAttribute in interface SBasePluginreadAttribute in class CompSBasePluginpublic void removePort(int i)
i - the index where to remove the PortIndexOutOfBoundsException - 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 SubmodelIndexOutOfBoundsException - if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size)public boolean removeSubmodel(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 - the list of Ports.public void setListOfSubmodels(ListOf<Submodel> listOfSubmodels)
ListOf<Submodel>. If listOfSubmodels
was defined before and contains some elements, they are all unset.listOfSubmodels - the list of Submodels.public boolean unsetListOfPorts()
true, if listOfPorts contain at least one element,
otherwise falsetrue, if listOfPorts contain at least one element,
otherwise falsepublic boolean unsetListOfSubmodels()
true, if listOfSubmodels contain at least one element,
otherwise falsetrue, if listOfSubmodels contain at least one element,
otherwise falsepublic Map<String,String> writeXMLAttributes()
writeXMLAttributes in interface SBasePluginwriteXMLAttributes in class CompSBasePluginpublic boolean unregister(SBase sbase)
unregister in interface IdManagerCopyright © 2009–2020. All rights reserved.