Enumerating objects by role
- [nondet]rdf_subject(?S)
- True when S is a currently known subject, i.e. it
appears in the subject position of some visible triple. The predicate is
semidet if S is ground.
- [nondet]rdf_predicate(?P)
- True when P is a currently known predicate, i.e. it appears
in the predicate position of some visible triple. The predicate is
semidet if P is ground.
- [nondet]rdf_object(?O)
- True when O is a currently known object, i.e. it appears in
the object position of some visible triple. If Term is ground, it is
pre-processed as the object argument of rdf_assert/3
and the predicate is semidet.
- [nondet]rdf_node(?T)
- True when T appears in the subject or object position of a
known triple, i.e., is a node in the RDF graph.
- [nondet]rdf_graph(?Graph)
- True when Graph is an existing graph.
Enumerating objects by type
- [nondet]rdf_literal(?Term)
- True if Term is a known literal. If Term is
ground, it is pre-processed as the object argument of rdf_assert/3
and the predicate is semidet.
- [nondet]rdf_bnode(?BNode)
- True if BNode is a currently known blank node. The predicate
is
semidet if BNode is ground.
- [nondet]rdf_iri(?IRI)
- True if IRI is a current IRI. The predicate is semidet
if IRI is ground.
- [nondet]rdf_name(?Name)
- True if Name is a current IRI or literal. The predicate is
semidet if Name is ground.
- [nondet]rdf_term(?Term)
- True if Term appears in the RDF database. Term is
either an IRI, literal or blank node and may appear in any position of
any triple. If Term is ground, it is pre-processed as the
object argument of rdf_assert/3
and the predicate is semidet.
Testing objects types
- [semidet]rdf_is_iri(@IRI)
- 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).
- [semidet]rdf_is_bnode(@Term)
- True if Term is an RDF blank node identifier.
A blank node is represented by an atom that starts with
_:
.
Success of this goal does not imply that the blank node is present in
the database (see rdf_bnode/1
for that).
For backwards compatibility, atoms that are represented with an atom
that starts with __
are also considered to be a blank node.
- [semidet]rdf_is_literal(@Term)
- True if Term is an RDF literal term.
An RDF literal term is of the form String@LanguageTag
or
Value^^Datatype
.
Success of this goal does not imply that the literal is well-formed
or that it is present in the database (see
rdf_literal/1 for that).
- [semidet]rdf_is_name(@Term)
- True if Term is an RDF Name, i.e., an IRI or literal.
Success of this goal does not imply that the name is well-formed or
that it is present in the database (see
rdf_name/1 for that).
- [semidet]rdf_is_object(@Term)
- True if Term can appear in the object position of a triple.
Success of this goal does not imply that the object term in
well-formed or that it is present in the database (see
rdf_object/1 for that).
Since any RDF term can appear in the object position, this is
equaivalent to rdf_is_term/1.
- [semidet]rdf_is_predicate(@Term)
- 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.
- [semidet]rdf_is_subject(@Term)
- 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)
.
- [semidet]rdf_is_term(@Term)
- True if Term can be used as an RDF term, i.e., if Term
is either an IRI, a blank node or an RDF literal.
Success of this goal does not imply that the RDF term is present in
the database (see rdf_term/1 for
that).