COPASI API  4.16.103
Public Member Functions | Private Attributes | List of all members
CBiologicalDescription Class Reference

#include <CBiologicalDescription.h>

Inheritance diagram for CBiologicalDescription:
Inheritance graph
[legend]
Collaboration diagram for CBiologicalDescription:
Collaboration graph
[legend]

Public Member Functions

 CBiologicalDescription (const std::string &objectName, const CCopasiContainer *pParent=NULL)
 
 CBiologicalDescription (const CRDFTriplet &triplet, const std::string &objectName="", const CCopasiContainer *pParent=NULL)
 
 CBiologicalDescription (const CBiologicalDescription &src, const CCopasiContainer *pParent=NULL)
 
void clearInvalidEntries ()
 
const std::string & getId () const
 
virtual const std::string & getKey () const
 
const CMIRIAMResourceObjectgetMIRIAMResourceObject () const
 
std::string getPredicate () const
 
std::string getResource () const
 
const CRDFTripletgetTriplet () const
 
std::string getURI () const
 
void setId (const std::string &id)
 
void setPredicate (const std::string &predicate)
 
void setResource (const std::string &resource)
 
 ~CBiologicalDescription ()
 
- Public Member Functions inherited from CCopasiContainer
virtual bool add (CCopasiObject *pObject, const bool &adopt=true)
 
 CCopasiContainer (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=CCopasiObject::Container)
 
 CCopasiContainer (const CCopasiContainer &src, const CCopasiContainer *pParent=NULL)
 
virtual std::string getChildObjectUnits (const CCopasiObject *pObject) const
 
virtual const CObjectInterfacegetObject (const CCopasiObjectName &cn) const
 
virtual const objectMapgetObjects () const
 
virtual std::string getUnits () const
 
virtual const CCopasiObjectgetValueObject () const
 
virtual bool remove (CCopasiObject *pObject)
 
virtual ~CCopasiContainer ()
 
- Public Member Functions inherited from CCopasiObject
void addDirectDependency (const CCopasiObject *pObject)
 
 CCopasiObject (const CCopasiObject &src, const CCopasiContainer *pParent=NULL)
 
void clearDirectDependencies ()
 
void clearRefresh ()
 
bool dependsOn (DataObjectSet candidates, const DataObjectSet &context=DataObjectSet()) const
 
void getAllDependencies (DataObjectSet &dependencies, const DataObjectSet &context) const
 
virtual CCopasiObjectName getCN () const
 
virtual const DataObjectSetgetDirectDependencies (const DataObjectSet &context=DataObjectSet()) const
 
CCopasiContainergetObjectAncestor (const std::string &type) const
 
CCopasiDataModelgetObjectDataModel ()
 
const CCopasiDataModelgetObjectDataModel () const
 
virtual std::string getObjectDisplayName (bool regular=true, bool richtext=false) const
 
const std::string & getObjectName () const
 
CCopasiContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const
CObjectInterface::ObjectSet
getPrerequisites () const
 
virtual RefreshgetRefresh () const
 
UpdateMethodgetUpdateMethod () const
 
virtual voidgetValuePointer () const
 
bool hasCircularDependencies (DataObjectSet &candidates, DataObjectSet &verified, const DataObjectSet &context) const
 
bool hasUpdateMethod () const
 
bool isArray () const
 
bool isContainer () const
 
bool isDataModel () const
 
bool isMatrix () const
 
bool isNameVector () const
 
bool isNonUniqueName () const
 
virtual bool isPrerequisiteForContext (const CObjectInterface *pObject, const CMath::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const
 
bool isReference () const
 
bool isRoot () const
 
bool isSeparator () const
 
bool isStaticString () const
 
bool isValueBool () const
 
bool isValueDbl () const
 
bool isValueInt () const
 
bool isValueInt64 () const
 
bool isValueString () const
 
bool isVector () const
 
virtual bool mustBeDeleted (const DataObjectSet &deletedObjects) const
 
virtual void print (std::ostream *ostream) const
 
void removeDirectDependency (const CCopasiObject *pObject)
 
void setDirectDependencies (const DataObjectSet &directDependencies)
 
bool setObjectName (const std::string &name)
 
virtual bool setObjectParent (const CCopasiContainer *pParent)
 
void setObjectValue (const C_FLOAT64 &value)
 
void setObjectValue (const C_INT32 &value)
 
void setObjectValue (const bool &value)
 
template<class CType >
void setRefresh (CType *pType, void(CType::*method)(void))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const C_FLOAT64 &))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const C_INT32 &))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const bool &))
 
