Volksdata 1.0b7
RDF library
Loading...
Searching...
No Matches
graph.c File Reference
#include "volksdata/graph.h"
Include dependency graph for graph.c:

Go to the source code of this file.

Data Structures

struct  VOLK_Graph
 Graph object. More...
struct  VOLK_GraphIterator
 Graph iterator. More...

Macros

#define ENTRY(a, b)

Functions

VOLK_Graph * VOLK_graph_new (VOLK_Store *store, const char *uri_str)
 Create new graph.
VOLK_Graph * VOLK_graph_get_txn (void *txn, VOLK_Store *store, const VOLK_Term *uri, size_t *ct)
 Create a temp graph from stored triples.
VOLK_rc VOLK_graph_bool_op_txn (void *txn, const VOLK_bool_op op, const VOLK_Graph *gr1, const VOLK_Graph *gr2, VOLK_Graph *res)
void VOLK_graph_free (VOLK_Graph *gr)
 Free a graph.
const VOLK_TermVOLK_graph_uri (const VOLK_Graph *gr)
 Read-only graph URI.
VOLK_StoreVOLK_graph_store (const VOLK_Graph *gr)
 Underlying graph store handle.
VOLK_rc VOLK_graph_set_uri (VOLK_Graph *gr, const char *uri_str)
size_t VOLK_graph_size (const VOLK_Graph *gr)
 Number of triples in a graph.
bool VOLK_graph_equals (const VOLK_Graph *gr1, const VOLK_Graph *gr2)
 Compare two graphs.
VOLK_GraphIterator * VOLK_graph_add_init_txn (void *txn, VOLK_Graph *gr)
 Initialize an iterator to add triples.
VOLK_rc VOLK_graph_add_iter (VOLK_GraphIterator *it, const VOLK_Triple *spo)
 Add a single triple to the store.
VOLK_rc VOLK_graph_add_txn (void *txn, VOLK_Graph *gr, VOLK_Triple *const *trp, size_t *ct)
 Add triples to a graph.
VOLK_rc VOLK_graph_remove_txn (void *txn, VOLK_Graph *gr, const VOLK_Term *s, const VOLK_Term *p, const VOLK_Term *o, size_t *ct)
 Delete triples by a matching pattern.
VOLK_rc VOLK_graph_copy_contents_txn (void *txn, const VOLK_Graph *src, VOLK_Graph *dest, const VOLK_Term *s, const VOLK_Term *p, const VOLK_Term *o)
 Copy triples from a source graph into a destination one.
VOLK_GraphIterator * VOLK_graph_lookup_txn (void *txn, const VOLK_Graph *gr, const VOLK_Term *s, const VOLK_Term *p, const VOLK_Term *o, size_t *ct)
 Look up triples by a matching pattern and yield an iterator.
VOLK_rc VOLK_graph_iter_next (VOLK_GraphIterator *it, VOLK_Triple **spo_p)
 Advance a cursor obtained by a lookup and return a matching triple.
const VOLK_Graph * VOLK_graph_iter_graph (VOLK_GraphIterator *it)
 Return the graph related to an iterator.
bool VOLK_graph_iter_is_add (VOLK_GraphIterator *it)
void VOLK_graph_iter_free (VOLK_GraphIterator *it)
 Free a graph iterator.
VOLK_TermSetVOLK_graph_list_txn (void *txn, VOLK_Store *store)
 List all graph URIs in a store.
bool VOLK_graph_contains (const VOLK_Graph *gr, const VOLK_Triple *spo)
 Whether a graph contains a triple.
void VOLK_graph_print (const VOLK_Graph *gr)
 Print graph information and triples to stdout.
VOLK_LinkMapVOLK_graph_connections (const VOLK_Graph *gr, const VOLK_Term *t, const VOLK_LinkType type)
 Get term pairs connected to a term in a graph.
VOLK_TermSetVOLK_graph_term_set (const VOLK_Graph *gr, const VOLK_Term *t1, const VOLK_TriplePos t1_pos, const VOLK_Term *t2, const VOLK_TriplePos t2_pos)
 Get a list of terms related to a term pair in a graph.
VOLK_TermSetVOLK_graph_unique_terms (const VOLK_Graph *gr, VOLK_TriplePos pos)
 Get all unique subjcts, predicates, or objects in a graph.
size_t VOLK_graph_add_link_map (VOLK_GraphIterator *it, VOLK_LinkMap *lm)
 Add triples for a term and related link map to a graph.
VOLK_TermVOLK_bnode_add_collection (VOLK_GraphIterator *it, VOLK_TermSet *ts)
 Add triples for an anonymous collection to a graph.
VOLK_Graph * VOLK_graph_new_ns (VOLK_Store *store, const char *ns_str)
 Create an empty graph using a namespace-prefixed string for its URI.

Macro Definition Documentation

◆ ENTRY

#define ENTRY ( a,
b )
Value:
(be) == (VOLK_STORE_##a) ||

Definition at line 32 of file graph.c.

Function Documentation

◆ VOLK_graph_iter_is_add()

bool VOLK_graph_iter_is_add ( VOLK_GraphIterator * it)

Definition at line 593 of file graph.c.