pyMetaModel 0.2.5__tar.gz → 0.2.7__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.
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/PKG-INFO +2 -2
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/README.md +1 -1
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/ceur-ws/ceur-ws.mermaid +3 -1
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/ceur-ws/ceur-ws.py +28 -1
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/ceur-ws/ceur-ws.xlsx +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/ceur-ws/ceur-ws.yaml +25 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/city/city.py +1 -1
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/city/city.xlsx +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/family/FamilyContext.mermaid +3 -1
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/family/FamilyContext.py +31 -1
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/family/FamilyContext.xlsx +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/family/FamilyContext.yaml +30 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/metamodel/metamodel.mermaid +3 -1
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/metamodel/metamodel.py +31 -1
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/metamodel/metamodel.xlsx +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/metamodel/metamodel.yaml +30 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/scientific-events/scientific-events.mermaid +5 -1
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/scientific-events/scientific-events.py +51 -1
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/scientific-events/scientific-events.xlsx +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/scientific-events/scientific-events.yaml +50 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/teaching/TeachingSchema.py +1 -1
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/teaching/TeachingSchema.xlsx +0 -0
- pymetamodel-0.2.7/meta/__init__.py +1 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/meta/metamodel.py +67 -14
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/meta/sidif2linkml.py +7 -3
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/tests/test_mw.py +8 -2
- pymetamodel-0.2.5/meta/__init__.py +0 -1
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/.github/workflows/build.yml +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/.github/workflows/upload-to-pypi.yml +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/.gitignore +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/.project +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/.pydevproject +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/LICENSE +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/ceur-ws/ceur-ws.puml +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/ceur-ws/ceur-ws.sidif +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/ceur-ws/ceur-ws_puml.txt +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/city/city.mermaid +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/city/city.puml +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/city/city.sidif +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/city/city.yaml +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/city/city_puml.txt +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/family/FamilyContext.puml +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/family/FamilyContext.sidif +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/family/FamilyContext_puml.txt +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/metamodel/metamodel.puml +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/metamodel/metamodel.sidif +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/metamodel/metamodel_puml.txt +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/scientific-events/scientific-events.puml +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/scientific-events/scientific-events.sidif +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/scientific-events/scientific-events_puml.txt +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/teaching/TeachingSchema.mermaid +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/teaching/TeachingSchema.puml +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/teaching/TeachingSchema.sidif +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/teaching/TeachingSchema.yaml +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/teaching/TeachingSchema_puml.txt +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/meta/metamodel_cmd.py +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/meta/mw.py +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/meta/profiler.py +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/meta/smw_type.py +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/meta/uml.py +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/meta/version.py +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/pyproject.toml +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/scripts/genexamples +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/scripts/install +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/scripts/test +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/tests/__init__.py +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/tests/basemwtest.py +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/tests/basetest.py +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/tests/test_linkml.py +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/tests/test_metamodel.py +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/tests/test_plantuml.py +0 -0
- {pymetamodel-0.2.5 → pymetamodel-0.2.7}/tests/test_sidif.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyMetaModel
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Project-URL: Home, https://github.com/WolfgangFahl/pyMetaModel
|
|
5
5
|
Project-URL: Documentation, https://wiki.bitplan.com/index.php/PyMetaModel
|
|
6
6
|
Project-URL: Source, https://github.com/WolfgangFahl/pyMetaModel
|
|
@@ -236,7 +236,7 @@ Description-Content-Type: text/markdown
|
|
|
236
236
|
# pyMetaModel
|
|
237
237
|
migrates https://wiki.bitplan.com/index.php/MetaModel#tab=Model to python
|
|
238
238
|
|
|
239
|
-
[](https://github.com/WolfgangFahl/
|
|
239
|
+
[](https://github.com/WolfgangFahl/pyMetaModel/discussions)
|
|
240
240
|
[](https://pypi.org/project/pyMetaModel/)
|
|
241
241
|
[](https://github.com/WolfgangFahl/pyMetaModel/actions?query=workflow%3ABuild+branch%3Amain)
|
|
242
242
|
[](https://pypi.python.org/pypi/pyMetaModel/)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# pyMetaModel
|
|
2
2
|
migrates https://wiki.bitplan.com/index.php/MetaModel#tab=Model to python
|
|
3
3
|
|
|
4
|
-
[](https://github.com/WolfgangFahl/
|
|
4
|
+
[](https://github.com/WolfgangFahl/pyMetaModel/discussions)
|
|
5
5
|
[](https://pypi.org/project/pyMetaModel/)
|
|
6
6
|
[](https://github.com/WolfgangFahl/pyMetaModel/actions?query=workflow%3ABuild+branch%3Amain)
|
|
7
7
|
[](https://pypi.python.org/pypi/pyMetaModel/)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Auto generated from ceur-ws.yaml by pythongen.py version: 0.9.0
|
|
2
|
-
# Generation date: 2023-03-
|
|
2
|
+
# Generation date: 2023-03-08T09:55:09
|
|
3
3
|
# Schema: CeurwsSchema
|
|
4
4
|
#
|
|
5
5
|
# id: CeurwsSchema
|
|
@@ -210,11 +210,15 @@ class Session(YAMLRoot):
|
|
|
210
210
|
class_model_uri: ClassVar[URIRef] = CEURWSSCHEMA.Session
|
|
211
211
|
|
|
212
212
|
title: Optional[str] = None
|
|
213
|
+
volume: Optional[Union[dict, Volume]] = None
|
|
213
214
|
|
|
214
215
|
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
|
|
215
216
|
if self.title is not None and not isinstance(self.title, str):
|
|
216
217
|
self.title = str(self.title)
|
|
217
218
|
|
|
219
|
+
if self.volume is not None and not isinstance(self.volume, Volume):
|
|
220
|
+
self.volume = Volume(**as_dict(self.volume))
|
|
221
|
+
|
|
218
222
|
super().__post_init__(**kwargs)
|
|
219
223
|
|
|
220
224
|
|
|
@@ -234,6 +238,8 @@ class Paper(YAMLRoot):
|
|
|
234
238
|
title: Optional[str] = None
|
|
235
239
|
authors: Optional[str] = None
|
|
236
240
|
pdfUrl: Optional[Union[str, URI]] = None
|
|
241
|
+
volume: Optional[Union[dict, Volume]] = None
|
|
242
|
+
session: Optional[Union[dict, Session]] = None
|
|
237
243
|
|
|
238
244
|
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
|
|
239
245
|
if self.id is not None and not isinstance(self.id, str):
|
|
@@ -248,6 +254,12 @@ class Paper(YAMLRoot):
|
|
|
248
254
|
if self.pdfUrl is not None and not isinstance(self.pdfUrl, URI):
|
|
249
255
|
self.pdfUrl = URI(self.pdfUrl)
|
|
250
256
|
|
|
257
|
+
if self.volume is not None and not isinstance(self.volume, Volume):
|
|
258
|
+
self.volume = Volume(**as_dict(self.volume))
|
|
259
|
+
|
|
260
|
+
if self.session is not None and not isinstance(self.session, Session):
|
|
261
|
+
self.session = Session(**as_dict(self.session))
|
|
262
|
+
|
|
251
263
|
super().__post_init__(**kwargs)
|
|
252
264
|
|
|
253
265
|
|
|
@@ -264,6 +276,9 @@ slots.number = Slot(uri=CEURWSSCHEMA.number, name="number", curie=CEURWSSCHEMA.c
|
|
|
264
276
|
slots.title = Slot(uri=CEURWSSCHEMA.title, name="title", curie=CEURWSSCHEMA.curie('title'),
|
|
265
277
|
model_uri=CEURWSSCHEMA.title, domain=None, range=Optional[str])
|
|
266
278
|
|
|
279
|
+
slots.volume = Slot(uri=CEURWSSCHEMA.volume, name="volume", curie=CEURWSSCHEMA.curie('volume'),
|
|
280
|
+
model_uri=CEURWSSCHEMA.volume, domain=None, range=Optional[Union[dict, Volume]])
|
|
281
|
+
|
|
267
282
|
slots.id = Slot(uri=CEURWSSCHEMA.id, name="id", curie=CEURWSSCHEMA.curie('id'),
|
|
268
283
|
model_uri=CEURWSSCHEMA.id, domain=None, range=Optional[str])
|
|
269
284
|
|
|
@@ -273,6 +288,9 @@ slots.authors = Slot(uri=CEURWSSCHEMA.authors, name="authors", curie=CEURWSSCHEM
|
|
|
273
288
|
slots.pdfUrl = Slot(uri=CEURWSSCHEMA.pdfUrl, name="pdfUrl", curie=CEURWSSCHEMA.curie('pdfUrl'),
|
|
274
289
|
model_uri=CEURWSSCHEMA.pdfUrl, domain=None, range=Optional[Union[str, URI]])
|
|
275
290
|
|
|
291
|
+
slots.session = Slot(uri=CEURWSSCHEMA.session, name="session", curie=CEURWSSCHEMA.curie('session'),
|
|
292
|
+
model_uri=CEURWSSCHEMA.session, domain=None, range=Optional[Union[dict, Session]])
|
|
293
|
+
|
|
276
294
|
slots.volume__number = Slot(uri=CEURWSSCHEMA.number, name="volume__number", curie=CEURWSSCHEMA.curie('number'),
|
|
277
295
|
model_uri=CEURWSSCHEMA.volume__number, domain=None, range=Optional[float])
|
|
278
296
|
|
|
@@ -282,6 +300,9 @@ slots.volume__title = Slot(uri=CEURWSSCHEMA.title, name="volume__title", curie=C
|
|
|
282
300
|
slots.session__title = Slot(uri=CEURWSSCHEMA.title, name="session__title", curie=CEURWSSCHEMA.curie('title'),
|
|
283
301
|
model_uri=CEURWSSCHEMA.session__title, domain=None, range=Optional[str])
|
|
284
302
|
|
|
303
|
+
slots.session__volume = Slot(uri=CEURWSSCHEMA.volume, name="session__volume", curie=CEURWSSCHEMA.curie('volume'),
|
|
304
|
+
model_uri=CEURWSSCHEMA.session__volume, domain=None, range=Optional[Union[dict, Volume]])
|
|
305
|
+
|
|
285
306
|
slots.paper__id = Slot(uri=CEURWSSCHEMA.id, name="paper__id", curie=CEURWSSCHEMA.curie('id'),
|
|
286
307
|
model_uri=CEURWSSCHEMA.paper__id, domain=None, range=Optional[str])
|
|
287
308
|
|
|
@@ -293,3 +314,9 @@ slots.paper__authors = Slot(uri=CEURWSSCHEMA.authors, name="paper__authors", cur
|
|
|
293
314
|
|
|
294
315
|
slots.paper__pdfUrl = Slot(uri=CEURWSSCHEMA.pdfUrl, name="paper__pdfUrl", curie=CEURWSSCHEMA.curie('pdfUrl'),
|
|
295
316
|
model_uri=CEURWSSCHEMA.paper__pdfUrl, domain=None, range=Optional[Union[str, URI]])
|
|
317
|
+
|
|
318
|
+
slots.paper__volume = Slot(uri=CEURWSSCHEMA.volume, name="paper__volume", curie=CEURWSSCHEMA.curie('volume'),
|
|
319
|
+
model_uri=CEURWSSCHEMA.paper__volume, domain=None, range=Optional[Union[dict, Volume]])
|
|
320
|
+
|
|
321
|
+
slots.paper__session = Slot(uri=CEURWSSCHEMA.session, name="paper__session", curie=CEURWSSCHEMA.curie('session'),
|
|
322
|
+
model_uri=CEURWSSCHEMA.paper__session, domain=None, range=Optional[Union[dict, Session]])
|
|
Binary file
|
|
@@ -175,6 +175,11 @@ slots:
|
|
|
175
175
|
Paper
|
|
176
176
|
from_schema: CeurwsSchema
|
|
177
177
|
range: string
|
|
178
|
+
volume:
|
|
179
|
+
name: volume
|
|
180
|
+
description: volume,volume
|
|
181
|
+
from_schema: CeurwsSchema
|
|
182
|
+
range: Volume
|
|
178
183
|
id:
|
|
179
184
|
name: id
|
|
180
185
|
description: The id (filename) of the Paper
|
|
@@ -190,6 +195,11 @@ slots:
|
|
|
190
195
|
description: the url for the pdf of this paper
|
|
191
196
|
from_schema: CeurwsSchema
|
|
192
197
|
range: uri
|
|
198
|
+
session:
|
|
199
|
+
name: session
|
|
200
|
+
description: session
|
|
201
|
+
from_schema: CeurwsSchema
|
|
202
|
+
range: Session
|
|
193
203
|
classes:
|
|
194
204
|
Volume:
|
|
195
205
|
name: Volume
|
|
@@ -219,6 +229,11 @@ classes:
|
|
|
219
229
|
the Paper
|
|
220
230
|
from_schema: CeurwsSchema
|
|
221
231
|
range: string
|
|
232
|
+
volume:
|
|
233
|
+
name: volume
|
|
234
|
+
description: volume,volume
|
|
235
|
+
from_schema: CeurwsSchema
|
|
236
|
+
range: Volume
|
|
222
237
|
Paper:
|
|
223
238
|
name: Paper
|
|
224
239
|
description: A paper is e.g. a scholarly article
|
|
@@ -245,4 +260,14 @@ classes:
|
|
|
245
260
|
description: the url for the pdf of this paper
|
|
246
261
|
from_schema: CeurwsSchema
|
|
247
262
|
range: uri
|
|
263
|
+
volume:
|
|
264
|
+
name: volume
|
|
265
|
+
description: volume,volume
|
|
266
|
+
from_schema: CeurwsSchema
|
|
267
|
+
range: Volume
|
|
268
|
+
session:
|
|
269
|
+
name: session
|
|
270
|
+
description: session
|
|
271
|
+
from_schema: CeurwsSchema
|
|
272
|
+
range: Session
|
|
248
273
|
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Auto generated from FamilyContext.yaml by pythongen.py version: 0.9.0
|
|
2
|
-
# Generation date: 2023-03-
|
|
2
|
+
# Generation date: 2023-03-08T09:54:40
|
|
3
3
|
# Schema: FamilyContext
|
|
4
4
|
#
|
|
5
5
|
# id: FamilyContext
|
|
@@ -249,6 +249,9 @@ class Person(YAMLRoot):
|
|
|
249
249
|
monthDied: Optional[float] = None
|
|
250
250
|
noInLine: Optional[float] = None
|
|
251
251
|
wikiPedia: Optional[Union[str, URI]] = None
|
|
252
|
+
childOf: Optional[Union[dict, Family]] = None
|
|
253
|
+
parentOf: Optional[Union[dict, Family]] = None
|
|
254
|
+
spouse: Optional[Union[dict, "Person"]] = None
|
|
252
255
|
|
|
253
256
|
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
|
|
254
257
|
if self.qid is not None and not isinstance(self.qid, str):
|
|
@@ -299,6 +302,15 @@ class Person(YAMLRoot):
|
|
|
299
302
|
if self.wikiPedia is not None and not isinstance(self.wikiPedia, URI):
|
|
300
303
|
self.wikiPedia = URI(self.wikiPedia)
|
|
301
304
|
|
|
305
|
+
if self.childOf is not None and not isinstance(self.childOf, Family):
|
|
306
|
+
self.childOf = Family(**as_dict(self.childOf))
|
|
307
|
+
|
|
308
|
+
if self.parentOf is not None and not isinstance(self.parentOf, Family):
|
|
309
|
+
self.parentOf = Family(**as_dict(self.parentOf))
|
|
310
|
+
|
|
311
|
+
if self.spouse is not None and not isinstance(self.spouse, Person):
|
|
312
|
+
self.spouse = Person(**as_dict(self.spouse))
|
|
313
|
+
|
|
302
314
|
super().__post_init__(**kwargs)
|
|
303
315
|
|
|
304
316
|
|
|
@@ -378,6 +390,15 @@ slots.noInLine = Slot(uri=FAMILYCONTEXT.noInLine, name="noInLine", curie=FAMILYC
|
|
|
378
390
|
slots.wikiPedia = Slot(uri=FAMILYCONTEXT.wikiPedia, name="wikiPedia", curie=FAMILYCONTEXT.curie('wikiPedia'),
|
|
379
391
|
model_uri=FAMILYCONTEXT.wikiPedia, domain=None, range=Optional[Union[str, URI]])
|
|
380
392
|
|
|
393
|
+
slots.childOf = Slot(uri=FAMILYCONTEXT.childOf, name="childOf", curie=FAMILYCONTEXT.curie('childOf'),
|
|
394
|
+
model_uri=FAMILYCONTEXT.childOf, domain=None, range=Optional[Union[dict, Family]])
|
|
395
|
+
|
|
396
|
+
slots.parentOf = Slot(uri=FAMILYCONTEXT.parentOf, name="parentOf", curie=FAMILYCONTEXT.curie('parentOf'),
|
|
397
|
+
model_uri=FAMILYCONTEXT.parentOf, domain=None, range=Optional[Union[dict, Family]])
|
|
398
|
+
|
|
399
|
+
slots.spouse = Slot(uri=FAMILYCONTEXT.spouse, name="spouse", curie=FAMILYCONTEXT.curie('spouse'),
|
|
400
|
+
model_uri=FAMILYCONTEXT.spouse, domain=None, range=Optional[Union[dict, Person]])
|
|
401
|
+
|
|
381
402
|
slots.family__name = Slot(uri=FAMILYCONTEXT.name, name="family__name", curie=FAMILYCONTEXT.curie('name'),
|
|
382
403
|
model_uri=FAMILYCONTEXT.family__name, domain=None, range=Optional[str])
|
|
383
404
|
|
|
@@ -449,3 +470,12 @@ slots.person__noInLine = Slot(uri=FAMILYCONTEXT.noInLine, name="person__noInLine
|
|
|
449
470
|
|
|
450
471
|
slots.person__wikiPedia = Slot(uri=FAMILYCONTEXT.wikiPedia, name="person__wikiPedia", curie=FAMILYCONTEXT.curie('wikiPedia'),
|
|
451
472
|
model_uri=FAMILYCONTEXT.person__wikiPedia, domain=None, range=Optional[Union[str, URI]])
|
|
473
|
+
|
|
474
|
+
slots.person__childOf = Slot(uri=FAMILYCONTEXT.childOf, name="person__childOf", curie=FAMILYCONTEXT.curie('childOf'),
|
|
475
|
+
model_uri=FAMILYCONTEXT.person__childOf, domain=None, range=Optional[Union[dict, Family]])
|
|
476
|
+
|
|
477
|
+
slots.person__parentOf = Slot(uri=FAMILYCONTEXT.parentOf, name="person__parentOf", curie=FAMILYCONTEXT.curie('parentOf'),
|
|
478
|
+
model_uri=FAMILYCONTEXT.person__parentOf, domain=None, range=Optional[Union[dict, Family]])
|
|
479
|
+
|
|
480
|
+
slots.person__spouse = Slot(uri=FAMILYCONTEXT.spouse, name="person__spouse", curie=FAMILYCONTEXT.curie('spouse'),
|
|
481
|
+
model_uri=FAMILYCONTEXT.person__spouse, domain=None, range=Optional[Union[dict, Person]])
|
|
Binary file
|
|
@@ -275,6 +275,21 @@ slots:
|
|
|
275
275
|
description: the wikiPedia link of the Person
|
|
276
276
|
from_schema: FamilyContext
|
|
277
277
|
range: uri
|
|
278
|
+
childOf:
|
|
279
|
+
name: childOf
|
|
280
|
+
description: childOf
|
|
281
|
+
from_schema: FamilyContext
|
|
282
|
+
range: Family
|
|
283
|
+
parentOf:
|
|
284
|
+
name: parentOf
|
|
285
|
+
description: parentOf
|
|
286
|
+
from_schema: FamilyContext
|
|
287
|
+
range: Family
|
|
288
|
+
spouse:
|
|
289
|
+
name: spouse
|
|
290
|
+
description: spouse
|
|
291
|
+
from_schema: FamilyContext
|
|
292
|
+
range: Person
|
|
278
293
|
classes:
|
|
279
294
|
Family:
|
|
280
295
|
name: Family
|
|
@@ -403,4 +418,19 @@ classes:
|
|
|
403
418
|
description: the wikiPedia link of the Person
|
|
404
419
|
from_schema: FamilyContext
|
|
405
420
|
range: uri
|
|
421
|
+
childOf:
|
|
422
|
+
name: childOf
|
|
423
|
+
description: childOf
|
|
424
|
+
from_schema: FamilyContext
|
|
425
|
+
range: Family
|
|
426
|
+
parentOf:
|
|
427
|
+
name: parentOf
|
|
428
|
+
description: parentOf
|
|
429
|
+
from_schema: FamilyContext
|
|
430
|
+
range: Family
|
|
431
|
+
spouse:
|
|
432
|
+
name: spouse
|
|
433
|
+
description: spouse
|
|
434
|
+
from_schema: FamilyContext
|
|
435
|
+
range: Person
|
|
406
436
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Auto generated from metamodel.yaml by pythongen.py version: 0.9.0
|
|
2
|
-
# Generation date: 2023-03-
|
|
2
|
+
# Generation date: 2023-03-08T09:55:01
|
|
3
3
|
# Schema: MetaModel
|
|
4
4
|
#
|
|
5
5
|
# id: MetaModel
|
|
@@ -240,6 +240,7 @@ class Property(YAMLRoot):
|
|
|
240
240
|
showInGrid: Optional[Union[bool, Bool]] = None
|
|
241
241
|
isLink: Optional[Union[bool, Bool]] = None
|
|
242
242
|
nullable: Optional[Union[bool, Bool]] = None
|
|
243
|
+
topic: Optional[Union[dict, "Topic"]] = None
|
|
243
244
|
|
|
244
245
|
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
|
|
245
246
|
if self.name is not None and not isinstance(self.name, str):
|
|
@@ -299,6 +300,9 @@ class Property(YAMLRoot):
|
|
|
299
300
|
if self.nullable is not None and not isinstance(self.nullable, Bool):
|
|
300
301
|
self.nullable = Bool(self.nullable)
|
|
301
302
|
|
|
303
|
+
if self.topic is not None and not isinstance(self.topic, Topic):
|
|
304
|
+
self.topic = Topic(**as_dict(self.topic))
|
|
305
|
+
|
|
302
306
|
super().__post_init__(**kwargs)
|
|
303
307
|
|
|
304
308
|
|
|
@@ -322,6 +326,7 @@ class SMWType(YAMLRoot):
|
|
|
322
326
|
helppage: Optional[Union[str, URI]] = None
|
|
323
327
|
typepage: Optional[str] = None
|
|
324
328
|
javaType: Optional[str] = None
|
|
329
|
+
usedByProperties: Optional[Union[dict, Property]] = None
|
|
325
330
|
|
|
326
331
|
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
|
|
327
332
|
if self.type is not None and not isinstance(self.type, str):
|
|
@@ -342,6 +347,9 @@ class SMWType(YAMLRoot):
|
|
|
342
347
|
if self.javaType is not None and not isinstance(self.javaType, str):
|
|
343
348
|
self.javaType = str(self.javaType)
|
|
344
349
|
|
|
350
|
+
if self.usedByProperties is not None and not isinstance(self.usedByProperties, Property):
|
|
351
|
+
self.usedByProperties = Property(**as_dict(self.usedByProperties))
|
|
352
|
+
|
|
345
353
|
super().__post_init__(**kwargs)
|
|
346
354
|
|
|
347
355
|
|
|
@@ -367,6 +375,7 @@ class Topic(YAMLRoot):
|
|
|
367
375
|
listLimit: Optional[float] = None
|
|
368
376
|
cargo: Optional[Union[bool, Bool]] = None
|
|
369
377
|
headerTabs: Optional[Union[bool, Bool]] = None
|
|
378
|
+
context: Optional[Union[dict, Context]] = None
|
|
370
379
|
|
|
371
380
|
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
|
|
372
381
|
if self.name is not None and not isinstance(self.name, str):
|
|
@@ -399,6 +408,9 @@ class Topic(YAMLRoot):
|
|
|
399
408
|
if self.headerTabs is not None and not isinstance(self.headerTabs, Bool):
|
|
400
409
|
self.headerTabs = Bool(self.headerTabs)
|
|
401
410
|
|
|
411
|
+
if self.context is not None and not isinstance(self.context, Context):
|
|
412
|
+
self.context = Context(**as_dict(self.context))
|
|
413
|
+
|
|
402
414
|
super().__post_init__(**kwargs)
|
|
403
415
|
|
|
404
416
|
|
|
@@ -596,6 +608,9 @@ slots.isLink = Slot(uri=METAMODEL.isLink, name="isLink", curie=METAMODEL.curie('
|
|
|
596
608
|
slots.nullable = Slot(uri=METAMODEL.nullable, name="nullable", curie=METAMODEL.curie('nullable'),
|
|
597
609
|
model_uri=METAMODEL.nullable, domain=None, range=Optional[Union[bool, Bool]])
|
|
598
610
|
|
|
611
|
+
slots.topic = Slot(uri=METAMODEL.topic, name="topic", curie=METAMODEL.curie('topic'),
|
|
612
|
+
model_uri=METAMODEL.topic, domain=None, range=Optional[Union[dict, Topic]])
|
|
613
|
+
|
|
599
614
|
slots.id = Slot(uri=METAMODEL.id, name="id", curie=METAMODEL.curie('id'),
|
|
600
615
|
model_uri=METAMODEL.id, domain=None, range=Optional[str])
|
|
601
616
|
|
|
@@ -608,6 +623,9 @@ slots.typepage = Slot(uri=METAMODEL.typepage, name="typepage", curie=METAMODEL.c
|
|
|
608
623
|
slots.javaType = Slot(uri=METAMODEL.javaType, name="javaType", curie=METAMODEL.curie('javaType'),
|
|
609
624
|
model_uri=METAMODEL.javaType, domain=None, range=Optional[str])
|
|
610
625
|
|
|
626
|
+
slots.usedByProperties = Slot(uri=METAMODEL.usedByProperties, name="usedByProperties", curie=METAMODEL.curie('usedByProperties'),
|
|
627
|
+
model_uri=METAMODEL.usedByProperties, domain=None, range=Optional[Union[dict, Property]])
|
|
628
|
+
|
|
611
629
|
slots.pluralName = Slot(uri=METAMODEL.pluralName, name="pluralName", curie=METAMODEL.curie('pluralName'),
|
|
612
630
|
model_uri=METAMODEL.pluralName, domain=None, range=Optional[str])
|
|
613
631
|
|
|
@@ -632,6 +650,9 @@ slots.cargo = Slot(uri=METAMODEL.cargo, name="cargo", curie=METAMODEL.curie('car
|
|
|
632
650
|
slots.headerTabs = Slot(uri=METAMODEL.headerTabs, name="headerTabs", curie=METAMODEL.curie('headerTabs'),
|
|
633
651
|
model_uri=METAMODEL.headerTabs, domain=None, range=Optional[Union[bool, Bool]])
|
|
634
652
|
|
|
653
|
+
slots.context = Slot(uri=METAMODEL.context, name="context", curie=METAMODEL.curie('context'),
|
|
654
|
+
model_uri=METAMODEL.context, domain=None, range=Optional[Union[dict, Context]])
|
|
655
|
+
|
|
635
656
|
slots.servicetype = Slot(uri=METAMODEL.servicetype, name="servicetype", curie=METAMODEL.curie('servicetype'),
|
|
636
657
|
model_uri=METAMODEL.servicetype, domain=None, range=Optional[str])
|
|
637
658
|
|
|
@@ -758,6 +779,9 @@ slots.property__isLink = Slot(uri=METAMODEL.isLink, name="property__isLink", cur
|
|
|
758
779
|
slots.property__nullable = Slot(uri=METAMODEL.nullable, name="property__nullable", curie=METAMODEL.curie('nullable'),
|
|
759
780
|
model_uri=METAMODEL.property__nullable, domain=None, range=Optional[Union[bool, Bool]])
|
|
760
781
|
|
|
782
|
+
slots.property__topic = Slot(uri=METAMODEL.topic, name="property__topic", curie=METAMODEL.curie('topic'),
|
|
783
|
+
model_uri=METAMODEL.property__topic, domain=None, range=Optional[Union[dict, Topic]])
|
|
784
|
+
|
|
761
785
|
slots.sMWType__type = Slot(uri=METAMODEL.type, name="sMWType__type", curie=METAMODEL.curie('type'),
|
|
762
786
|
model_uri=METAMODEL.sMWType__type, domain=None, range=Optional[str])
|
|
763
787
|
|
|
@@ -776,6 +800,9 @@ slots.sMWType__typepage = Slot(uri=METAMODEL.typepage, name="sMWType__typepage",
|
|
|
776
800
|
slots.sMWType__javaType = Slot(uri=METAMODEL.javaType, name="sMWType__javaType", curie=METAMODEL.curie('javaType'),
|
|
777
801
|
model_uri=METAMODEL.sMWType__javaType, domain=None, range=Optional[str])
|
|
778
802
|
|
|
803
|
+
slots.sMWType__usedByProperties = Slot(uri=METAMODEL.usedByProperties, name="sMWType__usedByProperties", curie=METAMODEL.curie('usedByProperties'),
|
|
804
|
+
model_uri=METAMODEL.sMWType__usedByProperties, domain=None, range=Optional[Union[dict, Property]])
|
|
805
|
+
|
|
779
806
|
slots.topic__name = Slot(uri=METAMODEL.name, name="topic__name", curie=METAMODEL.curie('name'),
|
|
780
807
|
model_uri=METAMODEL.topic__name, domain=None, range=Optional[str])
|
|
781
808
|
|
|
@@ -806,6 +833,9 @@ slots.topic__cargo = Slot(uri=METAMODEL.cargo, name="topic__cargo", curie=METAMO
|
|
|
806
833
|
slots.topic__headerTabs = Slot(uri=METAMODEL.headerTabs, name="topic__headerTabs", curie=METAMODEL.curie('headerTabs'),
|
|
807
834
|
model_uri=METAMODEL.topic__headerTabs, domain=None, range=Optional[Union[bool, Bool]])
|
|
808
835
|
|
|
836
|
+
slots.topic__context = Slot(uri=METAMODEL.context, name="topic__context", curie=METAMODEL.curie('context'),
|
|
837
|
+
model_uri=METAMODEL.topic__context, domain=None, range=Optional[Union[dict, Context]])
|
|
838
|
+
|
|
809
839
|
slots.action__name = Slot(uri=METAMODEL.name, name="action__name", curie=METAMODEL.curie('name'),
|
|
810
840
|
model_uri=METAMODEL.action__name, domain=None, range=Optional[str])
|
|
811
841
|
|
|
Binary file
|
|
@@ -373,6 +373,11 @@ slots:
|
|
|
373
373
|
description: should nullvalues be allowed and value set to NULL when empty?
|
|
374
374
|
from_schema: MetaModel
|
|
375
375
|
range: boolean
|
|
376
|
+
topic:
|
|
377
|
+
name: topic
|
|
378
|
+
description: topic
|
|
379
|
+
from_schema: MetaModel
|
|
380
|
+
range: Topic
|
|
376
381
|
id:
|
|
377
382
|
name: id
|
|
378
383
|
description: SMW internal id of the type
|
|
@@ -395,6 +400,11 @@ slots:
|
|
|
395
400
|
description: Java mapping of this type
|
|
396
401
|
from_schema: MetaModel
|
|
397
402
|
range: string
|
|
403
|
+
usedByProperties:
|
|
404
|
+
name: usedByProperties
|
|
405
|
+
description: the properties having this type
|
|
406
|
+
from_schema: MetaModel
|
|
407
|
+
range: Property
|
|
398
408
|
pluralName:
|
|
399
409
|
name: pluralName
|
|
400
410
|
description: The plural of a topic name. E.g. for the topic 'City' the pluralName
|
|
@@ -438,6 +448,11 @@ slots:
|
|
|
438
448
|
description: shall the forms be generated with header tabs?
|
|
439
449
|
from_schema: MetaModel
|
|
440
450
|
range: boolean
|
|
451
|
+
context:
|
|
452
|
+
name: context
|
|
453
|
+
description: context
|
|
454
|
+
from_schema: MetaModel
|
|
455
|
+
range: Context
|
|
441
456
|
servicetype:
|
|
442
457
|
name: servicetype
|
|
443
458
|
description: The type of the service
|
|
@@ -759,6 +774,11 @@ classes:
|
|
|
759
774
|
description: should nullvalues be allowed and value set to NULL when empty?
|
|
760
775
|
from_schema: MetaModel
|
|
761
776
|
range: boolean
|
|
777
|
+
topic:
|
|
778
|
+
name: topic
|
|
779
|
+
description: topic
|
|
780
|
+
from_schema: MetaModel
|
|
781
|
+
range: Topic
|
|
762
782
|
SMW_Type:
|
|
763
783
|
name: SMW_Type
|
|
764
784
|
description: an SMW_Type is a data type which determines the possible values for
|
|
@@ -801,6 +821,11 @@ classes:
|
|
|
801
821
|
description: Java mapping of this type
|
|
802
822
|
from_schema: MetaModel
|
|
803
823
|
range: string
|
|
824
|
+
usedByProperties:
|
|
825
|
+
name: usedByProperties
|
|
826
|
+
description: the properties having this type
|
|
827
|
+
from_schema: MetaModel
|
|
828
|
+
range: Property
|
|
804
829
|
Topic:
|
|
805
830
|
name: Topic
|
|
806
831
|
description: A Topic is a Concept/Class/Thing/Entity
|
|
@@ -863,6 +888,11 @@ classes:
|
|
|
863
888
|
description: shall the forms be generated with header tabs?
|
|
864
889
|
from_schema: MetaModel
|
|
865
890
|
range: boolean
|
|
891
|
+
context:
|
|
892
|
+
name: context
|
|
893
|
+
description: context
|
|
894
|
+
from_schema: MetaModel
|
|
895
|
+
range: Context
|
|
866
896
|
Action:
|
|
867
897
|
name: Action
|
|
868
898
|
description: An action/function/operation to be performed
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Auto generated from scientific-events.yaml by pythongen.py version: 0.9.0
|
|
2
|
-
# Generation date: 2023-03-
|
|
2
|
+
# Generation date: 2023-03-08T09:54:23
|
|
3
3
|
# Schema: CrSchema
|
|
4
4
|
#
|
|
5
5
|
# id: CrSchema
|
|
@@ -226,6 +226,10 @@ class Event(YAMLRoot):
|
|
|
226
226
|
title: Optional[str] = None
|
|
227
227
|
homepage: Optional[str] = None
|
|
228
228
|
wikidataid: Optional[str] = None
|
|
229
|
+
series: Optional[Union[dict, EventSeries]] = None
|
|
230
|
+
city: Optional[Union[dict, "City"]] = None
|
|
231
|
+
country: Optional[Union[dict, "Country"]] = None
|
|
232
|
+
region: Optional[Union[dict, "Region"]] = None
|
|
229
233
|
|
|
230
234
|
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
|
|
231
235
|
if self.acronym is not None and not isinstance(self.acronym, str):
|
|
@@ -243,6 +247,18 @@ class Event(YAMLRoot):
|
|
|
243
247
|
if self.wikidataid is not None and not isinstance(self.wikidataid, str):
|
|
244
248
|
self.wikidataid = str(self.wikidataid)
|
|
245
249
|
|
|
250
|
+
if self.series is not None and not isinstance(self.series, EventSeries):
|
|
251
|
+
self.series = EventSeries(**as_dict(self.series))
|
|
252
|
+
|
|
253
|
+
if self.city is not None and not isinstance(self.city, City):
|
|
254
|
+
self.city = City(**as_dict(self.city))
|
|
255
|
+
|
|
256
|
+
if self.country is not None and not isinstance(self.country, Country):
|
|
257
|
+
self.country = Country(**as_dict(self.country))
|
|
258
|
+
|
|
259
|
+
if self.region is not None and not isinstance(self.region, Region):
|
|
260
|
+
self.region = Region(**as_dict(self.region))
|
|
261
|
+
|
|
246
262
|
super().__post_init__(**kwargs)
|
|
247
263
|
|
|
248
264
|
|
|
@@ -429,6 +445,7 @@ class Institution(YAMLRoot):
|
|
|
429
445
|
wikidataid: Optional[str] = None
|
|
430
446
|
homepage: Optional[str] = None
|
|
431
447
|
smartCRMId: Optional[str] = None
|
|
448
|
+
scholar: Optional[Union[dict, Scholar]] = None
|
|
432
449
|
|
|
433
450
|
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
|
|
434
451
|
if self.title is not None and not isinstance(self.title, str):
|
|
@@ -443,6 +460,9 @@ class Institution(YAMLRoot):
|
|
|
443
460
|
if self.smartCRMId is not None and not isinstance(self.smartCRMId, str):
|
|
444
461
|
self.smartCRMId = str(self.smartCRMId)
|
|
445
462
|
|
|
463
|
+
if self.scholar is not None and not isinstance(self.scholar, Scholar):
|
|
464
|
+
self.scholar = Scholar(**as_dict(self.scholar))
|
|
465
|
+
|
|
446
466
|
super().__post_init__(**kwargs)
|
|
447
467
|
|
|
448
468
|
|
|
@@ -509,6 +529,18 @@ slots.wikidataid = Slot(uri=CRSCHEMA.wikidataid, name="wikidataid", curie=CRSCHE
|
|
|
509
529
|
slots.homepage = Slot(uri=CRSCHEMA.homepage, name="homepage", curie=CRSCHEMA.curie('homepage'),
|
|
510
530
|
model_uri=CRSCHEMA.homepage, domain=None, range=Optional[str])
|
|
511
531
|
|
|
532
|
+
slots.series = Slot(uri=CRSCHEMA.series, name="series", curie=CRSCHEMA.curie('series'),
|
|
533
|
+
model_uri=CRSCHEMA.series, domain=None, range=Optional[Union[dict, EventSeries]])
|
|
534
|
+
|
|
535
|
+
slots.city = Slot(uri=CRSCHEMA.city, name="city", curie=CRSCHEMA.curie('city'),
|
|
536
|
+
model_uri=CRSCHEMA.city, domain=None, range=Optional[Union[dict, City]])
|
|
537
|
+
|
|
538
|
+
slots.country = Slot(uri=CRSCHEMA.country, name="country", curie=CRSCHEMA.curie('country'),
|
|
539
|
+
model_uri=CRSCHEMA.country, domain=None, range=Optional[Union[dict, Country]])
|
|
540
|
+
|
|
541
|
+
slots.region = Slot(uri=CRSCHEMA.region, name="region", curie=CRSCHEMA.curie('region'),
|
|
542
|
+
model_uri=CRSCHEMA.region, domain=None, range=Optional[Union[dict, Region]])
|
|
543
|
+
|
|
512
544
|
slots.name = Slot(uri=CRSCHEMA.name, name="name", curie=CRSCHEMA.curie('name'),
|
|
513
545
|
model_uri=CRSCHEMA.name, domain=None, range=Optional[str])
|
|
514
546
|
|
|
@@ -539,6 +571,9 @@ slots.gndId = Slot(uri=CRSCHEMA.gndId, name="gndId", curie=CRSCHEMA.curie('gndId
|
|
|
539
571
|
slots.smartCRMId = Slot(uri=CRSCHEMA.smartCRMId, name="smartCRMId", curie=CRSCHEMA.curie('smartCRMId'),
|
|
540
572
|
model_uri=CRSCHEMA.smartCRMId, domain=None, range=Optional[str])
|
|
541
573
|
|
|
574
|
+
slots.scholar = Slot(uri=CRSCHEMA.scholar, name="scholar", curie=CRSCHEMA.curie('scholar'),
|
|
575
|
+
model_uri=CRSCHEMA.scholar, domain=None, range=Optional[Union[dict, Scholar]])
|
|
576
|
+
|
|
542
577
|
slots.id = Slot(uri=CRSCHEMA.id, name="id", curie=CRSCHEMA.curie('id'),
|
|
543
578
|
model_uri=CRSCHEMA.id, domain=None, range=Optional[str])
|
|
544
579
|
|
|
@@ -578,6 +613,18 @@ slots.event__homepage = Slot(uri=CRSCHEMA.homepage, name="event__homepage", curi
|
|
|
578
613
|
slots.event__wikidataid = Slot(uri=CRSCHEMA.wikidataid, name="event__wikidataid", curie=CRSCHEMA.curie('wikidataid'),
|
|
579
614
|
model_uri=CRSCHEMA.event__wikidataid, domain=None, range=Optional[str])
|
|
580
615
|
|
|
616
|
+
slots.event__series = Slot(uri=CRSCHEMA.series, name="event__series", curie=CRSCHEMA.curie('series'),
|
|
617
|
+
model_uri=CRSCHEMA.event__series, domain=None, range=Optional[Union[dict, EventSeries]])
|
|
618
|
+
|
|
619
|
+
slots.event__city = Slot(uri=CRSCHEMA.city, name="event__city", curie=CRSCHEMA.curie('city'),
|
|
620
|
+
model_uri=CRSCHEMA.event__city, domain=None, range=Optional[Union[dict, City]])
|
|
621
|
+
|
|
622
|
+
slots.event__country = Slot(uri=CRSCHEMA.country, name="event__country", curie=CRSCHEMA.curie('country'),
|
|
623
|
+
model_uri=CRSCHEMA.event__country, domain=None, range=Optional[Union[dict, Country]])
|
|
624
|
+
|
|
625
|
+
slots.event__region = Slot(uri=CRSCHEMA.region, name="event__region", curie=CRSCHEMA.curie('region'),
|
|
626
|
+
model_uri=CRSCHEMA.event__region, domain=None, range=Optional[Union[dict, Region]])
|
|
627
|
+
|
|
581
628
|
slots.city__name = Slot(uri=CRSCHEMA.name, name="city__name", curie=CRSCHEMA.curie('name'),
|
|
582
629
|
model_uri=CRSCHEMA.city__name, domain=None, range=Optional[str])
|
|
583
630
|
|
|
@@ -650,6 +697,9 @@ slots.institution__homepage = Slot(uri=CRSCHEMA.homepage, name="institution__hom
|
|
|
650
697
|
slots.institution__smartCRMId = Slot(uri=CRSCHEMA.smartCRMId, name="institution__smartCRMId", curie=CRSCHEMA.curie('smartCRMId'),
|
|
651
698
|
model_uri=CRSCHEMA.institution__smartCRMId, domain=None, range=Optional[str])
|
|
652
699
|
|
|
700
|
+
slots.institution__scholar = Slot(uri=CRSCHEMA.scholar, name="institution__scholar", curie=CRSCHEMA.curie('scholar'),
|
|
701
|
+
model_uri=CRSCHEMA.institution__scholar, domain=None, range=Optional[Union[dict, Scholar]])
|
|
702
|
+
|
|
653
703
|
slots.paper__description = Slot(uri=CRSCHEMA.description, name="paper__description", curie=CRSCHEMA.curie('description'),
|
|
654
704
|
model_uri=CRSCHEMA.paper__description, domain=None, range=Optional[str])
|
|
655
705
|
|
|
Binary file
|
|
@@ -198,6 +198,26 @@ slots:
|
|
|
198
198
|
of the scholar,The homepage of the Institution
|
|
199
199
|
from_schema: CrSchema
|
|
200
200
|
range: string
|
|
201
|
+
series:
|
|
202
|
+
name: series
|
|
203
|
+
description: series
|
|
204
|
+
from_schema: CrSchema
|
|
205
|
+
range: EventSeries
|
|
206
|
+
city:
|
|
207
|
+
name: city
|
|
208
|
+
description: city
|
|
209
|
+
from_schema: CrSchema
|
|
210
|
+
range: City
|
|
211
|
+
country:
|
|
212
|
+
name: country
|
|
213
|
+
description: country
|
|
214
|
+
from_schema: CrSchema
|
|
215
|
+
range: Country
|
|
216
|
+
region:
|
|
217
|
+
name: region
|
|
218
|
+
description: region
|
|
219
|
+
from_schema: CrSchema
|
|
220
|
+
range: Region
|
|
201
221
|
name:
|
|
202
222
|
name: name
|
|
203
223
|
description: The name of the city,The name of the Country,The name of the Region,The
|
|
@@ -250,6 +270,11 @@ slots:
|
|
|
250
270
|
description: smartCRM id of the scholar,smartCRM id of the scholar
|
|
251
271
|
from_schema: CrSchema
|
|
252
272
|
range: string
|
|
273
|
+
scholar:
|
|
274
|
+
name: scholar
|
|
275
|
+
description: scholar
|
|
276
|
+
from_schema: CrSchema
|
|
277
|
+
range: Scholar
|
|
253
278
|
id:
|
|
254
279
|
name: id
|
|
255
280
|
description: The id (filename) of the Paper
|
|
@@ -344,6 +369,26 @@ classes:
|
|
|
344
369
|
the Institution,The wikidataid of the paper
|
|
345
370
|
from_schema: CrSchema
|
|
346
371
|
range: string
|
|
372
|
+
series:
|
|
373
|
+
name: series
|
|
374
|
+
description: series
|
|
375
|
+
from_schema: CrSchema
|
|
376
|
+
range: EventSeries
|
|
377
|
+
city:
|
|
378
|
+
name: city
|
|
379
|
+
description: city
|
|
380
|
+
from_schema: CrSchema
|
|
381
|
+
range: City
|
|
382
|
+
country:
|
|
383
|
+
name: country
|
|
384
|
+
description: country
|
|
385
|
+
from_schema: CrSchema
|
|
386
|
+
range: Country
|
|
387
|
+
region:
|
|
388
|
+
name: region
|
|
389
|
+
description: region
|
|
390
|
+
from_schema: CrSchema
|
|
391
|
+
range: Region
|
|
347
392
|
City:
|
|
348
393
|
name: City
|
|
349
394
|
description: large permanent human settlement
|
|
@@ -526,6 +571,11 @@ classes:
|
|
|
526
571
|
description: smartCRM id of the scholar,smartCRM id of the scholar
|
|
527
572
|
from_schema: CrSchema
|
|
528
573
|
range: string
|
|
574
|
+
scholar:
|
|
575
|
+
name: scholar
|
|
576
|
+
description: scholar
|
|
577
|
+
from_schema: CrSchema
|
|
578
|
+
range: Scholar
|
|
529
579
|
Paper:
|
|
530
580
|
name: Paper
|
|
531
581
|
description: A paper is e.g. a scholarly article
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.7"
|
|
@@ -136,7 +136,50 @@ class Context(MetaModelElement):
|
|
|
136
136
|
tl.sourceTopic=self.lookupTopic(tl.source,f"topicLink {tl.name}")
|
|
137
137
|
tl.targetTopic=self.lookupTopic(tl.target,f"topicLink {tl.name}")
|
|
138
138
|
if tl.targetTopic is not None and tl.sourceTopic is not None:
|
|
139
|
-
self.link_source_with_target(tl, tl.sourceTopic, tl.targetTopic)
|
|
139
|
+
self.link_source_with_target(tl, tl.sourceTopic, tl.targetTopic)
|
|
140
|
+
|
|
141
|
+
def addProperty(self,prop:'Property')->bool:
|
|
142
|
+
"""
|
|
143
|
+
add the given property to this context
|
|
144
|
+
|
|
145
|
+
Args:
|
|
146
|
+
prop(Property): the property to add
|
|
147
|
+
|
|
148
|
+
Returns:
|
|
149
|
+
bool: True if the property adding was successful
|
|
150
|
+
"""
|
|
151
|
+
if not hasattr(prop, "topic"):
|
|
152
|
+
self.error(f"prop {prop} has no topic")
|
|
153
|
+
return False
|
|
154
|
+
topic_name = prop.topic
|
|
155
|
+
if not hasattr(prop, "name"):
|
|
156
|
+
self.error(f"prop {prop} has no name")
|
|
157
|
+
return False
|
|
158
|
+
topic=self.lookupTopic(topic_name,f"property {prop.name}")
|
|
159
|
+
if topic:
|
|
160
|
+
topic.properties[prop.name] = prop
|
|
161
|
+
return True
|
|
162
|
+
|
|
163
|
+
def createProperty4TopicLink(self,tl:'TopicLink')->'Propertx':
|
|
164
|
+
"""
|
|
165
|
+
create a property for the given topic link
|
|
166
|
+
|
|
167
|
+
Args:
|
|
168
|
+
tl: TopicLink - the topiclink to create a property for
|
|
169
|
+
"""
|
|
170
|
+
# see https://wiki.bitplan.com/index.php/SiDIFTemplates#properties
|
|
171
|
+
prop=Property()
|
|
172
|
+
prop.name=tl.sourceRole
|
|
173
|
+
prop.label=prop.name
|
|
174
|
+
if hasattr(tl, "sourceDocumentation"):
|
|
175
|
+
prop.documentation=tl.sourceDocumentation
|
|
176
|
+
else:
|
|
177
|
+
prop.documentation=f"{prop.name}"
|
|
178
|
+
prop.topic=tl.target
|
|
179
|
+
prop.type="Page"
|
|
180
|
+
prop.topicLink=tl
|
|
181
|
+
prop.isLink=True
|
|
182
|
+
return prop
|
|
140
183
|
|
|
141
184
|
@classmethod
|
|
142
185
|
def fromDictOfDicts(cls, did:dict) -> 'Context':
|
|
@@ -185,19 +228,17 @@ true is targetMultiple of it
|
|
|
185
228
|
context.addLink(tl)
|
|
186
229
|
elif isA == "Property":
|
|
187
230
|
prop = Property()
|
|
231
|
+
prop.isLink=False
|
|
188
232
|
prop.fromDict(record)
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
topic_name = prop.topic
|
|
193
|
-
if not hasattr(prop, "name"):
|
|
194
|
-
context.error(f"prop {prop} has no name")
|
|
195
|
-
continue
|
|
196
|
-
topic=context.lookupTopic(topic_name,f"property {prop.name}")
|
|
197
|
-
if topic:
|
|
198
|
-
topic.properties[prop.name] = prop
|
|
233
|
+
context.addProperty(prop)
|
|
234
|
+
|
|
235
|
+
# link topic to concepts and add topicLinks
|
|
199
236
|
for topic in context.topics.values():
|
|
200
237
|
topic.setConceptProperty()
|
|
238
|
+
for _tl_name,tl in topic.targetTopicLinks.items():
|
|
239
|
+
prop=context.createProperty4TopicLink(tl)
|
|
240
|
+
context.addProperty(prop)
|
|
241
|
+
pass
|
|
201
242
|
return context
|
|
202
243
|
|
|
203
244
|
@classmethod
|
|
@@ -399,12 +440,13 @@ class Topic(MetaModelElement):
|
|
|
399
440
|
markup=f"{sortClause}{orderClause}"
|
|
400
441
|
return markup
|
|
401
442
|
|
|
402
|
-
def askQuery(self,mainlabel:str=None,listLimit:int=None)->str:
|
|
443
|
+
def askQuery(self,mainlabel:str=None,filterShowInGrid:bool=True,listLimit:int=None)->str:
|
|
403
444
|
"""
|
|
404
445
|
get the askQuery for the me topic
|
|
405
446
|
|
|
406
447
|
Args:
|
|
407
448
|
mainlabel(str): the mainlabel to use - topic.name as default
|
|
449
|
+
filterShowInGrid(bool): if True include only properties with showInGrid not being false
|
|
408
450
|
listLimit(int): the list limit to use
|
|
409
451
|
Returns:
|
|
410
452
|
str: the markup for the query
|
|
@@ -417,8 +459,13 @@ class Topic(MetaModelElement):
|
|
|
417
459
|
|mainlabel={mainlabel}
|
|
418
460
|
"""
|
|
419
461
|
for prop in self.properties.values():
|
|
420
|
-
|
|
421
|
-
|
|
462
|
+
if filterShowInGrid and hasattr(prop, "showInGrid"):
|
|
463
|
+
show=prop.showInGrid
|
|
464
|
+
else:
|
|
465
|
+
show=True
|
|
466
|
+
if show:
|
|
467
|
+
markup+=f"|?{self.name} {prop.name} = {prop.name}\n"
|
|
468
|
+
markup+=f"|limit={listLimit}\n"
|
|
422
469
|
markup+=f"""{self.askSort()}}}}}"""
|
|
423
470
|
return markup
|
|
424
471
|
|
|
@@ -427,6 +474,12 @@ class Property(MetaModelElement):
|
|
|
427
474
|
"""
|
|
428
475
|
Provides helper functions and constants for properties
|
|
429
476
|
"""
|
|
477
|
+
|
|
478
|
+
def __init__(self):
|
|
479
|
+
"""
|
|
480
|
+
constructor
|
|
481
|
+
"""
|
|
482
|
+
MetaModelElement.__init__(self)
|
|
430
483
|
|
|
431
484
|
@classmethod
|
|
432
485
|
def getSamples(cls):
|
|
@@ -71,10 +71,14 @@ class SiDIF2LinkML:
|
|
|
71
71
|
"Page": "string", # @TODO will need own type
|
|
72
72
|
"Number": "double", # @TODO will need special type handling
|
|
73
73
|
}
|
|
74
|
-
if prop.
|
|
75
|
-
|
|
74
|
+
if prop.isLink:
|
|
75
|
+
# 1:1 and 1:n handling
|
|
76
|
+
slot.range=prop.topicLink.source
|
|
76
77
|
else:
|
|
77
|
-
|
|
78
|
+
if prop.type in typesMap:
|
|
79
|
+
slot.range=typesMap[prop.type]
|
|
80
|
+
else:
|
|
81
|
+
slot.range="string"
|
|
78
82
|
sv.add_slot(slot)
|
|
79
83
|
cd.attributes[qname]=slot
|
|
80
84
|
pass
|
|
@@ -96,12 +96,12 @@ class TestMediawiki(BaseMediawikiTest):
|
|
|
96
96
|
if debug:
|
|
97
97
|
for prop in props:
|
|
98
98
|
print(f"{prop.index}:{prop.name}")
|
|
99
|
-
self.assertEqual(
|
|
99
|
+
self.assertEqual(11,len(props))
|
|
100
100
|
self.assertTrue("pluralName",props[1].name)
|
|
101
101
|
|
|
102
102
|
def testAskQuery4Topic(self):
|
|
103
103
|
"""
|
|
104
|
-
test creating the
|
|
104
|
+
test creating the ask query for a topic
|
|
105
105
|
"""
|
|
106
106
|
debug=self.debug
|
|
107
107
|
debug=True
|
|
@@ -161,6 +161,12 @@ class TestMediawiki(BaseMediawikiTest):
|
|
|
161
161
|
self.assertIsNone(errMsg)
|
|
162
162
|
self.assertTrue("OsProject" in context.topics)
|
|
163
163
|
pass
|
|
164
|
+
|
|
165
|
+
def test_Issue23(self):
|
|
166
|
+
"""
|
|
167
|
+
https://github.com/WolfgangFahl/pyMetaModel/issues/23
|
|
168
|
+
handle "showInGrid"
|
|
169
|
+
"""
|
|
164
170
|
|
|
165
171
|
def test_metamodel_from_wikis(self):
|
|
166
172
|
"""
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.5"
|
|
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
|
{pymetamodel-0.2.5 → pymetamodel-0.2.7}/examples/scientific-events/scientific-events_puml.txt
RENAMED
|
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
|