You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/odmltordf.rst
+103Lines changed: 103 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,3 +111,106 @@ odmlToRDF searches for odML files within a provided SEARCHDIR and converts them
111
111
Usage: odmltordf [-r] [-o OUT] SEARCHDIR
112
112
113
113
The command line option ``-r`` enables recursive search, ``-o OUT`` specifies a dedicated output folder for the created output files.
114
+
115
+
116
+
Advanced features
117
+
=================
118
+
119
+
RDF subclassing of odml.Section.type
120
+
------------------------------------
121
+
122
+
By default a set of pre-defined odml.Section.types will export Sections not as an odml:Section but as a specific RDF subclass of an odml:Section. This is meant to simplify SPARQL query searches on graph databases that contain odml specific RDF.
123
+
124
+
As an example an odml.Section normally gets exported as RDF class type odml-rdf:Section::
In an RDF query this can now be searched for directly by asking for RDF class "odml-rdf:Protocol" instead of asking for RDF class "odml-rdf:Section" with type "Protocol".
133
+
134
+
On install the core library already provides a list of odml.Section.type mappings to RDF subclasses. On initialisation the ``RDFWriter`` loads all subclasses that are available and uses them by default when exporting an odML document to RDF. The available terms and the mappings of odml.Section.types to RDF subclasses can be viewed by accessing the ``section_subclasses`` attribute of an initialised ``RDFWriter``::
135
+
136
+
rdf_export = RDFWriter(doc)
137
+
rdf_export.section_subclasses
138
+
139
+
This export also adds all used subclass definitions to the resulting file to enable query reasoners to makes sense of the introduced subclasses upon a query.
140
+
141
+
Currently the following mappings of ``odml.Section.type`` values to odml-rdf:Section subclass are available::
0 commit comments