From f7f363be4e6a35e0a5888adba424951af456fdf7 Mon Sep 17 00:00:00 2001 From: Anthony Mahanna Date: Sat, 9 Dec 2023 23:30:12 -0500 Subject: [PATCH] cleanup controller docstrings --- arango_rdf/controller.py | 41 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/arango_rdf/controller.py b/arango_rdf/controller.py index b2c02a31..36bd4dee 100644 --- a/arango_rdf/controller.py +++ b/arango_rdf/controller.py @@ -10,10 +10,7 @@ class ArangoRDFController(AbstractArangoRDFController): - """ArangoDB-RDF controller. - - You can derive your own custom ArangoRDFController. - """ + """ArangoDB-RDF controller. You can derive your own custom ArangoRDFController.""" def __init__(self) -> None: self.db: StandardDatabase @@ -42,28 +39,28 @@ def identify_best_class( The current identification process goes as follows: 1) If an RDF Resource only has one `rdf:type` statement - (either by explicit definition or by domain/range inference), - then the local name of the single RDFS Class is used as the ArangoDB - Document Collection name. For example, - - would place the JSON Document for - under the ArangoDB "Person" Document Collection. + (either by explicit definition or by domain/range inference), + then the local name of the single RDFS Class is used as the ArangoDB + Document Collection name. For example, + + would place the JSON Document for + under the ArangoDB "Person" Document Collection. 2) If an RDF Resource has multiple `rdf:type` statements - (either by explicit definition or by domain/range inference), - with some (or all) of the RDFS Classes of those statements - belonging in an `rdfs:subClassOf` Taxonomy, then the - local name of the "most specific" Class within the Taxonomy is - used (i.e the Class with the biggest depth). If there is a - tie between 2+ Classes, then the URIs are alphabetically - sorted & the first one is picked. Relies on **subclass_tree**. + (either by explicit definition or by domain/range inference), + with some (or all) of the RDFS Classes of those statements + belonging in an `rdfs:subClassOf` Taxonomy, then the + local name of the "most specific" Class within the Taxonomy is + used (i.e the Class with the biggest depth). If there is a + tie between 2+ Classes, then the URIs are alphabetically + sorted & the first one is picked. Relies on **subclass_tree**. 3) If an RDF Resource has multiple `rdf:type` statements, with - none of the RDFS Classes of those statements belonging in an - `rdfs:subClassOf` Taxonomy, then the URIs are - alphabetically sorted & the first one is picked. The local - name of the selected URI will be designated as the Document - Collection for **rdf_resource**. + none of the RDFS Classes of those statements belonging in an + `rdfs:subClassOf` Taxonomy, then the URIs are + alphabetically sorted & the first one is picked. The local + name of the selected URI will be designated as the Document + Collection for **rdf_resource**. :param rdf_resource: The RDF Resource in question. :type rdf_resource: URIRef | BNode