virtual ~CCopasiObject ()
 
- Public Member Functions inherited from CObjectInterface
 CObjectInterface ()
 
virtual ~CObjectInterface ()
 

Private Attributes

std::string mKey
 
CMIRIAMResourceObject mResource
 
CRDFTriplet mTriplet
 

Additional Inherited Members

- Public Types inherited from CCopasiContainer
typedef std::multimap
< std::string, CCopasiObject * > 
objectMap
 
- Public Types inherited from CCopasiObject
typedef std::set< const
CCopasiObject * > 
DataObjectSet
 
typedef std::vector< Refresh * > DataUpdateSequence
 
- Public Types inherited from CObjectInterface
typedef std::set< const
CObjectInterface * > 
ObjectSet
 
typedef std::vector
< CObjectInterface * > 
UpdateSequence
 
- Static Public Member Functions inherited from CCopasiObject
static std::vector< Refresh * > buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet())
 
static void setRenameHandler (CRenameHandler *rh)
 
- Static Public Attributes inherited from CCopasiContainer
static const std::vector
< CCopasiContainer * > 
EmptyList
 
- Protected Types inherited from CCopasiObject
enum  Flag {
  Container = 0x1, Vector = 0x2, Matrix = 0x4, NameVector = 0x8,
  Reference = 0x10, ValueBool = 0x20, ValueInt = 0x40, ValueInt64 = 0x80,
  ValueDbl = 0x100, NonUniqueName = 0x200, StaticString = 0x400, ValueString = 0x800,
  Separator = 0x1000, ModelEntity = 0x2000, Array = 0x4000, DataModel = 0x8000,
  Root = 0x10000, Gui = 0x20000
}
 
- Protected Member Functions inherited from CCopasiContainer
template<class CType >
CCopasiObjectaddMatrixReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
template<class CType >
CCopasiObjectaddObjectReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
template<class CType >
CCopasiObjectaddVectorReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
void initObjects ()
 
- Protected Member Functions inherited from CCopasiObject
 CCopasiObject ()
 
 CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0)
 
- Protected Attributes inherited from CCopasiContainer
objectMap mObjects
 
- Static Protected Attributes inherited from CCopasiObject
static CRenameHandlersmpRenameHandler = NULL
 

Detailed Description

Definition at line 21 of file CBiologicalDescription.h.

Constructor & Destructor Documentation

CBiologicalDescription::CBiologicalDescription ( const std::string &  objectName,
const CCopasiContainer pParent = NULL 
)

Default constructor

Parameters
conststd::string & objectName
constCCopasiContainer * pParent (default: NULL)

Definition at line 23 of file CBiologicalDescription.cpp.

24  :
25  CCopasiContainer(objectName, pParent, "BiologicalDescription"),
26  mTriplet(),
27  mKey(CCopasiRootContainer::getKeyFactory()->add("BiologicalDescription", this)),
28  mResource(NULL)
29 {}
CMIRIAMResourceObject mResource
static CKeyFactory * getKeyFactory()
virtual bool add(CCopasiObject *pObject, const bool &adopt=true)
CBiologicalDescription::CBiologicalDescription ( const CRDFTriplet triplet,
const std::string &  objectName = "",
const CCopasiContainer pParent = NULL 
)

Specific constructor

Parameters
constCRDFTriplet & triplet
conststd::string & objectName (default: "")
constCCopasiContainer * pParent (default: NULL)

Definition at line 31 of file CBiologicalDescription.cpp.

33  :
34  CCopasiContainer(objectName, pParent, "BiologicalDescription"),
35  mTriplet(triplet),
36  mKey(CCopasiRootContainer::getKeyFactory()->add("BiologicalDescription", this)),
38 {}
CMIRIAMResourceObject mResource
static CKeyFactory * getKeyFactory()
virtual bool add(CCopasiObject *pObject, const bool &adopt=true)
CRDFNode * pObject
Definition: CRDFTriplet.h:42
CBiologicalDescription::CBiologicalDescription ( const CBiologicalDescription src,
const CCopasiContainer pParent = NULL 
)

Copy constructor

Parameters
const CBiologicalDescription &src
constCCopasiContainer * pParent (default: NULL)

Definition at line 40 of file CBiologicalDescription.cpp.

41  :
42  CCopasiContainer(src, pParent),
43  mTriplet(src.mTriplet),
44  mKey(CCopasiRootContainer::getKeyFactory()->add("Creator", this)),
45  mResource(src.mResource)
46 {}
CMIRIAMResourceObject mResource
static CKeyFactory * getKeyFactory()
virtual bool add(CCopasiObject *pObject, const bool &adopt=true)
CBiologicalDescription::~CBiologicalDescription ( )

