HyperAgents / hmas

An ontology to describe Hypermedia Multi-Agent Systems, interactions, and organizations.
https://purl.org/hmas/
1 stars 0 forks source link

Do document only terms that are defined by the ontology #177

Closed maximelefrancois86 closed 7 months ago

maximelefrancois86 commented 8 months ago

Currently every class, op, dp, and skos concept, has a section in the documentation.

We should add an option to pyLODE to filter only those that are defined by (rdfs:isDefinedBy) the ontology that is being documented

maximelefrancois86 commented 8 months ago

Add an option "ontology" in pylode/ontodoc.py:106 ? if this ontology exists, then, only those terms that are defined by this ontology should be documented. This has an impact in functions: _make_main_sections _make_toc

currently pyLODE looks if the ontology contains triples of the kind: (None, RDF.type, OWL.Class) we may want to change each of those into executing an ask query, something along the lines of: self.ont.query(f"ASK \{ [] a owl:Class ; rdfs:isDefinedBy {ontology}}").askAnswer

then the function section_html is to """Makes all the HTML (div, title & table) for all instances of a given RDF class, e.g. owl:Class or owl:ObjectProperty"""

We want to restrict that a bit: """Makes all the HTML (div, title & table) for all instances of a given RDF class, e.g. owl:Class or owl:ObjectProperty, that are defined by the given ontology, if given""".

so:

FabienGandon commented 7 months ago

addressed in PR #184