COPASI API  4.40.278
CRDFPredicate Class Reference

#include <CRDFPredicate.h>

Classes

struct  sAllowedLocation
 

Public Types

typedef std::vector< sAllowedLocationAllowedLocationList
 
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_hasProperty , bqbiol_hasVersion , bqbiol_is , bqbiol_isDescribedBy ,
  bqbiol_isEncodedBy , bqbiol_isHomologTo , bqbiol_isPartOf , bqbiol_isPropertyOf ,
  bqbiol_isVersionOf , bqbiol_occursIn , bqbiol_hasTaxon , bqmodel_is ,
  bqmodel_isDerivedFrom , bqmodel_isDescribedBy , bqmodel_isInstanceOf , bqmodel_hasInstance ,
  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< ePredicateTypePath
 

Public Member Functions

 CRDFPredicate (const CRDFPredicate &src)
 
 CRDFPredicate (const ePredicateType &type=end)
 
 CRDFPredicate (const std::string &uri)
 
const ePredicateTypegetType () 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 AllowedLocationListgetAllowedLocationList (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 &currentPath)
 
static const std::string & getURI (const CRDFPredicate &predicate)
 
static bool isReadOnly (const Path &currentPath)
 

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, ePredicateTypeDisplayName2Predicate
 
static std::vector< AllowedLocationListPredicate2AllowedLocationsAbsolute
 
static std::vector< AllowedLocationListPredicate2AllowedLocationsRelative
 
static const std::string PredicateDisplayName []
 
static const std::string PredicateURI []
 
static std::map< std::string, ePredicateTypeURI2Predicate
 

Friends

std::ostream & operator<< (std::ostream &os, const CRDFPredicate &p)
 

Member Typedef Documentation

◆ AllowedLocationList

◆ Path

typedef std::vector< ePredicateType > CRDFPredicate::Path

Member Enumeration Documentation

◆ ePredicateType

Enumerator
copasi_encodes 
copasi_hasPart 
copasi_hasVersion 
copasi_is 
copasi_isDescribedBy 
copasi_isEncodedBy 
copasi_isHomologTo 
copasi_isPartOf 
copasi_isVersionOf 
copasi_occursIn 
bqbiol_encodes 
bqbiol_hasPart 
bqbiol_hasProperty 
bqbiol_hasVersion 
bqbiol_is 
bqbiol_isDescribedBy 
bqbiol_isEncodedBy 
bqbiol_isHomologTo 
bqbiol_isPartOf 
bqbiol_isPropertyOf 
bqbiol_isVersionOf 
bqbiol_occursIn 
bqbiol_hasTaxon 
bqmodel_is 
bqmodel_isDerivedFrom 
bqmodel_isDescribedBy 
bqmodel_isInstanceOf 
bqmodel_hasInstance 
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 

Constructor & Destructor Documentation

◆ CRDFPredicate() [1/3]

CRDFPredicate::CRDFPredicate ( const ePredicateType type = end)

Default constructor

Parameters
constePredicateType & type (default CRDFPredicate::end)

References initialize(), mType, mURI, and PredicateURI.

Referenced by operator=().

◆ CRDFPredicate() [2/3]

CRDFPredicate::CRDFPredicate ( const std::string &  uri)

Specific constructor

Parameters
conststd::string & uri

References getPredicateFromURI(), initialize(), mType, mURI, PredicateURI, and rdf_li.

◆ CRDFPredicate() [3/3]

CRDFPredicate::CRDFPredicate ( const CRDFPredicate src)

Copy constructor

Parameters
constCRDFPredicate & src

◆ ~CRDFPredicate()

CRDFPredicate::~CRDFPredicate ( )

Destructor

Member Function Documentation

◆ createAllowedLocationsAbsolute() [1/2]

void CRDFPredicate::createAllowedLocationsAbsolute ( )
staticprivate

Create the list of absolute allowed locations for each predicate

References Predicate2AllowedLocationsRelative.

Referenced by createAllowedLocationsAbsolute(), and initialize().

◆ createAllowedLocationsAbsolute() [2/2]

void CRDFPredicate::createAllowedLocationsAbsolute ( const ePredicateType predicate)
staticprivate

◆ createAllowedLocationsRelative()

◆ createDisplayName2Predicate()

void CRDFPredicate::createDisplayName2Predicate ( )
staticprivate

Initialize the map from display name to predicate

References DisplayName2Predicate, and PredicateDisplayName.

Referenced by initialize().

◆ createURI2Predicate()

void CRDFPredicate::createURI2Predicate ( )
staticprivate

Initialize the map from URI to predicate

References Predicate2AllowedLocationsAbsolute, Predicate2AllowedLocationsRelative, PredicateURI, and URI2Predicate.

Referenced by initialize().

◆ getAllowedLocationList()

const CRDFPredicate::AllowedLocationList & CRDFPredicate::getAllowedLocationList ( const ePredicateType predicate)
static

Retrieve the list of allowed locations in the RDF graph for the given predicate

Parameters
constePredicateType & predicate
Returns
const AllowedLocationList & listOfAllowedLocations

References Predicate2AllowedLocationsAbsolute.

Referenced by CRDFGraphConverter::convert(), and CRDFNode::createMissingAncestors().

◆ getDisplayName()

const std::string & CRDFPredicate::getDisplayName ( const CRDFPredicate predicate)
static

Retrieve the display name for the given predicate

Parameters
constCRDFPredicate & predicate
Returns
const std::string & displayName

