COPASI API  4.40.278
CRDFNode Class Reference

#include <CRDFNode.h>

Public Member Functions

CRDFTriplet addEdge (const CRDFPredicate &predicate, CRDFNode *pObject)
 
bool addTripletToGraph (const CRDFTriplet &triplet) const
 
 CRDFNode (CRDFGraph &graph)
 
std::set< CRDFTripletgetDescendantsWithPredicate (const CRDFPredicate &predicate) const
 
const std::string & getFieldValue (const CRDFPredicate::ePredicateType &predicate) const
 
const std::string & getId () const
 
CRDFObjectgetObject ()
 
const CRDFObjectgetObject () const
 
CRDFPredicate::Path getPath () const
 
const CRDFSubjectgetSubject () 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)
 
CRDFNodecreateMissingAncestors (const CRDFPredicate::Path &nodePath, const CRDFPredicate::ePredicateType &predicate, CRDFPredicate::sAllowedLocation const *&pLocation)
 
CRDFNodecreateMissingAncestors (const CRDFPredicate::Path &predicatePath, const size_t &level)
 
CRDFNodeoperator= (const CRDFNode &rhs)
 

Private Attributes

CRDFGraphmGraph
 
std::string mId
 
bool mIsBlankNode
 
CRDFObjectmpObject
 
CRDFSubjectmpSubject
 

Constructor & Destructor Documentation

◆ CRDFNode() [1/3]

CRDFNode::CRDFNode ( )
private

Default Constructor

◆ CRDFNode() [2/3]

CRDFNode::CRDFNode ( const CRDFNode CRDFNode)
private

◆ CRDFNode() [3/3]

CRDFNode::CRDFNode ( CRDFGraph graph)

Specific Constructor

Parameters
CRDFGraph& graph

◆ ~CRDFNode()

CRDFNode::~CRDFNode ( )

Destructor

References mpObject, mpSubject, and pdelete.

Member Function Documentation

◆ addEdge()

◆ addTripletToGraph()

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.

Parameters
constCRDFTriplet & triplet
Returns
bool success.

References CRDFGraph::addTriplet(), and mGraph.

Referenced by addEdge().

◆ createMissingAncestors() [1/2]

CRDFNode * CRDFNode::createMissingAncestors ( const CRDFPredicate::Path nodePath,
const CRDFPredicate::ePredicateType predicate,
CRDFPredicate::sAllowedLocation const *&  pLocation 
)
private

◆ createMissingAncestors() [2/2]

◆ getDescendantsWithPredicate()

◆ getFieldValue()

◆ getId()

const std::string & CRDFNode::getId ( ) const

Retrieve the Id of the node

Returns
const std::string & id

References mId.

◆ getObject() [1/2]

CRDFObject & CRDFNode::getObject ( )

◆ getObject() [2/2]

const CRDFObject & CRDFNode::getObject ( ) const

Retrieve the object data of the node. It is recommended to call isObjectNode before retrieving the object.

Returns
const CRDFObject & object

References mpObject.

◆ getPath()

◆ getSubject()

const CRDFSubject & CRDFNode::getSubject ( ) const

◆ hasAncestor()

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

Parameters
constCRDFNode * pNode
Returns
bool hasAncestor

References CRDFGraph::getParentSubjects(), and mGraph.

◆ isBagNode()

bool CRDFNode::isBagNode ( ) const

Check whether this is a bag node

Returns
isBagNode

References CRDFGraph::getTriplets(), mGraph, and CRDFPredicate::rdf_type.

Referenced by addEdge(), CRDFGraphConverter::convert(), removeEdge(), and CRDFGraph::removeEmptyNodes().

◆ isBlankNode()

bool CRDFNode::isBlankNode ( ) const

Check whether this is a blank node

Returns
bool isBlankNode

References mIsBlankNode.

◆ isObjectNode()

bool CRDFNode::isObjectNode ( ) const

Check whether this is a object node

Returns
bool isObjectNode

References mpObject.

Referenced by CRDFGraph::addTriplet().

◆ isReadOnly()

bool CRDFNode::isReadOnly ( ) const

Check whether the node is read only

Returns
bool isReadOnly

References CRDFGraph::getPredicatePath(), CRDFPredicate::isReadOnly(), and mGraph.

◆ isSubjectNode()

bool CRDFNode::isSubjectNode ( ) const

Check whether this is a subject node

Returns
bool isSubjectNode

References mpSubject.

Referenced by CRDFGraph::addTriplet(), createMissingAncestors(), and CRDFGraph::guessGraphRoot().

◆ operator=()

CRDFNode& CRDFNode::operator= ( const CRDFNode rhs)
private

◆ removeEdge()

bool CRDFNode::removeEdge ( const CRDFPredicate predicate,
CRDFNode pObject 
)

◆ removeTripletFromGraph()

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.

Parameters
constCRDFTriplet & triplet
Returns
true, if an element was deleted, false otherwise

References mGraph, and CRDFGraph::removeTriplet().

Referenced by removeEdge(), and setFieldValue().

◆ setFieldValue() [1/2]

◆ setFieldValue() [2/2]

◆ setId()

void CRDFNode::setId ( const std::string &  id)

Set the Id of the node

Parameters
conststd::string & id

References mId.

◆ setObject()

void CRDFNode::setObject ( const CRDFObject object)

◆ setSubject()

Member Data Documentation

◆ mGraph

◆ mId

std::string CRDFNode::mId
private

The Id of the node

Referenced by getId(), setId(), setObject(), and setSubject().

◆ mIsBlankNode

bool CRDFNode::mIsBlankNode
private

Stores whether this is a blank node

Referenced by isBlankNode(), setObject(), and setSubject().

◆ mpObject

CRDFObject* CRDFNode::mpObject
mutableprivate

A pointer to the object if of type OBJECT or BOTH

Referenced by getObject(), isObjectNode(), setObject(), setSubject(), and ~CRDFNode().

◆ mpSubject

CRDFSubject* CRDFNode::mpSubject
mutableprivate

A pointer to the subject if of type SUBJECT or BOTH

Referenced by getSubject(), isSubjectNode(), setObject(), setSubject(), and ~CRDFNode().


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