java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, SBasePlugin
, TreeNodeWithChangeSupport
public class GroupsModelPlugin extends AbstractSBasePlugin
Constructor | Description |
---|---|
GroupsModelPlugin(GroupsModelPlugin groupModelPlugin) |
Creates a new
GroupsModelPlugin instance cloned from the given parameter. |
GroupsModelPlugin(Model model) |
Creates a new
GroupsModelPlugin instance |
Modifier and Type | Method | Description |
---|---|---|
boolean |
addGroup(Group group) |
Adds a new element to the listOfGroups.
|
GroupsModelPlugin |
clone() |
Creates a new instance of
SBasePlugin from this SBasePlugin . |
Group |
createGroup() |
Creates a new instance of
Group and add it to this GroupsModelPlugin . |
Group |
createGroup(java.lang.String id) |
Creates a new instance of
Group and add it to this GroupsModelPlugin . |
Group |
createGroup(java.lang.String id,
java.lang.String... memberIds) |
Creates a new instance of
Group and add it to this GroupsModelPlugin . |
boolean |
getAllowsChildren() |
|
SBase |
getChildAt(int childIndex) |
|
int |
getChildCount() |
|
Group |
getGroup(int i) |
Returns the n-th
Group object in this GroupsModelPlugin . |
SBase |
getGroup(java.lang.String sbmlID) |
Gets the
Group that has the given id. |
int |
getGroupCount() |
Returns the number of
Group s of this GroupsModelPlugin . |
ListOf<Group> |
getListOfGroups() |
Returns the listOfGroups.
|
int |
getNumGroups() |
Returns the number of
Group s of this GroupsModelPlugin . |
java.lang.String |
getPackageName() |
Returns the package name of this plugin object.
|
SBMLDocument |
getParent() |
|
SBMLDocument |
getParentSBMLObject() |
Returns the parent
SBase object to which this plugin object connected. |
java.lang.String |
getPrefix() |
Returns the prefix of the package extension of this plugin object.
|
java.lang.String |
getURI() |
Gets the URI to which this element belongs to.
|
boolean |
isSetListOfGroups() |
|
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 |
setListOfGroups(ListOf<Group> listOfGroups) |
|
boolean |
unsetListOfGroups() |
Removes the
listOfGroups from this Model and notifies
all registered instances of TreeNodeChangeListener . |
java.util.Map<java.lang.String,java.lang.String> |
writeXMLAttributes() |
Returns a
Map containing the XML attributes of this object. |
equals, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getElementNamespace, getExtendedSBase, getLevel, getPackageVersion, getSBMLDocument, getVersion, hashCode, 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
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
public GroupsModelPlugin(GroupsModelPlugin groupModelPlugin)
GroupsModelPlugin
instance cloned from the given parameter.groupModelPlugin
- the instance to clonepublic GroupsModelPlugin(Model model)
GroupsModelPlugin
instancemodel
- the parent core Model
.public boolean addGroup(Group group)
listOfGroups is initialized if necessary.
group
- true
(as specified by Collection.add(E)
)public GroupsModelPlugin clone()
SBasePlugin
SBasePlugin
from this SBasePlugin
.clone
in interface SBasePlugin
clone
in class AbstractSBasePlugin
SBasePlugin
from this SBasePlugin
.public Group createGroup()
Group
and add it to this GroupsModelPlugin
.Group
instance.public Group createGroup(java.lang.String id)
Group
and add it to this GroupsModelPlugin
.public Group createGroup(java.lang.String id, java.lang.String... memberIds)
Group
and add it to this GroupsModelPlugin
.
For each id in the memberIds array, a new Member
instance is created and added to the Group
as well.public boolean getAllowsChildren()
public SBase getChildAt(int childIndex)
public int getChildCount()
public Group getGroup(int i)
Group
object in this GroupsModelPlugin
.i
- an indexGroup
with the given index if it exists.java.lang.IndexOutOfBoundsException
public int getGroupCount()
Group
s of this GroupsModelPlugin
.Group
s of this GroupsModelPlugin
.public ListOf<Group> getListOfGroups()
ListOf
is not defined, creates an empty one.public int getNumGroups()
Group
s of this GroupsModelPlugin
.Group
s of this GroupsModelPlugin
.getGroupCount()
public java.lang.String getPackageName()
SBasePlugin
public SBMLDocument getParent()
getParent
in interface javax.swing.tree.TreeNode
getParent
in class AbstractTreeNode
public SBMLDocument getParentSBMLObject()
SBasePlugin
SBase
object to which this plugin object connected.getParentSBMLObject
in interface SBasePlugin
getParentSBMLObject
in class AbstractSBasePlugin
SBase
object to which this plugin object connected.public java.lang.String getPrefix()
SBasePlugin
public java.lang.String getURI()
SBasePlugin
SBasePlugin.getElementNamespace()
public boolean isSetListOfGroups()
public boolean readAttribute(java.lang.String attributeName, java.lang.String prefix, java.lang.String value)
SBasePlugin
SBasePlugin
.attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.public boolean unsetListOfGroups()
listOfGroups
from this Model
and notifies
all registered instances of TreeNodeChangeListener
.true
if calling this method lead to a change in this
data structure.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 AbstractSBasePlugin
Map
containing the XML attributes of this object.