Availability:
:- use_module(library(semweb/turtle)).
rdf(Subject, Predicate, Object [, Graph])
The representation is consistent with the SWI-Prolog RDF/XML and ntriples parsers. Provided options are:
- base_uri(+BaseURI)
- Initial base URI. Defaults to file://<file> for loading files.
- anon_prefix(+Prefix)
- Blank nodes are generated as <Prefix>1, <Prefix>2,
etc. If Prefix is not an atom blank nodes are generated as
node(1)
,node(2)
, ... - format(+Format)
- One of
auto
(default),turtle
ortrig
. The auto mode switches to TriG format of there is a{
before the first triple. Finally, of the format is explicitly stated asturtle
and the file appears to be a TriG file, a warning is printed and the data is loaded while ignoring the graphs. - resources(URIorIRI)
- Officially, Turtle resources are IRIs. Quite a few applications however
send URIs. By default we do URI
->
IRI mapping because this rarely causes errors. To force strictly conforming mode, passiri
. - prefixes(-Pairs)
- Return encountered prefix declarations as a list of Alias-URI
- namespaces(-Pairs)
- Same as
prefixes(Pairs)
. Compatibility to rdf_load/2. - base_used(-Base)
- Base URI used for processing the data. Unified to
[]
if there is no base-uri. - on_error(+ErrorMode)
- In
warning
(default), print the error and continue parsing the remainder of the file. Iferror
, abort with an exception on the first error encountered. - error_count(-Count)
- If
on_error(warning)
is active, this option cane be used to retrieve the number of generated errors.
Input | is one of stream(Stream) , atom(Atom) ,
a http ,
https or file url or a filename specification
as accepted by absolute_file_name/3. |