public abstract class AbstractSBase extends AbstractTreeNode implements SBase
SBase
component.Modifier and Type | Class and Description |
---|---|
private static class |
AbstractSBase.NOTES_TYPE |
Modifier and Type | Field and Description |
---|---|
private Annotation |
annotation
Annotations of the SBML component.
|
private static ValidationContext |
attributeValidator
Shared context to perform attribute validation.
|
private java.util.Map<java.lang.String,java.lang.String> |
declaredNamespaces
Contains all the namespaces declared on the XML node with their prefixes.
|
private java.lang.String |
elementNamespace
the namespace which this SBase element belong to.
|
private java.util.SortedMap<java.lang.String,SBasePlugin> |
extensions
Map containing the SBML extension object of additional packages
with the appropriate name space of the package. |
private java.lang.String |
id
id of the SBML component (can be optional depending on the level and
version).
|
protected java.util.SortedMap<java.lang.String,XMLNode> |
ignoredExtensions
Map containing the ignored package objects. |
protected XMLNode |
ignoredXMLElements
Contains the unknown XML attributes or elements.
|
static java.lang.String |
JSBML_WRONG_SBO_TERM |
private static org.apache.log4j.Logger |
logger
A logger for this class.
|
(package private) ValuePair<java.lang.Integer,java.lang.Integer> |
lv
Level and version of the SBML component.
|
private java.lang.String |
metaId
metaid of the SBML component.
|
private java.lang.String |
name
name of the SBML component (can be optional depending on the level and
version).
|
private XMLNode |
notesXMLNode
notes of the SBML component.
|
protected java.lang.String |
packageName
the name of the package which this SBase element belong to, 'core' by
default.
|
private int |
packageVersion
the version of the package which this SBase element belong to, '0' by
default for core.
|
private int |
sboTerm
sbo term of the SBML component.
|
private static long |
serialVersionUID
Generated serial version identifier.
|
listOfListeners, parent, resourceBundle
Constructor and Description |
---|
AbstractSBase()
Creates an AbstractSBase instance.
|
AbstractSBase(int level,
int version)
Creates an
AbstractSBase instance with the given SBML Level and
Version. |
AbstractSBase(SBase sb)
Creates an
AbstractSBase instance from a given
AbstractSBase . |
AbstractSBase(java.lang.String id)
Creates an
AbstractSBase with the given identifier. |
AbstractSBase(java.lang.String id,
int level,
int version)
Creates an
AbstractSBase from an id, level and version. |
AbstractSBase(java.lang.String id,
java.lang.String name,
int level,
int version)
Creates an
AbstractSBase from an id, name, level and version. |
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 existing notes.
|
protected boolean |
checkAndSetPackageNamespaceAndVersion(SBase sbase)
Checks whether or not the given
SBase has the same package
version configuration than this element or the SBMLDocument. |
protected boolean |
checkAndSetPackageNamespaceAndVersion(SBasePlugin sbasePlugin,
SBMLDocument doc)
Checks whether or not the given
SBasePlugin has the same package
configuration than the SBMLDocument. |
protected boolean |
checkAttribute(java.lang.String attributeName)
Checks if the attribute conforms to the SBML specifications of the level
and version of this object.
|
(package private) boolean |
checkIdentifier(java.lang.String sID)
Checks if the sID is a valid identifier.
|
protected boolean |
checkLevelAndVersionCompatibility(SBase sbase)
Checks whether or not the given
SBase has the same level and
version configuration than this element. |
abstract AbstractSBase |
clone()
Creates a deep copy of this object, i.e., a new
SBase with the same
properties
like this one. |
History |
createHistory()
Creates a new
History and associates it with the annotation of
this element. |
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 object)
|
private java.lang.String |
extractAttribute(java.util.Map<java.lang.String,java.lang.String> attMap,
java.lang.String attributeName)
Extracts an attribute value from the given map with or without
packageName as prefix for the attribute name.
|
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. |
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 . |
boolean |
getAllowsChildren() |
Annotation |
getAnnotation()
Returns the content of the 'annotation' sub-element of this object as an
Annotation instance. |
java.lang.String |
getAnnotationString()
Returns the
Annotation of this SBML object as a String . |
javax.swing.tree.TreeNode |
getChildAt(int childIndex) |
int |
getChildCount() |
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 id)
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 . |
private int |
getFirstElementIndex(XMLNode curNotes)
Return the index of the first child of type 'Element' for the given
XMLNode . |
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.
|
protected IdManager |
getIdManager(SBase sbase)
|
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 an
XMLNode object that represent the notes of this element. |
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 |
getParent()
This is equivalent to calling
getParentSBMLObject() , but this
method is needed for TreeNode . |
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 . |
static boolean |
isValidLevelAndVersionCombination(int level,
int version)
Returns
true if the level and version combination is a valid one,
false otherwise. |
static boolean |
isValidMetaId(java.lang.String idCandidate)
Deprecated.
|
protected void |
notifyChildChange(javax.swing.tree.TreeNode oldChild,
javax.swing.tree.TreeNode newChild)
This method is called when one child has been swapped with another one
and can be used to check certain properties of the resulting changed
tree.
|
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'.
|
private void |
registerChild(SBasePlugin sbasePlugin)
|
boolean |
removeCVTerm(CVTerm cvTerm)
Removes the given
CVTerm . |
CVTerm |
removeCVTerm(int index)
Removes the
CVTerm at the given index. |
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'.
|
(package private) boolean |
setLevelAndVersion(int level,
int version,
boolean strict)
Sets recursively the level and version attribute for this element
and all sub-elements.
|
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 |
setNamespace(java.lang.String namespace)
Sets the XML namespace to which this
SBase belong. |
void |
setNotes(java.lang.String notes)
Sets the notes with 'notes'.
|
void |
setNotes(XMLNode notes)
Sets the
XMLNode containing the notes sub-element of
this object. |
(package private) boolean |
setPackageNamespaceAndVersion(java.lang.String packageLabel,
java.lang.String namespace,
int packageVersion)
Sets recursively the package namespace and version if the current node
'packageName' is equals to the given
packageLabel . |
void |
setPackageVersion(int packageVersion)
Sets the version of the SBML Level 3 package to which this element belongs.
|
protected void |
setParentSBML(SBase parent)
Sets the parent of the current
SBase . |
protected void |
setParentSBMLObject(SBase sbase)
Checks the Level/Version configuration of the new parent (if it is
compliant to the one of this
SBase ), adds all changeListeners from
the parent to this SBase , fires a
TreeNodeChangeListener.nodeAdded(TreeNode) event, and and finally,
it will forward the new parent to setParentSBML(SBase) . |
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'.
|
java.lang.String |
toString()
Returns a String representing this SBase with all the
attributes that are defined.
|
void |
unregisterChild(SBase sbase)
Unregisters recursively the given SBase from the
Model
and SBMLDocument . |
private void |
unregisterChild(SBasePlugin sbasePlugin)
|
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 |
unsetNamespace()
Unsets the namespace that is associated to this
SBase . |
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, 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
removeTreeNodeChangeListener
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
private static final transient org.apache.log4j.Logger logger
private static final long serialVersionUID
public static final transient java.lang.String JSBML_WRONG_SBO_TERM
private static ValidationContext attributeValidator
private Annotation annotation
private final java.util.Map<java.lang.String,java.lang.String> declaredNamespaces
private java.lang.String elementNamespace
private final java.util.SortedMap<java.lang.String,SBasePlugin> extensions
Map
containing the SBML extension object of additional packages
with the appropriate name space of the package.protected java.util.SortedMap<java.lang.String,XMLNode> ignoredExtensions
Map
containing the ignored package objects.
Package are considered ignored if JSBML does not support this package or support the package but not the associated namespace.
protected XMLNode ignoredXMLElements
ValuePair<java.lang.Integer,java.lang.Integer> lv
private java.lang.String metaId
private XMLNode notesXMLNode
protected java.lang.String packageName
private int packageVersion
private int sboTerm
private java.lang.String id
private java.lang.String name
public AbstractSBase()
By default, the sboTerm is -1, the
metaid, notes, parentSBMLObject, annotation, and
notes are null
. The level and version are set to -1.
The setOfListeners list and the extensions hash map
are empty.
public AbstractSBase(int level, int version)
AbstractSBase
instance with the given SBML Level and
Version.
By default, the sboTerm is -1, the metaid, notes,
AbstractTreeNode.parent
, annotation
, and notes are null
. The
declaredNamespaces
list and the extensions
Map
are
empty.
level
- the SBML levelversion
- the SBML versionpublic AbstractSBase(SBase sb)
AbstractSBase
instance from a given
AbstractSBase
.sb
- an AbstractSBase
object to clonepublic AbstractSBase(java.lang.String id)
AbstractSBase
with the given identifier.
Note that with this constructor the level and version of the element are not specified. But when adding the SBase inside a Model, it will inherit the level and version from his parent.
id
- the id of this AbstractSBase
public AbstractSBase(java.lang.String id, int level, int version)
AbstractSBase
from an id, level and version.id
- the id of this AbstractSBase
level
- the SBML levelversion
- the SBML versionpublic AbstractSBase(java.lang.String id, java.lang.String name, int level, int version)
AbstractSBase
from an id, name, level and version.id
- the id of this AbstractSBase
name
- the name of this AbstractSBase
level
- the SBML levelversion
- the SBML versionpublic static boolean isValidLevelAndVersionCombination(int level, int version)
true
if the level and version combination is a valid one,
false
otherwise.level
- the SBML levelversion
- the SBML versiontrue
if the level and version combination is a valid one,
false
otherwise.@Deprecated public static final boolean isValidMetaId(java.lang.String idCandidate)
SyntaxChecker.isValidMetaId(String)
idCandidate
- the id to checktrue
if the given argument is a valid meta identifier
String
, false
otherwise.public boolean addCVTerm(CVTerm term)
SBase
CVTerm
.public void addDeclaredNamespace(java.lang.String prefix, java.lang.String namespace)
SBase
.addDeclaredNamespace
in interface SBase
prefix
- the prefix of the namespace to addnamespace
- the namespace to addpublic void addExtension(java.lang.String nameOrUri, SBasePlugin sbasePlugin)
SBase
SBasePlugin
extension object to this SBase
.
If a previous SBasePlugin
associated with the same package
was present before, it will be replaced.
addExtension
in interface SBase
nameOrUri
- the name or URI of the package extension.sbasePlugin
- the SBasePlugin
to add.public void addPlugin(java.lang.String nameOrUri, SBasePlugin sbasePlugin)
SBase
SBasePlugin
extension object to this SBase
.
If a previous SBasePlugin
associated with the same package
was present before, it will be replaced.
addPlugin
in interface SBase
nameOrUri
- the name or URI of the package extension.sbasePlugin
- the SBasePlugin
to add.SBase.addExtension(String, SBasePlugin)
public void appendAnnotation(java.lang.String annotation) throws javax.xml.stream.XMLStreamException
SBase
SBase.setAnnotation(XMLNode)
or
SBase.setAnnotation(String)
, this method allows other
annotations to be preserved when an application adds its own data.appendAnnotation
in interface SBase
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.SBase.appendAnnotation(XMLNode)
public void appendAnnotation(XMLNode annotation)
SBase
SBase.setAnnotation(XMLNode)
or
SBase.setAnnotation(String)
, this method allows other
annotations to be preserved when an application adds its own data.appendAnnotation
in interface SBase
annotation
- an XML structure that is to be copied and appended to the content of
the 'annotation' subelement of this objectpublic void appendNotes(java.lang.String notes) throws javax.xml.stream.XMLStreamException
SBase
appendNotes
in interface SBase
notes
- the notes to be added.javax.xml.stream.XMLStreamException
- if an error occurs while parsing the notes String
.public void appendNotes(XMLNode notes)
This allows other notes to be preserved whilst adding additional information.
appendNotes
in interface SBase
notes
- the notes to append.protected boolean checkAttribute(java.lang.String attributeName)
TreeNodeChangeEvent
could be used as attribute name.
WARNING: this is a placeholder method, most classes have no attribute validations implemented.
attributeName
- - the attribute nametrue
if the attribute conforms the the SBML specifications.protected boolean checkLevelAndVersionCompatibility(SBase sbase)
SBase
has the same level and
version configuration than this element. If the L/V combination for the
given sbase
is not yet defined, this method sets it to the
identical values as it is for the current object.sbase
- the element to be checked.true
if the given sbase
and this object
have the same L/V configuration.LevelVersionError
- In case the given SBase
has a different, but defined
Level/Version combination than this current SBase
, an
LevelVersionError
is thrown. This method is only
package-wide visible because it is not intended to be a
real check, rather than to indicate potential errors.protected boolean checkAndSetPackageNamespaceAndVersion(SBase sbase)
SBase
has the same package
version configuration than this element or the SBMLDocument. If the package
namespace and version combination
for the given sbase
is not yet defined, this method sets it to the
identical values as it is for the current object or the SBMLDocument.sbase
- the element to be checked.true
if the given sbase
and this object
have the same package configuration.LevelVersionError
- In case the given SBase
has a different, but defined
package version combination than this current SBase
, an
LevelVersionError
is thrown. This method is only
package-wide visible because it is not intended to be a
real check, rather than to indicate potential errors.protected boolean checkAndSetPackageNamespaceAndVersion(SBasePlugin sbasePlugin, SBMLDocument doc)
SBasePlugin
has the same package
configuration than the SBMLDocument. If the package namespace and version
combination
for the given sbasePlugin
is not yet defined, this method sets it
to the
identical values as it is for the current SBMLDocument.sbasePlugin
- the element to be checked.true
if the given sbase
and this object
have the same package configuration.LevelVersionError
- In case the given SBase
has a different, but defined
package version combination than this current SBase
, an
LevelVersionError
is thrown. This method is only
package-wide visible because it is not intended to be a
real check, rather than to indicate potential errors.public abstract AbstractSBase clone()
SBase
SBase
with the same
properties
like this one.clone
in interface SBase
clone
in class AbstractTreeNode
public History createHistory()
History
and associates it with the annotation of
this element. If no Annotation
exists, a new such element is
created as well.History
instance that is directly associated with
this element.getHistory()
public SBasePlugin createPlugin(java.lang.String nameOrUri)
SBase
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.
createPlugin
in interface SBase
nameOrUri
- the package name or URISBasePlugin
for the given package name or URIpublic void disablePackage(java.lang.String packageURIOrName)
SBMLDocument
.disablePackage
in interface SBase
packageURIOrName
- a package namespace URI or package namepublic void enablePackage(java.lang.String packageURIOrName)
SBMLDocument
.enablePackage
in interface SBase
packageURIOrName
- a package namespace URI or package namepublic void enablePackage(java.lang.String packageURIOrName, boolean enabled)
SBMLDocument
.enablePackage
in interface SBase
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.public boolean equals(java.lang.Object object)
SBase
public java.util.List<CVTerm> filterCVTerms(CVTerm.Qualifier qualifier)
SBase
CVTerm
with the given CVTerm.Qualifier
.filterCVTerms
in interface SBase
qualifier
- CVTerm.Qualifier
used to filter the CVTerm
s.CVTerm
with the given CVTerm.Qualifier
.public java.util.List<java.lang.String> filterCVTerms(CVTerm.Qualifier qualifier, boolean recursive, java.lang.String... patterns)
SBase
CVTerm.Qualifier
that match
the
given patterns.filterCVTerms
in interface SBase
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...)
public java.util.List<java.lang.String> filterCVTerms(CVTerm.Qualifier qualifier, java.lang.String pattern)
SBase
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.filterCVTerms
in interface SBase
qualifier
- CVTerm.Qualifier
used to filter the CVTerm
s.pattern
- a regexp pattern, for instance, '.*kegg.*' or '.*chebi.*'.Pattern
public java.util.List<java.lang.String> filterCVTerms(CVTerm.Qualifier qualifier, java.lang.String pattern, boolean recursive)
SBase
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.
filterCVTerms
in interface SBase
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
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 boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
public Annotation getAnnotation()
SBase
Annotation
instance.getAnnotation
in interface SBase
Annotation
instance.public java.lang.String getAnnotationString() throws javax.xml.stream.XMLStreamException
Annotation
of this SBML object as a String
.getAnnotationString
in interface SBase
Annotation
of this SBML object as a String
or
an empty String
if there are no Annotation
.javax.xml.stream.XMLStreamException
- if there is a problem writing the annotation to XML.public javax.swing.tree.TreeNode getChildAt(int childIndex)
getChildAt
in interface javax.swing.tree.TreeNode
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
public int getCVTermCount()
SBase
getCVTermCount
in interface SBase
CVTerm
s of this SBase
.public java.util.List<CVTerm> getCVTerms()
SBase
CVTerm
s of this object.getCVTerms
in interface SBase
CVTerm
s of this object. If not yet set, this
method
initializes the annotation and returns an empty list.public java.util.Map<java.lang.String,java.lang.String> getDeclaredNamespaces()
SBase
getDeclaredNamespaces
in interface SBase
public SBase getElementBySId(java.lang.String id)
SBase
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.
getElementBySId
in interface SBase
id
- string representing the id of the SBase
to find.Model.getSBaseById(String)
public SBase getElementByMetaId(java.lang.String id)
SBase
This method is here for compatibility with libSBML, it is less efficient than
the methods that are located in the Model
and SBMLDocument
classes.
getElementByMetaId
in interface SBase
id
- string representing the metaid of the SBase
to find.SBMLDocument.findSBase(String)
public java.lang.String getElementName()
SBase
getElementName
in interface SBase
public SBasePlugin getExtension(java.lang.String nameOrUri)
SBase
SBasePlugin
extension object which matches this package
name or URI.getExtension
in interface SBase
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.public int getExtensionCount()
SBase
SBasePlugin
s of this SBase
.getExtensionCount
in interface SBase
SBasePlugin
s of this SBase
.public java.util.Map<java.lang.String,SBasePlugin> getExtensionPackages()
SBase
SBasePlugin
extension objects
of this SBase
.getExtensionPackages
in interface SBase
SBasePlugin
extension objects
of this SBase
.private int getFirstElementIndex(XMLNode curNotes)
XMLNode
.curNotes
- the XMLNodeXMLNode
, -1 otherwise.public History getHistory()
SBase
History
instance of this object.getHistory
in interface SBase
History
instance of this object.protected IdManager getIdManager(SBase sbase)
IdManager
that can register the given SBase
.
It means that the method IdManager.accept(SBase)
returned
true
.
public int getLevel()
SBase
getLevel
in interface SBase
SBase.getVersion()
public ValuePair<java.lang.Integer,java.lang.Integer> getLevelAndVersion()
SBase
SBase
.getLevelAndVersion
in interface SBase
ValuePair
with the Level and Version of this
SBase
. Note that the returned ValuePair
is never
null
, but if undeclared it may contain elements set to -1.public java.lang.String getMetaId()
SBase
public java.lang.String getNamespace()
SBase
SBase
belong to.getNamespace
in interface SBase
SBase
belong to.public XMLNode getNotes()
XMLNode
object that represent the notes of this element.public java.lang.String getNotesString() throws javax.xml.stream.XMLStreamException
SBase
String
.
If no notes are set, an empty String
will be returned.
getNotesString
in interface SBase
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.public int getNumCVTerms()
SBase
getNumCVTerms
in interface SBase
CVTerm
s of this SBase
.public int getNumPlugins()
SBase
SBasePlugin
s of this SBase
.getNumPlugins
in interface SBase
SBasePlugin
s of this SBase
.public java.lang.String getPackageName()
SBase
For example, the string "core" will be returned if this element is defined in SBML Level 3 Core.
getPackageName
in interface SBase
public int getPackageVersion()
SBase
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.
getPackageVersion
in interface SBase
public SBase getParent()
getParentSBMLObject()
, but this
method is needed for TreeNode
.getParent
in interface javax.swing.tree.TreeNode
getParent
in class AbstractTreeNode
getParentSBMLObject()
public SBase getParentSBMLObject()
SBase
SBase
.getParentSBMLObject
in interface SBase
TreeNode.getParent()
public SBasePlugin getPlugin(java.lang.String nameOrUri)
SBase
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.
getPlugin
in interface SBase
nameOrUri
- the name or URI of the packageSBasePlugin
for an SBML Level 3 package extension
with the given package name or URI.public SBMLDocument getSBMLDocument()
SBase
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.getSBMLDocument
in interface SBase
SBMLDocument
object of this SBML object.public int getSBOTerm()
SBase
SBase
.getSBOTerm
in interface SBase
SBO
public java.lang.String getSBOTermID()
SBase
SBase
.getSBOTermID
in interface SBase
SBO
public java.lang.String getURI()
SBase
SBase
belong to. Same as SBase.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.
getURI
in interface SBase
SBase
belong to.SBase.getNamespace()
public int getVersion()
SBase
getVersion
in interface SBase
SBase.getLevel()
public int hashCode()
SBase
SBase
instance.hashCode
in interface SBase
hashCode
in class AbstractTreeNode
SBase
instance.Object.hashCode()
public boolean hasValidAnnotation()
SBase
true
if the Annotation
RDF 'about' attribute
matches the metaid of this object.hasValidAnnotation
in interface SBase
true
if the Annotation
'about' String
of
this
object matches the metaid of this object.public boolean hasValidLevelVersionNamespaceCombination()
SBase
true
or false
depending on whether this object's
level/version and namespace values correspond to a valid SBML
specification.hasValidLevelVersionNamespaceCombination
in interface SBase
true
if this object's level, version and namespace values
correspond to a valid SBML specification.public boolean isExtendedByOtherPackages()
SBase
true
if this object is extended by other packages.isExtendedByOtherPackages
in interface SBase
true
if this object is extended by other packages.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 SBase
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 boolean isPackageEnabled(java.lang.String packageURIOrName)
SBase
true
if the given SBML Level 3 package is enabled within
the containing SBMLDocument
.isPackageEnabled
in interface SBase
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.public boolean isPackageURIEnabled(java.lang.String packageURIOrName)
SBase
true
if the given SBML Level 3 package is enabled within
the containing SBMLDocument
.isPackageURIEnabled
in interface SBase
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 public boolean isPkgEnabled(java.lang.String packageURIOrName)
SBase
true
if the given SBML Level 3 package is enabled within
the containing SBMLDocument
.isPkgEnabled
in interface SBase
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 public boolean isPkgURIEnabled(java.lang.String packageURIOrName)
SBase
true
if the given SBML Level 3 package is enabled within
the containing SBMLDocument
.isPkgURIEnabled
in interface SBase
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.public boolean isSetAnnotation()
SBase
true
or false
depending on whether this object's
'annotation' sub-elements exists and have some content.isSetAnnotation
in interface SBase
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.public boolean isSetHistory()
SBase
true
if the History
instance of this object is set.isSetHistory
in interface SBase
true
if the History
instance of this object is set.public boolean isSetLevel()
SBase
true
if the level is set.isSetLevel
in interface SBase
true
if the level is set.public boolean isSetLevelAndVersion()
SBase
true
if both, Level and Version are set for this
SBase
.isSetLevelAndVersion
in interface SBase
true
if SBase.isSetLevel()
and
SBase.isSetVersion()
.public boolean isSetMetaId()
SBase
true
or false
depending on whether this object's
'metaid' attribute has been set.isSetMetaId
in interface SBase
true
if the metaid is not null
.public boolean isSetNotes()
SBase
true
or false
depending on whether this object's
'notes' sub-element exists and has content.isSetNotes
in interface SBase
true
if the notes String
is not null
.public boolean isSetPackageVErsion()
SBase
true
if the package version is not equals to '-1'.isSetPackageVErsion
in interface SBase
true
if the package version is not equals to '-1'.public boolean isSetParentSBMLObject()
SBase
SBase
has been linked to a parent within the
hierarchical SBML data structure.isSetParentSBMLObject
in interface SBase
true
if this SBase
has a parent SBML object,
false
otherwise.SBase.getParentSBMLObject()
public boolean isSetPlugin(java.lang.String nameOrUri)
SBase
true
if an SBasePlugin
is defined
for the given package.isSetPlugin
in interface SBase
nameOrUri
- the package name or URItrue
if an SBasePlugin
is defined
for the given package.public boolean isSetSBOTerm()
SBase
true
if the SBOTerm is set.isSetSBOTerm
in interface SBase
true
if the SBOTerm is set.SBO
public boolean isSetVersion()
SBase
true
if the version is not null
.isSetVersion
in interface SBase
true
if the version is not null
.protected void notifyChildChange(javax.swing.tree.TreeNode oldChild, javax.swing.tree.TreeNode newChild)
AbstractTreeNode
notifyChildChange
in class AbstractTreeNode
oldChild
- the element that was a child of this node before the change.newChild
- the new child whose new parent is this node.public boolean readAttribute(java.lang.String attributeName, java.lang.String prefix, java.lang.String value)
SBase
SBase
.
If the given attribute name is not recognized, nothing is done and
false
is returned.
readAttribute
in interface SBase
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.public boolean registerChild(SBase sbase) throws LevelVersionError
SBase
Exception
is thrown.registerChild
in interface SBase
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.private void registerChild(SBasePlugin sbasePlugin)
sbasePlugin
- the SBasePlugin
to register.public boolean removeCVTerm(CVTerm cvTerm)
CVTerm
.removeCVTerm
in interface SBase
cvTerm
- the CVTerm
to removeCVTerm
was successfully removed.public CVTerm removeCVTerm(int index)
CVTerm
at the given index.removeCVTerm
in interface SBase
index
- the indexCVTerm
.java.lang.IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >= size())public void setAnnotation(Annotation annotation)
SBase
Annotation
instance.setAnnotation
in interface SBase
annotation
- the annotation of this SBase
public void setAnnotation(java.lang.String nonRDFAnnotation) throws javax.xml.stream.XMLStreamException
SBase
setAnnotation
in interface SBase
nonRDFAnnotation
- a String representing a piece of XML.javax.xml.stream.XMLStreamException
- - if any problem occurs while reading the XML.public void setAnnotation(XMLNode nonRDFAnnotation)
SBase
setAnnotation
in interface SBase
nonRDFAnnotation
- an XMLNodepublic void setHistory(History history)
SBase
setHistory
in interface SBase
history
- the history of this SBase
public void setLevel(int level)
SBase
Exception
is thrown.boolean setLevelAndVersion(int level, int version, boolean strict)
level
- the SBML levelversion
- the SBML versionstrict
- a boolean to say if the method need to be strict or not (not used at
the moment)true
if the operation as been successful.boolean setPackageNamespaceAndVersion(java.lang.String packageLabel, java.lang.String namespace, int packageVersion)
packageLabel
.packageLabel
- the short label of the packagenamespace
- the namespace of the packagepackageVersion
- the package versiontrue
if the current node 'packageName' is equals to the given packageLabel
and the package namespace and version were sets on all children.public void setMetaId(java.lang.String metaId) throws java.lang.IllegalArgumentException
SBase
setMetaId
in interface SBase
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
public void setNamespace(java.lang.String namespace)
SBase
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 SBase
belong.public void setNotes(java.lang.String notes) throws javax.xml.stream.XMLStreamException
SBase
public void setNotes(XMLNode notes)
SBase
XMLNode
containing the notes sub-element of
this object.public void setPackageVersion(int packageVersion)
SBase
Use with caution, only if you know what you are doing. This should be set automatically.
setPackageVersion
in interface SBase
packageVersion
- the version of the SBML Level 3 package to which this element belongs.protected void setParentSBML(SBase parent)
SBase
.parent
- the parent of this element.protected void setParentSBMLObject(SBase sbase) throws LevelVersionError
SBase
), adds all changeListeners from
the parent to this SBase
, fires a
TreeNodeChangeListener.nodeAdded(TreeNode)
event, and and finally,
it will forward the new parent to setParentSBML(SBase)
.
Note that this will cause another event to be triggered:
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
with the old and the new parent.sbase
- the new parent element.LevelVersionError
- if the SBML Level and Version configuration of the new parent
differs from the one of this SBase
.setParentSBML(SBase)
public void setSBOTerm(int term)
SBase
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.
setSBOTerm
in interface SBase
term
- the NNNNNNN integer portion of the SBO
identifierSBO
public void setSBOTerm(java.lang.String sboid)
SBase
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.
setSBOTerm
in interface SBase
sboid
- the SBO
identifier of the form 'SBO:NNNNNNN'SBO
@Deprecated public void setThisAsParentSBMLObject(SBase sbase) throws LevelVersionError
SBase
Exception
is
thrown.setThisAsParentSBMLObject
in interface SBase
sbase
- the child SBase
LevelVersionError
- - if the parent and the child have a different level and version.public void setVersion(int version)
SBase
Exception
is thrown.setVersion
in interface SBase
version
- the SBML versionpublic java.lang.String toString()
toString
in class AbstractTreeNode
private java.lang.String extractAttribute(java.util.Map<java.lang.String,java.lang.String> attMap, java.lang.String attributeName)
If a value is found, the attribute is removed from the map.
attMap
- the attributes mapattributeName
- the attribute namepublic void unregisterChild(SBase sbase)
SBase
Model
and SBMLDocument
.unregisterChild
in interface SBase
sbase
- the SBase
to be unregistered.private void unregisterChild(SBasePlugin sbasePlugin)
sbasePlugin
- the SBasePlugin
to unregister.public void unsetAnnotation()
SBase
unsetAnnotation
in interface SBase
public void unsetCVTerms()
SBase
CVTerm
of this object.unsetCVTerms
in interface SBase
public void unsetExtension(java.lang.String nameOrUri)
SBase
SBasePlugin
extension object which matches this package
name or URI.unsetExtension
in interface SBase
nameOrUri
- the package name or URIpublic void unsetHistory()
SBase
History
of this object.unsetHistory
in interface SBase
public void unsetMetaId()
SBase
unsetMetaId
in interface SBase
public void unsetNamespace()
SBase
.
This is an internal method of JSBML that should be used with caution.
public void unsetNotes()
SBase
unsetNotes
in interface SBase
public void unsetPlugin(java.lang.String nameOrUri)
SBase
SBasePlugin
extension object which matches this package
name or URI.unsetPlugin
in interface SBase
nameOrUri
- the package name or URIpublic void unsetSBOTerm()
SBase
unsetSBOTerm
in interface SBase
public java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
SBase
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.
writeXMLAttributes
in interface SBase
Map
containing the XML attributes of this object.boolean checkIdentifier(java.lang.String sID)
sID
- the identifier to be checked. If null or an invalid
identifier, an exception will be thrown.true
only if the sID is a valid identifier.
Otherwise this method throws an IllegalArgumentException
.
This is an intended behavior.java.lang.IllegalArgumentException
- if the given id is not valid in this model.public java.lang.String getId()
SBase
public java.lang.String getName()
SBase
public boolean isSetId()
SBase
true
if the id is not null
.public boolean isSetName()
SBase
true
if the name is not null
.public void setId(java.lang.String id)
SBase
public void setName(java.lang.String name)
SBase
public void unsetId()
SBase
null
.