|
1 | 1 | # API Reference |
2 | 2 |
|
3 | | -This document is for developers and/or advanced users of OSP-core, it contains all API details. |
| 3 | +This document is for advanced users of SimPhoNy and defines all its public API |
| 4 | +details. This means that only when there is a breaking change in any of the |
| 5 | +methods listed on this page, the major version number of SimPhoNy |
| 6 | +will change accordingly, as prescribed by the |
| 7 | +[Semantic Versioning Specification](https://semver.org/spec/v2.0.0.html#spec-item-8). |
4 | 8 |
|
5 | | -## CUDS |
| 9 | +**Do not rely** on the stability of methods not listed on this page. |
| 10 | + |
| 11 | +If the `__init__` method is not listed for a class, you are **not expected |
| 12 | +to instantiate such class by yourself**, and thus doing so is unsupported. |
| 13 | + |
| 14 | +## Ontology management |
6 | 15 |
|
7 | 16 | ```{eval-rst} |
8 | | -.. autoclass:: osp.core.cuds.Cuds |
9 | | - :members: |
10 | | - :show-inheritance: |
| 17 | +.. autofunction:: simphony_osp.tools.pico.install |
| 18 | +
|
| 19 | +.. autofunction:: simphony_osp.tools.pico.uninstall |
| 20 | +
|
| 21 | +.. autofunction:: simphony_osp.tools.pico.packages |
| 22 | +
|
| 23 | +.. autofunction:: simphony_osp.tools.pico.namespaces |
11 | 24 | ``` |
12 | 25 |
|
13 | | -## Ontology interface |
| 26 | +## Terminological- and assertional knowledge |
14 | 27 |
|
15 | 28 | ```{eval-rst} |
16 | | -.. autoclass:: osp.core.ontology.namespace.OntologyNamespace |
17 | | - :members: |
18 | | - :special-members: __getattr__, __getitem__, __contains__, __iter__, __eq__ |
| 29 | +.. autoclass:: simphony_osp.ontology.OntologyNamespace |
| 30 | + :members: from_iri, from_label, from_suffix, get, iri, name |
| 31 | + :special-members: __getattr__, __getitem__, __contains__, __iter__, __eq__, |
| 32 | + __len__ |
19 | 33 | :show-inheritance: |
20 | 34 |
|
21 | | -.. autoclass:: osp.core.ontology.entity.OntologyEntity |
22 | | - :members: |
| 35 | +.. autoclass:: simphony_osp.ontology.OntologyEntity |
| 36 | + :members: direct_subclasses, direct_superclasses, identifier, iri, is_subclass_of, is_superclass_of, iter_labels, label, label_lang, label_literal, namespace, session, subclasses, superclasses, triples |
| 37 | + :special-members: __bool__, __eq__ |
| 38 | +
|
| 39 | +.. autoclass:: simphony_osp.ontology.OntologyClass |
| 40 | + :members: attributes, optional_attributes, axioms |
| 41 | + :special-members: __call__ |
23 | 42 | :show-inheritance: |
24 | 43 |
|
25 | | -.. autoclass:: osp.core.ontology.oclass.OntologyClass |
26 | | - :members: |
| 44 | +.. autoclass:: simphony_osp.ontology.Restriction |
| 45 | + :members: quantifier, target, relationship, attribute, rtype |
27 | 46 | :show-inheritance: |
28 | 47 |
|
29 | | -.. autoclass:: osp.core.ontology.oclass_restriction.Restriction |
| 48 | +.. autoclass:: simphony_osp.ontology.RESTRICTION_QUANTIFIER |
30 | 49 | :members: |
| 50 | + :undoc-members: |
31 | 51 | :show-inheritance: |
32 | 52 |
|
33 | | -.. autoclass:: osp.core.ontology.oclass_composition.Composition |
| 53 | +.. autoclass:: simphony_osp.ontology.RESTRICTION_TYPE |
34 | 54 | :members: |
| 55 | + :undoc-members: |
35 | 56 | :show-inheritance: |
36 | 57 |
|
37 | | -.. autoclass:: osp.core.ontology.relationship.OntologyRelationship |
38 | | - :members: |
| 58 | +.. autoclass:: simphony_osp.ontology.Composition |
| 59 | + :members: operator, operands |
39 | 60 | :show-inheritance: |
40 | 61 |
|
41 | | -.. autoclass:: osp.core.ontology.attribute.OntologyAttribute |
| 62 | +.. autoclass:: simphony_osp.ontology.COMPOSITION_OPERATOR |
42 | 63 | :members: |
| 64 | + :undoc-members: |
43 | 65 | :show-inheritance: |
44 | | -``` |
45 | | - |
46 | | -## Sessions |
47 | 66 |
|
48 | | -```{eval-rst} |
49 | | -.. autoclass:: osp.core.session.session.Session |
50 | | - :members: |
| 67 | +.. autoclass:: simphony_osp.ontology.OntologyRelationship |
| 68 | + :members: inverse |
51 | 69 | :show-inheritance: |
52 | 70 |
|
53 | | -.. autoclass:: osp.core.session.core_session.CoreSession |
54 | | - :members: |
| 71 | +.. autoclass:: simphony_osp.ontology.OntologyAttribute |
| 72 | + :members: datatype |
55 | 73 | :show-inheritance: |
56 | 74 |
|
57 | | -.. autoclass:: osp.core.session.wrapper_session.WrapperSession |
58 | | - :members: |
| 75 | +.. autoclass:: simphony_osp.ontology.OntologyAnnotation |
59 | 76 | :show-inheritance: |
60 | 77 |
|
61 | | -.. autoclass:: osp.core.session.sim_wrapper_session.SimWrapperSession |
62 | | - :members: |
| 78 | +.. autoclass:: simphony_osp.ontology.OntologyIndividual |
| 79 | + :members: classes, is_a, connect, disconnect, get, iter, operations, attributes |
| 80 | + :special-members: __getattr__, __setattr__, __getitem__, __setitem__, __delitem__ |
63 | 81 | :show-inheritance: |
64 | 82 |
|
65 | | -.. autoclass:: osp.core.session.db.db_wrapper_session.DbWrapperSession |
66 | | - :members: |
| 83 | +.. autoclass:: simphony_osp.ontology.RelationshipSet |
| 84 | + :members: update, intersection_update, difference_update, symmetric_difference_update, inverse |
| 85 | + :inherited-members: individual, predicate, one, any, all, isdisjoint, clear, pop, copy, difference, discard, intersection, issubset, issuperset, add, remove, symmetric_difference, union |
| 86 | + :special-members: __iter__, __contains__, __invert__, __len__, __le__, __lt__, __ne__, __gt__, __ge__, __and__, __radd__, __ror__, __rsub__, __rxor__, __or__, __xor__, __iadd__, __isub__, __ior__, __iand__, __ixor__ |
| 87 | + :exclude-members: iter_low_level, prevent_class_filtering |
| 88 | +
|
| 89 | +.. autoclass:: simphony_osp.ontology.AttributeSet |
| 90 | + :members: update, intersection_update, difference_update, symmetric_difference_update |
| 91 | + :inherited-members: individual, predicate, one, any, all, isdisjoint, clear, pop, copy, difference, discard, intersection, issubset, issuperset, add, remove, symmetric_difference, union |
| 92 | + :special-members: __iter__, __contains__, __len__, __le__, __lt__, __ne__, __gt__, __ge__, __and__, __radd__, __ror__, __rsub__, __rxor__, __or__, __xor__, __iadd__, __isub__, __ior__, __iand__, __ixor__ |
| 93 | +
|
| 94 | +.. autoclass:: simphony_osp.ontology.AnnotationSet |
| 95 | + :members: update, intersection_update, difference_update, symmetric_difference_update |
| 96 | + :inherited-members: individual, predicate, one, any, all, isdisjoint, clear, pop, copy, difference, discard, intersection, issubset, issuperset, add, remove, symmetric_difference, union |
| 97 | + :special-members: __iter__, __contains__, __len__, __le__, __lt__, __ne__, __gt__, __ge__, __and__, __radd__, __ror__, __rsub__, __rxor__, __or__, __xor__, __iadd__, __isub__, __ior__, __iand__, __ixor__ |
| 98 | +
|
| 99 | +.. autoclass:: simphony_osp.ontology.ResultEmptyError |
67 | 100 | :show-inheritance: |
68 | 101 |
|
69 | | -.. autoclass:: osp.core.session.db.sql_wrapper_session.SqlWrapperSession |
70 | | - :members: |
| 102 | +.. autoclass:: simphony_osp.ontology.MultipleResultsError |
71 | 103 | :show-inheritance: |
72 | 104 | ``` |
73 | 105 |
|
74 | | -## Registry |
| 106 | +## Sessions and wrappers |
75 | 107 |
|
76 | 108 | ```{eval-rst} |
77 | | -.. autoclass:: osp.core.session.registry.Registry |
78 | | - :members: |
| 109 | +.. autoclass:: simphony_osp.session.Session |
| 110 | + :members: commit, compute, close, sparql, identifier, update, from_label, add, delete, clear, get, iter |
| 111 | + :inherited-members: locked |
| 112 | + :special-members: __init__, __iter__, __contains__, __enter__, __exit__, __len__, |
| 113 | + :exclude-members: bind, default-ontology, driver, entity_cache_timestamp, from_identifier, from_identifier_typed, get_default_environment, get_default_session, get_entities, get_identifiers, get_namespace, get_namespace_bind, graph, iter_labels, label_languages, label_predicates, load_parser, lock, unlock, merge, namespaces, ontology, set_default_session, subscribers, unbind, unlock, update, iter_identifiers, default_ontology |
| 114 | +
|
| 115 | +.. autoclass:: simphony_osp.session.SessionSet |
| 116 | + :members: update, intersection_update, difference_update, symmetric_difference_update |
| 117 | + :inherited-members: individual, predicate, one, any, all, isdisjoint, clear, pop, copy, difference, discard, intersection, issubset, issuperset, add, remove, symmetric_difference, union |
| 118 | + :special-members: __iter__, __contains__, __len__, __le__, __lt__, __ne__, __gt__, __ge__, __and__, __radd__, __ror__, __rsub__, __rxor__, __or__, __xor__, __iadd__, __isub__, __ior__, __iand__, __ixor__ |
| 119 | +
|
| 120 | +.. autoclass:: simphony_osp.session.core_session |
79 | 121 | :show-inheritance: |
| 122 | +
|
| 123 | +.. autofunction:: simphony_osp.tools.import_file |
| 124 | +
|
| 125 | +.. autofunction:: simphony_osp.tools.export_file |
80 | 126 | ``` |
81 | 127 |
|
82 | | -## Utilities |
| 128 | +### Search |
83 | 129 |
|
84 | 130 | ```{eval-rst} |
85 | | -.. automodule:: osp.core.utils |
86 | | - :imported-members: |
87 | | - :members: |
| 131 | +.. autofunction:: simphony_osp.tools.search.find |
| 132 | +
|
| 133 | +.. autofunction:: simphony_osp.tools.search.find_by_identifier |
| 134 | +
|
| 135 | +.. autofunction:: simphony_osp.tools.search.find_by_class |
| 136 | +
|
| 137 | +.. autofunction:: simphony_osp.tools.search.find_by_attribute |
| 138 | +
|
| 139 | +.. autofunction:: simphony_osp.tools.search.find_relationships |
| 140 | +
|
| 141 | +.. autofunction:: simphony_osp.tools.search.sparql |
88 | 142 | ``` |
89 | 143 |
|
90 | | -### pico |
| 144 | +## Visualization |
91 | 145 |
|
92 | 146 | ```{eval-rst} |
93 | | -.. automodule:: osp.core.pico |
94 | | - :members: install, uninstall, packages, namespaces |
| 147 | +
|
| 148 | +.. autofunction:: simphony_osp.tools::semantic2dot |
| 149 | +
|
| 150 | +.. autoclass:: simphony_osp.tools.semantic2dot::Semantic2Dot |
| 151 | + :members: render, _repr_mimebundle_ |
| 152 | +
|
| 153 | +.. autofunction:: simphony_osp.tools.pretty_print |
| 154 | +``` |
| 155 | + |
| 156 | +## Tools |
| 157 | + |
| 158 | +```{eval-rst} |
| 159 | +
|
| 160 | +.. autofunction:: simphony_osp.tools.host |
| 161 | +
|
| 162 | +.. autofunction:: simphony_osp.tools.branch |
| 163 | +
|
| 164 | +.. autofunction:: simphony_osp.tools.relationships_between |
95 | 165 | ``` |
0 commit comments