Sfoglia il codice sorgente

Write documentation about different service types

Arkadiusz Ryś 3 anni fa
parent
commit
d8b35736ef
1 ha cambiato i file con 28 aggiunte e 1 eliminazioni
  1. 28 1
      README.rst

+ 28 - 1
README.rst

@@ -7,16 +7,43 @@ The default access point is at `http://127.0.0.1:8000`.
 This endpoint can be configured in the `configuration.toml <data/configuration.toml>`_ file.
 The docker image created uses uvicorn the host the application at `0.0.0.0:80`. Feel free to map this to any port of your liking.
 
-We currently support 3 services out of the box:
+Bound services
+--------------
+
+We currently support 4 bind services out of the box:
 
 .. code-block::
 
    dtf:outlier
    dtf:example
    dtf:conversion
+   dtf:cell
 
 The outlier service relies on `another endpoint <https://msdl.uantwerpen.be/git/lucasalbertins/DTDesign/src/main/tools/typeOperations>`_ which needs to be set up and accessible.
 
+.. code-block:: sparql
+   :caption: SPARQL query showing bind based cell service call.
+   :emphasize-lines: 2
+
+   PREFIX dtf: <https://ontology.rys.app/dt/function/>
+   SELECT ?cell ?cell_value WHERE {
+     SERVICE <http://localhost:8000/> {BIND(dtf:cell("data/example.csv", 0, 0) AS ?cell)}
+   }
+
+URI based services
+------------------
+
+A second, more versatile, way to access a service is provided in the form of an URI.
+It is possible to query cells by specifying an individual cell in the URI of the service call.
+
+.. code-block:: sparql
+   :caption: SPARQL query showing URI based cell service call.
+   :emphasize-lines: 2
+
+   SELECT ?s ?p ?o WHERE {
+     SERVICE <http://localhost:8000/cell/example.csv/2/2/> {?s ?p ?o}
+   }
+
 Installation
 ------------