org.sbml.jsbml.ext.req
public class ReqSBasePlugin extends AbstractSBasePlugin
SBase
as define in the req package.
The Required Elements package is an exceedingly small package that allows model writers to declare specifically which components of the model have had their mathematics changed, by which package or annotation, and whether interpretation of those components in the absence of any package information results in a workable model. It accomplishes this by defining a class that can be added as an optional child of any SBML element with mathematical meaning.
To define that an SBase
can have some optional ChangedMath
children.
Modifier and Type | Field and Description |
---|---|
private ListOf<ChangedMath> |
listOfChangedMaths |
private static long |
serialVersionUID
Generated serial version identifier.
|
extendedSBase, packageVersion
listOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS
Constructor and Description |
---|
ReqSBasePlugin()
Creates an
ReqSBasePlugin instance |
ReqSBasePlugin(ReqSBasePlugin obj)
Clone constructor
|
ReqSBasePlugin(SBase sbase)
Creates a ReqSBasePlugin instance with a level and version.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addChangedMath(ChangedMath changedMath)
Adds a new
ChangedMath to the listOfChangedMaths. |
ReqSBasePlugin |
clone()
clones this class
|
ChangedMath |
createChangedMath()
Creates a new ChangedMath element and adds it to the ListOfMathChangeds list
|
ChangedMath |
createChangedMath(java.lang.String id)
Creates a new
ChangedMath element and adds it to the ListOfMathChangeds 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<ChangedMath> |
getListOfChangedMaths()
Returns the listOfChangedMaths.
|
java.lang.String |
getPackageName()
Returns the package name of this plugin object.
|
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.
|
void |
initDefaults()
Initializes the default values using the namespace.
|
boolean |
isSetListOfChangedMaths()
Returns
true , if listOfChangedMaths contains at least one element. |
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 . |
boolean |
removeChangedMath(ChangedMath changedMath)
Removes an element from the listOfChangedMaths.
|
void |
removeChangedMath(int i)
Removes an element from the listOfChangedMaths at the given index.
|
void |
removeChangedMath(java.lang.String id)
Removes an element from the listOfChangedMaths with the given id.
|
void |
setListOfChangedMaths(ListOf<ChangedMath> listOfChangedMaths)
Sets the given
ListOf<ChangedMath> . |
boolean |
unsetListOfChangedMaths()
Removes all of the elements from this list of
ChangedMath s. |
equals, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getExtendedSBase, getLevel, getPackageVersion, getParentSBMLObject, getSBMLDocument, getVersion, hashCode, isSetExtendedSBase, removeFromParent, setExtendedSBase, writeXMLAttributes
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getParent, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, notifyChildChange, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, toString, userObjectKeySet
finalize, getClass, notify, notifyAll, wait, wait, wait
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
private static final long serialVersionUID
private ListOf<ChangedMath> listOfChangedMaths
public ReqSBasePlugin()
ReqSBasePlugin
instancepublic ReqSBasePlugin(SBase sbase)
level
- version
- public ReqSBasePlugin(ReqSBasePlugin obj)
public ReqSBasePlugin clone()
clone
in interface SBasePlugin
clone
in class AbstractSBasePlugin
SBasePlugin
from this SBasePlugin
.public void initDefaults()
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 java.lang.String getElementNamespace()
SBasePlugin
public java.lang.String getPackageName()
SBasePlugin
public java.lang.String getPrefix()
SBasePlugin
public java.lang.String getURI()
SBasePlugin
public boolean getAllowsChildren()
public boolean isSetListOfChangedMaths()
true
, if listOfChangedMaths contains at least one element.true
, if listOfChangedMaths contains at least one element,
otherwise false
public ListOf<ChangedMath> getListOfChangedMaths()
public void setListOfChangedMaths(ListOf<ChangedMath> listOfChangedMaths)
ListOf<ChangedMath>
. If listOfChangedMaths
was defined before and contains some elements, they are all unset.listOfChangedMaths
- public boolean unsetListOfChangedMaths()
ChangedMath
s.true
, if listOfChangedMaths contained at least one element,
otherwise false
public boolean addChangedMath(ChangedMath changedMath)
ChangedMath
to the listOfChangedMaths.
The listOfChangedMaths is initialized if necessary.
changedMath
- the element to add to the listCollection.add
)public boolean removeChangedMath(ChangedMath changedMath)
changedMath
- the element to be removed from the listList.remove(Object)
public void removeChangedMath(int i)
i
- - the index where to remove the ChangedMath
java.lang.IndexOutOfBoundsException
- - if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size)public void removeChangedMath(java.lang.String id)
id
- - the id of the ChangedMath
to be removedpublic ChangedMath createChangedMath()
public ChangedMath createChangedMath(java.lang.String id)
ChangedMath
element and adds it to the ListOfMathChangeds listChangedMath
elementpublic int getChildCount()
public javax.swing.tree.TreeNode getChildAt(int index)