Rasqal RDF Query Library Manual | ||||
---|---|---|---|---|
Top | Description |
rasqal_data_graph; rasqal_data_graph * rasqal_new_data_graph_from_data_graph (rasqal_data_graph *dg
); rasqal_data_graph * rasqal_new_data_graph_from_iostream (rasqal_world *world
,raptor_iostream *iostr
,raptor_uri *base_uri
,raptor_uri *name_uri
,unsigned int flags
,const char *format_type
,const char *format_name
,raptor_uri *format_uri
); rasqal_data_graph * rasqal_new_data_graph_from_uri (rasqal_world *world
,raptor_uri *uri
,raptor_uri *name_uri
,unsigned int flags
,const char *format_type
,const char *format_name
,raptor_uri *format_uri
); 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; unsigned int flags; char* format_type; char* format_name; raptor_uri* format_uri; raptor_iostream* iostr; raptor_uri* base_uri; int usage; } rasqal_data_graph;
A source of RDF data for querying.
If iostr
is present, the graph can be constructed by parsing the
iostream and using base_uri
as a base uri. Otherwise the graph
can be constructed from the graph at URI uri
.
In either case the name_uri
is the graph name as long as flags
is RASQAL_DATA_GRAPH_NAMED
rasqal_world * |
rasqal_world object |
source URI | |
name of graph for RASQAL_DATA_GRAPH_NAMED
|
|
RASQAL_DATA_GRAPH_NAMED or RASQAL_DATA_GRAPH_BACKGROUND
|
|
MIME Type of data format at uri (or NULL) |
|
Raptor parser Name of data format at uri (or NULL) |
|
URI of data format at uri (or NULL) |
|
Raptor iostream for content, overriding uri if present (or NULL) |
|
base URI for reading from iostream | |
usage count of this object |
rasqal_data_graph * rasqal_new_data_graph_from_data_graph
(rasqal_data_graph *dg
);
Copy Constructor - create a new rasqal_data_graph object from an existing rasqal_data_graph object.
|
rasqal_data_graph object to copy or NULL |
Returns : |
a new rasqal_data_graph object or NULL if dg was NULL. |
rasqal_data_graph * rasqal_new_data_graph_from_iostream (rasqal_world *world
,raptor_iostream *iostr
,raptor_uri *base_uri
,raptor_uri *name_uri
,unsigned int flags
,const char *format_type
,const char *format_name
,raptor_uri *format_uri
);
Constructor - create a new rasqal_data_graph from iostream content
The name_uri
is used when the flags are RASQAL_DATA_GRAPH_NAMED
.
The base_uri
is used to provide the Raptor parser a base URI. If
a base URI is required but none is given, the parsing will fail
and the query that uses this data source will fail.
|
rasqal_world object |
|
source graph format iostream |
|
base URI for iostream content |
|
name of graph (or NULL) |
|
RASQAL_DATA_GRAPH_NAMED or RASQAL_DATA_GRAPH_BACKGROUND
|
|
MIME Type of data format at uri (or NULL) |
|
Raptor parser Name of data format at uri (or NULL) |
|
URI of data format at uri (or NULL) |
Returns : |
a new rasqal_data_graph or NULL on failure. |
rasqal_data_graph * rasqal_new_data_graph_from_uri (rasqal_world *world
,raptor_uri *uri
,raptor_uri *name_uri
,unsigned int flags
,const char *format_type
,const char *format_name
,raptor_uri *format_uri
);
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
|
|
MIME Type of data format at uri (or NULL) |
|
Raptor parser Name of data format at uri (or NULL) |
|
URI of data format at uri (or NULL) |
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_new_data_graph_from_uri()
and
rasqal_new_data_graph_from_iostream()
. 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 |
Navigation: Redland Home Page