Destructor

Definition at line 48 of file CBiologicalDescription.cpp.

References CCopasiRootContainer::getKeyFactory(), mKey, and CKeyFactory::remove().

49 {
51 }
bool remove(const std::string &key)
static CKeyFactory * getKeyFactory()

Member Function Documentation

void CBiologicalDescription::clearInvalidEntries ( )

Convenience method removing invalid predicate, resource, and id combinations

Definition at line 108 of file CBiologicalDescription.cpp.

References CRDFPredicate::getURI(), CMIRIAMResourceObject::isValid(), mResource, mTriplet, CRDFTriplet::pObject, CRDFTriplet::Predicate, CRDFTriplet::pSubject, CRDFNode::removeEdge(), and CRDFPredicate::unknown.

109 {
111  mTriplet.Predicate.getURI() == "") ||
112  !mResource.isValid())
113  {
114  // Remove the edge with the predicate and object.
116  }
117 }
bool isValid() const
Definition: CConstants.cpp:182
CRDFNode * pSubject
Definition: CRDFTriplet.h:38
CMIRIAMResourceObject mResource
CRDFPredicate Predicate
Definition: CRDFTriplet.h:40
void removeEdge(const CRDFPredicate &predicate, CRDFNode *pObject)
Definition: CRDFNode.cpp:361
const std::string & getURI() const
CRDFNode * pObject
Definition: CRDFTriplet.h:42
const std::string & CBiologicalDescription::getId ( ) const

Retrieve the identifier of the subject in the MIRIAM resource.

Returns
const std::string id

Definition at line 73 of file CBiologicalDescription.cpp.

References CMIRIAMResourceObject::getId(), and mResource.

Referenced by test000092::test_miriam_export_8(), and test000092::test_miriam_export_9().

74 {return mResource.getId();}
CMIRIAMResourceObject mResource
const std::string & getId() const
Definition: CConstants.cpp:116
const std::string & CBiologicalDescription::getKey ( ) const
virtual

Retrieve the key of the object.

Returns
const std::string & key

Reimplemented from CCopasiObject.

Definition at line 64 of file CBiologicalDescription.cpp.

References mKey.

65 {return mKey;}
const CMIRIAMResourceObject & CBiologicalDescription::getMIRIAMResourceObject ( ) const

Retrieve the MIRIAM resource object for this reference

Definition at line 56 of file CBiologicalDescription.cpp.

References mResource.

Referenced by CQMiriamWidget::slotBtnBrowseDescription(), and CSBMLExporter::updateMIRIAMAnnotation().

57 {
58  return mResource;
59 }
CMIRIAMResourceObject mResource
std::string CBiologicalDescription::getPredicate ( ) const

Retrieve the predicate, i.e. the relationship between the subject. and the MIRIAM resource.

Returns
std::string predicate

Definition at line 67 of file CBiologicalDescription.cpp.

References CRDFPredicate::getDisplayName(), mTriplet, and CRDFTriplet::Predicate.

Referenced by test000092::test_miriam_export_8(), and test000092::test_miriam_export_9().

static const std::string & getDisplayName(const CRDFPredicate &predicate)
CRDFPredicate Predicate
Definition: CRDFTriplet.h:40
std::string CBiologicalDescription::getResource ( ) const

Retrieve the MIRIAM resource (database) describing the subject.

Returns
std::string resource

Definition at line 70 of file CBiologicalDescription.cpp.

References CMIRIAMResourceObject::getDisplayName(), and mResource.

Referenced by test000092::test_miriam_export_8(), and test000092::test_miriam_export_9().

71 {return mResource.getDisplayName();}
CMIRIAMResourceObject mResource
std::string getDisplayName() const
Definition: CConstants.cpp:173
const CRDFTriplet & CBiologicalDescription::getTriplet ( ) const

Retrieve the RDF triplet holding the description.

Returns
const CRDFTriplet & triplet

Definition at line 61 of file CBiologicalDescription.cpp.

References mTriplet.

Referenced by CMIRIAMInfo::removeBiologicalDescription(), and CSBMLExporter::updateMIRIAMAnnotation().

62 {return mTriplet;}
std::string CBiologicalDescription::getURI ( ) const

Retrieve the URI comprised of MIRIAM resource and id.

Returns
std::string uri

Definition at line 105 of file CBiologicalDescription.cpp.

