public class FunctionDefinition extends AbstractMathContainer implements CallableSBase, UniqueNamedSBase, NamedSBase
FunctionDefinition
s were introduced to SBML in Level 2, this
class must not be used for models in Level 1.Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
ILLEGAL_ASTNODE_TYPE_MSG
Error message to indicate that an incorrect
ASTNode.Type has been passed
to a method. |
private static long |
serialVersionUID
Generated serial version identifier.
|
ignoredExtensions, ignoredXMLElements, JSBML_WRONG_SBO_TERM, lv, packageName
listOfListeners, parent, resourceBundle
Constructor and Description |
---|
FunctionDefinition()
Creates a FunctionDefinition instance.
|
FunctionDefinition(FunctionDefinition sb)
Creates a FunctionDefinition instance from a given FunctionDefinition.
|
FunctionDefinition(int level,
int version)
Creates a FunctionDefinition instance from a level and version.
|
FunctionDefinition(java.lang.String id,
ASTNode lambda,
int level,
int version)
Creates a FunctionDefinition instance from an id, ASTNode, level and
version.
|
FunctionDefinition(java.lang.String id,
int level,
int version)
Creates a FunctionDefinition instance from an id, level and version.
|
Modifier and Type | Method and Description |
---|---|
FunctionDefinition |
clone()
Creates a deep copy of this object, i.e., a new
SBase with the same
properties
like this one. |
ASTNode |
getArgument(int n)
Get the nth argument to this function.
|
ASTNode |
getArgument(java.lang.String name)
Get the argument named name to this
FunctionDefinition . |
int |
getArgumentCount()
Get the number of arguments (bound variables) taken by this
FunctionDefinition . |
ASTNode |
getBody()
Get the mathematical expression that is the body of this
FunctionDefinition object. |
int |
getNumArguments()
Get the number of arguments (bound variables) taken by this
FunctionDefinition . |
ListOf<FunctionDefinition> |
getParent()
This is equivalent to calling
AbstractSBase.getParentSBMLObject() , but this
method is needed for TreeNode . |
boolean |
isIdMandatory()
Returns
true if the identifier of this
SBase is required to be defined (i.e., not null )
in the definition of SBML. |
void |
setMath(ASTNode math)
Sets the math
ASTNode of this MathContainer to the given
value. |
containsUndeclaredUnits, getAllowsChildren, getChildAt, getChildCount, getDerivedUnitDefinition, getDerivedUnits, getFormula, getMath, getMathMLString, isSetMath, readAttribute, setFormula, unsetFormula, unsetMath, writeXMLAttributes
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendAnnotation, appendAnnotation, appendNotes, appendNotes, checkAndSetPackageNamespaceAndVersion, checkAndSetPackageNamespaceAndVersion, checkAttribute, checkIdentifier, checkLevelAndVersionCompatibility, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, equals, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementBySId, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getId, getIdManager, getLevel, getLevelAndVersion, getMetaId, getModel, getName, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hashCode, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetId, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetName, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, notifyChildChange, registerChild, removeCVTerm, removeCVTerm, setAnnotation, setAnnotation, setAnnotation, setHistory, setId, setLevel, setLevelAndVersion, setMetaId, setName, setNamespace, setNotes, setNotes, setPackageNamespaceAndVersion, setPackageVersion, setParentSBML, setParentSBMLObject, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, toString, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetId, unsetMetaId, unsetName, unsetNamespace, unsetNotes, unsetPlugin, unsetSBOTerm
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isReadingInProgress, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySet
finalize, getClass, notify, notifyAll, wait, wait, wait
getId, getName, isSetId, isSetName, setId, setName, unsetId, unsetName
containsUndeclaredUnits, getDerivedUnitDefinition, getDerivedUnits
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createPlugin, disablePackage, enablePackage, enablePackage, equals, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementBySId, getElementName, getExtension, getExtensionCount, getExtensionPackages, getHistory, getLevel, getLevelAndVersion, getMetaId, getModel, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hashCode, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, readAttribute, registerChild, removeCVTerm, removeCVTerm, removeTreeNodeChangeListener, setAnnotation, setAnnotation, setAnnotation, setHistory, setLevel, setMetaId, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetMetaId, unsetNotes, unsetPlugin, unsetSBOTerm, writeXMLAttributes
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
private static final java.lang.String ILLEGAL_ASTNODE_TYPE_MSG
ASTNode.Type
has been passed
to a method.private static final long serialVersionUID
public FunctionDefinition()
null
.public FunctionDefinition(FunctionDefinition sb)
sb
- the FunctionDefinition
to clonepublic FunctionDefinition(int level, int version)
null
.level
- the SBML levelversion
- the SBML versionpublic FunctionDefinition(java.lang.String id, ASTNode lambda, int level, int version)
null
. If the ASTNode is not of type lambda,
an IllegalArgumentException is thrown.id
- the function definition idlambda
- the ASTNode representing the function mathlevel
- the SBML levelversion
- the SBML versionpublic FunctionDefinition(java.lang.String id, int level, int version)
id
- the function definition idlevel
- the SBML levelversion
- the SBML versionpublic FunctionDefinition clone()
SBase
SBase
with the same
properties
like this one.clone
in interface SBase
clone
in class AbstractMathContainer
public ASTNode getArgument(int n)
getArgumentCount()
.n
- an integer index for the argument sought.FunctionDefinition
.public ASTNode getArgument(java.lang.String name)
FunctionDefinition
.name
- the exact name (case-sensitive) of the sought-after argumentpublic ASTNode getBody()
FunctionDefinition
object.FunctionDefinition
as an Abstract Syntax
Tree, or null if no body is defined.public int getNumArguments()
FunctionDefinition
.FunctionDefinition
.public int getArgumentCount()
FunctionDefinition
.FunctionDefinition
.public ListOf<FunctionDefinition> getParent()
AbstractSBase
AbstractSBase.getParentSBMLObject()
, but this
method is needed for TreeNode
.getParent
in interface javax.swing.tree.TreeNode
getParent
in class AbstractSBase
AbstractSBase.getParentSBMLObject()
public boolean isIdMandatory()
SBase
true
if the identifier of this
SBase
is required to be defined (i.e., not null
)
in the definition of SBML.isIdMandatory
in interface NamedSBase
isIdMandatory
in interface SBase
isIdMandatory
in class AbstractSBase
true
if the identifier of this element must be set in
order to create a valid SBML representation. false
otherwise, i.e., if the identifier can be understood as an optional
attribute.public void setMath(ASTNode math)
MathContainer
ASTNode
of this MathContainer
to the given
value.setMath
in interface MathContainer
setMath
in class AbstractMathContainer
math
- an abstract syntax tree.