java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, ASTNodePlugin
, TreeNodeWithChangeSupport
MultiASTNodePlugin
public abstract class AbstractASTNodePlugin extends AbstractTreeNode implements ASTNodePlugin
Constructor | Description |
---|---|
AbstractASTNodePlugin() |
|
AbstractASTNodePlugin(ASTNode extendedASTNode) |
|
AbstractASTNodePlugin(ASTNodePlugin plugin) |
This method will need to be further tested
|
Modifier and Type | Method | Description |
---|---|---|
abstract ASTNodePlugin |
clone() |
Creates a new instance of
ASTNodePlugin from this ASTNodePlugin . |
boolean |
equals(java.lang.Object object) |
|
void |
fireNodeAddedEvent() |
All
TreeNodeChangeListener instances linked to this
TreeNode are informed about the adding of this Object to
an owning parent Object . |
void |
fireNodeRemovedEvent() |
All
TreeNodeChangeListener instances linked to this
TreeNode are informed about the deletion of this TreeNode
from a parent Object . |
void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue) |
All
TreeNodeChangeListener s are informed about the change in this
TreeNodeWithChangeSupport . |
java.lang.String |
getElementNamespace() |
Returns the XML namespace (URI) of the package extension of this plugin object.
|
ASTNode |
getExtendedASTNode() |
Returns the object that is extended by this plug-in.
|
int |
getLevel() |
Returns the SBML level of this plugin object.
|
int |
getPackageVersion() |
Returns the package version of the package extension of this plugin object.
|
SBase |
getParentSBMLObject() |
Returns the parent
SBase object to which this plugin object is connected. |
SBMLDocument |
getSBMLDocument() |
Returns the parent
SBMLDocument of this plugin object. |
int |
getVersion() |
Returns the SBML version of this plugin object.
|
int |
hashCode() |
|
boolean |
isSetExtendedASTNode() |
Checks whether an extended TreeNode has been set.
|
boolean |
isSetPackageVersion() |
Returns
true if a package version is set, false otherwise. |
boolean |
removeFromParent() |
This method is designed to be overridden for non-independent child nodes
|
void |
setExtendedASTNode(ASTNode extendedASTNode) |
Sets the extended
ASTNode . |
void |
setNamespace(java.lang.String namespace) |
Sets the XML namespace to which this
ASTNodePlugin belong. |
void |
setPackageVersion(int packageVersion) |
Sets the package version.
|
java.util.Map<java.lang.String,java.lang.String> |
writeXMLAttributes() |
Returns a
Map containing the XML attributes of this object. |
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
getPackageName, getPrefix, getURI, readAttribute
children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
public AbstractASTNodePlugin()
public AbstractASTNodePlugin(ASTNode extendedASTNode)
extendedASTNode
- public AbstractASTNodePlugin(ASTNodePlugin plugin)
plugin
- public abstract ASTNodePlugin clone()
ASTNodePlugin
ASTNodePlugin
from this ASTNodePlugin
.clone
in interface ASTNodePlugin
clone
in class AbstractTreeNode
ASTNodePlugin
from this ASTNodePlugin
.public boolean equals(java.lang.Object object)
equals
in interface ASTNodePlugin
equals
in class AbstractTreeNode
public void fireNodeAddedEvent()
TreeNodeWithChangeSupport
TreeNodeChangeListener
instances linked to this
TreeNode
are informed about the adding of this Object
to
an owning parent Object
.fireNodeAddedEvent
in interface TreeNodeWithChangeSupport
fireNodeAddedEvent
in class AbstractTreeNode
public void fireNodeRemovedEvent()
TreeNodeWithChangeSupport
TreeNodeChangeListener
instances linked to this
TreeNode
are informed about the deletion of this TreeNode
from a parent Object
.fireNodeRemovedEvent
in interface TreeNodeWithChangeSupport
fireNodeRemovedEvent
in class AbstractTreeNode
public void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
TreeNodeWithChangeSupport
TreeNodeChangeListener
s are informed about the change in this
TreeNodeWithChangeSupport
.firePropertyChange
in interface TreeNodeWithChangeSupport
firePropertyChange
in class AbstractTreeNode
propertyName
- Tells the TreeNodeChangeListener
the name of the
property whose value has been changed.oldValue
- This is the value before the change.newValue
- This gives the new value that is now the new value for the
given property..public java.lang.String getElementNamespace()
ASTNodePlugin
getElementNamespace
in interface ASTNodePlugin
ASTNodePlugin.getURI()
public ASTNode getExtendedASTNode()
ASTNodePlugin
getExtendedASTNode
in interface ASTNodePlugin
public int getLevel()
ASTNodePlugin
getLevel
in interface ASTNodePlugin
SBase.getLevel()
public int getPackageVersion()
ASTNodePlugin
getPackageVersion
in interface ASTNodePlugin
public SBase getParentSBMLObject()
ASTNodePlugin
SBase
object to which this plugin object is connected.getParentSBMLObject
in interface ASTNodePlugin
SBase
object to which this plugin object is connected.public SBMLDocument getSBMLDocument()
ASTNodePlugin
SBMLDocument
of this plugin object.getSBMLDocument
in interface ASTNodePlugin
SBMLDocument
object of this plugin object.public int getVersion()
ASTNodePlugin
getVersion
in interface ASTNodePlugin
SBase.getVersion()
public int hashCode()
hashCode
in interface ASTNodePlugin
hashCode
in class AbstractTreeNode
public boolean isSetExtendedASTNode()
ASTNodePlugin
isSetExtendedASTNode
in interface ASTNodePlugin
public boolean isSetPackageVersion()
ASTNodePlugin
true
if a package version is set, false
otherwise.isSetPackageVersion
in interface ASTNodePlugin
true
if a package version is set, false
otherwise.public boolean removeFromParent()
AbstractTreeNode
removeFromParent
in interface TreeNodeWithChangeSupport
removeFromParent
in class AbstractTreeNode
false
if this element is a root node, true
otherwise.TreeNodeWithChangeSupport.removeFromParent()
public void setNamespace(java.lang.String namespace)
ASTNodePlugin
belong.
This an internal method that should not be used outside of the main jsbml code (core + packages). One class should always belong to the same namespace, although the namespaces can have different level and version (and package version). You have to know what you are doing when using this method.
namespace
- the XML namespace to which this ASTNodePlugin
belong.public void setExtendedASTNode(ASTNode extendedASTNode)
ASTNode
.
This method should not be called in general but it is necessary
to use it after cloning an ASTNodePlugin
to be able to set properly
the new parent/extended ASTNode
.
extendedASTNode
- public void setPackageVersion(int packageVersion)
ASTNodePlugin
setPackageVersion
in interface ASTNodePlugin
packageVersion
- the packageVersion to setpublic java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
ASTNodePlugin
Map
containing the XML attributes of this object.writeXMLAttributes
in interface ASTNodePlugin
Map
containing the XML attributes of this object.