You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make it easy to add a new class to the triplestore, including annotations, subClassOf, equivalentTo, and disjointWith relations.
It could be defined something like
defadd_class(
self,
iri: str,
subclass_of: "Sequence[str]"=None,
annotations: dict=None,
equivalent_to: "Sequence[str]"=None,
disjoint_with: "Sequence[str]"=None
) ->str:
"""Add new class to the triplestore. Arguments: iri: IRI of the new class. See notes below for how include template substitution of a unique reproducible generated hash. subclass_of: A sequence of strings with superclass IRIs or restrictions. Restrictions should use Manchester syntax (require [EMMOntoPy]). annotations: A dict mapping annotation IRIs to values. Use Literal for literal annotation values. equivalent_to: A sequence of strings with logical constructs that this class is equivalent to using Manchester syntax (require [EMMOntoPy]). disjoint_with: A sequence of strings with logical constructs that this class is disjoint with using Manchester syntax (require [EMMOntoPy]). Returns: The `iri` after template substitution. Notes: The `iri` argument may contain a template substring of the form {ID:TYPE.LENGTH} which will be substituted with a unique but reproducible hash of `ID` and the triplestore `base_iri`, where `ID` is a unique user-provided identifier string for this class. The ":TYPE" (defaults to "uuid") and ".LENGTH" parts are optional. `TYPE` specifies how the hash is calculated and encoded and should be one of "uuid", "hex" or "base64". The "uuid" type correspond to a version 5 UUID (using the URL namespace), while the "hex" and "base64" types correspond to a hash generated with `urllib.shake_128()` encoded as hexidecimal or base64, respectively. If `LENGTH` is given, it specifies the number of substituted characters for the "hex" and "base64" types. For example, an IRI for EMMO would be `EMMO["EMMO_{uuid}"]`, where `EMMO` is a namespace. References: [EMMOntoPy]: https://pypi.org/project/EMMOntoPy/ """
Make it easy to add a new class to the triplestore, including annotations, subClassOf, equivalentTo, and disjointWith relations.
It could be defined something like
Also, add issues similar methods
The text was updated successfully, but these errors were encountered: