ontolutils 0.4.3__tar.gz → 0.4.4__tar.gz
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.
- {ontolutils-0.4.3 → ontolutils-0.4.4}/PKG-INFO +1 -1
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/classes/thing.py +8 -2
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/utils/qudt_units.py +2 -1
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils.egg-info/PKG-INFO +1 -1
- {ontolutils-0.4.3 → ontolutils-0.4.4}/setup.cfg +1 -1
- {ontolutils-0.4.3 → ontolutils-0.4.4}/LICENSE +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/README.md +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/__init__.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/_version.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/cache.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/classes/__init__.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/classes/decorator.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/classes/query_util.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/classes/typing.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/classes/utils.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/__dev.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/__init__.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/_iana_utils.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/codemeta.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/m4i.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/obo.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/qudt_kind.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/qudt_unit.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/schema.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/ssno.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/utils/__init__.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils.egg-info/SOURCES.txt +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils.egg-info/dependency_links.txt +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils.egg-info/requires.txt +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils.egg-info/top_level.txt +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/pyproject.toml +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/setup.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/tests/test_classes.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/tests/test_decorator.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/tests/test_namespaces.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/tests/test_query.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/tests/test_readme.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/tests/test_typing.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/tests/test_utils.py +0 -0
- {ontolutils-0.4.3 → ontolutils-0.4.4}/tests/test_version.py +0 -0
|
@@ -44,8 +44,11 @@ def resolve_iri(key_or_iri: str, context: Context) -> Optional[str]:
|
|
|
44
44
|
return 'http://www.w3.org/2000/01/rdf-schema#label'
|
|
45
45
|
return
|
|
46
46
|
|
|
47
|
+
|
|
47
48
|
def build_blank_n3():
|
|
48
49
|
return rdflib.BNode().n3()
|
|
50
|
+
|
|
51
|
+
|
|
49
52
|
@namespaces(owl='http://www.w3.org/2002/07/owl#',
|
|
50
53
|
rdfs='http://www.w3.org/2000/01/rdf-schema#')
|
|
51
54
|
@urirefs(Thing='owl:Thing', label='rdfs:label')
|
|
@@ -290,7 +293,8 @@ class Thing(ThingModel):
|
|
|
290
293
|
exclude_none: bool = True,
|
|
291
294
|
rdflib_serialize: bool = False,
|
|
292
295
|
resolve_keys: bool = True,
|
|
293
|
-
assign_bnode: bool = True
|
|
296
|
+
assign_bnode: bool = True,
|
|
297
|
+
indent: int = 4) -> str:
|
|
294
298
|
"""Similar to model_dump_json() but will return a JSON string with
|
|
295
299
|
context resulting in a JSON-LD serialization. Using `rdflib_serialize=True`
|
|
296
300
|
will use the rdflib to serialize. This will make the output a bit cleaner
|
|
@@ -315,6 +319,8 @@ class Thing(ThingModel):
|
|
|
315
319
|
explained in the context.
|
|
316
320
|
assign_bnode: bool=True
|
|
317
321
|
Assigns a blank node if no ID is set.
|
|
322
|
+
indent: int=4
|
|
323
|
+
The indent of the JSON-LD string
|
|
318
324
|
|
|
319
325
|
.. seealso:: `Thing.get_jsonld_dict`
|
|
320
326
|
|
|
@@ -343,7 +349,7 @@ class Thing(ThingModel):
|
|
|
343
349
|
|
|
344
350
|
return g.serialize(format='json-ld',
|
|
345
351
|
context=_context,
|
|
346
|
-
indent=
|
|
352
|
+
indent=indent)
|
|
347
353
|
|
|
348
354
|
def __repr__(self, limit: Optional[int] = None):
|
|
349
355
|
_fields = {k: getattr(self, k) for k in self.model_fields if getattr(self, k) is not None}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|