information-model 2.1.0rc4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. information_model/__init__.py +4 -0
  2. information_model/_version.py +24 -0
  3. information_model/assets.py +73 -0
  4. information_model/jsonldcontext/api/metadata.json +58 -0
  5. information_model/jsonldcontext/schema.json +294 -0
  6. information_model/jsonldcontext/vocab.json +308 -0
  7. information_model/ontologies/core-ontology.ttl +710 -0
  8. information_model/ontologies/deprecated/TBX-ontology.ttl +354 -0
  9. information_model/ontologies/deprecated/deprecated-IEC-ISO-core-ontology.ttl +410 -0
  10. information_model/ontologies/external/README.md +5 -0
  11. information_model/ontologies/external/vocabulary.ttl +347 -0
  12. information_model/schemas/shacl/README.md +21 -0
  13. information_model/schemas/shacl/annotation-ontology.shacl.ttl +104 -0
  14. information_model/schemas/shacl/core-ontology.shacl.ttl +309 -0
  15. information_model/schemas/shacl/external/shacl-shacl.ttl +410 -0
  16. information_model/schemas/shacl/jsonld/common_shapes/activity.json +12 -0
  17. information_model/schemas/shacl/jsonld/common_shapes/agent.json +12 -0
  18. information_model/schemas/shacl/jsonld/common_shapes/distribution.json +71 -0
  19. information_model/schemas/shacl/jsonld/common_shapes/entity.json +35 -0
  20. information_model/schemas/shacl/jsonld/common_shapes/specificresource.json +141 -0
  21. information_model/schemas/shacl/jsonld/data_shapes/annotation.json +51 -0
  22. information_model/schemas/shacl/jsonld/data_shapes/clause.json +95 -0
  23. information_model/schemas/shacl/jsonld/data_shapes/provision.json +157 -0
  24. information_model/schemas/shacl/jsonld/data_shapes/publicationdocument.json +77 -0
  25. information_model/schemas/shacl/jsonld/data_shapes/term.json +44 -0
  26. information_model/schemas/shacl/jsonld/data_shapes/termentry.json +108 -0
  27. information_model/schemas/shacl/schemas.shacl.ttl +396 -0
  28. information_model/schemas/shacl/terminology-model.shacl.ttl +98 -0
  29. information_model/schemas/shacl/ttl/common_shapes/activity.shacl.ttl +6 -0
  30. information_model/schemas/shacl/ttl/common_shapes/agent.shacl.ttl +6 -0
  31. information_model/schemas/shacl/ttl/common_shapes/distribution.shacl.ttl +47 -0
  32. information_model/schemas/shacl/ttl/common_shapes/entity.shacl.ttl +22 -0
  33. information_model/schemas/shacl/ttl/common_shapes/specificresource.shacl.ttl +76 -0
  34. information_model/schemas/shacl/ttl/data_shapes/annotation.shacl.ttl +104 -0
  35. information_model/schemas/shacl/ttl/data_shapes/clause.shacl.ttl +176 -0
  36. information_model/schemas/shacl/ttl/data_shapes/provision.shacl.ttl +225 -0
  37. information_model/schemas/shacl/ttl/data_shapes/publicationdocument.shacl.ttl +99 -0
  38. information_model/schemas/shacl/ttl/data_shapes/term.shacl.ttl +41 -0
  39. information_model/schemas/shacl/ttl/data_shapes/termentry.shacl.ttl +80 -0
  40. information_model/taxonomies/bindingness-type.ttl +44 -0
  41. information_model/taxonomies/identifier-type.ttl +32 -0
  42. information_model/taxonomies/part-of-speech-type.ttl +68 -0
  43. information_model/taxonomies/provision-supplement-type.ttl +58 -0
  44. information_model/taxonomies/provision-type.ttl +38 -0
  45. information_model/taxonomies/publication-component-type.ttl +63 -0
  46. information_model/taxonomies/publication-type.ttl +124 -0
  47. information_model/taxonomies/term-form-type.ttl +85 -0
  48. information_model-2.1.0rc4.dist-info/METADATA +316 -0
  49. information_model-2.1.0rc4.dist-info/RECORD +52 -0
  50. information_model-2.1.0rc4.dist-info/WHEEL +5 -0
  51. information_model-2.1.0rc4.dist-info/licenses/LICENSE.md +427 -0
  52. information_model-2.1.0rc4.dist-info/top_level.txt +1 -0
