COPASI API
4.40.278
|
#include <CRDFNode.h>
Public Member Functions | |
CRDFTriplet | addEdge (const CRDFPredicate &predicate, CRDFNode *pObject) |
bool | addTripletToGraph (const CRDFTriplet &triplet) const |
CRDFNode (CRDFGraph &graph) | |
std::set< CRDFTriplet > | getDescendantsWithPredicate (const CRDFPredicate &predicate) const |
const std::string & | getFieldValue (const CRDFPredicate::ePredicateType &predicate) const |
const std::string & | getId () const |
CRDFObject & | getObject () |
const CRDFObject & | getObject () const |
CRDFPredicate::Path | getPath () const |
const CRDFSubject & | getSubject () const |
bool | hasAncestor (const CRDFNode *pNode) const |
bool | isBagNode () const |
bool | isBlankNode () const |
bool | isObjectNode () const |
bool | isReadOnly () const |
bool | isSubjectNode () const |
bool | removeEdge (const CRDFPredicate &predicate, CRDFNode *pObject) |
bool | removeTripletFromGraph (const CRDFTriplet &triplet) const |
bool | setFieldValue (const CMIRIAMResourceObject &value, const CRDFPredicate::ePredicateType &predicate, const CRDFPredicate::Path &nodePath) |
bool | setFieldValue (const std::string &value, const CRDFPredicate::ePredicateType &predicate, const CRDFPredicate::Path &nodePath) |
void | setId (const std::string &id) |
void | setObject (const CRDFObject &object) |
void | setSubject (const CRDFSubject &subject) |
~CRDFNode () | |
Private Member Functions | |
CRDFNode () | |
CRDFNode (const CRDFNode &CRDFNode) | |
CRDFNode * | createMissingAncestors (const CRDFPredicate::Path &nodePath, const CRDFPredicate::ePredicateType &predicate, CRDFPredicate::sAllowedLocation const *&pLocation) |
CRDFNode * | createMissingAncestors (const CRDFPredicate::Path &predicatePath, const size_t &level) |
CRDFNode & | operator= (const CRDFNode &rhs) |
Private Attributes | |
CRDFGraph & | mGraph |
std::string | mId |
bool | mIsBlankNode |
CRDFObject * | mpObject |
CRDFSubject * | mpSubject |
|
private |
Default Constructor
|
private |
CRDFTriplet CRDFNode::addEdge | ( | const CRDFPredicate & | predicate, |
CRDFNode * | pObject | ||
) |
Add a property edge to the node.
const | CRDFPredicate & edge |
CRDFNode | * pObject |
References CRDFGraph::addTriplet(), addTripletToGraph(), CRDFGraph::getTriplets(), isBagNode(), mGraph, CRDFPredicate::rdf_li, CRDFPredicate::rdf_type, CRDFObject::RESOURCE, CRDFObject::setResource(), and CRDFObject::setType().
Referenced by CRDFGraph::addTriplet(), CRDFGraphConverter::convert(), CRDFGraph::moveTriplet(), and CBiologicalDescription::setPredicate().
bool CRDFNode::addTripletToGraph | ( | const CRDFTriplet & | triplet | ) | const |
This method is for internal use only. The method is declared public since friend declarations may not refer to public methods.
const | CRDFTriplet & triplet |
References CRDFGraph::addTriplet(), and mGraph.
Referenced by addEdge().
|
private |
References C_INVALID_INDEX, CRDFPredicate::getAllowedLocationList(), CRDFPredicate::getSubPathIndex(), and isSubjectNode().
Referenced by setFieldValue().
|
private |
std::set< CRDFTriplet > CRDFNode::getDescendantsWithPredicate | ( | const CRDFPredicate & | predicate | ) | const |
References CRDFGraph::getPredicatePath(), CRDFGraph::getTriplets(), and mGraph.
Referenced by CRDFGraphConverter::convert(), createMissingAncestors(), CReference::CReference(), getFieldValue(), CMIRIAMInfo::load(), CMIRIAMInfo::loadBiologicalDescriptions(), CMIRIAMInfo::loadCreators(), CMIRIAMInfo::loadModifications(), CMIRIAMInfo::loadReferences(), setFieldValue(), CReference::setId(), CReference::setResource(), and CSBMLExporter::updateMIRIAMAnnotation().
const std::string & CRDFNode::getFieldValue | ( | const CRDFPredicate::ePredicateType & | predicate | ) | const |
Retrieve the string representation of the property predicate
const | CRDFPredicate::ePredicateType & predicate |
References CRDFObject::BLANK_NODE, CRDFObject::getBlankNodeID(), getDescendantsWithPredicate(), CRDFLiteral::getLexicalData(), CRDFObject::getLiteral(), CRDFObject::getResource(), CRDFObject::getType(), CRDFObject::LITERAL, and CRDFObject::RESOURCE.
Referenced by CMIRIAMInfo::getCreatedDT(), CModification::getDate(), CReference::getDescription(), CCreator::getEmail(), CCreator::getFamilyName(), CCreator::getGivenName(), and CCreator::getORG().
const std::string & CRDFNode::getId | ( | ) | const |
CRDFObject & CRDFNode::getObject | ( | ) |
Retrieve the object data of the node. It is recommended to call isObjectNode before retrieving the object.
References mpObject.
Referenced by CRDFGraph::addTriplet(), CMIRIAMResourceObject::CMIRIAMResourceObject(), CRDFGraph::destroyUnreferencedNode(), operator<<(), setFieldValue(), CBiologicalDescription::setId(), CReference::setId(), CMIRIAMResourceObject::setNode(), CBiologicalDescription::setResource(), and CReference::setResource().
const CRDFObject & CRDFNode::getObject | ( | ) | const |
Retrieve the object data of the node. It is recommended to call isObjectNode before retrieving the object.
References mpObject.
CRDFPredicate::Path CRDFNode::getPath | ( | ) | const |
Retrieve a predicate path to the node.
References CRDFGraph::getPredicatePath(), and mGraph.
Referenced by CCreator::CCreator(), CModification::CModification(), CRDFGraphConverter::convert(), CReference::CReference(), CMIRIAMInfo::load(), CMIRIAMInfo::loadBiologicalDescriptions(), CMIRIAMInfo::loadCreators(), CMIRIAMInfo::loadReferences(), and CMIRIAMInfo::setCreatedDT().
const CRDFSubject & CRDFNode::getSubject | ( | ) | const |
Retrieve the subject data of the node. It is recommended to call isSubjectNode before retrieving the subject.
References mpSubject.
Referenced by CRDFGraphConverter::convert(), CMIRIAMInfo::createBiologicalDescription(), CMIRIAMInfo::createCreator(), createMissingAncestors(), CMIRIAMInfo::createModification(), CMIRIAMInfo::createReference(), CRDFGraph::guessGraphRoot(), operator<<(), CMIRIAMInfo::setCreatedDT(), and setFieldValue().
bool CRDFNode::hasAncestor | ( | const CRDFNode * | pNode | ) | const |
Check whether the given node is in the path, i.e., has the given node as an ancestor
const | CRDFNode * pNode |
References CRDFGraph::getParentSubjects(), and mGraph.
bool CRDFNode::isBagNode | ( | ) | const |
Check whether this is a bag node
References CRDFGraph::getTriplets(), mGraph, and CRDFPredicate::rdf_type.
Referenced by addEdge(), CRDFGraphConverter::convert(), removeEdge(), and CRDFGraph::removeEmptyNodes().
bool CRDFNode::isBlankNode | ( | ) | const |
bool CRDFNode::isObjectNode | ( | ) | const |
Check whether this is a object node
References mpObject.
Referenced by CRDFGraph::addTriplet().
bool CRDFNode::isReadOnly | ( | ) | const |
Check whether the node is read only
References CRDFGraph::getPredicatePath(), CRDFPredicate::isReadOnly(), and mGraph.
bool CRDFNode::isSubjectNode | ( | ) | const |
Check whether this is a subject node
References mpSubject.
Referenced by CRDFGraph::addTriplet(), createMissingAncestors(), and CRDFGraph::guessGraphRoot().
bool CRDFNode::removeEdge | ( | const CRDFPredicate & | predicate, |
CRDFNode * | pObject | ||
) |
Remove a property edge from the node.
const | CRDFPredicate & edge |
CRDFNode | * pObject |
References CRDFGraph::getTriplets(), isBagNode(), mGraph, CRDFPredicate::rdf_li, removeEdge(), and removeTripletFromGraph().
Referenced by CBiologicalDescription::clearInvalidEntries(), CRDFGraphConverter::convert(), CRDFGraph::moveTriplet(), removeEdge(), CRDFGraph::removeTriplet(), and CBiologicalDescription::setPredicate().
bool CRDFNode::removeTripletFromGraph | ( | const CRDFTriplet & | triplet | ) | const |
This method is for internal use only. The method is declared public since friend declarations may not refer to public methods.
const | CRDFTriplet & triplet |
References mGraph, and CRDFGraph::removeTriplet().
Referenced by removeEdge(), and setFieldValue().
bool CRDFNode::setFieldValue | ( | const CMIRIAMResourceObject & | value, |
const CRDFPredicate::ePredicateType & | predicate, | ||
const CRDFPredicate::Path & | nodePath | ||
) |
Set the field value for the property predicate
const | CMIRIAMResource & value |
const | CRDFPredicate::ePredicateType & predicate |
const | CRDFPredicate::Path & nodePath |
References CRDFGraph::addTriplet(), createMissingAncestors(), CMIRIAMResourceObject::getNode(), getSubject(), CMIRIAMResourceObject::getURI(), CRDFPredicate::getURI(), CMIRIAMResourceObject::isValid(), mGraph, CRDFObject::RESOURCE, setFieldValue(), and CRDFObject::setType().
Referenced by CReference::clearInvalidEntries(), CMIRIAMInfo::setCreatedDT(), CModification::setDate(), CReference::setDescription(), CCreator::setEmail(), CCreator::setFamilyName(), setFieldValue(), CCreator::setGivenName(), CReference::setId(), CCreator::setORG(), and CReference::setResource().
bool CRDFNode::setFieldValue | ( | const std::string & | value, |
const CRDFPredicate::ePredicateType & | predicate, | ||
const CRDFPredicate::Path & | nodePath | ||
) |
Set the field value for the property predicate
const | std::string & value |
const | CRDFPredicate::ePredicateType & predicate |
const | CRDFPredicate::Path & nodePath |
References CRDFGraph::addTriplet(), CRDFObject::BLANK_NODE, createMissingAncestors(), fatalError, CRDFGraph::generatedNodeId(), getDescendantsWithPredicate(), CRDFObject::getLiteral(), getObject(), getSubject(), CRDFObject::getType(), CRDFPredicate::getURI(), CRDFObject::LITERAL, mGraph, CRDFLiteral::PLAIN, CRDFTriplet::pObject, removeTripletFromGraph(), CRDFObject::RESOURCE, CRDFLiteral::setLexicalData(), CRDFObject::setResource(), CRDFLiteral::setType(), CRDFObject::setType(), and CRDFPredicate::sAllowedLocation::Type.
void CRDFNode::setId | ( | const std::string & | id | ) |
void CRDFNode::setObject | ( | const CRDFObject & | object | ) |
Set the object data of the node
const | CRDFObject & object |
References CRDFObject::BLANK_NODE, CRDFSubject::BLANK_NODE, CRDFObject::getBlankNodeID(), CRDFObject::getType(), mId, mIsBlankNode, mpObject, mpSubject, pdelete, CRDFSubject::setBlankNodeId(), and CRDFSubject::setType().
Referenced by CRDFGraph::addTriplet().
void CRDFNode::setSubject | ( | const CRDFSubject & | subject | ) |
Set the subject data of the node
const | CRDFSubject & subject |
References CRDFObject::BLANK_NODE, CRDFSubject::BLANK_NODE, CRDFSubject::getBlankNodeID(), CRDFSubject::getType(), mId, mIsBlankNode, mpObject, mpSubject, pdelete, CRDFObject::setBlankNodeId(), and CRDFObject::setType().
Referenced by CRDFGraph::addTriplet(), and CRDFGraph::createAboutNode().
|
private |
The graph in which the node is located.
Referenced by addEdge(), addTripletToGraph(), createMissingAncestors(), getDescendantsWithPredicate(), getPath(), hasAncestor(), isBagNode(), isReadOnly(), removeEdge(), removeTripletFromGraph(), and setFieldValue().
|
private |
The Id of the node
Referenced by getId(), setId(), setObject(), and setSubject().
|
private |
Stores whether this is a blank node
Referenced by isBlankNode(), setObject(), and setSubject().
|
mutableprivate |
A pointer to the object if of type OBJECT or BOTH
Referenced by getObject(), isObjectNode(), setObject(), setSubject(), and ~CRDFNode().
|
mutableprivate |
A pointer to the subject if of type SUBJECT or BOTH
Referenced by getSubject(), isSubjectNode(), setObject(), setSubject(), and ~CRDFNode().