63
Central to this library is the module \file{rdf_db.pl}, providing
64
storage and basic querying for RDF triples. This triple store is filled
65
using the RDF parser realised by \file{rdf.pl}. The storage module can
66
quickly save and load (partial) databases. The modules \file{rdfs.pl}
67
and \file{owl.pl} add querying in terms of the more powerful RDFS and
68
OWL languages. Module \file{rdf_edit.pl} adds editing, undo, journaling
69
and change-forwarding. Finally, a variety of XPCE modules visualise and
70
edit the database. Figure \figref{modules} summarised the modular
63
Central to this library is the module \pllib{semweb/rdf_db.pl},
64
providing storage and basic querying for RDF triples. This triple store
65
is filled using the RDF parser realised by \pllib{rdf.pl}. The storage
66
module can quickly save and load (partial) databases. The modules
67
\pllib{semweb/rdfs.pl} and \pllib{semweb/owl.pl} add querying in terms
68
of the more powerful RDFS and OWL languages. Module
69
\pllib{semweb/rdf_edit.pl} adds editing, undo, journaling and
70
change-forwarding. Finally, a variety of XPCE modules visualise and edit
71
the database. Figure \figref{modules} summarised the modular design.
73
73
\postscriptfig[width=0.8\linewidth]{modules}
74
74
{Modules for the Semantic Web library}
657
657
for literals with a \emph{different} language identifier. Please note
658
658
that this option will cause all literals without language tag to be
659
659
interpreted using \arg{XMLLang}.
661
\termitem{namespaces}{+List}
662
Explicitely specify saved namespace declarations. See rdf_save_header/2
663
option namespaces for details.
660
664
\end{description}
662
666
\predicate{rdf_graph}{1}{?DB}
1792
1796
\label{sec:rdfs}
1794
1798
\index{RDF-Schema}%
1795
The \pllib{rdfs} library adds interpretation of the triple store in
1796
terms of concepts from RDF-Schema (RDFS). There are two ways to provide
1797
support for more high level languages in RDF. One is to view such
1798
languages as a set of \jargon{entailment rules}. In this model the
1799
rdfs library would provide a predicate \predref{rdfs}{3} providing
1800
the same functionality as rdf/3 on union of the raw graph and triples
1801
that can be derived by applying the RDFS entailment rules.
1799
The \pllib{semweb/rdfs} library adds interpretation of the triple store
1800
in terms of concepts from RDF-Schema (RDFS). There are two ways to
1801
provide support for more high level languages in RDF. One is to view
1802
such languages as a set of \jargon{entailment rules}. In this model the
1803
rdfs library would provide a predicate \predref{rdfs}{3} providing the
1804
same functionality as rdf/3 on union of the raw graph and triples that
1805
can be derived by applying the RDFS entailment rules.
1803
1807
Alternatively, RDFS provides a view on the RDF store in terms of
1804
1808
individuals, classes, properties, etc., and we can provide predicates
1805
1809
that query the database with this view in mind. This is the approach
1806
taken in the \pllib{rdfs.pl} library, providing calls like
1810
taken in the \pllib{semweb/rdfs.p}l library, providing calls like
1807
1811
\term{rdfs_individual_of}{?Resource, ?Class}.%
1808
1812
\footnote{The SeRQL language is based on querying the deductive
1809
1813
closure of the triple set. The SWI-Prolog SeRQL
2177
2181
\index{Sesame}\index{SeRQL}%
2178
2182
The SWI-Prolog SemWeb package is designed to provide access to the
2179
2183
Semantic Web languages from Prolog. It consists of the low level
2180
\file{rdf_db.pl} store with layers such as \file{rdfs.pl} to provide
2184
\file{rdf_db.pl} store with layers such as \pllib{semweb/rdfs.pl} to provide
2181
2185
more high level querying of a triple set with relations such as
2182
2186
rdfs_individual_of/2, rdfs_subclass_of/2, etc.
2183
2187
\url[SeRQL]{http://www.openrdf.org} is a semantic web query language