15typedef struct graph_t VOLK_Graph;
90#define VOLK_graph_get(...) VOLK_graph_get_txn (NULL, __VA_ARGS__)
115 void *txn,
const VOLK_Graph *src, VOLK_Graph *dest,
134#define VOLK_graph_copy_contents(...) \
135 VOLK_graph_copy_contents_txn (NULL, __VA_ARGS__)
150#define VOLK_graph_copy(src, dest) \
151 VOLK_graph_copy_contents_txn (NULL, src, dest, NULL, NULL, NULL)
180 const VOLK_Graph *gr1,
const VOLK_Graph *gr2, VOLK_Graph *res);
184#define VOLK_graph_bool_op(...) VOLK_graph_bool_op_txn (NULL, __VA_ARGS__)
282#define VOLK_graph_add_init(...) VOLK_graph_add_init_txn (NULL, __VA_ARGS__)
309 void *txn, VOLK_Graph *gr,
VOLK_Triple *
const *trp,
size_t *
ct);
313#define VOLK_graph_add(...) VOLK_graph_add_txn (NULL, __VA_ARGS__)
334#define VOLK_graph_remove(...) VOLK_graph_remove_txn (NULL, __VA_ARGS__)
364#define VOLK_graph_lookup(...) VOLK_graph_lookup_txn (NULL, __VA_ARGS__)
472#define VOLK_graph_list(...) VOLK_graph_list_txn (NULL, __VA_ARGS__)
VOLK_TriplePos
Triple position of s, p, o.
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.
const VOLK_Graph * VOLK_graph_iter_graph(VOLK_GraphIterator *it)
Return the graph related to an iterator.
VOLK_TermSet * VOLK_graph_list_txn(void *txn, VOLK_Store *store)
List all graph URIs in a store.
void VOLK_graph_print(const VOLK_Graph *gr)
Print graph information and triples to stdout.
VOLK_LinkMap * VOLK_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_Graph * VOLK_graph_get_txn(void *txn, VOLK_Store *store, const VOLK_Term *uri, size_t *ct)
Create a temp graph from stored triples.
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.
bool VOLK_graph_contains(const VOLK_Graph *gr, const VOLK_Triple *spo)
Whether a graph contains a triple.
bool VOLK_graph_equals(const VOLK_Graph *gr1, const VOLK_Graph *gr2)
Compare two graphs.
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.
void VOLK_graph_free(VOLK_Graph *gr)
Free a graph.
VOLK_rc VOLK_graph_add_txn(void *txn, VOLK_Graph *gr, VOLK_Triple *const *trp, size_t *ct)
Add triples to a graph.
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_bool_op_txn(void *txn, const VOLK_bool_op op, const VOLK_Graph *gr1, const VOLK_Graph *gr2, VOLK_Graph *res)
VOLK_TermSet * VOLK_graph_unique_terms(const VOLK_Graph *gr, VOLK_TriplePos pos)
Get all unique subjcts, predicates, or objects in a graph.
VOLK_Store * VOLK_graph_store(const VOLK_Graph *gr)
Underlying graph store handle.
VOLK_GraphIterator * VOLK_graph_add_init_txn(void *txn, VOLK_Graph *gr)
Initialize an iterator to add triples.
VOLK_rc VOLK_graph_iter_next(VOLK_GraphIterator *it, VOLK_Triple **spo)
Advance a cursor obtained by a lookup and return a matching triple.
VOLK_rc VOLK_graph_set_uri(VOLK_Graph *gr, const char *uri_str)
VOLK_Term * VOLK_bnode_add_collection(VOLK_GraphIterator *it, VOLK_TermSet *ts)
Add triples for an anonymous collection to a graph.
VOLK_rc VOLK_graph_add_iter(VOLK_GraphIterator *it, const VOLK_Triple *spo)
Add a single triple to the store.
void VOLK_graph_iter_free(VOLK_GraphIterator *it)
Free a graph iterator.
VOLK_TermSet * VOLK_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_Graph * VOLK_graph_new(VOLK_Store *store, const char *uri_str)
Create new graph.
const VOLK_Term * VOLK_graph_uri(const VOLK_Graph *gr)
Read-only graph URI.
size_t VOLK_graph_size(const VOLK_Graph *gr)
Number of triples in a graph.
VOLK_rc VOLK_nsmap_normalize_uri(const char *pfx_uri, char **fq_uri_p)
Convert a namespace-prefixed string to a FQ URI sring if mapped.
#define RCNL(exp)
Return NULL if exp returns a nonzero value.
VOLK_bool_op
Boolean operations that can be performed on a graph.
struct hashmap VOLK_TermSet
a set of unique terms.
Generic store dependency.
size_t ct
Total lookup matches.