org.sbml.jsbml.ext.comp
public class CompSBasePlugin extends AbstractSBasePlugin
CompSBasePlugin class extends the SBase class by adding an optional ListOfReplacedElements child and a single optional ReplacedBy child.
The CompSBasePlugin class codifies the extensions to the SBase class defined in the 'Hierarchical Model Composition' package (comp).
These extensions allows the modeler to define one or more Submodel elements which the parent SBase object replaces,
and/or a single Submodel element which replaces the parent SBase object.
This is accomplished through the addition of an optional ListOfReplacedElements child, which may contain one or more ReplacedElement
objects, each of which references a Submodel element to be replaced by the containing SBase object, and through the addition of a single
optional ReplacedBy child, which references a Submodel element which is to replace the containing SBase object.
If a single SBase element both contains a ListOfReplacedElements and has a ReplacedBy child, it and all the referenced
ReplacedElement objects are to be replaced by the object referenced by the ReplacedBy element.
ReplacedElement,
ReplacedBy,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
(package private) ListOf<ReplacedElement> |
listOfReplacedElements |
(package private) ReplacedBy |
replacedBy |
private static long |
serialVersionUID
Generated serial version identifier.
|
extendedSBase, packageVersionlistOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS| Constructor and Description |
|---|
CompSBasePlugin()
Creates an CompSBasePlugin instance
|
CompSBasePlugin(CompSBasePlugin obj)
Clone constructor
|
CompSBasePlugin(SBase extendedSBase)
Creates a CompSBasePlugin instance with a level and version.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addReplacedElement(ReplacedElement replacedElement)
Adds a new element to listOfReplacedElements.
|
CompSBasePlugin |
clone()
clones this class
|
ReplacedBy |
createReplacedBy()
Creates a new
ReplacedBy element and sets it in this CompSBasePlugin. |
ReplacedElement |
createReplacedElement()
Creates a new
ReplacedElement element and adds it to the ListOfReplacedElements list. |
boolean |
getAllowsChildren() |
javax.swing.tree.TreeNode |
getChildAt(int index) |
int |
getChildCount() |
java.lang.String |
getElementNamespace()
Returns the XML namespace (URI) of the package extension of this plugin object.
|
ListOf<ReplacedElement> |
getListOfReplacedElements()
Returns the listOfReplacedElements
|
int |
getNumReplacedElements()
Returns the number of
ReplacedElement of this CompSBasePlugin. |
java.lang.String |
getPackageName()
Returns the package name of this plugin object.
|
SBase |
getParent() |
SBase |
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.
|
ReplacedBy |
getReplacedBy()
Returns the value of replacedBy
|
ReplacedElement |
getReplacedElement(int index)
Returns the n-th
ReplacedElement object in this CompSBasePlugin. |
ReplacedElement |
getReplacedElement(java.lang.String id)
Returns a
ReplacedElement element that has the given 'id' within
this CompSBasePlugin or null if no such element can be found. |
int |
getReplacedElementCount()
Returns the number of
ReplacedElement objects in this CompSBasePlugin. |
java.lang.String |
getURI()
Gets the URI to which this element belongs to.
|
void |
initDefaults()
Initializes the default values using the namespace.
|
boolean |
isSetListOfReplacedElements()
Returns
true, if listOfReplacedElements contains at least one element,
otherwise false |
boolean |
isSetReplacedBy()
Returns whether replacedBy is set
|
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 |
removeReplacedElement(int i)
Removes the ith element from the ListOfReplacedElements.
|
boolean |
removeReplacedElement(ReplacedElement replacedElement)
Removes an element from listOfReplacedElements.
|
void |
setListOfReplacedElements(ListOf<ReplacedElement> listOfReplacedElements)
Sets the listOfReplacedElements.
|
void |
setReplacedBy(ReplacedBy replacedBy)
Sets the value of the optional replacedBy element.
|
java.lang.String |
toString() |
boolean |
unsetListOfReplacedElements()
Returns
true, if listOfReplacedElements contained at least one element,
otherwise false |
boolean |
unsetReplacedBy()
Unsets the variable replacedBy
|
java.util.Map<java.lang.String,java.lang.String> |
writeXMLAttributes()
Returns a
Map containing the XML attributes of this object. |
equals, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getExtendedSBase, getLevel, getPackageVersion, getSBMLDocument, getVersion, hashCode, isSetExtendedSBase, removeFromParent, setExtendedSBaseaddAllChangeListeners, 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, 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, userObjectKeySetprivate static final long serialVersionUID
ListOf<ReplacedElement> listOfReplacedElements
ReplacedBy replacedBy
public CompSBasePlugin()
public CompSBasePlugin(SBase extendedSBase)
level - version - public CompSBasePlugin(CompSBasePlugin obj)
public java.lang.String getElementNamespace()
SBasePluginpublic java.lang.String getPackageName()
SBasePluginpublic java.lang.String getPrefix()
SBasePluginpublic java.lang.String getURI()
SBasePluginpublic SBase getParent()
getParent in interface javax.swing.tree.TreeNodegetParent in class AbstractTreeNodepublic SBase getParentSBMLObject()
SBasePluginSBase object to which this plugin object connected.getParentSBMLObject in interface SBasePlugingetParentSBMLObject in class AbstractSBasePluginSBase object to which this plugin object connected.public CompSBasePlugin clone()
clone in interface SBasePluginclone in class AbstractSBasePluginSBasePlugin from this SBasePlugin.public void initDefaults()
public ReplacedBy getReplacedBy()
public boolean isSetReplacedBy()
public void setReplacedBy(ReplacedBy replacedBy)
public ReplacedBy createReplacedBy()
ReplacedBy element and sets it in this CompSBasePlugin.ReplacedBy element.public boolean unsetReplacedBy()
true, if replacedBy was set before,
otherwise falsepublic boolean isSetListOfReplacedElements()
true, if listOfReplacedElements contains at least one element,
otherwise falsetrue, if listOfReplacedElements contains at least one element,
otherwise falsepublic ReplacedElement getReplacedElement(int index)
ReplacedElement object in this CompSBasePlugin.n - an indexReplacedElement with the given index if it exists.java.lang.IndexOutOfBoundsExceptionpublic ReplacedElement getReplacedElement(java.lang.String id)
ReplacedElement element that has the given 'id' within
this CompSBasePlugin or null if no such element can be found.id - an id indicating a ReplacedElement element of the
CompSBasePlugin.ReplacedElement element of the CompSBasePlugin that has
the given 'id' as id or null if no element with this
'id' can be found.public int getReplacedElementCount()
ReplacedElement objects in this CompSBasePlugin.ReplacedElement objects in this CompSBasePlugin.public ListOf<ReplacedElement> getListOfReplacedElements()
public int getNumReplacedElements()
ReplacedElement of this CompSBasePlugin.ReplacedElement of this CompSBasePlugin.public void setListOfReplacedElements(ListOf<ReplacedElement> listOfReplacedElements)
ReplacedElement object.listOfReplacedElements - public boolean unsetListOfReplacedElements()
true, if listOfReplacedElements contained at least one element,
otherwise falsetrue, if listOfReplacedElements contained at least one element,
otherwise falsepublic boolean addReplacedElement(ReplacedElement replacedElement)
listOfReplacedElements is initialized if necessary.
replacedElement - true (as specified by Collection.add)public boolean removeReplacedElement(ReplacedElement replacedElement)
replacedElement - the element to be removed from the listtrue if this list contained the specified elementList.remove(Object)public void removeReplacedElement(int i)
i - the index of the element to be removedjava.lang.IndexOutOfBoundsException - if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size).public ReplacedElement createReplacedElement()
ReplacedElement element and adds it to the ListOfReplacedElements list.ReplacedElement element.public java.lang.String toString()
toString in class AbstractTreeNodepublic boolean readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
SBasePluginSBasePlugin.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()
SBasePluginMap containing the XML attributes of this object.writeXMLAttributes in interface SBasePluginwriteXMLAttributes in class AbstractSBasePluginMap containing the XML attributes of this object.public boolean getAllowsChildren()
public int getChildCount()
public javax.swing.tree.TreeNode getChildAt(int index)