libCombine
C++ library for working with the COMBINE Archive format
|
@sbmlbrief{} TODO:Definition of the CaBase class. More...
#include <CaBase.h>
Public Member Functions | |
virtual | ~CaBase () |
Destroys this object. More... | |
CaBase & | operator= (const CaBase &rhs) |
Assignment operator for CaBase. More... | |
virtual CaBase * | clone () const =0 |
Creates and returns a deep copy of this CaBase object. More... | |
virtual CaBase * | getElementBySId (const std::string &id) |
Returns the first child element it can find with a specific "id" attribute value, or NULL if no such object is found. More... | |
virtual const CaBase * | getElementBySId (const std::string &metaid) const |
Returns the first child element it can find with a specific "id" attribute value, or NULL if no such object is found. More... | |
virtual CaBase * | getElementByMetaId (const std::string &metaid) |
Returns the first child element it can find with a specific "metaid" attribute value, or NULL if no such object is found. More... | |
virtual const CaBase * | getElementByMetaId (const std::string &metaid) const |
Returns the first child element it can find with a specific "metaid" attribute value, or NULL if no such object is found. More... | |
virtual List * | getAllElements () |
Returns a List of all child CaBase objects, including those nested to an arbitrary depth. More... | |
const std::string & | getMetaId () const |
Returns the value of the "metaid" attribute of this object. More... | |
std::string & | getMetaId () |
Returns the value of the "metaid" attribute of this object. More... | |
virtual const std::string & | getId () const |
LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * | getNotes () |
Returns the content of the "notes" subelement of this object as a tree of XMLNode objects. More... | |
const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * | getNotes () const |
Returns the content of the "notes" subelement of this object as a tree of XMLNode objects. More... | |
std::string | getNotesString () |
Returns the content of the "notes" subelement of this object as a string. More... | |
std::string | getNotesString () const |
Returns the content of the "notes" subelement of this object as a string. More... | |
LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * | getAnnotation () |
Returns the content of the "annotation" subelement of this object as a tree of XMLNode objects. More... | |
const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * | getAnnotation () const |
Returns the content of the "annotation" subelement of this object as a tree of XMLNode objects. More... | |
std::string | getAnnotationString () |
Returns the content of the "annotation" subelement of this object as a character string. More... | |
std::string | getAnnotationString () const |
Returns the content of the "annotation" subelement of this object as a character string. More... | |
virtual const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces * | getNamespaces () const |
Returns a list of the XML Namespaces declared on the OMEX document owning this object. More... | |
virtual LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces * | getNamespaces () |
Returns a list of the XML Namespaces declared on the OMEX document owning this object. More... | |
const CaOmexManifest * | getCaOmexManifest () const |
Returns the CaOmexManifest object containing this object instance. More... | |
CaOmexManifest * | getCaOmexManifest () |
Returns the CaOmexManifest object containing this object instance. More... | |
CaBase * | getParentCaObject () |
Returns the parent OMEX object containing this object. More... | |
const CaBase * | getParentCaObject () const |
Returns the parent OMEX object containing this object. More... | |
CaBase * | getAncestorOfType (int type) |
Returns the first ancestor object that has the given OMEX type code. More... | |
const CaBase * | getAncestorOfType (int type) const |
Returns the first ancestor object that has the given OMEX type code. More... | |
unsigned int | getLine () const |
Returns the line number on which this object first appears in the XML representation of the OMEX document, or '0' if the object was created, not read from a file. More... | |
unsigned int | getColumn () const |
Returns the column number on which this object first appears in the XML representation of the OMEX document, or '0' if the object was created, not read from a file. More... | |
bool | isSetMetaId () const |
Predicate returning true if this object's "metaid" attribute is set. More... | |
virtual bool | isSetId () const |
Predicate returning true if this object's "id" attribute is set. More... | |
bool | isSetNotes () const |
Predicate returning true if this object's "notes" subelement exists and has content. More... | |
bool | isSetAnnotation () const |
Predicate returning true if this object's "annotation" subelement exists and has content. More... | |
int | setMetaId (const std::string &metaid) |
Sets the value of the meta-identifier attribute of this object. More... | |
virtual int | setId (const std::string &sid) |
Sets the value of the "id" attribute of this OMEX object. More... | |
virtual int | setAnnotation (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *annotation) |
Sets the value of the "annotation" subelement of this OMEX object. More... | |
virtual int | setAnnotation (const std::string &annotation) |
Sets the value of the "annotation" subelement of this OMEX object. More... | |
virtual int | appendAnnotation (const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *annotation) |
Appends the given annotation to the "annotation" subelement of this object. More... | |
virtual int | appendAnnotation (const std::string &annotation) |
Appends the given annotation to the "annotation" subelement of this object. More... | |
int | removeTopLevelAnnotationElement (const std::string elementName, const std::string elementURI="") |
Removes the top-level element within the "annotation" subelement of this OMEX object with the given name and optional URI. More... | |
int | replaceTopLevelAnnotationElement (const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *annotation) |
Replaces the given top-level element within the "annotation" subelement of this OMEX object and with the annotation element supplied. More... | |
int | replaceTopLevelAnnotationElement (const std::string &annotation) |
Replaces the given top-level element within the "annotation" subelement of this OMEX object and with the annotation element supplied. More... | |
int | setNotes (const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *notes) |
Sets the value of the "notes" subelement of this OMEX object. More... | |
int | setNotes (const std::string ¬es, bool addXHTMLMarkup=false) |
Sets the value of the "notes" subelement of this OMEX object to a copy of the string notes . More... | |
int | appendNotes (const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode *notes) |
Appends the given notes to the "notes" subelement of this object. More... | |
int | appendNotes (const std::string ¬es) |
Appends the given notes to the "notes" subelement of this object. More... | |
int | setNamespaces (LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces *xmlns) |
Sets the namespaces relevant of this OMEX object. More... | |
int | unsetMetaId () |
Unsets the value of the "metaid" attribute of this OMEX object. More... | |
virtual int | unsetId () |
Unsets the value of the "id" attribute of this OMEX object. More... | |
int | unsetNotes () |
Unsets the value of the "notes" subelement of this OMEX object. More... | |
int | unsetAnnotation () |
Unsets the value of the "annotation" subelement of this OMEX object. More... | |
unsigned int | getLevel () const |
Returns the OMEX Level of the CaOmexManifest object containing this object. More... | |
unsigned int | getVersion () const |
Returns the Version within the OMEX Level of the CaOmexManifest object containing this object. More... | |
virtual int | getTypeCode () const |
Returns the libCombine type code for this object. More... | |
bool | hasValidLevelVersionNamespaceCombination () |
Predicate returning true if this object's level/version and namespace values correspond to a valid OMEX specification. More... | |
virtual const std::string & | getElementName () const =0 |
Returns the XML element name of this object. More... | |
char * | toCa () |
Returns a string consisting of a partial OMEX corresponding to just this object. More... | |
virtual bool | isSetAttribute (const std::string &attributeName) const |
virtual int | removeFromParentAndDelete () |
Removes this object from its parent. More... | |
bool | matchesCaNamespaces (const CaBase *sb) |
Returns true if this object's set of XML namespaces are the same as the given object's XML namespaces. More... | |
bool | matchesCaNamespaces (const CaBase *sb) const |
Returns true if this object's set of XML namespaces are the same as the given object's XML namespaces. More... | |
bool | matchesRequiredCaNamespacesForAddition (const CaBase *sb) |
Returns true if this object's set of XML namespaces are a subset of the given object's XML namespaces. More... | |
bool | matchesRequiredCaNamespacesForAddition (const CaBase *sb) const |
Returns true if this object's set of XML namespaces are a subset of the given object's XML namespaces. More... | |
int | setUserData (void *userData) |
Sets the user data of this element. More... | |
void * | getUserData () const |
Returns the user data that has been previously set via setUserData(). More... | |
bool | isSetUserData () const |
Predicate returning true or false depending on whether the user data of this element has been set. More... | |
int | unsetUserData () |
Unsets the user data of this element. More... | |
CaErrorLog * | getErrorLog () |
Returns the CaErrorLog used to log errors while reading and validating OMEX. More... | |
Protected Member Functions | |
bool | getHasBeenDeleted () const |
virtual void | setElementText (const std::string &text) |
When overridden allows CaBase elements to use the text included in between the elements tags. More... | |
@sbmlbrief{} TODO:Definition of the CaBase class.
|
virtual |
Destroys this object.
|
virtual |
Appends the given annotation
to the "annotation" subelement of this object.
Whereas the CaBase "notes" subelement 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. Every object derived from CaBase can have its own value for "annotation". The element's content type is XML type "any", allowing essentially arbitrary well-formed XML data content.
OMEX places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the OMEX specifications for more details.
Unlike CaBase::setAnnotation(const XMLNode* annotation) or CaBase::setAnnotation(const std::string& annotation), 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 object |
|
virtual |
Appends the given annotation
to the "annotation" subelement of this object.
Whereas the CaBase "notes" subelement 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. Every object derived from CaBase can have its own value for "annotation". The element's content type is XML type "any", allowing essentially arbitrary well-formed XML data content.
OMEX places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the OMEX specifications for more details.
Unlike CaBase::setAnnotation(const XMLNode* annotation) or CaBase::setAnnotation(const std::string& annotation), 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 object |
int CaBase::appendNotes | ( | const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * | notes | ) |
Appends the given notes
to the "notes" subelement of this object.
The content of notes
is copied.
The optional OMEX element named "notes", present on every major OMEX component type, is intended 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. Every object derived directly or indirectly from type CaBase can have a separate value for "notes", allowing users considerable freedom when adding comments to their models.
The format of "notes" elements must be XHTML 1.0. To help verify the formatting of "notes" content, libCombine provides the static utility method SyntaxChecker::hasExpectedXHTMLSyntax( ); however, readers are urged to consult the appropriate OMEX specification document for the Level and Version of their model for more in-depth explanations. The OMEX Level 2 and 3 specifications have considerable detail about how "notes" element content must be structured.
notes | an XML node structure that is to appended to the content of the "notes" subelement of this object |
int CaBase::appendNotes | ( | const std::string & | notes | ) |
Appends the given notes
to the "notes" subelement of this object.
The content of the parameter notes
is copied.
The optional OMEX element named "notes", present on every major OMEX component type, is intended 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. Every object derived directly or indirectly from type CaBase can have a separate value for "notes", allowing users considerable freedom when adding comments to their models.
The format of "notes" elements must be XHTML 1.0. To help verify the formatting of "notes" content, libCombine provides the static utility method SyntaxChecker::hasExpectedXHTMLSyntax( ); however, readers are urged to consult the appropriate OMEX specification document for the Level and Version of their model for more in-depth explanations. The OMEX Level 2 and 3 specifications have considerable detail about how "notes" element content must be structured.
notes | an XML string that is to appended to the content of the "notes" subelement of this object |
|
pure virtual |
Creates and returns a deep copy of this CaBase object.
Implemented in CaContent, CaCrossRef, CaListOf, CaListOfContents, CaListOfCrossRefs, and CaOmexManifest.
|
virtual |
CaBase * CaBase::getAncestorOfType | ( | int | type | ) |
Returns the first ancestor object that has the given OMEX type code.
This method searches the tree of objects that are parents of this object, and returns the first one that has the given OMEX type code from the given pkgName
.
type | the OMEX type code of the object sought |
NULL
if no ancestor exists. const CaBase * CaBase::getAncestorOfType | ( | int | type | ) | const |
Returns the first ancestor object that has the given OMEX type code.
This method searches the tree of objects that are parents of this object, and returns the first one that has the given OMEX type code from the given pkgName
.
type | the OMEX type code of the object sought |
NULL
if no ancestor exists. LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * CaBase::getAnnotation | ( | ) |
Returns the content of the "annotation" subelement of this object as a tree of XMLNode objects.
The annotations returned by this method will be in XML form. LibCombine provides an object model and related interfaces for certain specific kinds of annotations, namely model history information and RDF content. See the ModelHistory, CVTerm and RDFAnnotationParser classes for more information about the facilities available.
const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * CaBase::getAnnotation | ( | ) | const |
Returns the content of the "annotation" subelement of this object as a tree of XMLNode objects.
The annotations returned by this method will be in XML form. LibCombine provides an object model and related interfaces for certain specific kinds of annotations, namely model history information and RDF content. See the ModelHistory, CVTerm and RDFAnnotationParser classes for more information about the facilities available.
std::string CaBase::getAnnotationString | ( | ) |
Returns the content of the "annotation" subelement of this object as a character string.
The annotations returned by this method will be in string form. See the method getAnnotation() for a version that returns annotations in XML form.
std::string CaBase::getAnnotationString | ( | ) | const |
Returns the content of the "annotation" subelement of this object as a character string.
The annotations returned by this method will be in string form. See the method getAnnotation() for a version that returns annotations in XML form.
CaOmexManifest * CaBase::getCaOmexManifest | ( | ) |
Returns the CaOmexManifest object containing this object instance.
This method allows the caller to obtain the CaOmexManifest for the current object.
const CaOmexManifest * CaBase::getCaOmexManifest | ( | ) | const |
Returns the CaOmexManifest object containing this object instance.
This method allows the caller to obtain the CaOmexManifest for the current object.
unsigned int CaBase::getColumn | ( | ) | const |
Returns the column number on which this object first appears in the XML representation of the OMEX document, or '0' if the object was created, not read from a file.
|
virtual |
Returns the first child element it can find with a specific "metaid" attribute value, or NULL
if no such object is found.
metaid | string representing the "metaid" attribute value of the object to find. |
Reimplemented in CaListOf.
|
virtual |
Returns the first child element it can find with a specific "metaid" attribute value, or NULL
if no such object is found.
metaid | string representing the "metaid" attribute value of the object to find. |
|
virtual |
Returns the first child element it can find with a specific "id" attribute value, or NULL
if no such object is found.
id | string representing the "id" attribute value of the object to find. |
Reimplemented in CaContent, CaListOf, and CaOmexManifest.
|
virtual |
Returns the first child element it can find with a specific "id" attribute value, or NULL
if no such object is found.
id | string representing the "id" attribute value of the object to find. |
|
pure virtual |
Returns the XML element name of this object.
This is overridden by subclasses to return a string appropriate to the OMEX component. For example, Model defines it as returning "model"
, CompartmentType defines it as returning "compartmentType"
, and so on.
Implemented in CaContent, CaCrossRef, CaListOf, CaListOfContents, CaListOfCrossRefs, and CaOmexManifest.
CaErrorLog * CaBase::getErrorLog | ( | ) |
Returns the CaErrorLog used to log errors while reading and validating OMEX.
unsigned int CaBase::getLevel | ( | ) | const |
Returns the OMEX Level of the CaOmexManifest object containing this object.
unsigned int CaBase::getLine | ( | ) | const |
Returns the line number on which this object first appears in the XML representation of the OMEX document, or '0' if the object was created, not read from a file.
std::string & CaBase::getMetaId | ( | ) |
Returns the value of the "metaid" attribute of this object.
const std::string & CaBase::getMetaId | ( | ) | const |
Returns the value of the "metaid" attribute of this object.
|
virtual |
Returns a list of the XML Namespaces declared on the OMEX document owning this object.
The CaNamespaces object encapsulates OMEX Level/Version/namespaces information. It is used to communicate the OMEX Level, Version, and (in Level 3) packages used in addition to OMEX Level 3 Core.
NULL
in certain very usual circumstances where a namespace is not set.Reimplemented in CaOmexManifest.
|
virtual |
Returns a list of the XML Namespaces declared on the OMEX document owning this object.
The CaNamespaces object encapsulates OMEX Level/Version/namespaces information. It is used to communicate the OMEX Level, Version, and (in Level 3) packages used in addition to OMEX Level 3 Core.
NULL
in certain very usual circumstances where a namespace is not set.Reimplemented in CaOmexManifest.
LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * CaBase::getNotes | ( | ) |
Returns the content of the "notes" subelement of this object as a tree of XMLNode objects.
The "notes" element content returned by this method will be in XML form, but libCombine does not provide an object model specifically for the content of notes. Callers will need to traverse the XML tree structure using the facilities available on XMLNode and related objects. For an alternative method of accessing the notes, see getNotesString().
const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * CaBase::getNotes | ( | ) | const |
Returns the content of the "notes" subelement of this object as a tree of XMLNode objects.
The "notes" element content returned by this method will be in XML form, but libCombine does not provide an object model specifically for the content of notes. Callers will need to traverse the XML tree structure using the facilities available on XMLNode and related objects. For an alternative method of accessing the notes, see getNotesString().
std::string CaBase::getNotesString | ( | ) |
Returns the content of the "notes" subelement of this object as a string.
For an alternative method of accessing the notes, see getNotes(), which returns the content as an XMLNode tree structure. Depending on an application's needs, one or the other method may be more convenient.
std::string CaBase::getNotesString | ( | ) | const |
Returns the content of the "notes" subelement of this object as a string.
For an alternative method of accessing the notes, see getNotes(), which returns the content as an XMLNode tree structure. Depending on an application's needs, one or the other method may be more convenient.
CaBase * CaBase::getParentCaObject | ( | ) |
Returns the parent OMEX object containing this object.
This returns the immediately-containing object. This method is convenient when holding an object nested inside other objects in an OMEX model.
const CaBase * CaBase::getParentCaObject | ( | ) | const |
Returns the parent OMEX object containing this object.
This returns the immediately-containing object. This method is convenient when holding an object nested inside other objects in an OMEX model.
|
virtual |
Returns the libCombine type code for this object.
Reimplemented in CaContent, CaCrossRef, CaListOf, CaListOfContents, CaListOfCrossRefs, and CaOmexManifest.
void * CaBase::getUserData | ( | ) | const |
Returns the user data that has been previously set via setUserData().
NULL
if no user data has been set.unsigned int CaBase::getVersion | ( | ) | const |
Returns the Version within the OMEX Level of the CaOmexManifest object containing this object.
bool CaBase::hasValidLevelVersionNamespaceCombination | ( | ) |
Predicate returning true
if this object's level/version and namespace values correspond to a valid OMEX specification.
true
if the level, version and namespace values of this OMEX object correspond to a valid set of values, false
otherwise. bool CaBase::isSetAnnotation | ( | ) | const |
Predicate returning true
if this object's "annotation" subelement exists and has content.
Whereas the CaBase "notes" subelement 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. Every object derived from CaBase can have its own value for "annotation". The element's content type is XML type "any", allowing essentially arbitrary well-formed XML data content.
OMEX places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the OMEX specifications for more details.
true
if a "annotation" subelement exists, false
otherwise.
|
virtual |
Predicate returning true
if this object's "id" attribute is set.
true
if the "id" attribute of this OMEX object is set, false
otherwise.bool CaBase::isSetMetaId | ( | ) | const |
Predicate returning true
if this object's "metaid" attribute is set.
true
if the "metaid" attribute of this OMEX object is set, false
otherwise.bool CaBase::isSetNotes | ( | ) | const |
Predicate returning true
if this object's "notes" subelement exists and has content.
The optional OMEX element named "notes", present on every major OMEX component type, is intended 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. Every object derived directly or indirectly from type CaBase can have a separate value for "notes", allowing users considerable freedom when adding comments to their models.
The format of "notes" elements must be XHTML 1.0. To help verify the formatting of "notes" content, libCombine provides the static utility method SyntaxChecker::hasExpectedXHTMLSyntax( ); however, readers are urged to consult the appropriate OMEX specification document for the Level and Version of their model for more in-depth explanations. The OMEX Level 2 and 3 specifications have considerable detail about how "notes" element content must be structured.
true
if a "notes" subelement exists, false
otherwise.bool CaBase::isSetUserData | ( | ) | const |
Predicate returning true or false depending on whether the user data of this element has been set.
true
if this object's user data has been set, false
otherwise. bool CaBase::matchesCaNamespaces | ( | const CaBase * | sb | ) |
Returns true
if this object's set of XML namespaces are the same as the given object's XML namespaces.
sb | an object to compare with respect to namespaces |
true
if this object's collection of namespaces is the same as sb's
, false
otherwise. bool CaBase::matchesCaNamespaces | ( | const CaBase * | sb | ) | const |
Returns true
if this object's set of XML namespaces are the same as the given object's XML namespaces.
sb | an object to compare with respect to namespaces |
true
if this object's collection of namespaces is the same as sb's
, false
otherwise. bool CaBase::matchesRequiredCaNamespacesForAddition | ( | const CaBase * | sb | ) |
Returns true
if this object's set of XML namespaces are a subset of the given object's XML namespaces.
sb | an object to compare with respect to namespaces |
true
if this object's collection of namespaces is a subset of sb's
, false
otherwise. bool CaBase::matchesRequiredCaNamespacesForAddition | ( | const CaBase * | sb | ) | const |
Returns true
if this object's set of XML namespaces are a subset of the given object's XML namespaces.
sb | an object to compare with respect to namespaces |
true
if this object's collection of namespaces is a subset of sb's
, false
otherwise. Assignment operator for CaBase.
rhs | The object whose values are used as the basis of the assignment. |
|
virtual |
Removes this object from its parent.
If the parent was storing this object as a pointer, it is deleted. If not, it is simply cleared (as in CaListOf objects). This is a pure virtual method, as every CaBase element has different parents, and therefore different methods of removing itself. Will fail (and not delete itself) if it has no parent object. This function is designed to be overridden, but for all objects whose parent is of the class CaListOf, the default implementation will work.
Reimplemented in CaListOf.
int CaBase::removeTopLevelAnnotationElement | ( | const std::string | elementName, |
const std::string | elementURI = "" |
||
) |
Removes the top-level element within the "annotation" subelement of this OMEX object with the given name and optional URI.
OMEX places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the OMEX specifications for more details.
Calling this method allows a particular annotation element to be removed whilst the remaining annotations remain intact.
elementName | a string representing the name of the top level annotation element that is to be removed |
elementURI | an optional string that is used to check both the name and URI of the top level element to be removed |
int CaBase::replaceTopLevelAnnotationElement | ( | const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * | annotation | ) |
Replaces the given top-level element within the "annotation" subelement of this OMEX object and with the annotation element supplied.
OMEX places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the OMEX specifications for more details.
This method determines the name of the element to be replaced from the annotation argument. Functionally it is equivalent to calling removeTopLevelAnnotationElement(name); appendAnnotation(annotation_with_name);
with the exception that the placement of the annotation element remains the same.
annotation | XMLNode representing the replacement top level annotation |
int CaBase::replaceTopLevelAnnotationElement | ( | const std::string & | annotation | ) |
Replaces the given top-level element within the "annotation" subelement of this OMEX object and with the annotation element supplied.
OMEX places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the OMEX specifications for more details.
This method determines the name of the element to be replaced from the annotation argument. Functionally it is equivalent to calling removeTopLevelAnnotationElement(name); appendAnnotation(annotation_with_name);
with the exception that the placement of the annotation element remains the same.
annotation | string representing the replacement top level annotation |
|
virtual |
Sets the value of the "annotation" subelement of this OMEX object.
The content of annotation
is copied, and any previous content of this object's "annotation" subelement is deleted.
Whereas the CaBase "notes" subelement 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. Every object derived from CaBase can have its own value for "annotation". The element's content type is XML type "any", allowing essentially arbitrary well-formed XML data content.
OMEX places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the OMEX specifications for more details.
Call this method will result in any existing content of the "annotation" subelement to be discarded. Unless you have taken steps to first copy and reconstitute any existing annotations into the annotation
that is about to be assigned, it is likely that performing such wholesale replacement is unfriendly towards other software applications whose annotations are discarded. An alternative may be to use CaBase::appendAnnotation(const XMLNode* annotation) or CaBase::appendAnnotation(const std::string& annotation).
annotation | an XML string that is to be used as the content of the "annotation" subelement of this object |
|
virtual |
Sets the value of the "annotation" subelement of this OMEX object.
The content of annotation
is copied, and any previous content of this object's "annotation" subelement is deleted.
Whereas the CaBase "notes" subelement 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. Every object derived from CaBase can have its own value for "annotation". The element's content type is XML type "any", allowing essentially arbitrary well-formed XML data content.
OMEX places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the OMEX specifications for more details.
Call this method will result in any existing content of the "annotation" subelement to be discarded. Unless you have taken steps to first copy and reconstitute any existing annotations into the annotation
that is about to be assigned, it is likely that performing such wholesale replacement is unfriendly towards other software applications whose annotations are discarded. An alternative may be to use CaBase::appendAnnotation(const XMLNode* annotation) or CaBase::appendAnnotation(const std::string& annotation).
annotation | an XML structure that is to be used as the new content of the "annotation" subelement of this object |
|
protectedvirtual |
When overridden allows CaBase elements to use the text included in between the elements tags.
The default implementation does nothing.
text | the text string found between the element tags. |
|
virtual |
Sets the value of the "id" attribute of this OMEX object.
int CaBase::setMetaId | ( | const std::string & | metaid | ) |
Sets the value of the meta-identifier attribute of this object.
The string metaid
is copied.
metaid | the identifier string to use as the value of the "metaid" attribute |
int CaBase::setNamespaces | ( | LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNamespaces * | xmlns | ) |
Sets the namespaces relevant of this OMEX object.
The content of xmlns
is copied, and this object's existing namespace content is deleted.
The CaNamespaces object encapsulates OMEX Level/Version/namespaces information. It is used to communicate the OMEX Level, Version, and (in Level 3) packages used in addition to OMEX Level 3 Core.
xmlns | the namespaces to set |
int CaBase::setNotes | ( | const LIBSBML_CPP_NAMESPACE_QUALIFIER XMLNode * | notes | ) |
Sets the value of the "notes" subelement of this OMEX object.
The content of notes
is copied, and any existing content of this object's "notes" subelement is deleted.
The optional OMEX element named "notes", present on every major OMEX component type, is intended 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. Every object derived directly or indirectly from type CaBase can have a separate value for "notes", allowing users considerable freedom when adding comments to their models.
The format of "notes" elements must be XHTML 1.0. To help verify the formatting of "notes" content, libCombine provides the static utility method SyntaxChecker::hasExpectedXHTMLSyntax( ); however, readers are urged to consult the appropriate OMEX specification document for the Level and Version of their model for more in-depth explanations. The OMEX Level 2 and 3 specifications have considerable detail about how "notes" element content must be structured.
notes | an XML structure that is to be used as the content of the "notes" subelement of this object |
int CaBase::setNotes | ( | const std::string & | notes, |
bool | addXHTMLMarkup = false |
||
) |
Sets the value of the "notes" subelement of this OMEX object to a copy of the string notes
.
The content of notes
is copied, and any existing content of this object's "notes" subelement is deleted.
The optional OMEX element named "notes", present on every major OMEX component type, is intended 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. Every object derived directly or indirectly from type CaBase can have a separate value for "notes", allowing users considerable freedom when adding comments to their models.
The format of "notes" elements must be XHTML 1.0. To help verify the formatting of "notes" content, libCombine provides the static utility method SyntaxChecker::hasExpectedXHTMLSyntax( ); however, readers are urged to consult the appropriate OMEX specification document for the Level and Version of their model for more in-depth explanations. The OMEX Level 2 and 3 specifications have considerable detail about how "notes" element content must be structured.
notes | an XML string that is to be used as the content of the "notes" subelement of this object |
addXHTMLMarkup | a boolean indicating whether to wrap the contents of the notes argument with XHTML paragraph (<p> ) tags. This is appropriate when the string in notes does not already containg the appropriate XHTML markup. |
int CaBase::setUserData | ( | void * | userData | ) |
Sets the user data of this element.
userData | specifies the new user data. |
char * CaBase::toCa | ( | ) |
Returns a string consisting of a partial OMEX corresponding to just this object.
int CaBase::unsetAnnotation | ( | ) |
Unsets the value of the "annotation" subelement of this OMEX object.
Whereas the CaBase "notes" subelement 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. Every object derived from CaBase can have its own value for "annotation". The element's content type is XML type "any", allowing essentially arbitrary well-formed XML data content.
OMEX places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the OMEX specifications for more details.
|
virtual |
Unsets the value of the "id" attribute of this OMEX object.
int CaBase::unsetMetaId | ( | ) |
Unsets the value of the "metaid" attribute of this OMEX object.
int CaBase::unsetNotes | ( | ) |
Unsets the value of the "notes" subelement of this OMEX object.
The optional OMEX element named "notes", present on every major OMEX component type, is intended 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. Every object derived directly or indirectly from type CaBase can have a separate value for "notes", allowing users considerable freedom when adding comments to their models.
The format of "notes" elements must be XHTML 1.0. To help verify the formatting of "notes" content, libCombine provides the static utility method SyntaxChecker::hasExpectedXHTMLSyntax( ); however, readers are urged to consult the appropriate OMEX specification document for the Level and Version of their model for more in-depth explanations. The OMEX Level 2 and 3 specifications have considerable detail about how "notes" element content must be structured.
int CaBase::unsetUserData | ( | ) |
Unsets the user data of this element.