package rdf
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=fdca8ab06da34d9d76fe273f654ec6a1
sha512=fff3ad6cb5978e43ac3c509cc25a01d16be6e21b04df607e0595ec0e7226ba7b6e4e2ec86bbeae4aa3d6a181fa399c7c00a4b1c788ddc98486f5c8badf8867f7
doc/rdf/Rdf/Ds/index.html
Module Rdf.DsSource
Datasets.
A dataset is composed of:
- a default graph,
- a set of named graphs,
- a function to get a graph by its name,
- a function to add a graph.
type dataset = {default : Graph.graph;(*The default graph.
*)named : unit -> NameSet.t;(*The set of named graphs.
*)get_named : ?add:bool -> name -> Graph.graph option;(*The function to get a graph by its name, if present. It not, then if
*)addistrueand theaddfield provides a function to add a graph, a new graph is created, added to the dataset and returned. If name is a blank id, base IRI of created graph is an empty IRI, else it is thename.add : (?name:name -> Graph.graph -> Graph.graph) option;(*Add a graph to dataset, if dataset allows it. Use the returned graph to add triples in the dataset, because if a graph for the same name already existed in the dataset, triples of the given graph are added to the existing graph. If optional parameter
*)nameis not provided, the base IRI of graph is used.
}A dataset.
simple_dataset graph returns a dataset with graph as default graph.
val dataset :
?add:(?name:name -> Graph.graph -> Graph.graph) ->
?get_named:(?add:bool -> name -> Graph.graph option) ->
?named:(unit -> NameSet.t) ->
Graph.graph ->
datasetdataset graph returns a dataset with graph as default graph.
mem_dataset g create a new in-memory dataset with given graph g as default graph. named, get_named and add functions are implemented to fulfill dataset API.
merge_to_default dataset add triples of all named graphs to dataset.default.
graphs dataset returns the list of (optional name, graph) from dataset.
iter f dataset calls f for each graph in the dataset, with optional name and graph as argument.
fold f acc dataset folds on dataset's graphs with f called with optional name and graph as argument.
type diff = | Cardinals of int * int| Missing_graph of name| Graph_diff of name option * Graph.diff
Differences when checking if two datasets are isomorphic.