COPASI API
4.16.103
|
#include <CRDFPredicate.h>
Classes | |
struct | sAllowedLocation |
Public Types | |
typedef std::vector < sAllowedLocation > | AllowedLocationList |
enum | ePredicateType { copasi_encodes = 0, copasi_hasPart, copasi_hasVersion, copasi_is, copasi_isDescribedBy, copasi_isEncodedBy, copasi_isHomologTo, copasi_isPartOf, copasi_isVersionOf, copasi_occursIn, bqbiol_encodes, bqbiol_hasPart, bqbiol_hasVersion, bqbiol_is, bqbiol_isDescribedBy, bqbiol_isEncodedBy, bqbiol_isHomologTo, bqbiol_isPartOf, bqbiol_isVersionOf, bqbiol_occursIn, bqmodel_is, bqmodel_isDescribedBy, dc_creator, dcterms_creator, dcterms_bibliographicCitation, dcterms_created, dcterms_description, dcterms_modified, dcterms_W3CDTF, vcard_EMAIL, vcard_Family, vcard_Given, vcard_N, vcard_ORG, vcard_Orgname, rdf_type, rdf_li, rdf__n, rdf_subject, rdf_predicate, rdf_object, unknown, about, any, end } |
typedef std::vector < ePredicateType > | Path |
Public Member Functions | |
CRDFPredicate (const ePredicateType &type=end) | |
CRDFPredicate (const std::string &uri) | |
CRDFPredicate (const CRDFPredicate &src) | |
const ePredicateType & | getType () const |
const std::string & | getURI () const |
bool | operator!= (const CRDFPredicate &rhs) const |
bool | operator< (const CRDFPredicate &rhs) const |
CRDFPredicate | operator= (const ePredicateType &type) |
bool | operator== (const CRDFPredicate &rhs) const |
void | setURI (const std::string &uri) |
~CRDFPredicate () | |
Static Public Member Functions | |
static const AllowedLocationList & | getAllowedLocationList (const ePredicateType &predicate) |
static const std::string & | getDisplayName (const CRDFPredicate &predicate) |
static ePredicateType | getPredicateFromDisplayName (const std::string &displayName) |
static ePredicateType | getPredicateFromURI (const std::string &URI) |
static size_t | getSubPathIndex (const Path &fullPath, const Path ¤tPath) |
static const std::string & | getURI (const CRDFPredicate &predicate) |
static bool | isReadOnly (const Path ¤tPath) |
Static Private Member Functions | |
static void | createAllowedLocationsAbsolute () |
static void | createAllowedLocationsAbsolute (const ePredicateType &predicate) |
static void | createAllowedLocationsRelative () |
static void | createDisplayName2Predicate () |
static void | createURI2Predicate () |
static void | initialize () |
Private Attributes | |
ePredicateType | mType |
std::string | mURI |
Static Private Attributes | |
static std::map< std::string, ePredicateType > | DisplayName2Predicate |
static std::vector < AllowedLocationList > | Predicate2AllowedLocationsAbsolute |
static std::vector < AllowedLocationList > | Predicate2AllowedLocationsRelative |
static const std::string | PredicateDisplayName [] |
static const std::string | PredicateURI [] |
static std::map< std::string, ePredicateType > | URI2Predicate |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CRDFPredicate &p) |
Definition at line 29 of file CRDFPredicate.h.
typedef std::vector< sAllowedLocation > CRDFPredicate::AllowedLocationList |
Definition at line 102 of file CRDFPredicate.h.
typedef std::vector< ePredicateType > CRDFPredicate::Path |
Definition at line 91 of file CRDFPredicate.h.
Definition at line 32 of file CRDFPredicate.h.
CRDFPredicate::CRDFPredicate | ( | const ePredicateType & | type = end | ) |
Default constructor
const | ePredicateType & type (default CRDFPredicate::end) |
Definition at line 555 of file CRDFPredicate.cpp.
References initialize(), mType, mURI, and PredicateURI.
Referenced by operator=().
CRDFPredicate::CRDFPredicate | ( | const std::string & | uri | ) |
Specific constructor
const | std::string & uri |
Definition at line 563 of file CRDFPredicate.cpp.
References getPredicateFromURI(), initialize(), mType, mURI, PredicateURI, and rdf_li.
CRDFPredicate::CRDFPredicate | ( | const CRDFPredicate & | src | ) |
Copy constructor
const | CRDFPredicate & src |
Definition at line 574 of file CRDFPredicate.cpp.
CRDFPredicate::~CRDFPredicate | ( | ) |
|
staticprivate |
Create the list of absolute allowed locations for each predicate
Definition at line 452 of file CRDFPredicate.cpp.
References Predicate2AllowedLocationsRelative.
Referenced by createAllowedLocationsAbsolute(), and initialize().
|
staticprivate |
Create the list of absolute allowed locations for the given predicate
const | ePredicateType & predicate |
Definition at line 461 of file CRDFPredicate.cpp.
References about, any, createAllowedLocationsAbsolute(), CRDFPredicate::sAllowedLocation::Location, CRDFPredicate::sAllowedLocation::MaxOccurance, Predicate2AllowedLocationsAbsolute, Predicate2AllowedLocationsRelative, CRDFPredicate::sAllowedLocation::ReadOnly, and CRDFPredicate::sAllowedLocation::Type.
|
staticprivate |
Create the list of relative allowed locations for each predicate
Definition at line 179 of file CRDFPredicate.cpp.
References about, any, CRDFObject::BLANK_NODE, bqbiol_encodes, bqbiol_hasPart, bqbiol_hasVersion, bqbiol_is, bqbiol_isDescribedBy, bqbiol_isEncodedBy, bqbiol_isHomologTo, bqbiol_isPartOf, bqbiol_isVersionOf, bqbiol_occursIn, bqmodel_is, bqmodel_isDescribedBy, C_INVALID_INDEX, copasi_encodes, copasi_hasPart, copasi_hasVersion, copasi_is, copasi_isDescribedBy, copasi_isEncodedBy, copasi_isHomologTo, copasi_isPartOf, copasi_isVersionOf, copasi_occursIn, dc_creator, dcterms_bibliographicCitation, dcterms_created, dcterms_creator, dcterms_description, dcterms_modified, dcterms_W3CDTF, CRDFObject::LITERAL, Predicate2AllowedLocationsRelative, CRDFObject::RESOURCE, vcard_EMAIL, vcard_Family, vcard_Given, vcard_N, vcard_ORG, and vcard_Orgname.
Referenced by initialize().
|
staticprivate |
Initialize the map from display name to predicate
Definition at line 165 of file CRDFPredicate.cpp.
References DisplayName2Predicate, and PredicateDisplayName.
Referenced by initialize().
|
staticprivate |
Initialize the map from URI to predicate
Definition at line 87 of file CRDFPredicate.cpp.
References Predicate2AllowedLocationsAbsolute, Predicate2AllowedLocationsRelative, PredicateURI, and URI2Predicate.
Referenced by initialize().
|
static |
Retrieve the list of allowed locations in the RDF graph for the given predicate
const | ePredicateType & predicate |
Definition at line 618 of file CRDFPredicate.cpp.
References Predicate2AllowedLocationsAbsolute.
Referenced by CRDFGraphConverter::convert(), and CRDFNode::createMissingAncestors().
|
static |
Retrieve the display name for the given predicate
const | CRDFPredicate & predicate |
Definition at line 644 of file CRDFPredicate.cpp.
References mType, and PredicateDisplayName.
Referenced by CQMiriamWidget::CQMiriamWidget(), and CBiologicalDescription::getPredicate().
|
static |
Retrieve the type of predicate from the given display name
const | std::string & displayName |
Definition at line 650 of file CRDFPredicate.cpp.
References DisplayName2Predicate, and unknown.
Referenced by CBiologicalDescription::setPredicate().
|
static |
Retrieve the type of predicate for the given URI
const | std::string & URI |
Definition at line 630 of file CRDFPredicate.cpp.
References if(), PredicateURI, rdf__n, rdf_li, unknown, and URI2Predicate.
Referenced by CRDFPredicate(), and setURI().
Retrieve the index of the next path element of the full path beyond the current path. If the current path is not part of the full path C_INVALID_INDEX is returned
const | Path & fullPath |
const | Path & currentPath |
Definition at line 661 of file CRDFPredicate.cpp.
References C_INVALID_INDEX.
Referenced by CRDFGraphConverter::convert(), and CRDFNode::createMissingAncestors().
const CRDFPredicate::ePredicateType & CRDFPredicate::getType | ( | ) | const |
Retrieve the type og the predicate.
Definition at line 585 of file CRDFPredicate.cpp.
References mType.
Referenced by CSBMLExporter::updateMIRIAMAnnotation().
const std::string & CRDFPredicate::getURI | ( | ) | const |
Retrieve the URI.
Definition at line 598 of file CRDFPredicate.cpp.
References mURI.
Referenced by CBiologicalDescription::clearInvalidEntries(), CRDFGraphConverter::convert(), CMIRIAMInfo::createCreator(), CRDFNode::createMissingAncestors(), CMIRIAMInfo::createModification(), CMIRIAMInfo::createReference(), operator<<(), CMIRIAMInfo::removeCreator(), CMIRIAMInfo::removeModification(), CMIRIAMInfo::removeReference(), CMIRIAMInfo::setCreatedDT(), CRDFNode::setFieldValue(), and CQRDFTreeViewItem::setTriplet().
|
static |
Retrieve the URI for the given predicate
const | CRDFPredicate & predicate |
Definition at line 624 of file CRDFPredicate.cpp.
References mType, and PredicateURI.
|
staticprivate |
Initialize the static information
Definition at line 532 of file CRDFPredicate.cpp.
References createAllowedLocationsAbsolute(), createAllowedLocationsRelative(), createDisplayName2Predicate(), and createURI2Predicate().
Referenced by CRDFPredicate().
|
static |
Checks whether the element pointed to by the current path is read-only
const | Path & currentPath |
Definition at line 681 of file CRDFPredicate.cpp.
References Predicate2AllowedLocationsAbsolute.
Referenced by CRDFNode::isReadOnly().
bool CRDFPredicate::operator!= | ( | const CRDFPredicate & | rhs | ) | const |
Comparison operator for inequality.
const | CRDFPredicate & rhs |
Definition at line 604 of file CRDFPredicate.cpp.
References mURI.
bool CRDFPredicate::operator< | ( | const CRDFPredicate & | rhs | ) | const |
Comparison operator for less.
const | CRDFPredicate & rhs |
Definition at line 607 of file CRDFPredicate.cpp.
References mURI.
CRDFPredicate CRDFPredicate::operator= | ( | const ePredicateType & | type | ) |
Assignment operator.
const | ePredicateType & type |
Definition at line 582 of file CRDFPredicate.cpp.
References CRDFPredicate().
bool CRDFPredicate::operator== | ( | const CRDFPredicate & | rhs | ) | const |
Comparison operator for equality.
const | CRDFPredicate & rhs |
Definition at line 601 of file CRDFPredicate.cpp.
References mURI.
void CRDFPredicate::setURI | ( | const std::string & | uri | ) |
Set the URI.
const | std::string & URI |
Definition at line 588 of file CRDFPredicate.cpp.
References getPredicateFromURI(), mType, mURI, PredicateURI, and rdf_li.
|
friend |
Friend declaration of ostream operator
std::ostream | & os |
const | CRDFPredicate & p |
Definition at line 611 of file CRDFPredicate.cpp.
|
staticprivate |
Map from display name to predicate type
Definition at line 296 of file CRDFPredicate.h.
Referenced by createDisplayName2Predicate(), and getPredicateFromDisplayName().
|
private |
The type of the predicate
Definition at line 271 of file CRDFPredicate.h.
Referenced by CRDFPredicate(), getDisplayName(), getType(), getURI(), operator<<(), and setURI().
|
private |
The URI
Definition at line 276 of file CRDFPredicate.h.
Referenced by CRDFPredicate(), getURI(), operator!=(), operator<(), operator==(), and setURI().
|
staticprivate |
Vector of absolute allowed locations
Definition at line 306 of file CRDFPredicate.h.
Referenced by createAllowedLocationsAbsolute(), createURI2Predicate(), getAllowedLocationList(), and isReadOnly().
|
staticprivate |
Vector of relative allowed locations
Definition at line 301 of file CRDFPredicate.h.
Referenced by createAllowedLocationsAbsolute(), createAllowedLocationsRelative(), and createURI2Predicate().
|
staticprivate |
Static strings for display names
Definition at line 291 of file CRDFPredicate.h.
Referenced by createDisplayName2Predicate(), and getDisplayName().
|
staticprivate |
Static strings for URIs
Definition at line 281 of file CRDFPredicate.h.
Referenced by CRDFPredicate(), createURI2Predicate(), getPredicateFromURI(), getURI(), and setURI().
|
staticprivate |
Map from URI to predicate type
Definition at line 286 of file CRDFPredicate.h.
Referenced by createURI2Predicate(), and getPredicateFromURI().