From 8ed470a0d1229a16474ad12ad01ffd109f94b56f Mon Sep 17 00:00:00 2001 From: "Hannes R. Brunsch" Date: Fri, 20 Dec 2024 10:32:35 +0100 Subject: [PATCH] docs: start ontology specific config docs; part of #438 --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index acf3e178..e5930d4d 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,34 @@ This configuration is rather complex and one of the reasons why we still use a T In the current [default configuration](./js/config/config.dist.ts), we import either a [snik config](./js/config/config.snik.ts) or a [hito config](./js/config/config.hito.ts) for the SNIK and HITO ontologies, respectively. Consult these two files for more examples on this part of the config. +When writing your own ontology config, you can either do that in the `config.ts` itself (not recommended), or also write a separate file (recommended). + +The subkeys are: +|**Key**|**Description**|**Example**| +|-------|---------------|-----------| +| `id` | ID used in code to identify which ontology is being used, for possibly better integration of a specific ontology (like SNIK). *This seems to be unused.* | `"snik"` | +| `name` | Name of the ontology in the docs. | `"SNIK"` | +| `name` | Name of the ontology in the docs. | `"SNIK"` | +| `initialView` | Object (probably JSON) which is loaded as the initial view. Consult [snik](./js/config/initialView/snik.json) and [hito](./js/config/initialView/hito.json) as examples. || +| `snik` | SNIK-specific configuration. Only used for SNIK. Probably `null` if not the default. See below. | `null` | +| `style` | How to apply shapes and colors to the resources. See below. || +| `sparql` | SPARQL-Queries to get triples (edges) and classes (nodes). See below. || + +##### SNIK-specific configuration + +##### Style your own ontology + +##### SPARQL-Config for custom ontology +|**Key**|**Description**|**Example**| +|-------|---------------|-----------| +| `endpoint` | SPARQL endpoint to use. Sends queries to this server. | `"https://www.snik.eu/sparql"` | +| `graph` | Base URI / SPARQL graph to use. | `""http://www.snik.eu/ontology"` | +| `instances` | Whether to display instances of classes. May not work. | `false` | +| `queries` | SPARQL-queries to query for classes and triples. See below. || + +> [!NOTE] +> TODO. For now, consult the files in the `js/config` directory for this part. + #### `multiview` |**Key**|**Description**|**Example**|