oldaplib 0.3.17__py3-none-any.whl → 0.3.18__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.
- oldaplib/src/propertyclass.py +18 -5
- oldaplib/src/version.py +1 -1
- oldaplib/test/test_propertyclass.py +1 -1
- {oldaplib-0.3.17.dist-info → oldaplib-0.3.18.dist-info}/METADATA +1 -1
- {oldaplib-0.3.17.dist-info → oldaplib-0.3.18.dist-info}/RECORD +6 -6
- {oldaplib-0.3.17.dist-info → oldaplib-0.3.18.dist-info}/WHEEL +0 -0
oldaplib/src/propertyclass.py
CHANGED
|
@@ -498,11 +498,24 @@ class PropertyClass(Model, Notify):
|
|
|
498
498
|
"""
|
|
499
499
|
if not isinstance(attr, PropClassAttr):
|
|
500
500
|
raise OldapError(f'Unsupported prop {attr}')
|
|
501
|
-
if attr == PropClassAttr.TYPE
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
501
|
+
if attr == PropClassAttr.TYPE:
|
|
502
|
+
if value is None:
|
|
503
|
+
remaining = self._attributes.get(attr) & {OwlPropertyType.OwlObjectProperty, OwlPropertyType.OwlDataProperty}
|
|
504
|
+
to_delete = self._attributes.get(attr) - remaining
|
|
505
|
+
for x in to_delete:
|
|
506
|
+
self._attributes[attr].discard(x)
|
|
507
|
+
return
|
|
508
|
+
else:
|
|
509
|
+
to_add = set(value) - set(self._attributes.get(attr))
|
|
510
|
+
to_delete = set(self._attributes.get(attr)) - set(value)
|
|
511
|
+
if OwlPropertyType.OwlObjectProperty in to_delete:
|
|
512
|
+
to_delete.remove(OwlPropertyType.OwlObjectProperty)
|
|
513
|
+
if OwlPropertyType.OwlDataProperty in to_delete:
|
|
514
|
+
to_delete.remove(OwlPropertyType.OwlDataProperty)
|
|
515
|
+
for x in to_delete:
|
|
516
|
+
self._attributes[attr].discard(x)
|
|
517
|
+
for x in to_add:
|
|
518
|
+
self._attributes[attr].add(x)
|
|
506
519
|
return
|
|
507
520
|
if self._attributes.get(attr) == value:
|
|
508
521
|
return
|
oldaplib/src/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.3.
|
|
1
|
+
__version__ = "0.3.18"
|
|
@@ -966,7 +966,7 @@ class TestPropertyClass(unittest.TestCase):
|
|
|
966
966
|
name=LangString(["Child"]),
|
|
967
967
|
description={"Child of the human"})
|
|
968
968
|
i.create()
|
|
969
|
-
i.type =
|
|
969
|
+
i.type = {OwlPropertyType.FunctionalProperty, OwlPropertyType.SymmetricProperty}
|
|
970
970
|
i.update()
|
|
971
971
|
i2 = PropertyClass.read(con=self._connection,
|
|
972
972
|
project=self._project,
|
|
@@ -66,11 +66,11 @@ oldaplib/src/oldaplistnode.py,sha256=NnC2juEGTtEkDO6OlB9PjSw_zTF-wSsRUgEk-6VV9DA
|
|
|
66
66
|
oldaplib/src/oldaplogging.py,sha256=IDSOylms9OSTInYPC4Y2QrTTEzRL0T5I2QssCevOhTU,1242
|
|
67
67
|
oldaplib/src/permissionset.py,sha256=bzzVuZ7O_yVMujziwo32GEJIZYGG3g5gTds4HjLmGtU,31874
|
|
68
68
|
oldaplib/src/project.py,sha256=DNwViRg19zkE1F0zuWqQFK008uTVehVAu7xNbyessig,34207
|
|
69
|
-
oldaplib/src/propertyclass.py,sha256=
|
|
69
|
+
oldaplib/src/propertyclass.py,sha256=jXB5Y4Fq9RcSpsW_v7dHxd0BjdFqFWVT9A67k-dnoaw,97330
|
|
70
70
|
oldaplib/src/resourceclass.py,sha256=I6m93JhfCh4XAUFgmb6v0fD798DfU7-ImTKrUJk4g-o,102098
|
|
71
71
|
oldaplib/src/user.py,sha256=Z4GXPRkaHXx3glUpPXQdFqYMxQPOuqayDwkTAE5RGjU,48820
|
|
72
72
|
oldaplib/src/userdataclass.py,sha256=FbZkcRt0pKbOeqsZ7HbpwoKE-XPWH2AqpHG1GcsrBPo,12364
|
|
73
|
-
oldaplib/src/version.py,sha256=
|
|
73
|
+
oldaplib/src/version.py,sha256=KDtsjv7ghvIAiAm_GoJi8tU56ilDnt7P4gEvxUpAlwc,22
|
|
74
74
|
oldaplib/src/xsd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
75
75
|
oldaplib/src/xsd/floatingpoint.py,sha256=rDReKqh0mXyc4F5wslgTUxbeGf3-PGERyughj5_62YI,8852
|
|
76
76
|
oldaplib/src/xsd/iri.py,sha256=w1Dr0z-REi7yPe3GPGnyzGrLVMvLY03kEeK-AmZ9sxw,8383
|
|
@@ -134,7 +134,7 @@ oldaplib/test/test_oldaplist_helpers.py,sha256=vJkA_Txhdk4oIwo2YK566yOte2Z6MQksh
|
|
|
134
134
|
oldaplib/test/test_oldaplistnode.py,sha256=bWoCmDmHvOnNNviSCvhWo7LA2CskA_5IRDxNUufTKj4,149434
|
|
135
135
|
oldaplib/test/test_permissionset.py,sha256=YOCirqm_oFE1Emz9fYsnDeawwI6zHN9xBv9vOZnKst0,23368
|
|
136
136
|
oldaplib/test/test_project.py,sha256=fwkfaCxEskd27xinxDDr74dMWs7S0YcGr84mUOw20x4,25290
|
|
137
|
-
oldaplib/test/test_propertyclass.py,sha256=
|
|
137
|
+
oldaplib/test/test_propertyclass.py,sha256=1C2urIKlZV1FwGlsmJMLcrHk1aSeb9dclydzhYlbNqw,61857
|
|
138
138
|
oldaplib/test/test_resourceclass.py,sha256=WQGyns2S8O6vDH8oXBQjcww_VcjIONovuNdKm0coO-c,96621
|
|
139
139
|
oldaplib/test/test_semantic_version.py,sha256=OSJYHWDpKBqk-HsxJ2nFpSr14a4OEZTFCogzEni8mcE,3392
|
|
140
140
|
oldaplib/test/test_user.py,sha256=gLTcQ0ymi9pYPPpq9BOY_3YS07EJXtnJKFCHe4Rj0mQ,72133
|
|
@@ -158,6 +158,6 @@ oldaplib/testdata/source_type.yaml,sha256=dSihKikw3O-IlGf6anj5KWMoBYLaweLVF1Zojm
|
|
|
158
158
|
oldaplib/testdata/test_move_left_of_toL.yaml,sha256=2m1OSQrQFlsCQxeJrjzBAO74LMprNDo_HuyrYGsOeXI,787
|
|
159
159
|
oldaplib/testdata/testlist.yaml,sha256=AT11nXEG81Sfyb-tr1gQV0H_dZBrOCcFuHf7YtL8P2g,1994
|
|
160
160
|
oldaplib/testit.http,sha256=qW7mnr6aNLXFG6lQdLgyhXILOPN6qc5iFVZclLyVvkY,303
|
|
161
|
-
oldaplib-0.3.
|
|
162
|
-
oldaplib-0.3.
|
|
163
|
-
oldaplib-0.3.
|
|
161
|
+
oldaplib-0.3.18.dist-info/METADATA,sha256=9IYrZnU_x0pbUEcYRWe0qKpthP8GRekOEHWAxX9SxsI,3061
|
|
162
|
+
oldaplib-0.3.18.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
163
|
+
oldaplib-0.3.18.dist-info/RECORD,,
|
|
File without changes
|