Did you know ... Search Documentation:
Pack prolog_rdf -- prolog/rdf_term.pl
PublicShow source
 rdf_atom_node(+Atom:atom, +Node:rdf_node) is semidet
rdf_atom_node(+Atom:atom, -Node:rdf_node) is det
rdf_atom_node(-Atom:atom, +Node:rdf_node) is det
Parses the given Atom in order to extract the encoded RDF node. The following syntactic forms are supported:
  1. RDF nodes defined by the N-Triples 1.1 grammar (blank nodes, IRIs, and literals).
  2. Turtle 1.1 prefix notation for IRIs.
 rdf_atom_predicate(+Atom:atom, +Predicate:iri) is semidet
rdf_atom_predicate(+Atom:atom, -Predicate:iri) is det
rdf_atom_predicate(-Atom:atom, +Predicate:iri) is det
 rdf_base_iri(+BaseIri:iri) is semidet
rdf_base_iri(-BaseIri:iri) is det
 rdf_canonical_lexical_form(+Datatype:iri, +LexicalForm:atom, -CanonicaldLexicalForm:atom) is det
 rdf_canonical_literal(+Literal:rdf_literal, -CanonicaldLiteral:rdf_literal) is det
 rdf_container_membership_property(+Property:iri) is semidet
rdf_container_membership_property(-Property:iri) is multi
 rdf_container_membership_property(+Property:iri, +Index:positive_integer) is semidet
rdf_container_membership_property(+Property:iri, -Index:positive_integer) is det
rdf_container_membership_property(-Property:iri, +Index:positive_integer) is det
rdf_container_membership_property(-Property:iri, -Index:positive_integer) is multi
Succeeds if P is the Nth container membership property.
 rdf_create_iri(+Alias:atom, +TermOrTerms:or([term,list(term)]), -Iri:iri) is det
 rdf_hash_iri(+Alias:atom, +Term:term, -Iri:iri) is det
 rdf_is_bnode_iri(@Term) is semidet
 rdf_is_name(@Term) is semidet
 rdf_is_numeric_literal(@Term) is semidet
 rdf_is_object(@Term) is semidet
 rdf_is_skip_node(@Term) is semidet
 rdf_is_term(@Term) is semidet
 rdf_language_tagged_string(+LTag:atom, +LexicalForm:atom, -Literal:rdf_literal) is det
rdf_language_tagged_string(-LTag:atom, -LexicalForm:atom, +Literal:rdf_literal) is det
 rdf_lexical_value(+Datatype:iri, +LexicalForm:atom, -Value:term) is det
rdf_lexical_value(+Datatype:iri, -LexicalForm:atom, +Value:term) is det
Translate between a value (`Value') and its serialization, according to a given datatype IRI (`Datatype'), into a lexical form (`LexicalForm').
 rdf_literal(+Datatype:iri, +LTag:atom, +LexicalForm:atom, +Literal:rdf_literal) is semidet
rdf_literal(+Datatype:iri, +LTag:atom, +LexicalForm:atom, -Literal:rdf_literal) is det
rdf_literal(-Datatype:iri, -LTag:atom, -LexicalForm:atom, +Literal:rdf_literal) is det
Compose/decompose literals.
 rdf_literal_datatype_iri(+Literal:rdf_literal, +Datatype:iri) is semidet
rdf_literal_datatype_iri(+Literal:rdf_literal, -Datatype:iri) is det
 rdf_literal_dwim(+Dwim:term, +Literal:rdf_literal) is semidet
rdf_literal_dwim(+Dwim:term, -Literal:rdf_literal) is semidet
Allows literal terms to be created based on various simplified inputs:
Input formatDatatype IRI
-----------------------------+------------------------
boolean(LexicalForm)xsd:boolean
date(Y,Mo,Da)xsd:date
date_time(Y,Mo,D,H,Mi,S)xsd:dateTime
date_time(Y,Mo,D,H,Mi,S,TZ)xsd:dateTime
day(Da)xsd:gDay
decimal(N)xsd:decimal
double(N)xsd:double
duration(S)xsd:dayTimeDuration
duration(Mo,S)xsd:duration
floatxsd:double
float(N)xsd:float
integerxsd:integer
integer(N)xsd:integer
literal(lang(LTag,Lex))rdf:langString
literal(type(D,Lex))Datatype
month(Mo)xsd:gMonth
month_day(Mo,Da)xsd:gMonthDay
nonneg(N)xsd:nonNegativeInteger
oneof([false,true])xsd:boolean
pair(string,list(atom))rdf:langString
positive_integer(N)xsd:positiveInteger
stringxsd:string
string(atom)xsd:string
time(H,Mi,S)xsd:time
uri(Uri)xsd:anyURI
year(Y)xsd:gYear
year_month(Y,Mo)xsd:gYearMonth
LexicalForm^^DatatypeIriDatatypeIri
LexicalForm@LanguageTagrdf:langstring
 rdf_literal_lexical_form(+Literal:rdf_literal, +LexicalForm:atom) is semidet
