| Rasqal RDF Query Library Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
rasqal_data_graph; rasqal_data_graph* rasqal_new_data_graph (rasqal_world *world,raptor_uri *uri,raptor_uri *name_uri,int flags); void rasqal_free_data_graph (rasqal_data_graph *dg); enum rasqal_data_graph_flags; int rasqal_data_graph_print (rasqal_data_graph *dg,FILE *fh);
Data graphs are used in the query to describe RDF graphs that can be used to query against. The graphs can be used either with raptor_uri to name the graph, or without a name. The query language determines which graphs are used in the query.
typedef struct {
rasqal_world* world;
raptor_uri* uri;
raptor_uri* name_uri;
int flags;
} rasqal_data_graph;
A source of RDF data for querying.
The uri is the original source (base URI) of the content. It may
also have an additional name name_uri as long as flags is
RASQAL_DATA_GRAPH_NAMED
rasqal_world * |
rasqal_world object |
raptor_uri * |
source URI |
raptor_uri * |
name of graph for RASQAL_DATA_GRAPH_NAMED
|
RASQAL_DATA_GRAPH_NAMED or RASQAL_DATA_GRAPH_BACKGROUND
|
rasqal_data_graph* rasqal_new_data_graph (rasqal_world *world,raptor_uri *uri,raptor_uri *name_uri,int flags);
Constructor - create a new rasqal_data_graph.
The name_uri is only used when the flags are RASQAL_DATA_GRAPH_NAMED.
|
rasqal_world object |
|
source URI |
|
name of graph (or NULL) |
|
RASQAL_DATA_GRAPH_NAMED or RASQAL_DATA_GRAPH_BACKGROUND
|
Returns : |
a new rasqal_data_graph or NULL on failure. |
void rasqal_free_data_graph (rasqal_data_graph *dg);
Destructor - destroy a rasqal_data_graph object.
|
rasqal_data_graph object |
typedef enum {
RASQAL_DATA_GRAPH_NONE = 0,
RASQAL_DATA_GRAPH_NAMED = 1,
RASQAL_DATA_GRAPH_BACKGROUND = 2,
} rasqal_data_graph_flags;
Flags for the type of rasqal_data_graph.
These are used by rasqal_query_add_data_graph(). See rasqal_data_graph.
int rasqal_data_graph_print (rasqal_data_graph *dg,FILE *fh);
Print a Rasqal data graph in a debug format.
The print debug format may change in any release.
|
rasqal_data_graph object |
|
the FILE* handle to print to |
Returns : |
non-0 on failure |