32typedef struct graph_t VOLK_Graph;
110#define VOLK_graph_get(...) VOLK_graph_get_txn (NULL, __VA_ARGS__)
135 void *txn,
const VOLK_Graph *src, VOLK_Graph *dest,
153#define VOLK_graph_copy_contents(...) \
154 VOLK_graph_copy_contents_txn (NULL, __VA_ARGS__)
169#define VOLK_graph_copy(src, dest) \
170 VOLK_graph_copy_contents_txn (NULL, src, dest, NULL, NULL, NULL)
199 const VOLK_Graph *gr1,
const VOLK_Graph *gr2, VOLK_Graph *res);
202#define VOLK_graph_bool_op(...) VOLK_graph_bool_op_txn (NULL, __VA_ARGS__)
228#define VOLK_graph_equals(...) VOLK_graph_equals_txn (NULL, __VA_ARGS__)
270#define VOLK_graph_set_uri(...) VOLK_graph_set_uri_txn (NULL, __VA_ARGS__)
285#define VOLK_graph_size(...) VOLK_graph_size_txn (NULL, __VA_ARGS__)
300 void *txn,
const VOLK_Graph *gr,
const VOLK_Triple *spo);
303#define VOLK_graph_contains(...) VOLK_graph_contains_txn (NULL, __VA_ARGS__)
320#define VOLK_graph_add_init(...) VOLK_graph_add_init_txn (NULL, __VA_ARGS__)
347 void *txn, VOLK_Graph *gr,
VOLK_Triple *
const *trp,
size_t *
ct);
350#define VOLK_graph_add(...) VOLK_graph_add_txn (NULL, __VA_ARGS__)
370#define VOLK_graph_remove(...) VOLK_graph_remove_txn (NULL, __VA_ARGS__)
399#define VOLK_graph_lookup(...) VOLK_graph_lookup_txn (NULL, __VA_ARGS__)
463 void *txn,
const VOLK_Graph *gr,
const VOLK_Term *t,
468#define VOLK_graph_connections(...) \
469 VOLK_graph_connections_txn (NULL, __VA_ARGS__)
490 void *txn,
const VOLK_Graph *gr,
495#define VOLK_graph_term_set(...) VOLK_graph_term_set_txn (NULL, __VA_ARGS__)
511#define VOLK_graph_unique_terms(...) \
512 VOLK_graph_unique_terms_txn (NULL, __VA_ARGS__)
527#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.
bool VOLK_graph_contains_txn(void *txn, const VOLK_Graph *gr, const VOLK_Triple *spo)
Whether a graph contains a triple.
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.
size_t VOLK_graph_size_txn(void *txn, const VOLK_Graph *gr)
Number of triples 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.
VOLK_LinkMap * VOLK_graph_connections_txn(void *txn, const VOLK_Graph *gr, const VOLK_Term *t, const VOLK_LinkType type)
Get term pairs connected to a term 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_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_rc VOLK_graph_set_uri_txn(void *txn, VOLK_Graph *gr, const char *uri_str)
VOLK_Store * VOLK_graph_store(const VOLK_Graph *gr)
Underlying graph store handle.
VOLK_TermSet * VOLK_graph_unique_terms_txn(void *txn, const VOLK_Graph *gr, VOLK_TriplePos pos)
Get all unique subjcts, predicates, or objects in a graph.
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_TermSet * VOLK_graph_term_set_txn(void *txn, 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_Term * VOLK_bnode_add_collection(VOLK_GraphIterator *it, VOLK_TermSet *ts)
Add triples for an anonymous collection to a graph.
bool VOLK_graph_equals_txn(void *txn, const VOLK_Graph *gr1, const VOLK_Graph *gr2)
Compare two graphs.
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_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.
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.