Skip to content

Commit f91d56a

Browse files
authored
Merge pull request #17 from paulovn/feature/format-refactoring
Feature/format refactoring
2 parents e06ae94 + 25f0def commit f91d56a

File tree

8 files changed

+40277
-35266
lines changed

8 files changed

+40277
-35266
lines changed

README.rst

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ needs write permissions in the system directories).
4444

4545
Additionally, the ``--logdir <dir>`` option will define the default directory to
4646
use for logfiles (it can be overriden when executing the kernel by defining
47-
the ``LOGDIR`` environment variable).
47+
the ``LOGDIR`` environment variable). By default it will use the system
48+
temporal directory.
4849

4950
Note that kernel installation also installs some custom CSS and a modification
5051
for a Pygments highlighter; its purpose is to improve the layout of the kernel
@@ -139,10 +140,17 @@ It remains active until superceded by another ``%endpoint`` magic.
139140

140141
Sets the data format requested to the SPARQL endpoint::
141142

142-
%format JSON | N3 | default
143+
%format JSON | N3 | any | default
143144

144-
where ``default`` selects a default format depending on the requested SPARQL
145-
operation (N3 for ``DESCRIBE`` and ``CONSTRUCT``, JSON for ``SELECT``).
145+
where:
146+
147+
* ``JSON`` requests *application/sparql-results+json* format
148+
* ``N3`` requests the endpoint to provide results in *text/rdf+n3* format
149+
* ``any`` lets the endpoint return any format it pleases (note that if the returned
150+
format is not JSON or N3, it will be rendered as raw text)
151+
* ``default`` selects a default format depending on the requested SPARQL
152+
operation (N3 for ``DESCRIBE`` and ``CONSTRUCT``, JSON for ``SELECT``, *any*
153+
for the rest)
146154

147155

148156
``%display``
@@ -166,6 +174,10 @@ There are three possible display formats:
166174
much better (PNG quality is lower, image size is fixed and cannot contain
167175
hyperlinks).
168176

177+
Default is ``table``. Note that if the result format is not a supported format
178+
for a table or diagram representation (i.e. it is not JSON or N3), then raw
179+
format will be used.
180+
169181

170182

171183

0 commit comments

Comments
 (0)