Public Types | Public Member Functions

Graph Class Reference

Models a Sparql GRAPH contruct. More...

Inheritance diagram for Graph:
Inheritance graph
[legend]

List of all members.

Public Types

enum  Type { IriGraph, VariableGraph }

Public Member Functions

CUBI_EXPLICIT Graph (const ResourceValue &iri)
 Constructs a graph with an IRI.
CUBI_EXPLICIT Graph (const Variable &variable)
 Constructs a graph with a variable.
Type graphType () const
 Returns the type of the graph.
void setIri (const ResourceValue &iri)
 Sets the IRI of the graph.
void setVariable (const Variable &variable)
 Sets the variable of the graph.
ResourceValue iri () const
 Returns the IRI of the graph.
Variable variable () const
 Returns the variable of the graph.

Detailed Description

Models a Sparql GRAPH contruct.

There can be two type of GRAPH constructs, one where you want to restrict the graph (in which case you'll set up a fixed Iri for the Graph object, and type will be Type::IriGraph), and one where you query the graph of a pattern, in this case you'll set a Variable as a parameter of the Graph object, and type will be Type::VariableGraph.

Example of a graph with a fixed IRI: GRAPH <fixed:iri> {?c a nco:PersonContact}

Example of a graph with a variable: GRAPH ?graph {?c a nco:PersonContact}


Member Function Documentation

ResourceValue Graph::iri (  )  const

Returns the IRI of the graph.

If the type of the graph is not IriGraph, returns an invalid ResourceValue.

Variable Graph::variable (  )  const

Returns the variable of the graph.

If the type of the graph is not VariableGraph, returns an invalid Variable.


The documentation for this class was generated from the following files:
 All Classes Functions Enumerations