Skip to content

Commit 9bee03e

Browse files
committed
docs: faq add (sub)ontology
1 parent 0fa3e3a commit 9bee03e

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

README.md

+25-5
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,6 @@ The subkeys are:
150150
| `center` | If `initialView` is not specified, `snik.centerDepth` number of star operations are made on this node. | `"http://www.snik.eu/ontology/bb/ChiefInformationOfficer"` |
151151
| `centerDepth` | How many star operations to make on `snik.center` if no `initialView` is specified. | `1` |
152152

153-
###### Adding another subontology
154-
155-
> [!NOTE]
156-
> TODO. For now, you hopefully do not have to do this.
157-
158153
##### Style your own ontology
159154

160155
Nodes can be individually styled by shape and color.
@@ -296,6 +291,31 @@ Citation info and meta data is documented in CITATION.cff, which is also used by
296291

297292
## FAQ
298293

294+
### How can I use this for my own ontology?
295+
296+
When using your own ontology, you need to change the configuration in `ontology` and `git`, see above.
297+
Some things are not configurable yet, but this is actively being worked on.
298+
299+
### How can I add another SNIK subontology?
300+
301+
For this, both the ontology and graph source have to be modified.
302+
303+
First, the things you need to change in the graph.
304+
305+
Some things are changed in the config: you need to add your new subontology by its id in `ontology.snik.defaultSubOntologies`.
306+
For colors, you need to add it to the `ontology.colorMap`.
307+
The SNIK ontology config is in [`config.snik.ts`](js/config/config.snik.ts), this probably has to be changed there.
308+
309+
You also need to add a filter so you can filter out the new subontology in the filter menu.
310+
For this, add your filter function to `filterData` in [`filter.ts`](js/browser/filter.ts).
311+
These are cytoscape selectors and I18N labels for the button;
312+
all entities selected by the node selector are filtered by this.
313+
You then also need to add a label for the new button in [the file for the default language](js/lang/en.ts).
314+
315+
316+
> [!NOTE]
317+
> The ontology part is TODO. For now, you hopefully do not have to do this.
318+
299319
### The devs told me a bug was fixed but it still occurs
300320
Browsers may hold an old version of SNIK Graph in the cache.
301321
Go to "Help" -> "About SNIK Graph" to see if you have the newest version and if not delete your browser cache.

0 commit comments

Comments
 (0)