java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, SBasePlugin
, TreeNodeWithChangeSupport
public class MultiCompartmentPlugin extends AbstractSBasePlugin
Constructor | Description |
---|---|
MultiCompartmentPlugin() |
Creates an MultiCompartmentPlugin instance.
|
MultiCompartmentPlugin(Compartment compartment) |
Creates a
MultiCompartmentPlugin instance associated with the given
Compartment . |
MultiCompartmentPlugin(MultiCompartmentPlugin obj) |
Clone constructor.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
addCompartmentReference(CompartmentReference compartmentReference) |
Adds a new
CompartmentReference to the listOfCompartmentReferences . |
MultiCompartmentPlugin |
clone() |
Creates a new instance of
SBasePlugin from this SBasePlugin . |
CompartmentReference |
createCompartmentReference() |
Creates a new CompartmentReference element and adds it to the
listOfCompartmentReferences list. |
CompartmentReference |
createCompartmentReference(java.lang.String id) |
Creates a new
CompartmentReference element and adds it to the
listOfCompartmentReferences list. |
boolean |
equals(java.lang.Object obj) |
|
boolean |
getAllowsChildren() |
|
javax.swing.tree.TreeNode |
getChildAt(int index) |
|
int |
getChildCount() |
|
CompartmentReference |
getCompartmentReference(int i) |
Gets an element from the
listOfCompartmentReferences at the given index. |
CompartmentReference |
getCompartmentReference(java.lang.String compartmentReferenceId) |
Gets an element from the listOfCompartmentReferences, with the given id.
|
int |
getCompartmentReferenceCount() |
Returns the number of
CompartmentReference s in this
MultiCompartmentPlugin . |
java.lang.String |
getCompartmentType() |
Returns the value of
compartmentType . |
boolean |
getIsType() |
Returns the value of
isType . |
ListOf<CompartmentReference> |
getListOfCompartmentReferences() |
Returns the
listOfCompartmentReferences . |
int |
getNumCompartmentReferences() |
Returns the number of
CompartmentReference s in this
MultiCompartmentPlugin . |
java.lang.String |
getPackageName() |
Returns the package name of this plugin object.
|
Compartment |
getParent() |
|
Compartment |
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.
|
int |
hashCode() |
|
void |
initDefaults() |
Initializes the default values using the namespace.
|
boolean |
isSetCompartmentType() |
Returns whether
compartmentType is set. |
boolean |
isSetIsType() |
Returns whether
isType is set. |
boolean |
isSetListOfCompartmentReferences() |
Returns
true if listOfCompartmentReferences contains at least
one element. |
boolean |
isType() |
Returns the value of
isType , return false if isType is not defined. |
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 . |
CompartmentReference |
removeCompartmentReference(int i) |
Removes an element from the
listOfCompartmentReferences at the given index. |
CompartmentReference |
removeCompartmentReference(java.lang.String compartmentReferenceId) |
Removes an element from the
listOfCompartmentReferences . |
boolean |
removeCompartmentReference(CompartmentReference compartmentReference) |
Removes an element from the
listOfCompartmentReferences . |
void |
setCompartmentType(java.lang.String compartmentType) |
Sets the value of compartmentType
|
void |
setIsType(boolean isType) |
Sets the value of isType
|
void |
setListOfCompartmentReferences(ListOf<CompartmentReference> listOfCompartmentReferences) |
Sets the given
ListOf<CompartmentReference> . |
boolean |
unsetCompartmentType() |
Unsets the variable compartmentType.
|
boolean |
unsetIsType() |
Unsets the variable isType.
|
boolean |
unsetListOfCompartmentReferences() |
|
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
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
public MultiCompartmentPlugin()
public MultiCompartmentPlugin(Compartment compartment)
MultiCompartmentPlugin
instance associated with the given
Compartment
.compartment
- the compartment to extend.public MultiCompartmentPlugin(MultiCompartmentPlugin obj)
obj
- the MultiCompartmentPlugin
to clonepublic MultiCompartmentPlugin clone()
SBasePlugin
SBasePlugin
from this SBasePlugin
.clone
in interface SBasePlugin
clone
in class AbstractSBasePlugin
SBasePlugin
from this SBasePlugin
.public void initDefaults()
public java.lang.String getPackageName()
SBasePlugin
public java.lang.String getPrefix()
SBasePlugin
public java.lang.String getURI()
SBasePlugin
SBasePlugin.getElementNamespace()
public Compartment getParent()
getParent
in interface javax.swing.tree.TreeNode
getParent
in class AbstractTreeNode
public Compartment 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 boolean isSetListOfCompartmentReferences()
true
if listOfCompartmentReferences
contains at least
one element.true
if listOfCompartmentReferences
contains at least
one element, otherwise false
.public ListOf<CompartmentReference> getListOfCompartmentReferences()
listOfCompartmentReferences
.
Creates it if it does not already exist.listOfCompartmentReferences
.public void setListOfCompartmentReferences(ListOf<CompartmentReference> listOfCompartmentReferences)
ListOf<CompartmentReference>
.
If listOfCompartmentReferences
was defined before and contains some
elements, they are all unset.listOfCompartmentReferences
- the list of CompartmentReference
s to setpublic boolean unsetListOfCompartmentReferences()
true
if listOfCompartmentReferences
contains at least
one element, otherwise false
.public boolean addCompartmentReference(CompartmentReference compartmentReference)
CompartmentReference
to the listOfCompartmentReferences
.
The listOfCompartmentReferences is initialized if necessary.
compartmentReference
- the element to add to the listtrue
(as specified by Collection.add(E)
)Collection.add(Object)
public boolean removeCompartmentReference(CompartmentReference compartmentReference)
listOfCompartmentReferences
.compartmentReference
- the element to be removed from the list.true
if the list contained the specified element and it was
removed.List.remove(Object)
public CompartmentReference removeCompartmentReference(java.lang.String compartmentReferenceId)
listOfCompartmentReferences
.compartmentReferenceId
- the id of the element to be removed from the list.null
.public CompartmentReference removeCompartmentReference(int i)
listOfCompartmentReferences
at the given index.i
- the index where to remove the CompartmentReference
.java.lang.IndexOutOfBoundsException
- if the listOf is not set or if the index is
out of bound ((i < 0) || (i > listOfCompartmentReferences)
).public CompartmentReference createCompartmentReference()
listOfCompartmentReferences
list.listOfCompartmentReferences
public CompartmentReference createCompartmentReference(java.lang.String id)
CompartmentReference
element and adds it to the
listOfCompartmentReferences
list.id
- the identifier that is to be applied to the new element.CompartmentReference
element, which is the last
element in the listOfCompartmentReferences
.public CompartmentReference getCompartmentReference(int i)
listOfCompartmentReferences
at the given index.i
- the index of the CompartmentReference
element to get.java.lang.IndexOutOfBoundsException
- if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size).public CompartmentReference getCompartmentReference(java.lang.String compartmentReferenceId)
compartmentReferenceId
- the id of the CompartmentReference
element to get.null
.public int getCompartmentReferenceCount()
CompartmentReference
s in this
MultiCompartmentPlugin
.CompartmentReference
s in this
MultiCompartmentPlugin
.public int getNumCompartmentReferences()
CompartmentReference
s in this
MultiCompartmentPlugin
.CompartmentReference
s in this
MultiCompartmentPlugin
.getCompartmentReferenceCount()
public java.lang.String getCompartmentType()
compartmentType
.compartmentType
.public boolean isSetCompartmentType()
compartmentType
is set.compartmentType
is set.public void setCompartmentType(java.lang.String compartmentType)
compartmentType
- the value of compartmentType to be set.public boolean unsetCompartmentType()
true
if compartmentType was set before, otherwise false
.public boolean isType()
isType
, return false if isType is not defined.isType
, return false if isType is not defined.public boolean isSetIsType()
isType
is set.isType
is set.public void setIsType(boolean isType)
isType
- the value of isType to be set.public boolean unsetIsType()
true
if isType was set before, otherwise false
.public boolean getAllowsChildren()
public int getChildCount()
public javax.swing.tree.TreeNode getChildAt(int index)
public int hashCode()
hashCode
in interface SBasePlugin
hashCode
in class AbstractSBasePlugin
public boolean equals(java.lang.Object obj)
equals
in interface SBasePlugin
equals
in class AbstractSBasePlugin
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.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.