rdf_literal_lexical_form(+Literal:rdf_literal, -LexicalForm:atom) is det
 rdf_literal_value(+Literal:rdf_literal, -Value:term) is det
Notice that languages-tagged strings do not have a value.
 rdf_literal_value(+Literal:rdf_literal, -Datatype:iri, -Value:term) is det
rdf_literal_value(-Literal:rdf_literal, +Datatype:iri, +Value:term) is det
 rdf_node_dwim(+Dwim:term, +Node:rdf_node) is semidet
rdf_node_dwim(+Dwim:term, -Node:rdf_node) is semidet
Supports the Input formats of rdf_literal_dwim/2.
 rdf_predicate_dwim(+Dwim:term, +Predicate:iri) is semidet
rdf_predicate_dwim(+Dwim:term, -Predicate:iri) is det
 rdf_triple_term(+Triple:rdf_triple, +Term:rdf_term) is semidet
rdf_triple_term(+Triple:rdf_triple, -Term:rdf_term) is multi
 rdf_typed_literal(+Datatype:iri, +LexicalForm:atom, +Literal:rdf_literal) is semidet
rdf_typed_literal(+Datatype:iri, +LexicalForm:atom, -Literal:rdf_literal) is det
rdf_typed_literal(-Datatype:iri, -LexicalForm:atom, +Literal:rdf_literal) is det
 well_known_iri(-Iri:iri) is det
 well_known_iri(+Segments:list(atom), +Iri:iri) is semidet
well_known_iri(+Segments:list(atom), -Iri:iri) is det
well_known_iri(-Segments:list(atom), +Iri:iri) is det

Re-exported predicates

The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.

 rdf_create_bnode(--BNode)
Create a new BNode. A blank node is an atom starting with _:. Blank nodes generated by this predicate are of the form _:genid followed by a unique integer.
 rdf_is_iri(@IRI) is semidet
True if IRI is an RDF IRI term.

For performance reasons, this does not check for compliance to the syntax defined in RFC 3987. This checks whether the term is (1) an atom and (2) not a blank node identifier.

Success of this goal does not imply that the IRI is present in the database (see rdf_iri/1 for that).

 rdf_is_predicate(@Term) is semidet
True if Term can appear in the predicate position of a triple.

Success of this goal does not imply that the predicate term is present in the database (see rdf_predicate/1 for that).

Since only IRIs can appear in the predicate position, this is equivalent to rdf_is_iri/1.

 rdf_is_subject(@Term) is semidet
True if Term can appear in the subject position of a triple.

Only blank nodes and IRIs can appear in the subject position.

Success of this goal does not imply that the subject term is present in the database (see rdf_subject/1 for that).

Since blank nodes are represented by atoms that start with `_:` and an IRIs are atoms as well, this is equivalent to atom(Term).

 rdf_is_bnode(+Id)
Tests if a resource is a blank node (i.e. is an anonymous resource). A blank node is represented as an atom that starts with _:. For backward compatibility reason, __ is also considered to be a blank node.
See also
- rdf_bnode/1.
 rdf_is_literal(@Term) is semidet
True if Term is an RDF literal object. Currently only checks for groundness and the literal functor.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 assert_prefixes(Arg1)
 rdf_prefix(Arg1)
 rdf_prefix_append(Arg1, Arg2)
 rdf_prefix_append(Arg1, Arg2, Arg3)
 rdf_prefix_iri(Arg1, Arg2, Arg3)
 rdf_prefix_map(Arg1)
 rdf_prefix_maplist(Arg1, Arg2)
 rdf_prefix_maplist(Arg1, Arg2, Arg3)
 rdf_prefix_maplist(Arg1, Arg2, Arg3, Arg4)
 rdf_prefix_member(Arg1, Arg2)
 rdf_prefix_memberchk(Arg1, Arg2)
 rdf_prefix_selectchk(Arg1, Arg2, Arg3)
 rdf_register_prefix(Arg1)
 rdf_register_prefixes
 rdf_equal(Arg1, Arg2)
 rdf_prefix(Arg1, Arg2)
 rdf_prefix_iri(Arg1, Arg2)
 rdf_prefix_term(Arg1, Arg2)
 rdf_prefix_any(Arg1, Arg2)
 rdf_register_prefix(Arg1, Arg2)
 rdf_register_prefix(Arg1, Arg2, Arg3)
 rdf_meta(Arg1)