AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog Semantic Web Library 3.0
        • Two RDF APIs
          • library(semweb/rdf11): The RDF database
            • Modifying the RDF store
              • rdf_assert/3
              • rdf_assert/4
              • rdf_retractall/3
              • rdf_retractall/4
              • rdf_create_bnode/1
Availability::- use_module(library(semweb/rdf11)).
Source[det]rdf_assert(+S, +P, +O)
[det]rdf_assert(+S, +P, +O, +G)
Assert a new triple. If O is a literal, certain Prolog terms are translated to typed RDF literals. These conversions are described with rdf_canonical_literal/2.

If a type is provided using Value^^Type syntax, additional conversions are performed. All types accept either an atom or Prolog string holding a valid RDF lexical value for the type and xsd:float and xsd:double accept a Prolog integer.

Availability::- use_module(library(semweb/rdf_db)).
Source[det]rdf_assert(+Subject, +Predicate, +Object, +Graph)
As rdf_assert/3, adding the predicate to the indicated named graph.
Graph is either the name of a graph (an atom) or a term Graph:Line, where Line is an integer that denotes a line number.