ontocast.check.scope¶
Which subjects of a facts graph are instances.
Classes¶
Functions:¶
catalog_schema_terms(catalog)
¶
Return the IRIs the catalog declares as a class or property.
Evidence is explicit typing, a domain or range, rdfs:subClassOf,
rdfs:subPropertyOf and rdf:type-object position. The catalog's
individuals (ex:Paris a ex:City, SKOS concepts, units) are not terms:
statements about them are facts.
Source code in ontocast/check/scope.py
declared_terms(graph)
¶
Return IRIs the graph itself declares as a class or property.
Source code in ontocast/check/scope.py
instances(graph, *, catalog_terms, standard_namespaces, restrict_to=None)
¶
Return the IRI subjects of graph that are instances.
An instance is not a catalog term (a class or property,
:func:catalog_schema_terms), not declared in the graph, and not under
a standard or well-known namespace. Blank-node and literal subjects are
ignored. With restrict_to, only IRIs under those namespaces are kept.