3.3.7 Graph manipulation
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog Semantic Web Library 3.0
        • Two RDF APIs
          • library(semweb/rdf_db): The RDF database
            • Graph manipulation
              • rdf_create_graph/1
              • rdf_unload_graph/1
              • rdf_graph_property/2
              • rdf_set_graph/2
Availability::- use_module(library(semweb/rdf_db)).
Source[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 the graph was loaded from Source.
triples(Count)
True when Count is the number of triples in Graph.

Additional graph properties can be added by defining rules for the multifile predicate property_of_graph/2. Currently, the following extensions are defined:

  • library(semweb/rdf_persistency)
    persistent(Boolean)
    Boolean is true if the graph is persistent.