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 |
addNamespace(java.lang.String namespace)
Adds an additional name space to the set of name spaces of this
SBase if the given name space is not yet present within this
SortedSet . |
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 copy of this object, i.e., e new
SBase with the same properties
like this one and returns a pointer to it. |
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.
|
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) |
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() |
History |
getHistory() |
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() |
Model |
getModel()
|
java.util.SortedSet<java.lang.String> |
getNamespaces()
Returns all the namespaces of all the packages which are currently
extending this object.
|
XMLNode |
getNotes()
Returns the
XMLNode containing the notes sub-element of
this object. |
java.lang.String |
getNotesString() |
int |
getNumCVTerms() |
SBase |
getParentSBMLObject()
This method is convenient when holding an object nested inside other
objects in an SBML model.
|
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 |
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 |
isSetSBOTerm() |
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)
Sets this object as SBML parent of 'sbase'.
|
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 |
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 |
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, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getListOfTreeNodeChangeListeners, getTreeNodeChangeListenerCount, isRoot, isSetParent, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener
boolean addCVTerm(CVTerm term)
void addNamespace(java.lang.String namespace)
SBase
if the given name space is not yet present within this
SortedSet
.namespace
- the namespace to addvoid addDeclaredNamespace(java.lang.String prefix, java.lang.String namespace)
SBase
.prefix
- the prefix of the namespace to addnamespace
- the namespace to addvoid appendNotes(java.lang.String notes)
notes
- void appendNotes(XMLNode notes)
notes
- SBase clone()
SBase
with the same properties
like this one and returns a pointer to it.boolean equals(java.lang.Object sbase)
SBase
has exactly the same
properties like this SBase
instance.equals
in class java.lang.Object
sbase
- 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'.Annotation getAnnotation()
Annotation
instance.Annotation
instance.java.lang.String getAnnotationString()
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.lang.String getElementName()
int getLevel()
getVersion()
ValuePair<java.lang.Integer,java.lang.Integer> getLevelAndVersion()
SBase
.java.lang.String getMetaId()
Model getModel()
java.util.SortedSet<java.lang.String> getNamespaces()
java.util.Map<java.lang.String,java.lang.String> getDeclaredNamespaces()
XMLNode getNotes()
XMLNode
containing the notes sub-element of
this object.XMLNode
containing the notes sub-element of
this object.java.lang.String getNotesString()
String
. If no
notes are set, an empty String
will be returned.SBase getParentSBMLObject()
TreeNode.getParent()
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()
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 isSetAnnotation()
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()
Annotation
instance of this objectboolean isSetLevel()
boolean isSetLevelAndVersion()
true
if both, Level and Version are set for this
SBase
.true
if isSetLevel()
and
isSetVersion()
.boolean isSetMetaId()
boolean isSetNotes()
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 isSetSBOTerm()
SBO
boolean isSetVersion()
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 attributevoid 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)
notes
- 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
void setThisAsParentSBMLObject(SBase sbase) throws LevelVersionError
Exception
is
thrown.LevelVersionError
void setVersion(int version)
Exception
is thrown.level
- void unsetAnnotation()
void unsetCVTerms()
CVTerm
of this object.void unsetHistory()
History
of this object.void unsetMetaId()
void unsetNotes()
void unsetSBOTerm()
java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
Map
containing the XML attributes of this object.