org.sbml.jsbml.ext.arrays
public class ArraysSBasePlugin extends AbstractSBasePlugin implements IdManager
ArraysSBasePlugin
class extends the SBase
class by adding an optional ListOfDimension
s child and a single optional Index
child.
The ArraysSBasePlugin
class codifies the extensions to the SBase
class defined in the 'Arrays' package.
These extensions allows the modeler to define one or more Dimension
elements to indicate the parent SBase
object is arrayed. In
addition, these extensions allows the definition of one or more Index
elements to reference the parent SBase
that has
one or more array dimensions.
Dimension
,
Index
,
Serialized FormModifier and Type | Field and Description |
---|---|
private ListOf<Dimension> |
listOfDimensions |
private ListOf<Index> |
listOfIndices |
private static org.apache.log4j.Logger |
logger
A
Logger for this class. |
(package private) java.util.Map<java.lang.String,Dimension> |
mapOfDimensions
Maps between the
Dimension identifiers and themselves. |
private static long |
serialVersionUID |
extendedSBase, packageVersion
listOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS
Constructor and Description |
---|
ArraysSBasePlugin()
Creates an ArraysSBasePlugin instance
|
ArraysSBasePlugin(ArraysSBasePlugin obj)
Clone constructor
|
ArraysSBasePlugin(SBase extendedSBase)
Creates an ArraysSBasePlugin with a level and a version.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(SBase sbase)
|
boolean |
addDimension(Dimension field)
Adds a new
Dimension to the listOfDimensions. |
boolean |
addIndex(Index field)
Adds a new
Index to the listOfIndices. |
ArraysSBasePlugin |
clone()
clones this class
|
Dimension |
createDimension()
Creates a new Dimension element and adds it to the ListOfDimensions list.
|
Dimension |
createDimension(java.lang.String id)
Creates a new
Dimension element and adds it to the ListOfDimensions list. |
Index |
createIndex()
Creates a new Index element and adds it to the listOfIndices list.
|
boolean |
equals(java.lang.Object obj) |
boolean |
getAllowsChildren() |
javax.swing.tree.TreeNode |
getChildAt(int childIndex) |
int |
getChildCount() |
Dimension |
getDimension(int i)
Gets an element from the listOfDimensions at the given index.
|
Dimension |
getDimension(java.lang.String fieldId)
Gets an element from the listOfDimensions, with the given id.
|
Dimension |
getDimensionByArrayDimension(int i)
Gets an element from the listOfDimensions at the given arrayDimension.
|
int |
getDimensionCount()
Returns the number of
Dimension s in this ArraysSBasePlugin . |
java.lang.String |
getElementNamespace()
Returns the XML namespace (URI) of the package extension of this plugin object.
|
Index |
getIndex(int i)
Gets an element from the listOfIndices at the given index.
|
Index |
getIndex(int dim,
java.lang.String attribute)
Gets an element from the listOfIndices based on array dimension
and referenced attribute.
|
int |
getIndexCount()
Returns the number of
Index s in this ArraysSBasePlugin . |
ListOf<Dimension> |
getListOfDimensions()
Returns the listOfDimensions.
|
ListOf<Index> |
getListOfIndices()
Returns the listOfIndices.
|
int |
getNumDimensions()
Returns the number of
Dimension s in this ArraysSBasePlugin . |
int |
getNumIndices()
Returns the number of
Index s in this ArraysSBasePlugin . |
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.
|
int |
hashCode() |
void |
initDefaults()
Initializes the default values using the namespace.
|
boolean |
isSetListOfDimensions()
Returns
true , if listOfDimensions contains at least one element. |
boolean |
isSetListOfIndices()
Returns
true , if listOfIndices 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 |
register(SBase sbase)
|
boolean |
removeDimension(Dimension field)
Removes an element from the listOfDimensions.
|
Dimension |
removeDimension(int i)
Removes an element from the listOfDimensions at the given index.
|
Dimension |
removeDimension(java.lang.String fieldId)
Removes an element from the listOfDimensions.
|
Dimension |
removeDimensionByArrayDimension(int arrayDim)
Removes an element from the listOfDimensions by array dimension.
|
boolean |
removeIndex(Index field)
Removes an element from the listOfIndices.
|
Index |
removeIndex(int i)
Removes an element from the listOfIndices at the given index.
|
boolean |
removeIndexByArrayDimension(int arrayDim)
Removes an element from the listOfIndices based on array dimension.
|
void |
setListOfDimensions(ListOf<Dimension> listOfDimensions)
Sets the given
ListOf<Dimension> . |
void |
setListOfIndices(ListOf<Index> listOfIndices)
Sets the given
ListOf<Index> . |
boolean |
unregister(SBase sbase)
|
boolean |
unsetListOfDimensions()
Returns
true , if listOfDimensions contain at least one element,
otherwise false . |
boolean |
unsetListOfIndices()
Returns
true , if listOfIndices contain at least one element,
otherwise false . |
java.util.Map<java.lang.String,java.lang.String> |
writeXMLAttributes()
Returns a
Map containing the XML attributes of this object. |
fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getExtendedSBase, getLevel, getPackageVersion, getParentSBMLObject, getSBMLDocument, getVersion, isSetExtendedSBase, removeFromParent, setExtendedSBase
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 static final transient org.apache.log4j.Logger logger
Logger
for this class.java.util.Map<java.lang.String,Dimension> mapOfDimensions
Dimension
identifiers and themselves.public ArraysSBasePlugin()
public ArraysSBasePlugin(SBase extendedSBase)
extendedSBase
- public ArraysSBasePlugin(ArraysSBasePlugin obj)
public ArraysSBasePlugin clone()
clone
in interface SBasePlugin
clone
in class AbstractSBasePlugin
SBasePlugin
from this SBasePlugin
.public void initDefaults()
public boolean isSetListOfIndices()
true
, if listOfIndices contains at least one element.true
, if listOfIndices contains at least one element,
otherwise false
.public ListOf<Index> getListOfIndices()
public void setListOfIndices(ListOf<Index> listOfIndices)
ListOf<Index>
. If listOfIndices
was defined before and contains some elements, they are all unset.listOfIndices.
- public boolean unsetListOfIndices()
true
, if listOfIndices contain at least one element,
otherwise false
.true
, if listOfIndices contain at least one element,
otherwise false
.public boolean addIndex(Index field)
Index
to the listOfIndices.
The listOfIndices is initialized if necessary.
field
- the element to add to the listCollection.add
)public boolean removeIndex(Index field)
field
- the element to be removed from the list.List#remove(Object)
public boolean removeIndexByArrayDimension(int arrayDim)
field
- the element with given array dimension to be removed from the list.List#remove(Object)
public Index removeIndex(int i)
i
- the index where to remove the Index
.java.lang.IndexOutOfBoundsException
- if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size).public Index createIndex()
public Index getIndex(int i)
i
- the index of the Index
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 Index getIndex(int dim, java.lang.String attribute)
i
- the index of the Index
element to get.public int getIndexCount()
Index
s in this ArraysSBasePlugin
.Index
s in this ArraysSBasePlugin
.public int getNumIndices()
Index
s in this ArraysSBasePlugin
.Index
s in this ArraysSBasePlugin
.public boolean isSetListOfDimensions()
true
, if listOfDimensions contains at least one element.true
, if listOfDimensions contains at least one element,
otherwise false
.public ListOf<Dimension> getListOfDimensions()
public void setListOfDimensions(ListOf<Dimension> listOfDimensions)
ListOf<Dimension>
. If listOfDimensions
was defined before and contains some elements, they are all unset.listOfDimensions.
- public boolean unsetListOfDimensions()
true
, if listOfDimensions contain at least one element,
otherwise false
.true
, if listOfDimensions contain at least one element,
otherwise false
.public boolean addDimension(Dimension field)
Dimension
to the listOfDimensions.
The listOfDimensions is initialized if necessary.
field
- the element to add to the listCollection.add
)public boolean removeDimension(Dimension field)
field
- the element to be removed from the list.List#remove(Object)
public Dimension removeDimension(java.lang.String fieldId)
id
- the id of the element to be removed from the list.public Dimension removeDimensionByArrayDimension(int arrayDim)
arrayDim
- the array dimension of the element to be removed from the list.public Dimension removeDimension(int i)
i
- the index where to remove the Dimension
.java.lang.IndexOutOfBoundsException
- if the listOf is not set or
if the index is out of bound (index < 0 || index > list.size).public Dimension createDimension()
public Dimension createDimension(java.lang.String id)
Dimension
element and adds it to the ListOfDimensions list.Dimension
element.public Dimension getDimension(int i)
i
- the dimension of the Dimension
element to get.java.lang.IndexOutOfBoundsException
- if the listOf is not set or
if the index is out of bound (index < 0 || index > 2).public Dimension getDimensionByArrayDimension(int i)
i
- the dimension of the Dimension
element to get.public Dimension getDimension(java.lang.String fieldId)
id
- the id of the Dimension
element to get.public int getDimensionCount()
Dimension
s in this ArraysSBasePlugin
.Dimension
s in this ArraysSBasePlugin
.public int getNumDimensions()
Dimension
s in this ArraysSBasePlugin
.Dimension
s in this ArraysSBasePlugin
.public java.lang.String getElementNamespace()
SBasePlugin
getElementNamespace
in interface SBasePlugin
public java.lang.String getPackageName()
SBasePlugin
getPackageName
in interface SBasePlugin
public java.lang.String getPrefix()
SBasePlugin
getPrefix
in interface SBasePlugin
public java.lang.String getURI()
SBasePlugin
getURI
in interface SBasePlugin
public boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
public javax.swing.tree.TreeNode getChildAt(int childIndex)
getChildAt
in interface javax.swing.tree.TreeNode
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
public boolean readAttribute(java.lang.String attributeName, java.lang.String prefix, java.lang.String value)
SBasePlugin
SBasePlugin
.readAttribute
in interface 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.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 unregister(SBase sbase)
IdManager
unregister
in interface IdManager
true
if this operation was successfully performed,
false
otherwise.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