public interface SBase extends TreeNodeWithChangeSupport
In addition to serving as the parent class for most other classes of objects in SBML, this base type is designed to allow a modeler or a software package to attach arbitrary information to each major element in an SBML model.
SBase
has an optional subelement called 'notes'. It is intended to
serve as a place for storing optional information intended to be seen by
humans. An example use of the 'notes' element would be to contain formatted
user comments about the model element in which the 'notes' element is
enclosed. There are certain conditions on the XHTML content permitted inside
the 'notes' element; please consult the SBML specification
document corresponding to the SBML Level and Version of your model for
more information about the requirements for 'notes' content.
SBase
has another optional subelement called 'annotation'. Whereas
the 'notes' element described above is a container for content to be shown
directly to humans, the 'annotation' element is a container for optional
software-generated content not meant to be shown to humans. The
element's content type is XML type
'any', allowing essentially arbitrary data content. SBML places only a
few restrictions on the organization of the content; these are intended to
help software tools read and write the data as well as help reduce conflicts
between annotations added by different tools. As is the case with 'notes', it
is important to refer to the SBML specification
document corresponding to the SBML Level and Version of your model for
more information about the requirements for 'annotation' content.
It is worth pointing out that the 'annotation' element in the definition of
SBase
exists in order that software developers may attach optional
application-specific data to the elements in an SBML model. However, it is
important that this facility not be misused. In particular, it is
critical that data essential to a model definition or that can be
encoded in existing SBML elements is not stored in 'annotation'.
Parameter
values, functional dependencies between model elements,
etc., should not be recorded as annotations. It is crucial to keep in mind
the fact that data placed in annotations can be freely ignored by software
applications. If such data affects the interpretation of a model, then
software interoperability is greatly impeded.
SBML Level 2 introduced an optional SBase
attribute named 'metaid'
for supporting metadata annotations using RDF (Resource Description Format). The attribute
value has the data type XML
ID, the XML identifier type, which means each 'metaid' value must be
globally unique within an SBML file. (Importantly, this uniqueness criterion
applies across any attribute with type XML ID, not just the 'metaid'
attribute used by SBML—something to be aware of if your
application-specific XML content inside the 'annotation' subelement happens
to use XML ID.) The 'metaid'
value serves to identify a model component for purposes such as referencing
that component from metadata placed within 'annotation' subelements.
Beginning with SBML Level 2 Version 3, SBase
also has an optional
attribute named 'sboTerm' for supporting the use of the Systems Biology
Ontology. In SBML proper, the data type of the attribute is a string of the
form 'SBO:NNNNNNN', where 'NNNNNNN' is a seven digit integer number; libSBML
simplifies the representation by only storing the 'NNNNNNN' integer portion.
Thus, in libSBML, the 'sboTerm' attribute on SBase
has data type
int
, and SBO
identifiers are stored simply as integers. (For
convenience, SBase
offers methods for returning both the integer form
and a text-string form of the SBO
identifier.) SBO
terms are
a type of optional annotation, and each different class of SBML object
derived from SBase
imposes its own requirements about the values
permitted for 'sboTerm'. Please consult the SBML Level 2 Version 4
specification for more information about the use of SBO
and the
'sboTerm' attribute.
Beginning with SBML Level 3 Version 2, SBase
also has two optional
attributes named 'id' and 'name'. So SBase
kind of replace the interface
NamedSBase
but NamedSBase is kept so that we can easily know which elements
had an id and a name before SBML L3V2.
Modifier and Type | Method and Description |
---|---|
boolean |
addCVTerm(CVTerm term)
Adds a
CVTerm . |
void |
addDeclaredNamespace(java.lang.String prefix,
java.lang.String namespace)
Adds an additional name space to the set of declared namespaces of this
SBase . |
void |
addExtension(java.lang.String nameOrUri,
SBasePlugin sbasePlugin)
Adds a
SBasePlugin extension object to this SBase . |
void |
addPlugin(java.lang.String nameOrUri,
SBasePlugin sbasePlugin)
Adds a
SBasePlugin extension object to this SBase . |
void |
appendAnnotation(java.lang.String annotation)
Appends the given annotation to the 'annotation' subelement of this object.
|
void |
appendAnnotation(XMLNode annotation)
Appends the given annotation to the 'annotation' subelement of this object.
|
void |
appendNotes(java.lang.String notes)
Appends 'notes' to the notes String of this object.
|
void |
appendNotes(XMLNode notes)
Appends 'notes' to the notes of this object.
|
SBase |
clone()
Creates a deep copy of this object, i.e., a new
SBase with the same
properties
like this one. |
SBasePlugin |
createPlugin(java.lang.String nameOrUri)
Creates a new
SBasePlugin for the given package name or URI
and adds it to this SBase . |
void |
disablePackage(java.lang.String packageURIOrName)
Disables the given SBML Level 3 package on this
SBMLDocument . |
void |
enablePackage(java.lang.String packageURIOrName)
Enables the given SBML Level 3 package on this
SBMLDocument . |
void |
enablePackage(java.lang.String packageURIOrName,
boolean enabled)
Enables or disables the given SBML Level 3 package on this
SBMLDocument . |
boolean |
equals(java.lang.Object sbase)
|
java.util.List<CVTerm> |
filterCVTerms(CVTerm.Qualifier qualifier)
Returns a list of all the
CVTerm with the given CVTerm.Qualifier . |
java.util.List<java.lang.String> |
filterCVTerms(CVTerm.Qualifier qualifier,
boolean recursive,
java.lang.String... patterns)
Returns a list of resource URIs for the given
CVTerm.Qualifier that match
the
given patterns. |
java.util.List<java.lang.String> |
filterCVTerms(CVTerm.Qualifier qualifier,
java.lang.String pattern)
Queries the list of controlled vocabulary terms (
CVTerm ) for those
terms whose CVTerm.Qualifier is of the given type and selects only those
resources from
these terms that contain the given pattern. |
java.util.List<java.lang.String> |
filterCVTerms(CVTerm.Qualifier qualifier,
java.lang.String pattern,
boolean recursive)
Returns a list of resource URIs for the given
CVTerm.Qualifier that match
the
given pattern. |
Annotation |
getAnnotation()
Returns the content of the 'annotation' sub-element of this object as an
Annotation instance. |
java.lang.String |
getAnnotationString()
Returns the content of the 'annotation' sub-element of this object as a
String.
|
CVTerm |
getCVTerm(int index)
|
int |
getCVTermCount()
|
java.util.List<CVTerm> |
getCVTerms()
Returns the list of
CVTerm s of this object. |
java.util.Map<java.lang.String,java.lang.String> |
getDeclaredNamespaces()
Returns all the namespaces declared on this object.
|
SBase |
getElementByMetaId(java.lang.String metaid)
Returns the first child element found that has the given metaid.
|
SBase |
getElementBySId(java.lang.String id)
Returns the first child element found that has the given id.
|
java.lang.String |
getElementName()
Returns the XML element name of this object.
|
SBasePlugin |
getExtension(java.lang.String nameOrUri)
Returns the
SBasePlugin extension object which matches this package
name or URI. |
int |
getExtensionCount()
Returns the number of
SBasePlugin s of this SBase . |
java.util.Map<java.lang.String,SBasePlugin> |
getExtensionPackages()
Returns the map containing all the
SBasePlugin extension objects
of this SBase . |
History |
getHistory()
Returns the
History instance of this object. |
java.lang.String |
getId()
Returns the id of the element if it is set, an empty string otherwise.
|
int |
getLevel()
Returns the SBML Level of the overall SBML document.
|
ValuePair<java.lang.Integer,java.lang.Integer> |
getLevelAndVersion()
Returns the Level and Version combination of this
SBase . |
java.lang.String |
getMetaId()
Returns the metaid of this element.
|
Model |
getModel()
|
java.lang.String |
getName()
Returns the name of the element if it is set, an empty string otherwise.
|
java.lang.String |
getNamespace()
Returns the namespace to which this
SBase belong to. |
XMLNode |
getNotes()
Returns the
XMLNode containing the notes sub-element of
this object. |
java.lang.String |
getNotesString()
Returns the notes sub-element of this object as a
String . |
int |
getNumCVTerms()
|
int |
getNumPlugins()
Returns the number of
SBasePlugin s of this SBase . |
java.lang.String |
getPackageName()
Returns the name of the SBML Level 3 package in which this element is defined, as
defined in the sbml.org community wiki.
|
int |
getPackageVersion()
Returns the version of the SBML Level 3 package to which this element belongs.
|
SBase |
getParentSBMLObject()
Returns the parent of this
SBase . |
SBasePlugin |
getPlugin(java.lang.String nameOrUri)
Returns an
SBasePlugin for an SBML Level 3 package extension
with the given package name or URI. |
SBMLDocument |
getSBMLDocument()
Returns the parent
SBMLDocument object. |
int |
getSBOTerm()
Grants access to the Systems Biology Ontology (SBO) term associated with
this
SBase . |
java.lang.String |
getSBOTermID()
Grants access to the Systems Biology Ontology (SBO) term associated with
this
SBase . |
java.lang.String |
getURI()
Returns the namespace to which this
SBase belong to. |
int |
getVersion()
Returns the Version within the SBML Level of the overall SBML document.
|
int |
hashCode()
Returns a hash code value for this
SBase instance. |
boolean |
hasValidAnnotation()
Returns
true if the Annotation RDF 'about' attribute
matches the metaid of this object. |
boolean |
hasValidLevelVersionNamespaceCombination()
Returns
true or false depending on whether this object's
level/version and namespace values correspond to a valid SBML
specification. |
boolean |
isExtendedByOtherPackages()
Returns
true if this object is extended by other packages. |
boolean |
isIdMandatory()
Returns
true if the identifier of this
SBase is required to be defined (i.e., not null )
in the definition of SBML. |
boolean |
isPackageEnabled(java.lang.String packageURIOrName)
Returns
true if the given SBML Level 3 package is enabled within
the containing SBMLDocument . |
boolean |
isPackageURIEnabled(java.lang.String packageURIOrName)
Returns
true if the given SBML Level 3 package is enabled within
the containing SBMLDocument . |
boolean |
isPkgEnabled(java.lang.String packageURIOrName)
Deprecated.
|
boolean |
isPkgURIEnabled(java.lang.String packageURIOrName)
Deprecated.
|
boolean |
isSetAnnotation()
Returns
true or false depending on whether this object's
'annotation' sub-elements exists and have some content. |
boolean |
isSetHistory()
Returns
true if the History instance of this object is set. |
boolean |
isSetId()
Returns
true if the id is not null . |
boolean |
isSetLevel()
Returns
true if the level is set. |
boolean |
isSetLevelAndVersion()
Returns
true if both, Level and Version are set for this
SBase . |
boolean |
isSetMetaId()
Returns
true or false depending on whether this object's
'metaid' attribute has been set. |
boolean |
isSetName()
Returns
true if the name is not null . |
boolean |
isSetNotes()
Returns
true or false depending on whether this object's
'notes' sub-element exists and has content. |
boolean |
isSetPackageVErsion()
Returns
true if the package version is not equals to '-1'. |
boolean |
isSetParentSBMLObject()
Check whether this
SBase has been linked to a parent within the
hierarchical SBML data structure. |
boolean |
isSetPlugin(java.lang.String nameOrUri)
Returns
true if an SBasePlugin is defined
for the given package. |
boolean |
isSetSBOTerm()
Returns
true if the SBOTerm is set. |
boolean |
isSetVersion()
Returns
true if the version is not null . |
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
Sets the given attribute in this
SBase . |
boolean |
registerChild(SBase sbase)
Sets this object as SBML parent of 'sbase'.
|
boolean |
removeCVTerm(CVTerm cvTerm)
Removes the given
CVTerm . |
CVTerm |
removeCVTerm(int index)
Removes the
CVTerm at the given index. |
void |
removeTreeNodeChangeListener(TreeNodeChangeListener listener)
Removes the given
TreeNodeChangeListener from this element. |
void |
setAnnotation(Annotation annotation)
Sets the value of the 'annotation' sub-element of this SBML object to a
copy of annotation given as an
Annotation instance. |
void |
setAnnotation(java.lang.String nonRDFAnnotation)
Sets the non RDF part of the annotation.
|
void |
setAnnotation(XMLNode nonRDFAnnotation)
Sets the non RDF part of the annotation.
|
void |
setHistory(History history)
Sets the history.
|
void |
setId(java.lang.String id)
Sets the id value with 'id'
|
void |
setLevel(int level)
Sets the level of this object with 'level'.
|
void |
setMetaId(java.lang.String metaid)
Sets the metaid value with 'metaid'.
|
void |
setName(java.lang.String name)
Sets the name value with 'name'.
|
void |
setNotes(java.lang.String notes)
Sets the notes with 'notes'.
|
void |
setNotes(XMLNode notesXMLNode)
Sets the
XMLNode containing the notes sub-element of
this object. |
void |
setPackageVersion(int packageVersion)
Sets the version of the SBML Level 3 package to which this element belongs.
|
void |
setSBOTerm(int term)
Sets the value of the 'sboTerm' attribute.
|
void |
setSBOTerm(java.lang.String sboid)
Sets the value of the 'sboTerm' attribute.
|
void |
setThisAsParentSBMLObject(SBase sbase)
Deprecated.
|
void |
setVersion(int version)
Sets the version of this object with 'version'.
|
void |
unregisterChild(SBase sbase)
Unregisters recursively the given SBase from the
Model
and SBMLDocument . |
void |
unsetAnnotation()
Unsets the value of the 'annotation' sub-element of this SBML object.
|
void |
unsetCVTerms()
Unsets the list of
CVTerm of this object. |
void |
unsetExtension(java.lang.String nameOrUri)
Unsets the
SBasePlugin extension object which matches this package
name or URI. |
void |
unsetHistory()
Unsets the
History of this object. |
void |
unsetId()
Sets the id value to
null . |
void |
unsetMetaId()
Unsets the value of the 'metaid' attribute of this SBML object.
|
void |
unsetName()
Sets the name value to
null . |
void |
unsetNotes()
Unsets the value of the 'notes' sub-element of this SBML object.
|
void |
unsetPlugin(java.lang.String nameOrUri)
Unsets the
SBasePlugin extension object which matches this package
name or URI. |
void |
unsetSBOTerm()
Unsets the value of the 'sboTerm' attribute of this SBML object.
|
java.util.Map<java.lang.String,java.lang.String> |
writeXMLAttributes()
Returns a map with all the attributes of this
SBase that
need to be written out in XML. |
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
void addDeclaredNamespace(java.lang.String prefix, java.lang.String namespace)
SBase
.prefix
- the prefix of the namespace to addnamespace
- the namespace to addvoid addExtension(java.lang.String nameOrUri, SBasePlugin sbasePlugin)
SBasePlugin
extension object to this SBase
.
If a previous SBasePlugin
associated with the same package
was present before, it will be replaced.
nameOrUri
- the name or URI of the package extension.sbasePlugin
- the SBasePlugin
to add.void addPlugin(java.lang.String nameOrUri, SBasePlugin sbasePlugin)
SBasePlugin
extension object to this SBase
.
If a previous SBasePlugin
associated with the same package
was present before, it will be replaced.
nameOrUri
- the name or URI of the package extension.sbasePlugin
- the SBasePlugin
to add.addExtension(String, SBasePlugin)
void appendAnnotation(java.lang.String annotation) throws javax.xml.stream.XMLStreamException
setAnnotation(XMLNode)
or
setAnnotation(String)
, this method allows other
annotations to be preserved when an application adds its own data.annotation
- an XML string that is to be copied and appended to the content of
the 'annotation' subelement of this objectjavax.xml.stream.XMLStreamException
- thrown if the given annotation String cannot be parsed into
XMLNode
objects.appendAnnotation(XMLNode)
void appendAnnotation(XMLNode annotation)
setAnnotation(XMLNode)
or
setAnnotation(String)
, this method allows other
annotations to be preserved when an application adds its own data.annotation
- an XML structure that is to be copied and appended to the content of
the 'annotation' subelement of this objectvoid appendNotes(java.lang.String notes) throws javax.xml.stream.XMLStreamException
notes
- the notes to be added.javax.xml.stream.XMLStreamException
- if an error occurs while parsing the notes String
.void appendNotes(XMLNode notes)
notes
- the notes to be added.SBase clone()
SBase
with the same
properties
like this one.SBasePlugin createPlugin(java.lang.String nameOrUri)
SBasePlugin
for the given package name or URI
and adds it to this SBase
.
If an SBasePlugin
was already present in this SBase
it will be replaced.
nameOrUri
- the package name or URISBasePlugin
for the given package name or URIvoid disablePackage(java.lang.String packageURIOrName)
SBMLDocument
.packageURIOrName
- a package namespace URI or package namevoid enablePackage(java.lang.String packageURIOrName)
SBMLDocument
.packageURIOrName
- a package namespace URI or package namevoid enablePackage(java.lang.String packageURIOrName, boolean enabled)
SBMLDocument
.packageURIOrName
- a package namespace URI or package nameenabled
- a boolean to tell if the package need to be enabled or disabled. It
true
the package will be enabled, otherwise it will be
disabled.boolean equals(java.lang.Object sbase)
java.util.List<CVTerm> filterCVTerms(CVTerm.Qualifier qualifier)
CVTerm
with the given CVTerm.Qualifier
.qualifier
- CVTerm.Qualifier
used to filter the CVTerm
s.CVTerm
with the given CVTerm.Qualifier
.java.util.List<java.lang.String> filterCVTerms(CVTerm.Qualifier qualifier, java.lang.String pattern)
CVTerm
) for those
terms whose CVTerm.Qualifier
is of the given type and selects only those
resources from
these terms that contain the given pattern.qualifier
- CVTerm.Qualifier
used to filter the CVTerm
s.pattern
- a regexp pattern, for instance, '.*kegg.*' or '.*chebi.*'.Pattern
java.util.List<java.lang.String> filterCVTerms(CVTerm.Qualifier qualifier, java.lang.String pattern, boolean recursive)
CVTerm.Qualifier
that match
the
given pattern.
This is a recursive implementation of
#filterCVTerms(Qualifier, String)
that considers all child elements
of the current instance of SBase
as well.
qualifier
- CVTerm.Qualifier
used to filter the CVTerm
s.pattern
- a regexp pattern, for instance, '.*kegg.*' or '.*chebi.*'.recursive
- decides whether or not to consider all child elements of this
SBase
and collecting the matching CVTerm
s of
all children recursively. If this argument is false
, the
behavior of the method will be equivalent to calling
#filterCVTerms(Qualifier, String)
.CVTerm.Qualifier
that match the
given pattern.#filterCVTerms(Qualifier, String)
,
Pattern
java.util.List<java.lang.String> filterCVTerms(CVTerm.Qualifier qualifier, boolean recursive, java.lang.String... patterns)
CVTerm.Qualifier
that match
the
given patterns.qualifier
- CVTerm.Qualifier
used to filter the CVTerm
s.recursive
- boolean used to decides whether or not to consider all child
elements of this SBase
and collecting the matching
CVTerm
s of
all children recursively.patterns
- an arbitrary list of patterns to be matched to the resources of each
CVTerm
.CVTerm.Qualifier
that match the
given pattern.#filterCVTerms(Qualifier, String, boolean)
,
CVTerm.filterResources(String...)
Annotation getAnnotation()
Annotation
instance.Annotation
instance.java.lang.String getAnnotationString() throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
- if an error occurs while writing the XMLNode
to a StringCVTerm getCVTerm(int index)
java.util.List<CVTerm> getCVTerms()
CVTerm
s of this object.CVTerm
s of this object. If not yet set, this
method
initializes the annotation and returns an empty list.java.util.Map<java.lang.String,java.lang.String> getDeclaredNamespaces()
SBase getElementBySId(java.lang.String id)
This operation searches the model-wide SId identifier type namespace.
So it will not find for example LocalParameter
or UnitDefinition
.
This method is here for compatibility with libSBML, it is less efficient than
the methods that are located in the Model
and SBMLDocument
classes.
If you want to get an SBase
that is not in the SId namespace,
you can use the filter methods (for example: TreeNodeWithChangeSupport.filter(Filter)
)
using the IdFilter
filter.
id
- string representing the id of the SBase
to find.Model.getSBaseById(String)
SBase getElementByMetaId(java.lang.String metaid)
This method is here for compatibility with libSBML, it is less efficient than
the methods that are located in the Model
and SBMLDocument
classes.
metaid
- string representing the metaid of the SBase
to find.SBMLDocument.findSBase(String)
java.lang.String getElementName()
SBasePlugin getExtension(java.lang.String nameOrUri)
SBasePlugin
extension object which matches this package
name or URI.nameOrUri
- the package name or URISBasePlugin
extension object which matches this package
name or URI,
null is returned if nothing matching the name or URI is found.int getExtensionCount()
SBasePlugin
s of this SBase
.SBasePlugin
s of this SBase
.java.util.Map<java.lang.String,SBasePlugin> getExtensionPackages()
SBasePlugin
extension objects
of this SBase
.SBasePlugin
extension objects
of this SBase
.History getHistory()
History
instance of this object.History
instance of this object.int getLevel()
getVersion()
ValuePair<java.lang.Integer,java.lang.Integer> getLevelAndVersion()
SBase
.java.lang.String getMetaId()
java.lang.String getNamespace()
SBase
belong to.SBase
belong to.XMLNode getNotes()
XMLNode
containing the notes sub-element of
this object.XMLNode
containing the notes sub-element of
this object.java.lang.String getNotesString() throws javax.xml.stream.XMLStreamException
String
.
If no notes are set, an empty String
will be returned.
String
. If no
notes are set, an empty String
will be returned.javax.xml.stream.XMLStreamException
- if an error occurs while writing the XMLNode
to a String.int getNumPlugins()
SBasePlugin
s of this SBase
.SBasePlugin
s of this SBase
.java.lang.String getPackageName()
For example, the string "core" will be returned if this element is defined in SBML Level 3 Core.
int getPackageVersion()
The value 0 will be returned if this element belongs to the SBML Level 3 Core package. The value -1 will be returned if this element does not belong to the SBML Level core and the value has not been set properly.
SBase getParentSBMLObject()
SBase
.TreeNode.getParent()
SBasePlugin getPlugin(java.lang.String nameOrUri)
SBasePlugin
for an SBML Level 3 package extension
with the given package name or URI.
If no SBasePlugin
is found for this package, a new
SBasePlugin
is created, added to this SBase
and returned.
nameOrUri
- the name or URI of the packageSBasePlugin
for an SBML Level 3 package extension
with the given package name or URI.SBMLDocument getSBMLDocument()
SBMLDocument
object.
LibSBML uses the class SBMLDocument
as a top-level container for
storing
SBML content and data associated with it (such as warnings and error
messages). An SBML model in libSBML is contained inside an
SBMLDocument
object. SBMLDocument
corresponds roughly to
the class 'sbml' defined in the
SBML Level 2 specification, but it does not have a direct correspondence
in SBML Level 1. (But, it is created by libSBML no matter whether the
model is Level 1 or Level 2.)
This method allows the SBMLDocument
for the current object to be
retrieved.SBMLDocument
object of this SBML object.int getSBOTerm()
SBase
.SBO
java.lang.String getSBOTermID()
SBase
.SBO
java.lang.String getURI()
SBase
belong to. Same as getNamespace()
.
For example, all elements that belong to Layout Extension Version 1 for SBML Level 3 Version 1 Core must have the URI 'http://www.sbml.org/sbml/level3/version1/layout/version1'.
The elements that belong to SBML core might return null.
SBase
belong to.getNamespace()
int getVersion()
getLevel()
int hashCode()
SBase
instance.hashCode
in class java.lang.Object
SBase
instance.Object.hashCode()
boolean hasValidAnnotation()
true
if the Annotation
RDF 'about' attribute
matches the metaid of this object.true
if the Annotation
'about' String
of
this
object matches the metaid of this object.boolean hasValidLevelVersionNamespaceCombination()
true
or false
depending on whether this object's
level/version and namespace values correspond to a valid SBML
specification.true
if this object's level, version and namespace values
correspond to a valid SBML specification.boolean isExtendedByOtherPackages()
true
if this object is extended by other packages.true
if this object is extended by other packages.boolean isPackageEnabled(java.lang.String packageURIOrName)
true
if the given SBML Level 3 package is enabled within
the containing SBMLDocument
.packageURIOrName
- the name or URI of the package extension.true
if the given SBML Level 3 package is enabled within
the containing SBMLDocument
, false
otherwise.boolean isPackageURIEnabled(java.lang.String packageURIOrName)
true
if the given SBML Level 3 package is enabled within
the containing SBMLDocument
.packageURIOrName
- the name or URI of the package extension.true
if the given SBML Level 3 package is enabled within
the containing SBMLDocument
, false
otherwise.@Deprecated boolean isPkgEnabled(java.lang.String packageURIOrName)
isPackageEnabled(String)
true
if the given SBML Level 3 package is enabled within
the containing SBMLDocument
.packageURIOrName
- the name or URI of the package extension.true
if the given SBML Level 3 package is enabled within
the containing SBMLDocument
, false
otherwise.@Deprecated boolean isPkgURIEnabled(java.lang.String packageURIOrName)
isPackageEnabled(String)
true
if the given SBML Level 3 package is enabled within
the containing SBMLDocument
.packageURIOrName
- the name or URI of the package extension.true
if the given SBML Level 3 package is enabled within
the containing SBMLDocument
, false
otherwise.boolean isSetAnnotation()
true
or false
depending on whether this object's
'annotation' sub-elements exists and have some content.true
if the Annotation
instance of this object is
not null
and contains at least one CVTerm
or one
String
containing other annotations than RDF or a
History
instance.boolean isSetHistory()
true
if the History
instance of this object is set.true
if the History
instance of this object is set.boolean isSetLevel()
true
if the level is set.true
if the level is set.boolean isSetLevelAndVersion()
true
if both, Level and Version are set for this
SBase
.true
if isSetLevel()
and
isSetVersion()
.boolean isSetMetaId()
true
or false
depending on whether this object's
'metaid' attribute has been set.true
if the metaid is not null
.boolean isSetNotes()
true
or false
depending on whether this object's
'notes' sub-element exists and has content.true
if the notes String
is not null
.boolean isSetPackageVErsion()
true
if the package version is not equals to '-1'.true
if the package version is not equals to '-1'.boolean isSetParentSBMLObject()
SBase
has been linked to a parent within the
hierarchical SBML data structure.true
if this SBase
has a parent SBML object,
false
otherwise.getParentSBMLObject()
boolean isSetPlugin(java.lang.String nameOrUri)
true
if an SBasePlugin
is defined
for the given package.nameOrUri
- the package name or URItrue
if an SBasePlugin
is defined
for the given package.boolean isSetSBOTerm()
true
if the SBOTerm is set.true
if the SBOTerm is set.SBO
boolean isSetVersion()
true
if the version is not null
.true
if the version is not null
.boolean readAttribute(java.lang.String attributeName, java.lang.String prefix, java.lang.String value)
SBase
.
If the given attribute name is not recognized, nothing is done and
false
is returned.
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.boolean registerChild(SBase sbase) throws LevelVersionError
Exception
is thrown.sbase
- the SBase
to be registered.true
if the element could successfully be registered,
false
otherwise, e.g., if the element has already been
registered.LevelVersionError
- In case the given SBase
has a different, but defined
Level/Version combination than this current SBase
, an
LevelVersionError
is thrown.void unregisterChild(SBase sbase)
Model
and SBMLDocument
.sbase
- the SBase
to be unregistered.CVTerm removeCVTerm(int index)
CVTerm
at the given index.index
- the indexCVTerm
.java.lang.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >= size())void removeTreeNodeChangeListener(TreeNodeChangeListener listener)
TreeNodeChangeListener
from this element.removeTreeNodeChangeListener
in interface TreeNodeWithChangeSupport
listener
- the listener to be removed.TreeNodeWithChangeSupport.removeTreeNodeChangeListener(TreeNodeChangeListener, boolean)
void setAnnotation(Annotation annotation)
Annotation
instance.annotation
- the annotation of this SBase
void setAnnotation(XMLNode nonRDFAnnotation)
nonRDFAnnotation
- an XMLNodevoid setAnnotation(java.lang.String nonRDFAnnotation) throws javax.xml.stream.XMLStreamException
nonRDFAnnotation
- a String representing a piece of XML.javax.xml.stream.XMLStreamException
- - if any problem occurs while reading the XML.void setHistory(History history)
history
- the history of this SBase
void setLevel(int level)
Exception
is thrown.level
- the SBML level.void setMetaId(java.lang.String metaid) throws java.lang.IllegalArgumentException
metaid
- the meatId to be set.java.lang.IllegalArgumentException
- if the given metaid does not follow the pattern for valid metaids
ore if it is already used in the SBMLDocument
PropertyNotAvailableException
- in SBML level 1, as this attribute was introduced only from SBML
level 2.void setNotes(java.lang.String notes) throws javax.xml.stream.XMLStreamException
notes
- the notes for this SBase
.javax.xml.stream.XMLStreamException
- if an error occurs while parsing the notes.void setNotes(XMLNode notesXMLNode)
XMLNode
containing the notes sub-element of
this object.notesXMLNode
- the notes for this SBase
.void setPackageVersion(int packageVersion)
Use with caution, only if you know what you are doing. This should be set automatically.
packageVersion
- the version of the SBML Level 3 package to which this element belongs.void setSBOTerm(int term)
Beginning with SBML Level 2 Version 3, objects derived from SBase
have an optional attribute named 'sboTerm' for supporting the use of the
Systems Biology Ontology. In SBML proper, the data type of the attribute is
a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a seven digit
integer number; JSBML simplifies the representation by only storing the
'NNNNNNN' integer portion. Thus, in JSBML, the 'sboTerm' attribute on
SBase
has data type int
, and SBO
identifiers are
stored simply as integers.
SBO
terms are a type of optional annotation, and each different
class of SBML object derived from SBase
imposes its own
requirements about the values permitted for 'sboTerm'. Please consult the
SBML Level 2 Version 4 specification for more information about
the use of SBO
and the 'sboTerm' attribute.
term
- the NNNNNNN integer portion of the SBO
identifierPropertyNotAvailableException
- in Level 1.SBO
void setSBOTerm(java.lang.String sboid)
Beginning with SBML Level 2 Version 3, objects derived from SBase
have an optional attribute named 'sboTerm' for supporting the use of the
Systems Biology Ontology. In SBML proper, the data type of the attribute is
a string of the form 'SBO:NNNNNNN', where 'NNNNNNN' is a seven digit
integer number; JSBML simplifies the representation by only storing the
'NNNNNNN' integer portion. Thus, in JSBML, the 'sboTerm' attribute on
SBase
has data type int
, and SBO
identifiers are
stored simply as integers.
SBO
terms are a type of optional annotation, and each different
class of SBML object derived from SBase
imposes its own
requirements about the values permitted for 'sboTerm'. Please consult the
SBML Level 2 Version 4 specification for more information about
the use of SBO
and the 'sboTerm' attribute.
@Deprecated void setThisAsParentSBMLObject(SBase sbase) throws LevelVersionError
registerChild(SBase)
Exception
is
thrown.sbase
- the child SBase
LevelVersionError
- - if the parent and the child have a different level and version.void setVersion(int version)
Exception
is thrown.version
- the SBML versionvoid unsetAnnotation()
void unsetCVTerms()
CVTerm
of this object.void unsetExtension(java.lang.String nameOrUri)
SBasePlugin
extension object which matches this package
name or URI.nameOrUri
- the package name or URIvoid unsetHistory()
History
of this object.void unsetMetaId()
void unsetNotes()
void unsetPlugin(java.lang.String nameOrUri)
SBasePlugin
extension object which matches this package
name or URI.nameOrUri
- the package name or URIvoid unsetSBOTerm()
java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
SBase
that
need to be written out in XML.
The attribute name is used as a key and the attribute value as value. If a prefix is needed for the attribute name, it need to be set directly in this map.
Map
containing the XML attributes of this object.java.lang.String getId()
java.lang.String getName()
boolean isIdMandatory()
true
if the identifier of this
SBase
is required to be defined (i.e., not null
)
in the definition of SBML.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.boolean isSetId()
true
if the id is not null
.true
if the id is not null
.boolean isSetName()
true
if the name is not null
.true
if the name is not null
.void setId(java.lang.String id)
id
- the id to setvoid setName(java.lang.String name)
name
- the name to setvoid unsetId()
null
.void unsetName()
null
.