- open_memory_store(-Store:store) is det
- Opens an in-memory store and unifies it with Store.
- Arguments:
-
Store | - the returned in-memory store. |
- open_directory_store(+Path:text, -Store:store) is det
- Opens a store backed by a directory, and unifies it with Store.
This predicate does not check if the directory actually exists, but
other store-related predicates will error when used with a store
backed by a non-existent directory.
- Arguments:
-
Path | - a file system path to the store directory. This can be either absolute and relative. |
Store | - the returned directory store. |
- create_named_graph(+Store:store, +Name:text, -Graph:named_graph) is det
- Create a new named graph with the given name, and unifies it with Graph.
- Arguments:
-
Store | - the store to create the graph in. |
Name | - the name which the new graph should have. |
Graph | - the returned named graph. |
- throws
- - if a graph with the given name already exists.
- open_named_graph(+Store:store, +Name:text, -Graph:named_graph) is semidet
- Opens an existing named graph with the given name.
Fails if no graph with that name exists.
- Arguments:
-
Store | - the store to create the graph in. |
Name | - the name of the graph to be opened. |
Graph | - the returned named graph. |
- delete_named_graph(+Store:store, +Name:text) is semidet
- Deletes an existing named graph with the given name.
Fails if no graph with that name exists.
- Arguments:
-
Store | - the store to create the graph in. |
Name | - the name of the graph to be opened. |
- head(+Graph:named_graph, -Layer:layer) is semidet
- Retrieve the layer that a named graph points at.
This is the equivalent of opening a read transaction with snapshot isolation on a named graph.
Fails if the given graph has no head yet.
- Arguments:
-
Graph | - the named graph to retrieve the head layer from. |
Layer | - the returned head layer. |
- head(+Graph:named_graph, -Layer:layer, -Version:version) is semidet
- Retrieve the layer that a named graph points at and retrieve the version.
This is the equivalent of opening a read transaction with snapshot isolation on a named graph.
Fails if the given graph has no head yet.
- Arguments:
-
Graph | - the named graph to retrieve the head layer from. |
Layer | - the returned head layer. |
Version | - the version of the label. |
- nb_set_head(+Graph:named_graph, +Layer:layer) is semidet
- Set the given layer as the new head of the given graph.
Fails if the new layer is not a proper child of the current head.
This predicate does not support backtracking.
- Arguments:
-
Graph | - the named graph to set the head layer of. |
Layer | - the layer to make the new head of the graph. |
- open_write(+Store_Or_Layer:term, -Builder:layer_builder) is det
- Creates a layer builder from either a parent layer, or a store.
When Store_Or_Layer is a store, the resulting builder will create a
base layer.
When Store_Or_Layer is a layer, the resulting builder will create a
child layer whose parent is the given layer.
- Arguments:
-
Store_Or_layer | - a store when creating a new base layer, or the parent layer when creating a child layer. |
Builder | - a layer builder to create the new layer. |
- nb_apply_delta(+Builder:layer_builder, +Layer:layer) is det
- Add and remove all additions and removals from Layer into Builder
- Arguments:
-
Builder | - the layer builder to make changes to. |
Layer | - the layer that will apply changes from. |
- throws
- - if the builder has already been committed.
- nb_apply_diff(+Builder:layer_builder, +Layer:layer) is det
- Make whatever changes are necessary to Builder, to bring it in line
with Layer. Our final visabile state should be as layer, so we are
calculating the diff which should go into builder to do so.
- Arguments:
-
Builder | - the layer builder to make changes to. |
Layer | - the layer that we will view as a prototype. |
- throws
- - if the builder has already been committed.
- nb_commit(+Builder:layer_builder, -Layer:layer) is det
- Commit the layer builder, turning it into a layer.
- Arguments:
-
Builder | - the layer builder to commit. |
Layer | - the layer that will be returned. |
- throws
- - if the builder has already been committed.
- node_and_value_count(+Layer:layer, -Count:integer) is det
- Unify Count with the amount of nodes and values known to this layer,
including all parent layers.
- Arguments:
-
Layer | - the layer for which to get a count. |
Count | - the returned count. |
- predicate_count(+Layer:layer, -Count:integer) is det
- Unify Count with the amount of predicates known to this layer,
including all parent layers.
- Arguments:
-
Layer | - the layer for which to get a count. |
Count | - the returned count. |
- parent(+Layer:layer, +Parent:layer) is semidet
- Unifies Parent with the parent layer of Layer. Fails if that layer
has no parent.
- Arguments:
-
Layer | - the layer for which to do the parent lookup. |
Parent | - the retrieved parent layer. |
- squash(+Layer:layer, +Squash:layer) is semidet
- Squashes a layer-stack to create a new fresh layer
- Arguments:
-
Layer | - the layer for which to do the parent lookup. |
Parent | - the retrieved parent layer. |
- rollup(+Layer:layer) is semidet
- Produces a rollup of the current layer
- Arguments:
-
Layer | - the layer for which to do the parent lookup. |
- rollup_upto(+Layer:layer, +Upto:layer) is semidet
- Produces a rollup of the current layer upto (but not including)
the specified layer
- Arguments:
-
Layer | - the layer for which to do the parent lookup. |
Upto | - the layer at which to stop the rollup. |
- csv_builder(+Name:string, +Csv:path, +Builder:builder, +Options:options) is det
- Creates a layer with the contents of a csv as triples
- Arguments:
-
Name | - Name of the CSV object |
Csv | - The path to the csv to be loaded |
Builder | - The builder into which to place the CSV |
Layer | - The returned Layer |
Options | - A list containing any of the following:
data_prefix(Prefix) (default is "csv:///data#")
predicate_prefix(Prefix) (default is "csv:///schema#")
header(Bool) (Boolean to read a header, default true)
skip_header(Bool) (Skip the header regardless of presence,
default false)
|
- csv_builder(+Name:string, +Csv:path, +Builder:builder) is det
- Creates a layer with the contents of a csv as triples. Options are defaults.
- Arguments:
-
Name | - Name of the CSV object |
Csv | - The path to the csv to be loaded |
Builder | - The builder into which to place the CSV |
Layer | - The returned Layer |
- csv_iri(Name, Prefix, IRI) is det
- Creates a CSV IRI from a name and prefix
- layer_stack_names(+Layer:layer, -Stack:list) is det
- Creates a layer-id stack from a layer which contains all ancestor
layers.
- Arguments:
-
Layer | - The layer from which to obtain the stack. |
Stack | - A list of the layer-ids of all ancestors. |
- nb_add_triple(+Builder, +Subject, +Predicate, +Object) is semidet
- Add a triple to the builder.
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
- nb_force_set_head(Arg1, Arg2)
- nb_force_set_head(Arg1, Arg2, Arg3)
- nb_remove_triple(Arg1, Arg2, Arg3, Arg4)
- builder_committed(Arg1)
- subject_id(Arg1, Arg2, Arg3)
- predicate_id(Arg1, Arg2, Arg3)
- object_id(Arg1, Arg2, Arg3)
- id_triple(Arg1, Arg2, Arg3, Arg4)
- triple(Arg1, Arg2, Arg3, Arg4)
- id_triple_addition(Arg1, Arg2, Arg3, Arg4)
- triple_addition(Arg1, Arg2, Arg3, Arg4)
- id_triple_removal(Arg1, Arg2, Arg3, Arg4)
- triple_removal(Arg1, Arg2, Arg3, Arg4)
- sp_card(Arg1, Arg2, Arg3, Arg4)
- layer_addition_count(Arg1, Arg2)
- layer_removal_count(Arg1, Arg2)
- layer_total_addition_count(Arg1, Arg2)
- layer_total_removal_count(Arg1, Arg2)
- layer_total_triple_count(Arg1, Arg2)
- layer_to_id(Arg1, Arg2)
- store_id_layer(Arg1, Arg2, Arg3)
- pack_export(Arg1, Arg2, Arg3)
- pack_layerids_and_parents(Arg1, Arg2)
- pack_import(Arg1, Arg2, Arg3)
- csv_builder(Arg1, Arg2, Arg3, Arg4, Arg5)
- count_layer_stack_size(Arg1, Arg2)
- imprecise_rollup_upto(Arg1, Arg2)
- layer_equals(Arg1, Arg2)