References mType, and PredicateDisplayName.

Referenced by CBiologicalDescription::getPredicate().

◆ getPredicateFromDisplayName()

CRDFPredicate::ePredicateType CRDFPredicate::getPredicateFromDisplayName ( const std::string &  displayName)
static

Retrieve the type of predicate from the given display name

Parameters
conststd::string & displayName
Returns
ePredicateType type

References DisplayName2Predicate, and unknown.

Referenced by CBiologicalDescription::setPredicate().

◆ getPredicateFromURI()

CRDFPredicate::ePredicateType CRDFPredicate::getPredicateFromURI ( const std::string &  URI)
static

Retrieve the type of predicate for the given URI

Parameters
conststd::string & URI
Returns
ePredicateType type

References PredicateURI, rdf__n, rdf_li, unknown, and URI2Predicate.

Referenced by CRDFGraph::addTriplet(), CRDFPredicate(), and setURI().

◆ getSubPathIndex()

size_t CRDFPredicate::getSubPathIndex ( const Path fullPath,
const Path currentPath 
)
static

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

Parameters
constPath & fullPath
constPath & currentPath
Returns
size_t index

References C_INVALID_INDEX.

Referenced by CRDFGraphConverter::convert(), and CRDFNode::createMissingAncestors().

◆ getType()

const CRDFPredicate::ePredicateType & CRDFPredicate::getType ( ) const

Retrieve the type og the predicate.

Returns
const ePredicateType & type

References mType.

Referenced by CSBMLExporter::updateMIRIAMAnnotation().

◆ getURI() [1/2]

◆ getURI() [2/2]

const std::string & CRDFPredicate::getURI ( const CRDFPredicate predicate)
static

Retrieve the URI for the given predicate

Parameters
constCRDFPredicate & predicate
Returns
const std::string & uri

References mType, and PredicateURI.

◆ initialize()

void CRDFPredicate::initialize ( )
staticprivate

◆ isReadOnly()

bool CRDFPredicate::isReadOnly ( const Path currentPath)
static

Checks whether the element pointed to by the current path is read-only

Parameters
constPath & currentPath
Returns
bool isReadOnly

References Predicate2AllowedLocationsAbsolute.

Referenced by CRDFNode::isReadOnly().

◆ operator!=()

bool CRDFPredicate::operator!= ( const CRDFPredicate rhs) const

Comparison operator for inequality.

Parameters
constCRDFPredicate & rhs
Returns
bool isNotEqual

References mURI.

◆ operator<()

bool CRDFPredicate::operator< ( const CRDFPredicate rhs) const

Comparison operator for less.

Parameters
constCRDFPredicate & rhs
Returns
bool isLess

References mURI.

◆ operator=()

CRDFPredicate CRDFPredicate::operator= ( const ePredicateType type)

Assignment operator.

Parameters
constePredicateType & type
Returns
CRDFPredicate predicate

References CRDFPredicate().

◆ operator==()

bool CRDFPredicate::operator== ( const CRDFPredicate rhs) const

Comparison operator for equality.

Parameters
constCRDFPredicate & rhs
Returns
bool isEqual

References mURI.

◆ setURI()

void CRDFPredicate::setURI ( const std::string &  uri)

Set the URI.

Parameters
conststd::string & URI

References getPredicateFromURI(), mType, mURI, PredicateURI, and rdf_li.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const CRDFPredicate p 
)
friend

Friend declaration of ostream operator

Parameters
std::ostream& os
constCRDFPredicate & p
Returns
std::ostream & os

Member Data Documentation

◆ DisplayName2Predicate

std::map< std::string, CRDFPredicate::ePredicateType > CRDFPredicate::DisplayName2Predicate
staticprivate

Map from display name to predicate type

Referenced by createDisplayName2Predicate(), and getPredicateFromDisplayName().

◆ mType

ePredicateType CRDFPredicate::mType
private

The type of the predicate

Referenced by CRDFPredicate(), getDisplayName(), getType(), getURI(), and setURI().

◆ mURI

std::string CRDFPredicate::mURI
private

◆ Predicate2AllowedLocationsAbsolute

std::vector< CRDFPredicate::AllowedLocationList > CRDFPredicate::Predicate2AllowedLocationsAbsolute
staticprivate

Vector of absolute allowed locations

Referenced by createAllowedLocationsAbsolute(), createURI2Predicate(), getAllowedLocationList(), and isReadOnly().

◆ Predicate2AllowedLocationsRelative

std::vector< CRDFPredicate::AllowedLocationList > CRDFPredicate::Predicate2AllowedLocationsRelative
staticprivate

Vector of relative allowed locations

Referenced by createAllowedLocationsAbsolute(), createAllowedLocationsRelative(), and createURI2Predicate().

◆ PredicateDisplayName

const std::string CRDFPredicate::PredicateDisplayName
staticprivate

Static strings for display names

Referenced by createDisplayName2Predicate(), and getDisplayName().

◆ PredicateURI

const std::string CRDFPredicate::PredicateURI
staticprivate

Static strings for URIs

Referenced by CRDFPredicate(), createURI2Predicate(), getPredicateFromURI(), getURI(), and setURI().

◆ URI2Predicate

std::map< std::string, CRDFPredicate::ePredicateType > CRDFPredicate::URI2Predicate
staticprivate

Map from URI to predicate type

Referenced by createURI2Predicate(), and getPredicateFromURI().


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