Data Graphs

Data Graphs — RDF graph sources for triples.

Functions

Types and Values

Description

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.

Functions

rasqal_new_data_graph_from_data_graph ()

rasqal_data_graph *
rasqal_new_data_graph_from_data_graph (rasqal_data_graph *dg);

Returns


rasqal_new_data_graph_from_iostream ()

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);

Returns


rasqal_new_data_graph_from_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);

Returns


rasqal_free_data_graph ()

void
rasqal_free_data_graph (rasqal_data_graph *dg);


rasqal_data_graph_print ()

int
rasqal_data_graph_print (rasqal_data_graph *dg,
                         FILE *fh);

Returns

Types and Values

rasqal_data_graph

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

Members

rasqal_world *world;

rasqal_world object

 

raptor_uri *uri;

source URI

 

raptor_uri *name_uri;

name of graph for RASQAL_DATA_GRAPH_NAMED

 

unsigned int flags;

RASQAL_DATA_GRAPH_NAMED or RASQAL_DATA_GRAPH_BACKGROUND

 

char *format_type;

MIME Type of data format at uri (or NULL)

 

char *format_name;

Raptor parser Name of data format at uri (or NULL)

 

raptor_uri *format_uri;

URI of data format at uri (or NULL)

 

raptor_iostream *iostr;

Raptor iostream for content, overriding uri if present (or NULL)

 

raptor_uri *base_uri;

base URI for reading from iostream

 

int usage;

usage count of this object

 

enum 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.

Members

RASQAL_DATA_GRAPH_NONE

Internal.

 

RASQAL_DATA_GRAPH_NAMED

Graphs with a source and name.

 

RASQAL_DATA_GRAPH_BACKGROUND

Graphs with a source only.