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.
- Load files in the Turtle format. See section 5.
- Load gzip compressed files transparently. See section 4.2.
- Load RDF documents from HTTP servers. See section 4.3.
- Provide persistent backup of the triple store.
- 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
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
- 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
owl. Format is either a built-in format (
triples) or a format understood by the rdf_load_stream/3 hook.
- True if Protocol is a URL protocol recognised by rdf_load/2.