The hooks below are used to add new RDF file formats and sources from
which to load data to the library. They are used by the modules
described below and distributed with the package. Please examine the
source-code if you want to add new formats or locations.
library(library(semweb/turtle))
- Load files in the Turtle format. See section
5.
library(library(semweb/rdf_zlib_plugin))
- Load gzip compressed files transparently. See
section 4.2.
library(library(semweb/rdf_http_plugin))
- Load RDF documents from HTTP servers. See section
4.3.
library(library(http/http_ssl_plugin))
- May be combined with
library(library(semweb/rdf_http_plugin))
to load RDF from HTTPS servers.
library(library(semweb/rdf_persistency))
- Provide persistent backup of the triple store.
library(library(semweb/rdf_cache))
- Provide caching RDF sources using fast load/safe files to speedup
restarting an application.
- rdf_db:rdf_open_hook(+Input,
-Stream, -Format)
- Open an input. Input is one of
file(+Name)
,
stream(+Stream)
or url(Protocol, URL)
. If this
hook succeeds, the RDF will be read from Stream using rdf_load_stream/3.
Otherwise the default open functionality for file and stream are used.
- rdf_db:rdf_load_stream(+Format,
+Stream, +Options)
- Actually load the RDF from Stream into the RDF database.
Format describes the format and is produced either by
rdf_input_info/3
or rdf_file_type/2.
- rdf_db:rdf_input_info(+Input,
-Modified, -Format)
- Gather information on Input. Modified is the last
modification time of the source as a POSIX time-stamp (see time_file/2).
Format is the RDF format of the file. See rdf_file_type/2
for details. It is allowed to leave the output variables unbound.
Ultimately the default modified time is‘0’and the format is
assumed to be
xml
.
- rdf_db:rdf_file_type(?Extension,
?Format)
- True if Format is the default RDF file format for files with
the given extension. Extension is lowercase and without a’.’.
E.g.
owl
. Format is either a built-in format (xml
or triples
) or a format understood by the rdf_load_stream/3
hook.
- rdf_db:url_protocol(?Protocol)
- True if Protocol is a URL protocol recognised by rdf_load/2.