Commit 93388bb6 authored by Sabine Schröder's avatar Sabine Schröder
Browse files

#31: updated docstrings in TOARII_ontology.py

parent 85039bea
Pipeline #64344 passed with stages
in 2 minutes and 22 seconds
......@@ -30,6 +30,9 @@ class TOAR_Ontology:
Methods
-------
get_classes():
show all classes of onthology
get_class(title):
find the onthology class for the given title
......@@ -86,7 +89,7 @@ class TOAR_Ontology:
Returns
-------
list of class titles
[str]: list of class titles
"""
list = []
for s, p, o in self.graph.triples( (None, RDF.type, OWL.Class) ):
......@@ -106,7 +109,7 @@ class TOAR_Ontology:
Returns
-------
OWL.Class
OWL.Class: ontology class matching the given title
"""
for s, p, o in self.graph.triples( (None, RDF.type, OWL.Class) ):
value = self.graph.value(subject=s,predicate=RDFS.label)
......@@ -125,7 +128,7 @@ class TOAR_Ontology:
Returns
-------
OWL.Class
OWL.Class: ontology class matching the given id
"""
for s, p, o in self.graph.triples( (None, RDF.type, OWL.Class) ):
if s.strip() == id.strip():
......@@ -158,7 +161,7 @@ class TOAR_Ontology:
Returns
-------
int
int: next free index (NamedIndividual) in ontology
"""
nid=-1
for s, p, o in self.graph.triples( (None, RDF.type, OWL.NamedIndividual) ):
......@@ -245,7 +248,7 @@ class TOAR_Ontology:
Returns
-------
None
Boolean: True, if entry was found in class
"""
found=False
for s, p, o in self.graph.triples( (None, RDF.type, ont_class ) ):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment