public class CompSBasePlugin extends AbstractSBasePlugin
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 FormelementNamespace, extendedSBase, packageVersionlistOfListeners, parent, resourceBundle| 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 |
equals(Object obj) |
boolean |
getAllowsChildren() |
TreeNode |
getChildAt(int index) |
int |
getChildCount() |
ListOf<ReplacedElement> |
getListOfReplacedElements()
Returns the listOfReplacedElements
|
int |
getNumReplacedElements()
Returns the number of
ReplacedElement of this CompSBasePlugin. |
String |
getPackageName() |
SBase |
getParent() |
SBase |
getParentSBMLObject() |
String |
getPrefix() |
ReplacedBy |
getReplacedBy()
Returns the value of replacedBy
|
ReplacedElement |
getReplacedElement(int index)
Returns the n-th
ReplacedElement object in this CompSBasePlugin. |
ReplacedElement |
getReplacedElement(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. |
String |
getURI() |
int |
hashCode() |
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(String attributeName,
String prefix,
String value) |
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.
|
boolean |
unsetListOfReplacedElements()
Returns
true, if listOfReplacedElements contained at least one element,
otherwise false |
boolean |
unsetReplacedBy()
Unsets the variable replacedBy
|
Map<String,String> |
writeXMLAttributes() |
fireNodeAddedEvent, 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 CompSBasePlugin()
public CompSBasePlugin(SBase extendedSBase)
extendedSBase - the core SBase that is extended.public CompSBasePlugin(CompSBasePlugin obj)
obj - the instance to clonepublic String getPackageName()
public String getPrefix()
public String getURI()
public SBase getParent()
getParent in interface TreeNodegetParent in class AbstractTreeNodepublic SBase getParentSBMLObject()
getParentSBMLObject in interface SBasePlugingetParentSBMLObject in class AbstractSBasePluginpublic CompSBasePlugin clone()
clone in interface SBasePluginclone in class AbstractSBasePluginpublic void initDefaults()
public int hashCode()
hashCode in interface SBasePluginhashCode in class AbstractSBasePluginpublic boolean equals(Object obj)
equals in interface SBasePluginequals in class AbstractSBasePluginpublic ReplacedBy getReplacedBy()
public boolean isSetReplacedBy()
public void setReplacedBy(ReplacedBy replacedBy)
replacedBy - the value of replacedBypublic 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.index - an indexReplacedElement with the given index if it exists.IndexOutOfBoundsException - if the index is out of range: (index < 0 || index >= size())public ReplacedElement getReplacedElement(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.getReplacedElementCount()public void setListOfReplacedElements(ListOf<ReplacedElement> listOfReplacedElements)
ReplacedElement object.listOfReplacedElements - the list of ReplacedElements.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 - the element to be added to the listtrue (as specified by Collection.add(E))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 removedIndexOutOfBoundsException - 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 Map<String,String> writeXMLAttributes()
writeXMLAttributes in interface SBasePluginwriteXMLAttributes in class AbstractSBasePluginpublic boolean getAllowsChildren()
public int getChildCount()
public TreeNode getChildAt(int index)
Copyright © 2009–2017. All rights reserved.