A manifest file is an RDF file, often in
format, that provides meta-data about RDF resources. Often, a manifest
will describe RDF files in the current directory, but it can also
describe RDF resources at arbitrary URL locations. The RDF schema for
RDF library meta-data can be found in
namespace for the RDF library format is defined as
and abbreviated as
The schema defines three root classes: lib:Namespace, lib:Ontology and lib:Virtual, which we describe below.
- This is a subclass of owl:Ontology. It has two subclasses, lib:Schema
and lib:Instances. These three classes are currently processed equally.
The following properties are recognised on lib:Ontology:
- Title of the ontology. Displayed by rdf_list_library/0.
- Version of the ontology. Displayed by rdf_list_library/0.
- Ontologies imported. If rdf_load_library/2 is used to load this ontology, the ontologies referenced here are loaded as well. There are two subProperties: lib:schema and lib:instances with the obvious meaning.
- Defines the named graph into which the resource is loaded. If this ends
, the basename of each loaded file is appended to the given source. Defaults to the URL the RDF is loaded from.
- Defines the base for processing the RDF data. If not provided this defaults to the named graph, which in turn defaults to the URL the RDF is loaded from.
- Virtual ontologies do not refer to an RDF resource themselves. They only
import other resources. For example the W3C WordNet manifest defines
wn-fullas virtual resources. The lib:Virtual resource is used as a second rdf:type:
<wn-basic> a lib:Ontology ; a lib:Virtual ; ...
- Used by ClioPatria to combine this ontology and all data it imports into a node in the automatically generated datacloud.
- Defines a URL to be a namespace. The definition provides the preferred
mnemonic and can be referenced in the lib:providesNamespace and
lib:usesNamespace properties. The rdf_load_library/2
predicates registers encountered namespace mnemonics with rdf-db using
Typically namespace declarations use @prefix declarations. E.g.
@prefix lib: <http://www.swi-prolog.org/rdf/library/> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . [ a lib:Namespace ; lib:mnemonic "rdfs" ; lib:namespace rdfs: ] .
The VoID aims at resolving the same problem as the Manifest files described here. In addition, the VANN vocabulary provides the information about preferred namepaces prefixes. The RDF library manager can deal with VoID files. The following relations apply:
Linksetare similar to
lib:Ontology, but a VoID resource is always Virtual. I.e., the VoID URI itself never refers to an RDF document.
owl:importsand its lib specializations are replaced by
void:subset(referring to another VoID dataset) and
void:dataDump(referring to a concrete document).
- A description of the dataset is given using
- The RDF library recognises
lib:Cloudnode, which have no equivalent in VoID.
- The RDF library recognises
vann:preferredNamespaceUrias alternatives to its proprietary way for defining prefixes. The domain of these predicates is unclear. The library recognises them regardless of the domain. Note that the range of
vann:preferredNamespaceUriis a literal. A disadvantage of that is that the Turtle prefix declaration cannot be reused.
Currently, the RDF metadata is not stored in the RDF database. It is processed by low-level primitives that do not perform RDFS reasoning. In particular, this means that rdfs:supPropertyOf and rdfs:subClassOf cannot be used to specialise the RDF meta vocabulary.
The initial metadata file(s) are loaded into the system using rdf_attach_library/1.
- Load meta-data on RDF repositories from FileOrDirectory. If
the argument is a directory, this directory is processed recursively and
each for each directory, a file named
Manifest.rdfis loaded (in this order of preference).
Declared namespaces are added to the rdf-db namespace list. Encountered ontologies are added to a private database of
rdf_list_library.pl. Each ontology is given an identifier, derived from the basename of the URL without the extension. This, using the declaration below, the identifier of the declared ontology is
<wn-basic> a void:Dataset ; dcterms:title "Basic WordNet" ; ...
- List the available resources in the library. Currently only lists resources that have a dcterms:title property. See section 9.2 for an example.
It is possible for the initial set of manifests to refer to RDF files that are not covered by a manifest. If such a reference is encountered while loading or listing a library, the library manager will look for a manifest file in the directory holding the referenced RDF file and load this manifest. If a manifest is found that covers the referenced file, the directives found in the manifest will be followed. Otherwise the RDF resource is simply loaded using the current defaults.
- Same as
- rdf_list_library(+Id, +Options)
- Lists the resources that will be loaded if Id is handed to rdf_load_library/2. See rdf_attach_library/1 for how ontology identifiers are generated. In addition it checks the existence of each resource to help debugging library dependencies. Before doing its work, rdf_list_library/2 reloads manifests that have changed since they were loaded the last time. For HTTP resources it uses the HEAD method to verify existence and last modification time of resources.
- rdf_load_library(+Id, +Options)
- Load the given library. First rdf_load_library/2 will establish what resources need to be loaded and whether all resources exist. Than it will load the resources.