ontolutils 0.2.10__tar.gz → 0.2.13__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.2.10 → ontolutils-0.2.13}/PKG-INFO +1 -1
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/classes/query_util.py +12 -3
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/classes/thing.py +47 -52
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/classes/utils.py +2 -1
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/namespacelib/__dev.py +34 -28
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/namespacelib/__init__.py +4 -4
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/namespacelib/codemeta.py +2 -2
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/namespacelib/m4i.py +2 -2
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/namespacelib/obo.py +2 -2
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/namespacelib/pivmeta.py +38 -14
- ontolutils-0.2.13/ontolutils/namespacelib/qudt_kind.py +1156 -0
- ontolutils-0.2.13/ontolutils/namespacelib/qudt_unit.py +2521 -0
- ontolutils-0.2.13/ontolutils/namespacelib/schema.py +2858 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/namespacelib/ssno.py +6 -4
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils.egg-info/PKG-INFO +1 -1
- {ontolutils-0.2.10 → ontolutils-0.2.13}/setup.cfg +1 -1
- {ontolutils-0.2.10 → ontolutils-0.2.13}/tests/test_classes.py +78 -51
- {ontolutils-0.2.10 → ontolutils-0.2.13}/tests/test_namespaces.py +12 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/tests/test_utils.py +24 -1
- ontolutils-0.2.10/ontolutils/namespacelib/qudt_kind.py +0 -22591
- ontolutils-0.2.10/ontolutils/namespacelib/qudt_unit.py +0 -35763
- ontolutils-0.2.10/ontolutils/namespacelib/schema.py +0 -16584
- {ontolutils-0.2.10 → ontolutils-0.2.13}/LICENSE +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/README.md +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/__init__.py +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/_version.py +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/cache.py +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/classes/__init__.py +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/classes/decorator.py +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/classes/typing.py +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils/namespacelib/_iana_utils.py +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils.egg-info/SOURCES.txt +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils.egg-info/dependency_links.txt +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils.egg-info/requires.txt +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/ontolutils.egg-info/top_level.txt +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/pyproject.toml +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/setup.py +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/tests/test_decorator.py +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/tests/test_query.py +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/tests/test_readme.py +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/tests/test_typing.py +0 -0
- {ontolutils-0.2.10 → ontolutils-0.2.13}/tests/test_version.py +0 -0
|
@@ -291,12 +291,21 @@ def query(cls: Thing,
|
|
|
291
291
|
|
|
292
292
|
logger.debug(f'Expanding SPARQL results...')
|
|
293
293
|
kwargs: Dict = expand_sparql_res(res.bindings, g, False, False)
|
|
294
|
+
|
|
295
|
+
# in case that the model field names are different than the IRI names, we need to find the
|
|
296
|
+
# corresponding names. The urirefs translate the class model fields to a <prefix>:<name> format.
|
|
297
|
+
# As we have the latter, the inverse dictionary let's us find the model field names.
|
|
298
|
+
from . import get_urirefs
|
|
299
|
+
inverse_urirefs = {_v.split(':', 1)[-1]: _k for _k, _v in get_urirefs(cls).items()}
|
|
300
|
+
|
|
294
301
|
if limit is not None:
|
|
295
302
|
out = []
|
|
296
303
|
for i, (k, v) in enumerate(kwargs.items()):
|
|
304
|
+
model_field_dict = {inverse_urirefs.get(key, key): value for key, value in v.items()}
|
|
297
305
|
if limit == 1:
|
|
298
|
-
return cls.model_validate({'id': k, **
|
|
299
|
-
out.append(cls.model_validate({'id': k, **
|
|
306
|
+
return cls.model_validate({'id': k, **model_field_dict})
|
|
307
|
+
out.append(cls.model_validate({'id': k, **model_field_dict}))
|
|
300
308
|
if i == limit:
|
|
301
309
|
return out
|
|
302
|
-
return [cls.model_validate({'id': k, **
|
|
310
|
+
return [cls.model_validate({'id': k, **{inverse_urirefs.get(key, key): value for key, value in v.items()}}) for k, v
|
|
311
|
+
in kwargs.items()]
|
|
@@ -2,12 +2,13 @@ import abc
|
|
|
2
2
|
import json
|
|
3
3
|
import logging
|
|
4
4
|
import pathlib
|
|
5
|
-
import rdflib
|
|
6
5
|
import warnings
|
|
7
6
|
from datetime import datetime
|
|
8
|
-
from pydantic import HttpUrl, FileUrl, BaseModel, ConfigDict
|
|
9
7
|
from typing import Dict, Union, Optional
|
|
10
8
|
|
|
9
|
+
import rdflib
|
|
10
|
+
from pydantic import HttpUrl, FileUrl, BaseModel, ConfigDict
|
|
11
|
+
|
|
11
12
|
from .decorator import urirefs, namespaces, URIRefManager, NamespaceManager, _is_http_url
|
|
12
13
|
from .typing import BlankNodeType
|
|
13
14
|
from .utils import split_URIRef
|
|
@@ -27,18 +28,34 @@ class ThingModel(BaseModel, abc.ABC):
|
|
|
27
28
|
"""Returns the HTML representation of the class"""
|
|
28
29
|
|
|
29
30
|
|
|
30
|
-
def resolve_iri(iri: str, context: Dict) -> str:
|
|
31
|
+
def resolve_iri(iri: str, context: Dict) -> Union[str, None]:
|
|
31
32
|
"""Resolves short iri string which uses prefix, e.g.
|
|
32
33
|
converts 'foaf:firstName' to 'http://xmlns.com/foaf/0.1/firstName'
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
|
|
35
|
+
.. note::
|
|
36
|
+
|
|
37
|
+
This function will return 'http://www.w3.org/2000/01/rdf-schema#label' if the input iri is 'label'
|
|
38
|
+
and the context does not contain 'label'.
|
|
39
|
+
If the iri could not be resolved, None is returned.
|
|
40
|
+
|
|
41
|
+
|
|
35
42
|
"""
|
|
43
|
+
_iri = context.get(iri, None)
|
|
44
|
+
if _iri is not None:
|
|
45
|
+
if isinstance(_iri, dict):
|
|
46
|
+
iri = _iri.get('@id', iri)
|
|
47
|
+
else:
|
|
48
|
+
iri = _iri
|
|
36
49
|
if iri.startswith('http'):
|
|
37
50
|
return iri
|
|
51
|
+
if ':' not in iri:
|
|
52
|
+
if iri == 'label':
|
|
53
|
+
return 'http://www.w3.org/2000/01/rdf-schema#label'
|
|
54
|
+
return None
|
|
38
55
|
ns, key = split_URIRef(iri)
|
|
39
56
|
prefix_iri = context.get(ns, None)
|
|
40
57
|
if prefix_iri is None:
|
|
41
|
-
return iri
|
|
58
|
+
return None # could not resolve the iri
|
|
42
59
|
return f'{prefix_iri}{key}'
|
|
43
60
|
|
|
44
61
|
|
|
@@ -175,7 +192,7 @@ class Thing(ThingModel):
|
|
|
175
192
|
|
|
176
193
|
logger.debug(f'The context is "{at_context}".')
|
|
177
194
|
|
|
178
|
-
def
|
|
195
|
+
def _serialize_fields(
|
|
179
196
|
obj: Union[ThingModel, int, str, float, bool, datetime],
|
|
180
197
|
exclude_none: bool = True
|
|
181
198
|
) -> Union[Dict, int, str, float, bool]:
|
|
@@ -207,60 +224,38 @@ class Thing(ThingModel):
|
|
|
207
224
|
at_context.update(NamespaceManager.get(obj.__class__, {}))
|
|
208
225
|
|
|
209
226
|
if uri_ref_manager is None:
|
|
210
|
-
return obj
|
|
227
|
+
return str(obj)
|
|
211
228
|
|
|
212
229
|
try:
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
else:
|
|
228
|
-
serialized_fields[iri] = str(value)
|
|
229
|
-
else:
|
|
230
|
-
serialized_fields[iri] = value
|
|
231
|
-
else:
|
|
232
|
-
serialized_fields = {}
|
|
233
|
-
for k in obj.model_dump(exclude_none=True):
|
|
234
|
-
value = getattr(obj, k)
|
|
235
|
-
if value not in ('id', '@id'):
|
|
236
|
-
iri = uri_ref_manager[k]
|
|
237
|
-
if _is_http_url(iri):
|
|
238
|
-
serialized_fields[k] = value
|
|
239
|
-
else:
|
|
240
|
-
serialized_fields[iri] = value
|
|
230
|
+
serialized_fields = {}
|
|
231
|
+
for k in obj.model_dump(exclude_none=exclude_none):
|
|
232
|
+
value = getattr(obj, k)
|
|
233
|
+
if value is not None and k not in ('id', '@id'):
|
|
234
|
+
iri = uri_ref_manager.get(k, k)
|
|
235
|
+
if _is_http_url(iri):
|
|
236
|
+
serialized_fields[iri] = value
|
|
237
|
+
|
|
238
|
+
ns, key = split_URIRef(iri)
|
|
239
|
+
if key != k and not resolve_keys:
|
|
240
|
+
at_context[k] = resolve_iri(iri, at_context)
|
|
241
|
+
serialized_fields[k] = value
|
|
242
|
+
else:
|
|
243
|
+
serialized_fields[iri] = value
|
|
241
244
|
except AttributeError as e:
|
|
242
245
|
raise AttributeError(f"Could not serialize {obj} ({obj.__class__}). Orig. err: {e}") from e
|
|
243
246
|
|
|
244
|
-
# if obj.model_config['extra'] == 'allow':
|
|
245
|
-
# for k, v in obj.model_extra.items():
|
|
246
|
-
# iri = uri_ref_manager.get(k, k)
|
|
247
|
-
# if _is_http_url(iri):
|
|
248
|
-
# serialized_fields[k] = v
|
|
249
|
-
# else:
|
|
250
|
-
# serialized_fields[iri] = v
|
|
251
|
-
|
|
252
247
|
# datetime
|
|
253
248
|
for k, v in serialized_fields.copy().items():
|
|
254
249
|
_field = serialized_fields.pop(k)
|
|
255
250
|
key = k
|
|
256
|
-
if isinstance(v,
|
|
257
|
-
serialized_fields[key] =
|
|
258
|
-
elif isinstance(v, Thing):
|
|
259
|
-
serialized_fields[key] = serialize_fields(v, exclude_none=exclude_none)
|
|
251
|
+
if isinstance(v, Thing):
|
|
252
|
+
serialized_fields[key] = _serialize_fields(v, exclude_none=exclude_none)
|
|
260
253
|
elif isinstance(v, list):
|
|
261
|
-
serialized_fields[key] = [
|
|
254
|
+
serialized_fields[key] = [_serialize_fields(i, exclude_none=exclude_none) for i in v]
|
|
255
|
+
elif isinstance(v, (int, float)):
|
|
256
|
+
serialized_fields[key] = v
|
|
262
257
|
else:
|
|
263
|
-
serialized_fields[key] =
|
|
258
|
+
serialized_fields[key] = _serialize_fields(v)
|
|
264
259
|
|
|
265
260
|
_type = URIRefManager[obj.__class__].get(obj.__class__.__name__, obj.__class__.__name__)
|
|
266
261
|
|
|
@@ -272,7 +267,7 @@ class Thing(ThingModel):
|
|
|
272
267
|
out["@id"] = rdflib.BNode()
|
|
273
268
|
return out
|
|
274
269
|
|
|
275
|
-
serialization =
|
|
270
|
+
serialization = _serialize_fields(self, exclude_none=exclude_none)
|
|
276
271
|
|
|
277
272
|
jsonld = {
|
|
278
273
|
"@context": at_context,
|
|
@@ -284,7 +279,7 @@ class Thing(ThingModel):
|
|
|
284
279
|
context: Optional[Dict] = None,
|
|
285
280
|
exclude_none: bool = True,
|
|
286
281
|
rdflib_serialize: bool = False,
|
|
287
|
-
resolve_keys: bool =
|
|
282
|
+
resolve_keys: bool = True) -> str:
|
|
288
283
|
"""Similar to model_dump_json() but will return a JSON string with
|
|
289
284
|
context resulting in a JSON-LD serialization. Using `rdflib_serialize=True`
|
|
290
285
|
will use the rdflib to serialize. This will make the output a bit cleaner
|
|
@@ -43,7 +43,8 @@ def split_URIRef(uri: rdflib.URIRef) -> List[Union[str, None]]:
|
|
|
43
43
|
_uri = str(uri)
|
|
44
44
|
if _uri.startswith('http'):
|
|
45
45
|
if '#' in _uri:
|
|
46
|
-
|
|
46
|
+
_split = _uri.rsplit('#', 1)
|
|
47
|
+
return [f'{_split[0]}#', _split[1]]
|
|
47
48
|
_split = _uri.rsplit('/', 1)
|
|
48
49
|
return [f'{_split[0]}/', _split[1]]
|
|
49
50
|
if ':' in _uri:
|
|
@@ -35,6 +35,7 @@ def generate_namespace_file_from_ttl(namespace: str,
|
|
|
35
35
|
else:
|
|
36
36
|
target_dir = pathlib.Path(target_dir)
|
|
37
37
|
|
|
38
|
+
fields = []
|
|
38
39
|
with open(target_dir / f'{namespace}.py', 'w',
|
|
39
40
|
encoding='UTF8') as f:
|
|
40
41
|
f.write('from rdflib.namespace import DefinedNamespace, Namespace\n')
|
|
@@ -45,15 +46,18 @@ def generate_namespace_file_from_ttl(namespace: str,
|
|
|
45
46
|
|
|
46
47
|
for s in g.subjects():
|
|
47
48
|
u = str(s).rsplit('/', 1)[-1].replace('-', '_')
|
|
48
|
-
if
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
if u not in fields:
|
|
50
|
+
fields.append(u)
|
|
51
|
+
if '#' in u:
|
|
52
|
+
warnings.warn(f'Skipping {u} ({s}) because it has a "#" in it.')
|
|
53
|
+
elif u[0].isdigit():
|
|
54
|
+
warnings.warn(f'Skipping {u} ({s}) because it starts with a digit.')
|
|
55
|
+
elif u in ('True', 'False', 'yield'):
|
|
56
|
+
warnings.warn(f'Skipping {u} ({s}) because it starts with "yield".')
|
|
57
|
+
else:
|
|
58
|
+
uri = str(s)
|
|
59
|
+
f.write(f'\n {u} = URIRef("{uri}")')
|
|
60
|
+
# f.write(f'\n {u}: URIRef')
|
|
57
61
|
|
|
58
62
|
f.write(f'\n\n _NS = Namespace("{ns}")')
|
|
59
63
|
|
|
@@ -103,6 +107,7 @@ def generate_namespace_file_from_context(namespace: str,
|
|
|
103
107
|
else:
|
|
104
108
|
target_dir = pathlib.Path(target_dir)
|
|
105
109
|
|
|
110
|
+
fields = []
|
|
106
111
|
with open(target_dir / f'{namespace}.py', 'w',
|
|
107
112
|
encoding='UTF8') as f:
|
|
108
113
|
f.write('from rdflib.namespace import DefinedNamespace, Namespace\n')
|
|
@@ -114,7 +119,9 @@ def generate_namespace_file_from_context(namespace: str,
|
|
|
114
119
|
f.write(f'\n # Date: {datetime.datetime.now()}')
|
|
115
120
|
f.write(f'\n _fail = {fail}')
|
|
116
121
|
for k, v in iris.items():
|
|
117
|
-
|
|
122
|
+
if k not in fields:
|
|
123
|
+
fields.append(k)
|
|
124
|
+
f.write(f'\n {k}: URIRef # {v["keys"]}')
|
|
118
125
|
|
|
119
126
|
f.write(f'\n\n _NS = Namespace("{url}")')
|
|
120
127
|
|
|
@@ -296,35 +303,34 @@ def codemeta():
|
|
|
296
303
|
def build_namespace_files():
|
|
297
304
|
"""Call this only if you are a developer and want to build the namespace files"""
|
|
298
305
|
with open(__package_dir__ / '__init__.py', 'w') as f:
|
|
299
|
-
f.write('Auto-generated file. Do not edit
|
|
306
|
+
f.write('"""Auto-generated file. Do not edit!"""\n')
|
|
300
307
|
# f.write('from ._version import __version__\n')
|
|
301
308
|
|
|
302
309
|
with open(__package_dir__ / '__init__.py', 'a') as f:
|
|
303
|
-
|
|
304
|
-
m4i()
|
|
305
|
-
f.write('from .m4i import M4I\n')
|
|
310
|
+
m4i()
|
|
306
311
|
|
|
307
|
-
|
|
308
|
-
f.write('from .obo import OBO\n')
|
|
312
|
+
obo()
|
|
309
313
|
|
|
310
|
-
|
|
311
|
-
f.write('from .qudt_unit import QUDT_UNIT\n')
|
|
314
|
+
qudt_unit()
|
|
312
315
|
|
|
313
|
-
|
|
314
|
-
f.write('from .qudt_kind import QUDT_KIND\n')
|
|
316
|
+
qudt_quantitykind()
|
|
315
317
|
|
|
316
318
|
pivmeta()
|
|
317
|
-
f.write('from .pivmeta import PIVMETA\n')
|
|
318
319
|
|
|
319
|
-
|
|
320
|
-
codemeta()
|
|
321
|
-
f.write('from .codemeta import CODEMETA\n')
|
|
320
|
+
codemeta()
|
|
322
321
|
|
|
323
|
-
|
|
324
|
-
f.write('from .schema import SCHEMA\n')
|
|
322
|
+
schema()
|
|
325
323
|
|
|
326
|
-
|
|
327
|
-
|
|
324
|
+
ssno()
|
|
325
|
+
f.write('from .m4i import M4I\n')
|
|
326
|
+
f.write('from .obo import OBO\n')
|
|
327
|
+
f.write('from .pivmeta import PIVMETA\n')
|
|
328
|
+
f.write('from .codemeta import CODEMETA\n')
|
|
329
|
+
f.write('from .qudt_unit import QUDT_UNIT\n')
|
|
330
|
+
f.write('from .qudt_kind import QUDT_KIND\n')
|
|
331
|
+
f.write('from .schema import SCHEMA\n')
|
|
332
|
+
f.write('from .ssno import SSNO\n')
|
|
333
|
+
f.write('from ._iana_utils import IANA\n')
|
|
328
334
|
|
|
329
335
|
for jld in __package_dir__.glob('*.jsonld'):
|
|
330
336
|
jld.unlink()
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"""
|
|
2
|
-
from ._iana_utils import IANA
|
|
3
|
-
from .codemeta import CODEMETA
|
|
1
|
+
"""Auto-generated file. Do not edit!"""
|
|
4
2
|
from .m4i import M4I
|
|
5
3
|
from .obo import OBO
|
|
6
4
|
from .pivmeta import PIVMETA
|
|
7
|
-
from .
|
|
5
|
+
from .codemeta import CODEMETA
|
|
8
6
|
from .qudt_unit import QUDT_UNIT
|
|
7
|
+
from .qudt_kind import QUDT_KIND
|
|
9
8
|
from .schema import SCHEMA
|
|
10
9
|
from .ssno import SSNO
|
|
10
|
+
from ._iana_utils import IANA
|
|
@@ -7,8 +7,8 @@ class LanguageExtension:
|
|
|
7
7
|
|
|
8
8
|
class CODEMETA(DefinedNamespace):
|
|
9
9
|
# uri = "https://w3id.org/nfdi4ing/metadata4ing#"
|
|
10
|
-
# Generated with
|
|
11
|
-
# Date: 2024-03-
|
|
10
|
+
# Generated with None version 0.2.10
|
|
11
|
+
# Date: 2024-03-24 15:10:54.311802
|
|
12
12
|
_fail = True
|
|
13
13
|
softwareSuggestions: URIRef # ['softwareSuggestions']
|
|
14
14
|
contIntegration: URIRef # ['contIntegration']
|
|
@@ -7,8 +7,8 @@ class LanguageExtension:
|
|
|
7
7
|
|
|
8
8
|
class M4I(DefinedNamespace):
|
|
9
9
|
# uri = "https://w3id.org/nfdi4ing/metadata4ing#"
|
|
10
|
-
# Generated with
|
|
11
|
-
# Date: 2024-03-
|
|
10
|
+
# Generated with None version 0.2.10
|
|
11
|
+
# Date: 2024-03-24 15:10:44.476048
|
|
12
12
|
_fail = True
|
|
13
13
|
Method: URIRef # ['Methode', 'method']
|
|
14
14
|
NumericalAssignment: URIRef # ['numerical assignment', 'numerische Zuweisung']
|
|
@@ -7,8 +7,8 @@ class LanguageExtension:
|
|
|
7
7
|
|
|
8
8
|
class OBO(DefinedNamespace):
|
|
9
9
|
# uri = "https://w3id.org/nfdi4ing/metadata4ing#"
|
|
10
|
-
# Generated with
|
|
11
|
-
# Date: 2024-03-
|
|
10
|
+
# Generated with None version 0.2.10
|
|
11
|
+
# Date: 2024-03-24 15:10:45.600748
|
|
12
12
|
_fail = True
|
|
13
13
|
BFO_0000015: URIRef # ['Prozess', 'process']
|
|
14
14
|
BFO_0000017: URIRef # ['realisierbare Entität', 'realizable entity']
|
|
@@ -7,13 +7,12 @@ class LanguageExtension:
|
|
|
7
7
|
|
|
8
8
|
class PIVMETA(DefinedNamespace):
|
|
9
9
|
# uri = "https://w3id.org/nfdi4ing/metadata4ing#"
|
|
10
|
-
# Generated with None version 0.2.
|
|
11
|
-
# Date: 2024-03-
|
|
10
|
+
# Generated with None version 0.2.10
|
|
11
|
+
# Date: 2024-03-24 15:10:53.848424
|
|
12
12
|
_fail = True
|
|
13
13
|
time: URIRef # ['time']
|
|
14
14
|
BackgroundImageGeneration: URIRef # ['background image generation']
|
|
15
15
|
BackgroundSubtractionMethod: URIRef # ['background subtraction']
|
|
16
|
-
CorrelationMethod: URIRef # ['correlation method']
|
|
17
16
|
DigitalCamera: URIRef # ['Digital Camera']
|
|
18
17
|
DigitalCameraModel: URIRef # ['Digital Camera Model']
|
|
19
18
|
ImageDewarp: URIRef # ['image dewarp']
|
|
@@ -42,6 +41,7 @@ class PIVMETA(DefinedNamespace):
|
|
|
42
41
|
useOutlierReplacementScheme: URIRef # ['uses outlier replacement scheme']
|
|
43
42
|
filenamePattern: URIRef # ['filename pattern']
|
|
44
43
|
fnumber: URIRef # ['fnumber']
|
|
44
|
+
material: URIRef # ['material']
|
|
45
45
|
numberOfRecords: URIRef # ['number of records']
|
|
46
46
|
ExperimentalImage: URIRef # ['experimental image']
|
|
47
47
|
GaussWindowWeightingFunction: URIRef # ['gauss']
|
|
@@ -66,26 +66,37 @@ class PIVMETA(DefinedNamespace):
|
|
|
66
66
|
image_particle_density: URIRef # ['image_particle_density']
|
|
67
67
|
image_density: URIRef # ['image_density']
|
|
68
68
|
image_particle_diameter: URIRef # ['image_particle_diameter']
|
|
69
|
+
arithmetic_mean_of_image_particle_diameter: URIRef # ['arithmetic_mean_of_image_particle_diameter']
|
|
70
|
+
standard_deviation_of_image_particle_diameter: URIRef # ['standard_deviation_of_image_particle_diameter']
|
|
69
71
|
piv_image_index: URIRef # ['piv_image_index']
|
|
70
72
|
inplane_velocity: URIRef # ['inplane_velocity']
|
|
73
|
+
x_inplane_velocity: URIRef # ['x_inplane_velocity']
|
|
74
|
+
y_inplane_velocity: URIRef # ['y_inplane_velocity']
|
|
71
75
|
model_laser_sheet_thickness: URIRef # ['model_laser_sheet_thickness']
|
|
72
76
|
laser_sheet_thickness: URIRef # ['laser_sheet_thickness']
|
|
73
77
|
model_laser_sheet_shape_factor: URIRef # ['model_laser_sheet_shape_factor']
|
|
74
|
-
|
|
78
|
+
arithmetic_mean_of_seeding_particle_size: URIRef # ['arithmetic_mean_of_seeding_particle_size']
|
|
79
|
+
standard_deviation_of_seeding_particle_size: URIRef # ['standard_deviation_of_seeding_particle_size']
|
|
75
80
|
number_of_particles: URIRef # ['number_of_particles']
|
|
76
81
|
laser_pulse_delay: URIRef # ['laser_pulse_delay']
|
|
77
82
|
saturated_pixel_number: URIRef # ['saturated_pixel_number']
|
|
78
83
|
second_peak_x_displacement: URIRef # ['second_peak_x_displacement']
|
|
79
84
|
second_peak_y_displacement: URIRef # ['second_peak_y_displacement']
|
|
80
|
-
seeding_material: URIRef # ['seeding_material']
|
|
81
|
-
standard_deviation_of_image_particle_diameter: URIRef # ['standard_deviation_of_image_particle_diameter']
|
|
82
85
|
third_peak_x_displacement: URIRef # ['third_peak_x_displacement']
|
|
83
86
|
third_peak_y_displacement: URIRef # ['third_peak_y_displacement']
|
|
84
87
|
relative_time: URIRef # ['relative_time']
|
|
85
|
-
|
|
88
|
+
magnitude_of_velocity: URIRef # ['magnitude_of_velocity']
|
|
89
|
+
x_velocity: URIRef # ['x_velocity']
|
|
90
|
+
y_velocity: URIRef # ['y_velocity']
|
|
91
|
+
z_velocity: URIRef # ['z_velocity']
|
|
86
92
|
displacement: URIRef # ['displacement']
|
|
93
|
+
x_displacement: URIRef # ['x_displacement']
|
|
94
|
+
y_displacement: URIRef # ['y_displacement']
|
|
95
|
+
final_interrogation_window_overlap_size: URIRef # ['final_interrogation_window_overlap_size']
|
|
87
96
|
x_final_interrogation_window_overlap_size: URIRef # ['x_final_interrogation_window_overlap_size']
|
|
97
|
+
final_interrogation_window_size: URIRef # ['final_interrogation_window_size']
|
|
88
98
|
x_final_interrogation_window_size: URIRef # ['x_final_interrogation_window_size']
|
|
99
|
+
initial_interrogation_window_size: URIRef # ['initial_interrogation_window_size']
|
|
89
100
|
x_initial_interrogation_window_size: URIRef # ['x_initial_interrogation_window_size']
|
|
90
101
|
x_pixel_coordinate: URIRef # ['x_pixel_coordinate']
|
|
91
102
|
y_final_interrogation_window_overlap_size: URIRef # ['y_final_interrogation_window_overlap_size']
|
|
@@ -93,7 +104,8 @@ class PIVMETA(DefinedNamespace):
|
|
|
93
104
|
y_initial_interrogation_window_size: URIRef # ['y_initial_interrogation_window_size']
|
|
94
105
|
y_pixel_coordinate: URIRef # ['y_pixel_coordinate']
|
|
95
106
|
pixel_origin: URIRef # ['pixel_origin']
|
|
96
|
-
|
|
107
|
+
x_coordinate: URIRef # ['x_coordinate']
|
|
108
|
+
y_coordinate: URIRef # ['y_coordinate']
|
|
97
109
|
signal_to_noise_ratio: URIRef # ['signal_to_noise_ratio']
|
|
98
110
|
least_square_residual_of_z_displacement_reconstruction: URIRef # ['least_square_residual_of_z_displacement_reconstruction']
|
|
99
111
|
piv_scaling_factor: URIRef # ['piv_scaling_factor']
|
|
@@ -112,7 +124,6 @@ class PIVMETA(DefinedNamespace):
|
|
|
112
124
|
setattr(PIVMETA, "time", PIVMETA.time)
|
|
113
125
|
setattr(PIVMETA, "background_image_generation", PIVMETA.BackgroundImageGeneration)
|
|
114
126
|
setattr(PIVMETA, "background_subtraction", PIVMETA.BackgroundSubtractionMethod)
|
|
115
|
-
setattr(PIVMETA, "correlation_method", PIVMETA.CorrelationMethod)
|
|
116
127
|
setattr(PIVMETA, "Digital_Camera", PIVMETA.DigitalCamera)
|
|
117
128
|
setattr(PIVMETA, "Digital_Camera_Model", PIVMETA.DigitalCameraModel)
|
|
118
129
|
setattr(PIVMETA, "image_dewarp", PIVMETA.ImageDewarp)
|
|
@@ -141,6 +152,7 @@ setattr(PIVMETA, "piv_image_type", PIVMETA.pivImageType)
|
|
|
141
152
|
setattr(PIVMETA, "uses_outlier_replacement_scheme", PIVMETA.useOutlierReplacementScheme)
|
|
142
153
|
setattr(PIVMETA, "filename_pattern", PIVMETA.filenamePattern)
|
|
143
154
|
setattr(PIVMETA, "fnumber", PIVMETA.fnumber)
|
|
155
|
+
setattr(PIVMETA, "material", PIVMETA.material)
|
|
144
156
|
setattr(PIVMETA, "number_of_records", PIVMETA.numberOfRecords)
|
|
145
157
|
setattr(PIVMETA, "experimental_image", PIVMETA.ExperimentalImage)
|
|
146
158
|
setattr(PIVMETA, "gauss", PIVMETA.GaussWindowWeightingFunction)
|
|
@@ -165,26 +177,37 @@ setattr(PIVMETA, "piv_flag", PIVMETA.piv_flag)
|
|
|
165
177
|
setattr(PIVMETA, "image_particle_density", PIVMETA.image_particle_density)
|
|
166
178
|
setattr(PIVMETA, "image_density", PIVMETA.image_density)
|
|
167
179
|
setattr(PIVMETA, "image_particle_diameter", PIVMETA.image_particle_diameter)
|
|
180
|
+
setattr(PIVMETA, "arithmetic_mean_of_image_particle_diameter", PIVMETA.arithmetic_mean_of_image_particle_diameter)
|
|
181
|
+
setattr(PIVMETA, "standard_deviation_of_image_particle_diameter", PIVMETA.standard_deviation_of_image_particle_diameter)
|
|
168
182
|
setattr(PIVMETA, "piv_image_index", PIVMETA.piv_image_index)
|
|
169
183
|
setattr(PIVMETA, "inplane_velocity", PIVMETA.inplane_velocity)
|
|
184
|
+
setattr(PIVMETA, "x_inplane_velocity", PIVMETA.x_inplane_velocity)
|
|
185
|
+
setattr(PIVMETA, "y_inplane_velocity", PIVMETA.y_inplane_velocity)
|
|
170
186
|
setattr(PIVMETA, "model_laser_sheet_thickness", PIVMETA.model_laser_sheet_thickness)
|
|
171
187
|
setattr(PIVMETA, "laser_sheet_thickness", PIVMETA.laser_sheet_thickness)
|
|
172
188
|
setattr(PIVMETA, "model_laser_sheet_shape_factor", PIVMETA.model_laser_sheet_shape_factor)
|
|
173
|
-
setattr(PIVMETA, "
|
|
189
|
+
setattr(PIVMETA, "arithmetic_mean_of_seeding_particle_size", PIVMETA.arithmetic_mean_of_seeding_particle_size)
|
|
190
|
+
setattr(PIVMETA, "standard_deviation_of_seeding_particle_size", PIVMETA.standard_deviation_of_seeding_particle_size)
|
|
174
191
|
setattr(PIVMETA, "number_of_particles", PIVMETA.number_of_particles)
|
|
175
192
|
setattr(PIVMETA, "laser_pulse_delay", PIVMETA.laser_pulse_delay)
|
|
176
193
|
setattr(PIVMETA, "saturated_pixel_number", PIVMETA.saturated_pixel_number)
|
|
177
194
|
setattr(PIVMETA, "second_peak_x_displacement", PIVMETA.second_peak_x_displacement)
|
|
178
195
|
setattr(PIVMETA, "second_peak_y_displacement", PIVMETA.second_peak_y_displacement)
|
|
179
|
-
setattr(PIVMETA, "seeding_material", PIVMETA.seeding_material)
|
|
180
|
-
setattr(PIVMETA, "standard_deviation_of_image_particle_diameter", PIVMETA.standard_deviation_of_image_particle_diameter)
|
|
181
196
|
setattr(PIVMETA, "third_peak_x_displacement", PIVMETA.third_peak_x_displacement)
|
|
182
197
|
setattr(PIVMETA, "third_peak_y_displacement", PIVMETA.third_peak_y_displacement)
|
|
183
198
|
setattr(PIVMETA, "relative_time", PIVMETA.relative_time)
|
|
184
|
-
setattr(PIVMETA, "
|
|
199
|
+
setattr(PIVMETA, "magnitude_of_velocity", PIVMETA.magnitude_of_velocity)
|
|
200
|
+
setattr(PIVMETA, "x_velocity", PIVMETA.x_velocity)
|
|
201
|
+
setattr(PIVMETA, "y_velocity", PIVMETA.y_velocity)
|
|
202
|
+
setattr(PIVMETA, "z_velocity", PIVMETA.z_velocity)
|
|
185
203
|
setattr(PIVMETA, "displacement", PIVMETA.displacement)
|
|
204
|
+
setattr(PIVMETA, "x_displacement", PIVMETA.x_displacement)
|
|
205
|
+
setattr(PIVMETA, "y_displacement", PIVMETA.y_displacement)
|
|
206
|
+
setattr(PIVMETA, "final_interrogation_window_overlap_size", PIVMETA.final_interrogation_window_overlap_size)
|
|
186
207
|
setattr(PIVMETA, "x_final_interrogation_window_overlap_size", PIVMETA.x_final_interrogation_window_overlap_size)
|
|
208
|
+
setattr(PIVMETA, "final_interrogation_window_size", PIVMETA.final_interrogation_window_size)
|
|
187
209
|
setattr(PIVMETA, "x_final_interrogation_window_size", PIVMETA.x_final_interrogation_window_size)
|
|
210
|
+
setattr(PIVMETA, "initial_interrogation_window_size", PIVMETA.initial_interrogation_window_size)
|
|
188
211
|
setattr(PIVMETA, "x_initial_interrogation_window_size", PIVMETA.x_initial_interrogation_window_size)
|
|
189
212
|
setattr(PIVMETA, "x_pixel_coordinate", PIVMETA.x_pixel_coordinate)
|
|
190
213
|
setattr(PIVMETA, "y_final_interrogation_window_overlap_size", PIVMETA.y_final_interrogation_window_overlap_size)
|
|
@@ -192,7 +215,8 @@ setattr(PIVMETA, "y_final_interrogation_window_size", PIVMETA.y_final_interrogat
|
|
|
192
215
|
setattr(PIVMETA, "y_initial_interrogation_window_size", PIVMETA.y_initial_interrogation_window_size)
|
|
193
216
|
setattr(PIVMETA, "y_pixel_coordinate", PIVMETA.y_pixel_coordinate)
|
|
194
217
|
setattr(PIVMETA, "pixel_origin", PIVMETA.pixel_origin)
|
|
195
|
-
setattr(PIVMETA, "
|
|
218
|
+
setattr(PIVMETA, "x_coordinate", PIVMETA.x_coordinate)
|
|
219
|
+
setattr(PIVMETA, "y_coordinate", PIVMETA.y_coordinate)
|
|
196
220
|
setattr(PIVMETA, "signal_to_noise_ratio", PIVMETA.signal_to_noise_ratio)
|
|
197
221
|
setattr(PIVMETA, "least_square_residual_of_z_displacement_reconstruction", PIVMETA.least_square_residual_of_z_displacement_reconstruction)
|
|
198
222
|
setattr(PIVMETA, "piv_scaling_factor", PIVMETA.piv_scaling_factor)
|