3.7 Graph manipulation
Many RDF stores turned triples into quadruples. This store is no exception, initially using the 4th argument to store the filename from which the triple was loaded. Currently, the 4th argument is the RDF named graph. A named graph maintains some properties, notably to track origin, changes and modified state.
- [det]rdf_create_graph(+Graph)
- Create an RDF graph without triples. Succeeds silently if the graph already exists.
- [det]rdf_unload_graph(+Graph)
- Remove Graph from the RDF store. Succeeds silently if the named graph does not exist.
- [nondet]rdf_graph_property(?Graph, ?Property)
- True when Property is a property of Graph. Defined
properties are:
- hash(Hash)
- Hash is the (MD5-)hash for the content of Graph.
- modified(Boolean)
- True if the graph is modified since it was loaded or
rdf_set_graph/2 was called
with
modified(false). - source(Source)
- The graph is loaded from the Source (a URL)
- source_last_modified(?Time)
- Time is the last-modified timestamp of Source at the moment that the graph was loaded from Source.
- triples(Count)
- True when Count is the number of triples in Graph.
- [det]rdf_set_graph(+Graph, +Property)
- Set properties of Graph. Defined properties are:
- modified(false)
- Set the modified state of Graph to false.