java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, SBasePlugin
, IdManager
, TreeNodeWithChangeSupport
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 FormConstructor | Description |
---|---|
ArraysSBasePlugin() |
Creates an new
ArraysSBasePlugin instance. |
ArraysSBasePlugin(ArraysSBasePlugin obj) |
Clone constructor
|
ArraysSBasePlugin(SBase extendedSBase) |
Creates an new
ArraysSBasePlugin instance. |
Modifier and Type | Method | 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() |
Creates a new instance of
SBasePlugin from this SBasePlugin . |
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) |
|
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.
|
boolean |
removeDimension(Dimension field) |
Removes an element from the listOfDimensions.
|
Dimension |
removeDimensionByArrayDimension(int arrayDim) |
Removes an element from the listOfDimensions by array dimension.
|
Index |
removeIndex(int i) |
Removes an element from the listOfIndices at the given index.
|
boolean |
removeIndex(Index field) |
Removes an element from the listOfIndices.
|
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, isSetPackageVersion, removeFromParent, setExtendedSBase, setNamespace, setPackageVersion
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getParent, 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 ArraysSBasePlugin()
ArraysSBasePlugin
instance.public ArraysSBasePlugin(SBase extendedSBase)
ArraysSBasePlugin
instance.extendedSBase
- the core SBase
that is extendedpublic ArraysSBasePlugin(ArraysSBasePlugin obj)
obj
- the instance to clonepublic ArraysSBasePlugin clone()
SBasePlugin
SBasePlugin
from this SBasePlugin
.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
- the list of Index
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(E)
)public boolean removeIndex(Index field)
field
- the element to be removed from the list.List.remove(Object)
public boolean removeIndexByArrayDimension(int arrayDim)
arrayDim
- 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()
Index
instance.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)
dim
- the index of the Index
element to get.attribute
- the referenced attributepublic 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
.getIndexCount()
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
- the list of Dimension
spublic 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(E)
)public boolean removeDimension(Dimension field)
field
- the element to be removed from the list.List.remove(Object)
public Dimension removeDimension(java.lang.String fieldId)
fieldId
- 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()
Dimension
element.public Dimension createDimension(java.lang.String id)
Dimension
element and adds it to the ListOfDimensions list.id
- the idDimension
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)
fieldId
- the id of the Dimension
element to get.null
.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
.getDimensionCount()
public java.lang.String getElementNamespace()
SBasePlugin
getElementNamespace
in interface SBasePlugin
getElementNamespace
in class AbstractSBasePlugin
SBasePlugin.getURI()
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
SBasePlugin.getElementNamespace()
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