@@ -0,0 +1,4 @@
1
+ from .assets import as_path, exists, read_bytes, read_text, resource
2
+ from ._version import version as __version__
3
+
4
+ __all__ = ["as_path", "exists", "read_bytes", "read_text", "resource"]
@@ -0,0 +1,24 @@
1
+ # file generated by vcs-versioning
2
+ # don't change, don't track in version control
3
+ from __future__ import annotations
4
+
5
+ __all__ = [
6
+ "__version__",
7
+ "__version_tuple__",
8
+ "version",
9
+ "version_tuple",
10
+ "__commit_id__",
11
+ "commit_id",
12
+ ]
13
+
14
+ version: str
15
+ __version__: str
16
+ __version_tuple__: tuple[int | str, ...]
17
+ version_tuple: tuple[int | str, ...]
18
+ commit_id: str | None
19
+ __commit_id__: str | None
20
+
21
+ __version__ = version = '2.1.0rc4'
22
+ __version_tuple__ = version_tuple = (2, 1, 0, 'rc4')
23
+
24
+ __commit_id__ = commit_id = None
@@ -0,0 +1,73 @@
1
+ from __future__ import annotations
2
+
3
+ from contextlib import contextmanager
4
+ from importlib import resources
5
+ from pathlib import Path
6
+ from typing import Iterator
7
+
8
+
9
+ def resource(relative_path: str) -> resources.abc.Traversable:
10
+ """
11
+ Return a Traversable handle to a packaged resource inside `information_model`.
12
+
13
+ Example:
14
+ resource("ontologies/core-ontology.ttl")
15
+ """
16
+ # Normalize to forward slashes; Traversable uses POSIX-like paths.
17
+ rel = relative_path.strip().lstrip("/")
18
+
19
+ # Walk segments safely
20
+ node = resources.files("information_model")
21
+ for part in rel.split("/"):
22
+ if part:
23
+ node = node.joinpath(part)
24
+ return node
25
+
26
+
27
+ def exists(relative_path: str) -> bool:
28
+ """Return True if the packaged resource exists."""
29
+ return resource(relative_path).is_file()
30
+
31
+
32
+ def read_text(relative_path: str, encoding: str = "utf-8") -> str:
33
+ """Read a packaged resource as text."""
34
+ return resource(relative_path).read_text(encoding=encoding)
35
+
36
+
37
+ def read_bytes(relative_path: str) -> bytes:
38
+ """Read a packaged resource as bytes."""
39
+ return resource(relative_path).read_bytes()
40
+
41
+
42
+ @contextmanager
43
+ def as_path(relative_path: str) -> Iterator[Path]:
44
+ """
45
+ Yield a real filesystem Path to a packaged resource.
46
+
47
+ Use this when a library requires a filename/path (e.g., rdflib parsing).
48
+ This is safe even if the package is in a wheel/zip because it will extract
49
+ to a temporary location if needed.
50
+
51
+ Example:
52
+ with as_path("ontologies/core-ontology.ttl") as p:
53
+ graph.parse(p)
54
+ """
55
+ traversable = resource(relative_path)
56
+
57
+ if not traversable.is_file():
58
+ raise FileNotFoundError(f"Packaged resource not found: {relative_path}")
59
+
60
+ with resources.as_file(traversable) as p:
61
+ yield Path(p)
62
+
63
+
64
+ # Convenience helpers for your common folders -------------------------------
65
+
66
+ def ontology(name: str) -> resources.abc.Traversable:
67
+ """Convenience accessor for `ontologies/<name>`."""
68
+ return resource(f"ontologies/{name}")
69
+
70
+
71
+ def shacl(name: str) -> resources.abc.Traversable:
72
+ """Convenience accessor for `schemas/shacl/<name>`."""
73
+ return resource(f"schemas/shacl/{name}")
@@ -0,0 +1,58 @@
1
+ {
2
+ "@context": {
3
+ "smartapi": "https://w3id.org/standards/smart/api/",
4
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
5
+ "_rev": {
6
+ "@id": "smartapi:_rev",
7
+ "@type": "xsd:integer"
8
+ },
9
+ "_deprecated": {
10
+ "@id": "smartapi:_deprecated",
11
+ "@type": "xsd:boolean"
12
+ },
13
+ "_repository": {
14
+ "@id": "smartapi:_repository",
15
+ "@type": "@id"
16
+ },
17
+ "_schema": {
18
+ "@id": "smartapi:_schema",
19
+ "@type": "@id"
20
+ },
21
+ "_dateCreated": {
22
+ "@id": "smartapi:_dateCreated",
23
+ "@type": "xsd:dateTime"
24
+ },
25
+ "_dateModified": {
26
+ "@id": "smartapi:_dateModified",
27
+ "@type": "xsd:dateTime"
28
+ },
29
+ "_createdBy": {
30
+ "@id": "smartapi:_createdBy",
31
+ "@type": "@id"
32
+ },
33
+ "_modifiedBy": {
34
+ "@id": "smartapi:_modifiedBy",
35
+ "@type": "@id"
36
+ },
37
+ "_address": {
38
+ "@id": "smartapi:_address",
39
+ "@type": "@id"
40
+ },
41
+ "Organization": {
42
+ "@id": "smartapi:Organization",
43
+ "@type": "@id"
44
+ },
45
+ "_name": "smartapi:_name",
46
+ "description": "http://purl.org/dc/terms/description",
47
+ "reason": "smartapi:reason",
48
+ "Repository": {
49
+ "@id": "smartapi:Repository",
50
+ "@type": "@id"
51
+ },
52
+
53
+ "_base": "smartapi:_base",
54
+ "_vocab": "smartapi:_vocab",
55
+ "_prefixMappings": "smartapi:_prefixMappings"
56
+ },
57
+ "@id": "https://w3id.org/standards/smart/api/jsonldcontext/metadata"
58
+ }
@@ -0,0 +1,294 @@
1
+ {
2
+ "@context": {
3
+ "sh": "http://www.w3.org/ns/shacl#",
4
+ "owl": "http://www.w3.org/2002/07/owl#",
5
+ "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
6
+ "xml": "http://www.w3.org/XML/1998/namespace/",
7
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
8
+ "prov": "http://www.w3.org/ns/prov#",
9
+ "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
10
+ "shsh": "http://www.w3.org/ns/shacl-shacl#",
11
+ "skos": "http://www.w3.org/2004/02/skos/core#",
12
+ "skosxl": "http://www.w3.org/2008/05/skos-xl#",
13
+ "vann": "http://purl.org/vocab/vann/",
14
+ "void": "http://rdfs.org/ns/void#",
15
+ "schemaorg": "https://schema.org/",
16
+ "dcterms": "http://purl.org/dc/terms/",
17
+ "smart": "https://w3id.org/standards/smart/ontologies/core/",
18
+ "smartsh": "https://w3id.org/standards/smart/schema/data/",
19
+ "smartshcm": "https://w3id.org/standards/smart/schema/common/",
20
+ "smartshcore": "https://w3id.org/standards/smart/schema/core/",
21
+ "oa": "http://www.w3.org/ns/oa#",
22
+ "publication-type": "https://w3id.org/standards/smart/taxonomies/publication-type/",
23
+ "term-form-type": "https://w3id.org/standards/smart/taxonomies/term-form-type/",
24
+ "bindingness-type": "https://w3id.org/standards/smart/taxonomies/bindingness-type/",
25
+ "provision-type": "https://w3id.org/standards/smart/taxonomies/provision-type/",
26
+ "provision-supplement-type": "https://w3id.org/standards/smart/taxonomies/provision-supplement-type/",
27
+ "dcat": "http://www.w3.org/ns/dcat#",
28
+ "spdx": "http://spdx.org/rdf/terms#",
29
+ "Schema": {
30
+ "@id":"https://w3id.org/standards/smart/schema/core/Schema",
31
+ "@type":"@id"
32
+ },
33
+ "shapes": {
34
+ "@id": "https://w3id.org/standards/smart/schema/core/shapes",
35
+ "@type": "@id",
36
+ "@container": "@set"
37
+ },
38
+ "class": {
39
+ "@id": "sh:class",
40
+ "@type": "@id"
41
+ },
42
+ "path": {
43
+ "@id": "sh:path",
44
+ "@type": "@id"
45
+ },
46
+ "qualifiedValueShape": {
47
+ "@id": "sh:qualifiedValueShape",
48
+ "@type": "@id"
49
+ },
50
+ "qualifiedValueShapesDisjoint": {
51
+ "@id": "sh:qualifiedValueShapesDisjoint",
52
+ "@type": "xsd:boolean"
53
+ },
54
+ "qualifiedMinCount": {
55
+ "@id": "sh:qualifiedMinCount",
56
+ "@type": "xsd:integer"
57
+ },
58
+ "qualifiedMaxCount": {
59
+ "@id": "sh:qualifiedMaxCount",
60
+ "@type": "xsd:integer"
61
+ },
62
+ "maxCount": {
63
+ "@id": "sh:maxCount",
64
+ "@type": "xsd:integer"
65
+ },
66
+ "minCount": {
67
+ "@id": "sh:minCount",
68
+ "@type": "xsd:integer"
69
+ },
70
+ "message": {
71
+ "@id": "sh:message"
72
+ },
73
+ "sparql": {
74
+ "@id": "sh:sparql",
75
+ "@container": "@set"
76
+ },
77
+ "select": {
78
+ "@id": "sh:select"
79
+ },
80
+ "minInclusive": {
81
+ "@id": "sh:minInclusive"
82
+ },
83
+ "maxInclusive": {
84
+ "@id": "sh:maxInclusive"
85
+ },
86
+ "maxExclusive": {
87
+ "@id": "sh:maxExclusive"
88
+ },
89
+ "minExclusive": {
90
+ "@id": "sh:minExclusive"
91
+ },
92
+ "in": {
93
+ "@id": "sh:in",
94
+ "@container": "@list"
95
+ },
96
+ "imports": {
97
+ "@id": "owl:imports",
98
+ "@type": "@id",
99
+ "@container": "@set"
100
+ },
101
+ "datatype": {
102
+ "@id": "sh:datatype",
103
+ "@type": "@id"
104
+ },
105
+ "description": {
106
+ "@id": "sh:description"
107
+ },
108
+ "name": {
109
+ "@id": "sh:name"
110
+ },
111
+ "severity": {
112
+ "@id": "sh:severity"
113
+ },
114
+ "nodeKind": {
115
+ "@id": "sh:nodeKind",
116
+ "@type": "@vocab"
117
+ },
118
+ "BlankNode": {
119
+ "@id": "sh:BlankNode"
120
+ },
121
+ "BlankNodeOrIRI": {
122
+ "@id": "sh:BlankNodeOrIRI"
123
+ },
124
+ "BlankNodeOrLiteral": {
125
+ "@id": "sh:BlankNodeOrLiteral"
126
+ },
127
+ "IRI": {
128
+ "@id": "sh:IRI"
129
+ },
130
+ "IRIOrLiteral": {
131
+ "@id": "sh:IRIOrLiteral"
132
+ },
133
+ "Literal": {
134
+ "@id": "sh:Literal"
135
+ },
136
+ "prefix": {
137
+ "@id": "sh:prefix",
138
+ "@type": "xsd:string"
139
+ },
140
+ "declare": {
141
+ "@id": "sh:declare"
142
+ },
143
+ "namespace": {
144
+ "@id": "sh:namespace",
145
+ "@type": "xsd:anyURI"
146
+ },
147
+ "Violation": {
148
+ "@id": "sh:Violation"
149
+ },
150
+ "closed": {
151
+ "@id": "sh:closed",
152
+ "@type": "@id"
153
+ },
154
+ "ignoredProperties": {
155
+ "@id": "sh:ignoredProperties",
156
+ "@type": "@id"
157
+ },
158
+ "suggestedShapesGraph": {
159
+ "@id": "sh:suggestedShapesGraph",
160
+ "@type": "@id"
161
+ },
162
+ "shapesGraph": {
163
+ "@id": "sh:shapesGraph",
164
+ "@type": "@id"
165
+ },
166
+ "node": {
167
+ "@id": "sh:node",
168
+ "@type": "@id"
169
+ },
170
+ "property": {
171
+ "@id": "sh:property",
172
+ "@type": "@id",
173
+ "@container": "@set"
174
+ },
175
+ "targetClass": {
176
+ "@id": "sh:targetClass",
177
+ "@type": "@id"
178
+ },
179
+ "targetObjectsOf": {
180
+ "@id": "sh:targetObjectsOf",
181
+ "@type": "@id"
182
+ },
183
+ "targetSubjectsOf": {
184
+ "@id": "sh:targetSubjectsOf",
185
+ "@type": "@id"
186
+ },
187
+ "targetNode": {
188
+ "@id": "sh:targetNode",
189
+ "@type": "@id"
190
+ },
191
+ "target": {
192
+ "@id": "sh:target",
193
+ "@type": "@id"
194
+ },
195
+ "isDefinedBy": {
196
+ "@id": "http://www.w3.org/2000/01/rdf-schema#isDefinedBy",
197
+ "@type": "@id"
198
+ },
199
+ "Shape": {
200
+ "@id": "sh:Shape"
201
+ },
202
+ "NodeShape": {
203
+ "@id": "sh:NodeShape"
204
+ },
205
+ "PropertyShape": {
206
+ "@id": "sh:PropertyShape"
207
+ },
208
+ "or": {
209
+ "@id": "sh:or",
210
+ "@type": "@id",
211
+ "@container": "@list"
212
+ },
213
+ "and": {
214
+ "@id": "sh:and",
215
+ "@type": "@id",
216
+ "@container": "@list"
217
+ },
218
+ "xone": {
219
+ "@id": "sh:xone",
220
+ "@type": "@id",
221
+ "@container": "@list"
222
+ },
223
+ "not": {
224
+ "@id": "sh:not",
225
+ "@type": "@id"
226
+ },
227
+ "lessThan": {
228
+ "@id": "sh:lessThan",
229
+ "@type": "@id"
230
+ },
231
+ "lessThanOrEquals": {
232
+ "@id": "sh:lessThanOrEquals",
233
+ "@type": "@id"
234
+ },
235
+ "hasValue": {
236
+ "@id": "sh:hasValue",
237
+ "@type": "@id"
238
+ },
239
+ "resultMessage": {
240
+ "@id": "sh:resultMessage"
241
+ },
242
+ "deactivated": {
243
+ "@id": "sh:deactivated"
244
+ },
245
+ "pattern": {
246
+ "@id": "sh:pattern"
247
+ },
248
+ "label": {
249
+ "@id": "rdfs:label",
250
+ "@type": "xsd:string",
251
+ "@language": "en"
252
+ },
253
+ "comment": {
254
+ "@id": "rdfs:comment",
255
+ "@type": "xsd:string",
256
+ "@language": "en"
257
+ },
258
+ "editorialNote": {
259
+ "@id": "skos:editorialNote",
260
+ "@type": "xsd:string"
261
+ },
262
+ "seeAlso": {
263
+ "@id": "rdfs:seeAlso",
264
+ "@type": "@id"
265
+ },
266
+ "zeroOrMorePath": {
267
+ "@id": "sh:zeroOrMorePath"
268
+ },
269
+ "alternativePath": {
270
+ "@id": "sh:alternativePath",
271
+ "@type": "@id",
272
+ "@container": "@list"
273
+ },
274
+ "oneOrMorePath": {
275
+ "@id": "sh:oneOrMorePath"
276
+ },
277
+ "rest": {
278
+ "@id": "rdf:rest",
279
+ "@type": "@id"
280
+ },
281
+ "first": {
282
+ "@id": "rdf:first",
283
+ "@type": "@id"
284
+ },
285
+ "nil": {
286
+ "@id": "rdf:nil"
287
+ },
288
+ "uniqueLang": {
289
+ "@id": "sh:uniqueLang",
290
+ "@type": "xsd:boolean"
291
+ }
292
+ },
293
+ "@id": "https://w3id.org/standards/smart/jsonldcontext/schema"
294
+ }