org.sbml.jsbml
public interface SBase extends TreeNodeWithChangeSupport
Modifier and Type | Method and Description |
---|---|
boolean |
addCVTerm(CVTerm term) |
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 |
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)
This method returns a list of all qualifiers of the given type.
|
java.util.List<java.lang.String> |
filterCVTerms(CVTerm.Qualifier qualifier,
java.lang.String pattern)
Queries the list of controlled vocabulary terms for those terms whose
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)
A recursive implementation of
#filterCVTerms(Qualifier, String)
that considers all child elements of the current instance of
SBase as well. |
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() |
java.util.Map<java.lang.String,java.lang.String> |
getDeclaredNamespaces()
Returns all the namespaces declared on this object.
|
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. |
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. |
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 |
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 . |
SBase |
getParentSBMLObject()
This method is convenient when holding an object nested inside other
objects in an SBML model.
|
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 . |
int |
getVersion()
Returns the Version within the SBML Level of the overall SBML document.
|
int |
hashCode() |
boolean |
hasValidAnnotation() |
boolean |
hasValidLevelVersionNamespaceCombination()
Predicate returning
true or false depending on whether this object's
level/version and name space values correspond to a valid SBML
specification. |
boolean |
isExtendedByOtherPackages() |
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()
Predicate returning
true or false depending on whether this object's
'annotation' sub-element exists and has content. |
boolean |
isSetHistory() |
boolean |
isSetLevel() |
boolean |
isSetLevelAndVersion()
Returns
true if both, Level and Version are set for this
SBase . |
boolean |
isSetMetaId()
Predicate returning
true or false depending on whether this object's
'metaid' attribute has been set. |
boolean |
isSetNotes()
Predicate returning
true or false depending on whether this object's
'notes' sub-element exists and has content. |
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()
Return
true if the SBOTerm is set. |
boolean |
isSetVersion() |
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value)
If the attribute is an id or name attribute, it will set the id or name
of this object with the value of the XML attribute ('value').
|
void |
registerChild(SBase sbase)
Sets this object as SBML parent of 'sbase'.
|
void |
removeTreeNodeChangeListener(TreeNodeChangeListener l)
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 |
setHistory(History history) |
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 |
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 |
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 |
unregister(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 |
unsetMetaId()
Unsets the value of the 'metaid' attribute of this SBML object.
|
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() |
addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
boolean addCVTerm(CVTerm term)
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 appendNotes(java.lang.String notes) throws javax.xml.stream.XMLStreamException
notes
- javax.xml.stream.XMLStreamException
void appendNotes(XMLNode notes)
notes
- 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 nameboolean equals(java.lang.Object sbase)
true
if and only if the given SBase
has exactly the same
properties like this SBase
instance.equals
in class java.lang.Object
sbase
- true
if and only if the given Object
is an instance of
SBase
that has exactly the same properties like this
SBase instance.java.util.List<CVTerm> filterCVTerms(CVTerm.Qualifier qualifier)
qualifier
- java.util.List<java.lang.String> filterCVTerms(CVTerm.Qualifier qualifier, java.lang.String pattern)
qualifier
- pattern
- for instance, 'kegg' or 'chebi'.java.util.List<java.lang.String> filterCVTerms(CVTerm.Qualifier qualifier, java.lang.String pattern, boolean recursive)
#filterCVTerms(Qualifier, String)
that considers all child elements of the current instance of
SBase
as well.qualifier
- pattern
- recursive
- decides whether or not considering 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)
.#filterCVTerms(Qualifier, String)
Annotation getAnnotation()
Annotation
instance.Annotation
instance.java.lang.String getAnnotationString() throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
CVTerm getCVTerm(int index)
java.util.List<CVTerm> getCVTerms()
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()
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.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
int getNumPlugins()
SBasePlugin
s of this SBase
.SBasePlugin
s of this SBase
.SBase getParentSBMLObject()
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
int getVersion()
getLevel()
int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
boolean hasValidAnnotation()
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 name space values correspond to a valid SBML
specification.boolean isExtendedByOtherPackages()
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.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.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-element exists and has 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 Annotation
instance of this objectboolean isSetLevel()
true
if the level is not null
.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 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
.boolean readAttribute(java.lang.String attributeName, java.lang.String prefix, java.lang.String value)
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.void registerChild(SBase sbase) throws LevelVersionError
Exception
is
thrown.LevelVersionError
void unregister(SBase sbase)
Model
and SBMLDocument
.void removeTreeNodeChangeListener(TreeNodeChangeListener l)
TreeNodeChangeListener
from this element.removeTreeNodeChangeListener
in interface TreeNodeWithChangeSupport
l
- TreeNodeWithChangeSupport.removeTreeNodeChangeListener(TreeNodeChangeListener, boolean)
void setAnnotation(Annotation annotation)
Annotation
instance.annotation
- void setHistory(History history)
void setLevel(int level)
Exception
is thrown.level
- void setMetaId(java.lang.String metaid)
metaid
- PropertyNotAvailableException
- in Level 1.void setNotes(java.lang.String notes) throws javax.xml.stream.XMLStreamException
notes
- javax.xml.stream.XMLStreamException
void setNotes(XMLNode notesXMLNode)
XMLNode
containing the notes sub-element of
this object.void setSBOTerm(int term)
term
- PropertyNotAvailableException
- in Level 1.SBO
void setSBOTerm(java.lang.String sboid)
sboid
- SBO
@Deprecated void setThisAsParentSBMLObject(SBase sbase) throws LevelVersionError
registerChild(SBase)
Exception
is
thrown.LevelVersionError
void setVersion(int version)
Exception
is thrown.level
- void 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()
Map
containing the XML attributes of this object.