References CMIRIAMResourceObject::getURI(), and mResource.

106 {return mResource.getURI();}
std::string getURI() const
Definition: CConstants.cpp:133
CMIRIAMResourceObject mResource
void CBiologicalDescription::setId ( const std::string &  id)

Set the identifier of the subject in the MIRIAM resource.

Parameters
conststd::string & id

Definition at line 99 of file CBiologicalDescription.cpp.

References CRDFNode::getObject(), CMIRIAMResourceObject::getURI(), mResource, mTriplet, CRDFTriplet::pObject, CMIRIAMResourceObject::setId(), and CRDFObject::setResource().

Referenced by test000092::test_miriam_export_8(), and test000092::test_miriam_export_9().

100 {
101  mResource.setId(id);
103 }
std::string getURI() const
Definition: CConstants.cpp:133
CMIRIAMResourceObject mResource
bool setId(const std::string &id)
Definition: CConstants.cpp:101
CRDFObject & getObject()
Definition: CRDFNode.cpp:94
void setResource(const std::string &resource, const bool &isLocal)
Definition: CRDFObject.cpp:88
CRDFNode * pObject
Definition: CRDFTriplet.h:42
void CBiologicalDescription::setPredicate ( const std::string &  predicate)

Set the predicate, i.e., relationship between the subject and the MIRIAM resource.

Parameters
conststd::string & predicate

Definition at line 76 of file CBiologicalDescription.cpp.

References CRDFNode::addEdge(), CRDFPredicate::getPredicateFromDisplayName(), mTriplet, CRDFTriplet::pObject, CRDFTriplet::Predicate, CRDFTriplet::pSubject, and CRDFNode::removeEdge().

Referenced by test000092::test_miriam_export_8(), and test000092::test_miriam_export_9().

77 {
79 
80  if (Predicate == mTriplet.Predicate)
81  return;
82 
83  // Add the edge with the new predicate without any object creation.
85 
86  // Remove the edge with the predicate without destroying any objects.
88 
89  // Set the new predicate
90  mTriplet.Predicate = Predicate;
91 }
CRDFNode * pSubject
Definition: CRDFTriplet.h:38
static ePredicateType getPredicateFromDisplayName(const std::string &displayName)
CRDFPredicate Predicate
Definition: CRDFTriplet.h:40
void removeEdge(const CRDFPredicate &predicate, CRDFNode *pObject)
Definition: CRDFNode.cpp:361
CRDFNode * pObject
Definition: CRDFTriplet.h:42
CRDFTriplet addEdge(const CRDFPredicate &predicate, CRDFNode *pObject)
Definition: CRDFNode.cpp:321
void CBiologicalDescription::setResource ( const std::string &  resource)

Set the MIRIAM resource (database) describing the subject.

Parameters
conststd::string & predicate

Definition at line 93 of file CBiologicalDescription.cpp.

References CRDFNode::getObject(), CMIRIAMResourceObject::getURI(), mResource, mTriplet, CRDFTriplet::pObject, CMIRIAMResourceObject::setDisplayName(), and CRDFObject::setResource().

Referenced by test000092::test_miriam_export_8(), and test000092::test_miriam_export_9().

94 {
95  mResource.setDisplayName(resource);
97 }
std::string getURI() const
Definition: CConstants.cpp:133
CMIRIAMResourceObject mResource
bool setDisplayName(const std::string &displayName)
Definition: CConstants.cpp:163
CRDFObject & getObject()
Definition: CRDFNode.cpp:94
void setResource(const std::string &resource, const bool &isLocal)
Definition: CRDFObject.cpp:88
CRDFNode * pObject
Definition: CRDFTriplet.h:42

Member Data Documentation

std::string CBiologicalDescription::mKey
private

The key of the object needed for the COPASI tables.

Definition at line 33 of file CBiologicalDescription.h.

Referenced by getKey(), and ~CBiologicalDescription().

CMIRIAMResourceObject CBiologicalDescription::mResource
private

MIRIAM resource for holding the database and Id.

Definition at line 38 of file CBiologicalDescription.h.

Referenced by clearInvalidEntries(), getId(), getMIRIAMResourceObject(), getResource(), getURI(), setId(), and setResource().

CRDFTriplet CBiologicalDescription::mTriplet
private

Triplet in the RDF graph representing the description.

Definition at line 28 of file CBiologicalDescription.h.

Referenced by clearInvalidEntries(), getPredicate(), getTriplet(), setId(), setPredicate(), and setResource().


The documentation for this class was generated from the following files: