oldaplib 0.3.7__tar.gz → 0.3.9__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.
- {oldaplib-0.3.7 → oldaplib-0.3.9}/PKG-INFO +1 -1
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/observable_set.py +28 -18
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/model.py +1 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/objectfactory.py +71 -54
- oldaplib-0.3.9/oldaplib/src/version.py +1 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_datetimestamp.py +1 -1
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_externalontologies.py +3 -2
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_objectfactory.py +45 -2
- {oldaplib-0.3.7 → oldaplib-0.3.9}/pyproject.toml +1 -1
- oldaplib-0.3.7/oldaplib/src/version.py +0 -1
- {oldaplib-0.3.7 → oldaplib-0.3.9}/README.md +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/__init__.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/apps/load_list.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/ontologies/admin-testing.trig +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/ontologies/admin.trig +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/ontologies/example.trig +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/ontologies/oldap.trig +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/ontologies/oldap.ttl +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/ontologies/shared.trig +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/ontologies/standard/.gitsave +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/__init__.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/cachesingleton.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/connection.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/datamodel.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/dtypes/__init__.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/dtypes/bnode.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/dtypes/languagein.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/dtypes/namespaceiri.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/dtypes/rdfset.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/dtypes/xsdset.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/__init__.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/action.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/adminpermissions.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/attributeclass.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/datapermissions.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/externalontologyattr.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/haspropertyattr.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/language.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/oldaplistattr.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/oldaplistnodeattr.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/owlpropertytype.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/permissionsetattr.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/projectattr.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/propertyclassattr.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/resourceclassattr.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/sparql_result_format.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/userattr.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/enums/xsd_datatypes.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/externalontology.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/globalconfig.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/hasproperty.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/Notify.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/__init__.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/attributechange.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/context.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/convert2datatype.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/irincname.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/json_encoder.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/langstring.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/numeric.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/observable_dict.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/oldaperror.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/query_processor.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/semantic_version.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/serializeableset.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/serializer.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/singletonmeta.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/helpers/tools.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/iconnection.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/in_project.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/oldaplist.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/oldaplist_helpers.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/oldaplistnode.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/oldaplogging.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/permissionset.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/project.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/propertyclass.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/resourceclass.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/user.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/userdataclass.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/__init__.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/floatingpoint.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/iri.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_anyuri.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_base64binary.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_boolean.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_byte.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_date.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_datetime.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_decimal.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_double.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_duration.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_float.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_gday.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_gmonth.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_gmonthday.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_gyear.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_gyearmonth.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_hexbinary.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_id.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_idref.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_int.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_integer.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_language.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_long.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_name.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_ncname.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_negativeinteger.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_nmtoken.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_nonnegativeinteger.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_nonpositiveinteger.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_normalizedstring.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_positiveinteger.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_qname.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_short.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_string.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_time.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_token.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_unsignedbyte.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_unsignedint.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_unsignedlong.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/src/xsd/xsd_unsignedshort.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/__init__.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_cache.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_connection.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_context.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_datamodel.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_dtypes.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_hasproperty.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_in_project.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_langstring.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_language_in.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_observable_dict.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_observable_set.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_oldaplist.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_oldaplist_helpers.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_oldaplistnode.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_permissionset.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_project.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_propertyclass.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_resourceclass.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_semantic_version.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_user.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/test/test_xsd_datatypes.py +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/Gender.yaml +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/collections_type.yaml +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/connection_test.trig +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/datamodel_test.trig +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/event_type.yaml +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/hlist_schema.yaml +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/institution_or_building_type.yaml +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/language.yaml +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/location_type.yaml +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/means_of_transportation.yaml +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/objectfactory_test.trig +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/playground_list.yaml +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/role.yaml +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/source_type-1.yaml +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/source_type.yaml +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/test_move_left_of_toL.yaml +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testdata/testlist.yaml +0 -0
- {oldaplib-0.3.7 → oldaplib-0.3.9}/oldaplib/testit.http +0 -0
|
@@ -80,7 +80,7 @@ class ObservableSet(Notify):
|
|
|
80
80
|
def __str__(self) -> str:
|
|
81
81
|
return str(self._setdata)
|
|
82
82
|
|
|
83
|
-
def __eq__(self, other: Iterable) -> bool:
|
|
83
|
+
def __eq__(self, other: Iterable[Any]) -> bool:
|
|
84
84
|
if isinstance(other, ObservableSet):
|
|
85
85
|
return self._setdata == other._setdata
|
|
86
86
|
elif isinstance(other, set):
|
|
@@ -90,7 +90,7 @@ class ObservableSet(Notify):
|
|
|
90
90
|
else:
|
|
91
91
|
raise OldapErrorNotImplemented(f'Set.__eq__() not implemented for {type(other).__name__}')
|
|
92
92
|
|
|
93
|
-
def __or__(self, other: Iterable) -> Self:
|
|
93
|
+
def __or__(self, other: Iterable[Any]) -> Self:
|
|
94
94
|
if isinstance(other, ObservableSet):
|
|
95
95
|
return ObservableSet(self._setdata.__or__(other._setdata), self._notifier, self._notify_data)
|
|
96
96
|
elif isinstance(other, set):
|
|
@@ -100,25 +100,24 @@ class ObservableSet(Notify):
|
|
|
100
100
|
else:
|
|
101
101
|
raise OldapErrorNotImplemented(f'Set.__or__() not implemented for {type(other).__name__}')
|
|
102
102
|
|
|
103
|
-
def __ror__(self, other:
|
|
104
|
-
|
|
103
|
+
def __ror__(self, other: Iterable[Any]) -> Self:
|
|
104
|
+
return ObservableSet(set(other).__or__(self._setdata), self._notifier, self._notify_data)
|
|
105
|
+
|
|
106
|
+
def __rsub__(self, other: Iterable[Any]) -> Self:
|
|
107
|
+
return ObservableSet(set(other).__sub__(self._setdata), self._notifier, self._notify_data)
|
|
105
108
|
|
|
106
|
-
def __ior__(self, other: Iterable) -> Self:
|
|
109
|
+
def __ior__(self, other: Iterable[Any]) -> Self:
|
|
107
110
|
tmp_copy = deepcopy(self)
|
|
108
111
|
if isinstance(other, ObservableSet):
|
|
109
112
|
self._setdata.__ior__(other._setdata)
|
|
110
|
-
elif isinstance(other, set):
|
|
111
|
-
self._setdata.__ior__(other)
|
|
112
|
-
elif isinstance(other, Iterable):
|
|
113
|
-
return ObservableSet(self._setdata.__ior__(set(other)), self._notifier, self._notify_data)
|
|
114
113
|
else:
|
|
115
|
-
|
|
114
|
+
self._setdata.__ior__(set(other))
|
|
116
115
|
if not self._old_value:
|
|
117
116
|
self._old_value = tmp_copy
|
|
118
117
|
self.notify()
|
|
119
118
|
return self
|
|
120
119
|
|
|
121
|
-
def __and__(self, other: Iterable) -> Self:
|
|
120
|
+
def __and__(self, other: Iterable[Any]) -> Self:
|
|
122
121
|
if isinstance(other, ObservableSet):
|
|
123
122
|
return ObservableSet(self._setdata.__and__(other._setdata), self._notifier, self._notify_data)
|
|
124
123
|
elif isinstance(other, set):
|
|
@@ -128,7 +127,7 @@ class ObservableSet(Notify):
|
|
|
128
127
|
else:
|
|
129
128
|
raise OldapErrorNotImplemented(f'Set.__and__() not implemented for {type(other).__name__}')
|
|
130
129
|
|
|
131
|
-
def __iand__(self, other: Iterable) -> Self:
|
|
130
|
+
def __iand__(self, other: Iterable[Any]) -> Self:
|
|
132
131
|
tmp_copy = deepcopy(self)
|
|
133
132
|
if isinstance(other, ObservableSet):
|
|
134
133
|
self._setdata.__iand__(other._setdata)
|
|
@@ -146,7 +145,7 @@ class ObservableSet(Notify):
|
|
|
146
145
|
def __rsub__(self, other: Self) -> Self:
|
|
147
146
|
pass
|
|
148
147
|
|
|
149
|
-
def __sub__(self, other: Iterable) -> Self:
|
|
148
|
+
def __sub__(self, other: Iterable[Any]) -> Self:
|
|
150
149
|
if isinstance(other, ObservableSet):
|
|
151
150
|
return ObservableSet(self._setdata.__sub__(other._setdata), self.notify, self._notify_data)
|
|
152
151
|
elif isinstance(other, set):
|
|
@@ -156,7 +155,7 @@ class ObservableSet(Notify):
|
|
|
156
155
|
else:
|
|
157
156
|
raise OldapErrorNotImplemented(f'Set.__sub__() not implemented for {type(other).__name__}')
|
|
158
157
|
|
|
159
|
-
def __isub__(self, other: Iterable) -> Self:
|
|
158
|
+
def __isub__(self, other: Iterable[Any]) -> Self:
|
|
160
159
|
tmp_copy = deepcopy(self)
|
|
161
160
|
if isinstance(other, ObservableSet):
|
|
162
161
|
self._setdata.__isub__(other._setdata)
|
|
@@ -171,34 +170,45 @@ class ObservableSet(Notify):
|
|
|
171
170
|
self.notify()
|
|
172
171
|
return self
|
|
173
172
|
|
|
174
|
-
|
|
173
|
+
@classmethod
|
|
174
|
+
def coerce(cls, value: Iterable[Any], *, notifier=None, notify_data=None) -> "ObservableSet":
|
|
175
|
+
return value if isinstance(value, cls) else cls(value, notifier=notifier, notify_data=notify_data)
|
|
176
|
+
|
|
177
|
+
def update(self, items: Iterable[Any]):
|
|
175
178
|
tmp_copy = deepcopy(self)
|
|
176
179
|
self._setdata.update(items)
|
|
177
180
|
if not self._old_value:
|
|
178
181
|
self._old_value = tmp_copy
|
|
179
182
|
self.notify()
|
|
180
183
|
|
|
181
|
-
def intersection_update(self, items: Iterable):
|
|
184
|
+
def intersection_update(self, items: Iterable[Any]):
|
|
182
185
|
tmp_copy = deepcopy(self)
|
|
183
186
|
self._setdata.intersection_update(items)
|
|
184
187
|
if not self._old_value:
|
|
185
188
|
self._old_value = tmp_copy
|
|
186
189
|
self.notify()
|
|
187
190
|
|
|
188
|
-
def difference_update(self, items: Iterable):
|
|
191
|
+
def difference_update(self, items: Iterable[Any]):
|
|
189
192
|
tmp_copy = deepcopy(self)
|
|
190
193
|
self._setdata.difference_update(items)
|
|
191
194
|
if not self._old_value:
|
|
192
195
|
self._old_value = tmp_copy
|
|
193
196
|
self.notify()
|
|
194
197
|
|
|
195
|
-
def symmetric_difference_update(self, items: Iterable):
|
|
198
|
+
def symmetric_difference_update(self, items: Iterable[Any]):
|
|
196
199
|
tmp_copy = deepcopy(self)
|
|
197
200
|
self._setdata.symmetric_difference_update(items)
|
|
198
201
|
if not self._old_value:
|
|
199
202
|
self._old_value = tmp_copy
|
|
200
203
|
self.notify()
|
|
201
204
|
|
|
205
|
+
def replace(self, items: Iterable[Any]) -> None:
|
|
206
|
+
tmp_copy = deepcopy(self)
|
|
207
|
+
self._setdata = set(items)
|
|
208
|
+
if not self._old_value:
|
|
209
|
+
self._old_value = tmp_copy
|
|
210
|
+
self.notify()
|
|
211
|
+
|
|
202
212
|
def add(self, item: Any) -> None:
|
|
203
213
|
tmp_copy = deepcopy(self)
|
|
204
214
|
self._setdata.add(item)
|
|
@@ -8,6 +8,7 @@ from typing import Set, Dict, Any, Self
|
|
|
8
8
|
from oldaplib.src.connection import Connection
|
|
9
9
|
from oldaplib.src.enums.action import Action
|
|
10
10
|
from oldaplib.src.enums.attributeclass import AttributeClass
|
|
11
|
+
from oldaplib.src.enums.language import Language
|
|
11
12
|
from oldaplib.src.helpers.attributechange import AttributeChange
|
|
12
13
|
from oldaplib.src.helpers.context import Context
|
|
13
14
|
from oldaplib.src.helpers.numeric import Numeric
|
|
@@ -99,7 +99,7 @@ class ResourceInstance:
|
|
|
99
99
|
if iri and isinstance(iri, str):
|
|
100
100
|
iri = Iri(Xsd_QName(self.project.projectShortName, iri))
|
|
101
101
|
self._iri = Iri(iri, validate=True) if iri else Iri()
|
|
102
|
-
self._values = {}
|
|
102
|
+
self._values: dict[Xsd_QName, ValueType] = {}
|
|
103
103
|
self._graph = self.project.projectShortName
|
|
104
104
|
self._superclass_objs = {}
|
|
105
105
|
self._changeset = {}
|
|
@@ -170,11 +170,33 @@ class ResourceInstance:
|
|
|
170
170
|
|
|
171
171
|
for propname in self.properties.keys():
|
|
172
172
|
setattr(ResourceInstance, propname.fragment, property(
|
|
173
|
-
partial(ResourceInstance.__get_value,
|
|
174
|
-
partial(ResourceInstance.__set_value,
|
|
175
|
-
partial(ResourceInstance.__del_value,
|
|
173
|
+
partial(ResourceInstance.__get_value, attr=propname),
|
|
174
|
+
partial(ResourceInstance.__set_value, attr=propname),
|
|
175
|
+
partial(ResourceInstance.__del_value, attr=propname)))
|
|
176
176
|
self.clear_changeset()
|
|
177
177
|
|
|
178
|
+
def __setitem__(self, key: Xsd_QName, value: ValueType | Xsd | None):
|
|
179
|
+
if self._values.get(key):
|
|
180
|
+
self.__set_value(value, key)
|
|
181
|
+
else:
|
|
182
|
+
raise OldapErrorValue(f'{self.name}: Property {key} does not exist.')
|
|
183
|
+
|
|
184
|
+
def __getitem__(self, key: Xsd_QName) -> ValueType | Xsd | None:
|
|
185
|
+
if self._values.get(key):
|
|
186
|
+
return self.__get_value(key)
|
|
187
|
+
else:
|
|
188
|
+
raise OldapErrorValue(f'{self.name}: Property {key} does not exist.')
|
|
189
|
+
|
|
190
|
+
def __delitem__(self, key: Xsd_QName):
|
|
191
|
+
if self._values.get(key):
|
|
192
|
+
self.__del_value(key)
|
|
193
|
+
|
|
194
|
+
def get(self, key: Xsd_QName) -> ValueType | Xsd | None:
|
|
195
|
+
if self._values.get(key):
|
|
196
|
+
return self._values[key]
|
|
197
|
+
else:
|
|
198
|
+
return None
|
|
199
|
+
|
|
178
200
|
def validate_value(self, values: ValueType, property: PropertyClass):
|
|
179
201
|
"""
|
|
180
202
|
Validates a set of values against a given property and its constraints. This function ensures
|
|
@@ -330,16 +352,19 @@ class ResourceInstance:
|
|
|
330
352
|
else:
|
|
331
353
|
return False, f'Actor does not have {permission} in project "{self.project.projectShortName}".'
|
|
332
354
|
|
|
333
|
-
def __get_value(self: Self,
|
|
334
|
-
attr = Xsd_QName(prefix, fragment, validate=False)
|
|
355
|
+
def __get_value(self: Self, attr: Xsd_QName | str) -> Xsd | ValueType | None:
|
|
356
|
+
#attr = Xsd_QName(prefix, fragment, validate=False)
|
|
357
|
+
if not isinstance(attr, Xsd_QName):
|
|
358
|
+
attr = Xsd_QName(attr)
|
|
335
359
|
tmp = self._values.get(attr, None)
|
|
336
360
|
if tmp is not None and str(attr) in {'oldap:createdBy', 'oldap:creationDate', 'oldap:lastModifiedBy', 'oldap:lastModificationDate'}:
|
|
337
361
|
return next(iter(tmp))
|
|
338
362
|
return tmp
|
|
339
363
|
|
|
340
|
-
def __set_value(self: Self, value: ValueType | Xsd | None,
|
|
341
|
-
|
|
342
|
-
|
|
364
|
+
def __set_value(self: Self, value: ValueType | Xsd | None, attr: Xsd_QName | str) -> None:
|
|
365
|
+
if not isinstance(attr, Xsd_QName):
|
|
366
|
+
attr = Xsd_QName(attr)
|
|
367
|
+
hasprop = self.properties.get(attr)
|
|
343
368
|
|
|
344
369
|
#
|
|
345
370
|
# Validate
|
|
@@ -347,58 +372,58 @@ class ResourceInstance:
|
|
|
347
372
|
if hasprop.get(HasPropertyAttr.MIN_COUNT): # testing for MIN_COUNT conformance
|
|
348
373
|
if hasprop[HasPropertyAttr.MIN_COUNT] > 0 and not value:
|
|
349
374
|
raise OldapErrorValue(
|
|
350
|
-
f'{self.name}: Property {
|
|
375
|
+
f'{self.name}: Property {attr} with MIN_COUNT={hasprop[HasPropertyAttr.MIN_COUNT]} is missing')
|
|
351
376
|
elif isinstance(value, (list, tuple, set, ObservableSet)) and len(value) < hasprop[HasPropertyAttr.MIN_COUNT]:
|
|
352
377
|
raise OldapErrorValue(
|
|
353
|
-
f'{self.name}: Property {
|
|
378
|
+
f'{self.name}: Property {attr} with MIN_COUNT={hasprop[HasPropertyAttr.MIN_COUNT]} has not enough values')
|
|
354
379
|
if hasprop.get(HasPropertyAttr.MAX_COUNT): # testing for MAX_COUNT conformance
|
|
355
380
|
if isinstance(value, (list, tuple, set, ObservableSet)) and len(value) > hasprop[HasPropertyAttr.MAX_COUNT]:
|
|
356
381
|
raise OldapErrorValue(
|
|
357
|
-
f'{self.name}: Property {
|
|
382
|
+
f'{self.name}: Property {attr} with MAX_COUNT={hasprop[HasPropertyAttr.MIN_COUNT]} has to many values (n={len(value)})')
|
|
358
383
|
if value:
|
|
359
384
|
if isinstance(value, LangString):
|
|
360
385
|
self.validate_value(value, hasprop.prop)
|
|
361
386
|
else:
|
|
362
387
|
if isinstance(value, (list, tuple, set, ObservableSet)):
|
|
363
|
-
for val in self._values[
|
|
388
|
+
for val in self._values[attr]:
|
|
364
389
|
self.validate_value(val, hasprop.prop)
|
|
365
390
|
else:
|
|
366
391
|
self.validate_value(value, hasprop.prop)
|
|
367
392
|
|
|
368
393
|
if not value:
|
|
369
|
-
self._changeset[
|
|
370
|
-
del self._values[
|
|
394
|
+
self._changeset[attr] = AttributeChange(self._values.get(attr), Action.DELETE)
|
|
395
|
+
del self._values[attr]
|
|
371
396
|
elif isinstance(value, (list, tuple, set, LangString)): # we may have multiple values...
|
|
372
|
-
if self._values.get(
|
|
373
|
-
self._changeset[
|
|
397
|
+
if self._values.get(attr):
|
|
398
|
+
self._changeset[attr] = AttributeChange(self._values.get(attr), Action.REPLACE)
|
|
374
399
|
else:
|
|
375
|
-
self._changeset[
|
|
400
|
+
self._changeset[attr] = AttributeChange(None, Action.CREATE)
|
|
376
401
|
if hasprop.prop.datatype == XsdDatatypes.langString:
|
|
377
|
-
self._values[
|
|
402
|
+
self._values[attr] = LangString(value, notifier=self.notifier, notify_data=attr)
|
|
378
403
|
else:
|
|
379
|
-
self._values[
|
|
404
|
+
self._values[attr] = ObservableSet({
|
|
380
405
|
convert2datatype(x, hasprop.prop.datatype) for x in value
|
|
381
|
-
}, notifier=self.notifier, notify_data=
|
|
406
|
+
}, notifier=self.notifier, notify_data=attr)
|
|
382
407
|
else:
|
|
383
|
-
if self._values.get(
|
|
384
|
-
self._changeset[
|
|
408
|
+
if self._values.get(attr):
|
|
409
|
+
self._changeset[attr] = AttributeChange(self._values.get(attr), Action.REPLACE)
|
|
385
410
|
else:
|
|
386
|
-
self._changeset[
|
|
411
|
+
self._changeset[attr] = AttributeChange(None, Action.CREATE)
|
|
387
412
|
try:
|
|
388
|
-
self._values[
|
|
413
|
+
self._values[attr] = ObservableSet({convert2datatype(value, hasprop.prop.datatype)})
|
|
389
414
|
except TypeError:
|
|
390
|
-
self._values[
|
|
415
|
+
self._values[attr] = convert2datatype(value, hasprop.prop.datatype)
|
|
391
416
|
|
|
392
|
-
def __del_value(self: Self,
|
|
393
|
-
|
|
394
|
-
|
|
417
|
+
def __del_value(self: Self, attr: Xsd_QName | str) -> None:
|
|
418
|
+
if not isinstance(attr, Xsd_QName):
|
|
419
|
+
attr = Xsd_QName(attr)
|
|
420
|
+
hasprop = self.properties.get(attr)
|
|
395
421
|
|
|
396
422
|
if hasprop.get(HasPropertyAttr.MIN_COUNT): # testing for MIN_COUNT conformance
|
|
397
423
|
if hasprop[HasPropertyAttr.MIN_COUNT] > 0:
|
|
398
|
-
raise OldapErrorValue(f'{self.name}: Property {
|
|
424
|
+
raise OldapErrorValue(f'{self.name}: Property {attr} with MIN_COUNT={hasprop[HasPropertyAttr.MIN_COUNT]} cannot be deleted.')
|
|
399
425
|
|
|
400
|
-
self._changeset[
|
|
401
|
-
attr = Xsd_QName(prefix, fragment, validate=False)
|
|
426
|
+
self._changeset[attr] = AttributeChange(self._values.get(attr), Action.DELETE)
|
|
402
427
|
del self._values[attr]
|
|
403
428
|
|
|
404
429
|
@property
|
|
@@ -507,21 +532,19 @@ class ResourceInstance:
|
|
|
507
532
|
context = Context(name=con.context_name)
|
|
508
533
|
sparql = context.sparql_context
|
|
509
534
|
sparql += f'''
|
|
510
|
-
SELECT ?predicate ?value
|
|
511
|
-
WHERE {{
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
FILTER(?permval >= {DataPermission.DATA_VIEW.numeric.toRdf})
|
|
524
|
-
}}'''
|
|
535
|
+
SELECT ?predicate ?value
|
|
536
|
+
WHERE {{
|
|
537
|
+
GRAPH {graph}:data {{
|
|
538
|
+
{iri.toRdf} ?predicate ?value .
|
|
539
|
+
{iri.toRdf} oldap:grantsPermission ?permset .
|
|
540
|
+
}}
|
|
541
|
+
GRAPH oldap:admin {{
|
|
542
|
+
{con.userIri.toRdf} oldap:hasPermissions ?permset .
|
|
543
|
+
?permset oldap:givesPermission ?DataPermission .
|
|
544
|
+
?DataPermission oldap:permissionValue ?permval .
|
|
545
|
+
}}
|
|
546
|
+
FILTER(?permval >= {DataPermission.DATA_VIEW.numeric.toRdf})
|
|
547
|
+
}}'''
|
|
525
548
|
jsonres = con.query(sparql)
|
|
526
549
|
res = QueryProcessor(context, jsonres)
|
|
527
550
|
objtype = None
|
|
@@ -887,11 +910,6 @@ class ResourceInstanceFactory:
|
|
|
887
910
|
else:
|
|
888
911
|
sparql += "SELECT DISTINCT ?s ?t ?p ?o"
|
|
889
912
|
sparql += f'''
|
|
890
|
-
FROM oldap:onto
|
|
891
|
-
FROM shared:onto
|
|
892
|
-
FROM {graph}:onto
|
|
893
|
-
FROM NAMED oldap:admin
|
|
894
|
-
FROM NAMED {graph}:data
|
|
895
913
|
WHERE {{
|
|
896
914
|
GRAPH {graph}:data {{
|
|
897
915
|
?s ?p ?o .
|
|
@@ -901,9 +919,8 @@ class ResourceInstanceFactory:
|
|
|
901
919
|
FILTER(isLiteral(?o) &&
|
|
902
920
|
(datatype(?o) = xsd:string || datatype(?o) = rdf:langString || lang(?o) != ""))
|
|
903
921
|
FILTER(CONTAINS(LCASE(STR(?o)), "{s}")) # case-insensitive substring match
|
|
904
|
-
BIND({self._con.userIri.toRdf} as ?user)
|
|
905
922
|
GRAPH oldap:admin {{
|
|
906
|
-
|
|
923
|
+
{self._con.userIri.toRdf} oldap:hasPermissions ?permset .
|
|
907
924
|
?permset oldap:givesPermission ?DataPermission .
|
|
908
925
|
?DataPermission oldap:permissionValue ?permval .
|
|
909
926
|
}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.9"
|
|
@@ -54,7 +54,7 @@ class Xsd_dateTimeStamp(Xsd):
|
|
|
54
54
|
Constructor string representation of the Xsd_dateTimeStamp instance as ISO datetimestamp
|
|
55
55
|
:return: Constructor string
|
|
56
56
|
"""
|
|
57
|
-
return f'
|
|
57
|
+
return f'Xsd_dateTimeStamp("{self.__value.isoformat()}")'
|
|
58
58
|
|
|
59
59
|
def __eq__(self, other: Self | datetime | str | None) -> bool:
|
|
60
60
|
"""
|
|
@@ -105,7 +105,8 @@ class TestexternalOntologies(unittest.TestCase):
|
|
|
105
105
|
|
|
106
106
|
del eo1
|
|
107
107
|
eo1 = ExternalOntology.read(con=self._connection, projectShortName="testext", prefix="gagaB", ignore_cache=True)
|
|
108
|
-
|
|
108
|
+
with self.assertRaises(OldapErrorImmutable):
|
|
109
|
+
eo1.prefix = "gugus"
|
|
109
110
|
eo1.comment = LangString("Gugus comment@en", "Gugus Kommentar@de")
|
|
110
111
|
del eo1.label[Language.DE]
|
|
111
112
|
eo1.label[Language.FR] = "GAGA B ontologie"
|
|
@@ -113,7 +114,7 @@ class TestexternalOntologies(unittest.TestCase):
|
|
|
113
114
|
|
|
114
115
|
del eo1
|
|
115
116
|
eo1 = ExternalOntology.read(con=self._connection, projectShortName="testext", prefix="gagaB", ignore_cache=True)
|
|
116
|
-
self.assertEqual(eo1.prefix, "
|
|
117
|
+
self.assertEqual(eo1.prefix, "gagaB")
|
|
117
118
|
self.assertEqual(eo1.label, LangString("GAGA B ontology@en", "GAGA B ontologie@fr"))
|
|
118
119
|
self.assertEqual(eo1.comment, LangString("Gugus comment@en", "Gugus Kommentar@de"))
|
|
119
120
|
self.assertEqual(eo1.namespaceIri, NamespaceIRI("http://gaga.org/ns/gagaB/"))
|
|
@@ -357,7 +357,7 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
357
357
|
pubDate="2001-01-01",
|
|
358
358
|
grantsPermission=Iri('oldap:GenericView'))
|
|
359
359
|
b.create()
|
|
360
|
-
data =
|
|
360
|
+
data = ResourceInstanceFactory.read_data(con=self._connection, iri=b.iri, projectShortName='test')
|
|
361
361
|
self.assertEqual(data['rdf:type'], ['test:Book'])
|
|
362
362
|
self.assertEqual(data['test:title'], ['The Life and Times of Scrooge'])
|
|
363
363
|
self.assertEqual(data['test:author'], ['test:TuomasHolopainen'])
|
|
@@ -379,6 +379,23 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
379
379
|
self.assertEqual(jsonobj['test:pubDate'], ['2001-01-01'])
|
|
380
380
|
self.assertEqual(jsonobj['test:title'], ['The Life and Times of Scrooge'])
|
|
381
381
|
|
|
382
|
+
def test_read_C(self):
|
|
383
|
+
factory = ResourceInstanceFactory(con=self._connection, project='test')
|
|
384
|
+
Book = factory.createObjectInstance('Book')
|
|
385
|
+
b = Book(title="The Life and Times of Scrooge",
|
|
386
|
+
author="test:TuomasHolopainen",
|
|
387
|
+
pubDate="2001-01-01",
|
|
388
|
+
grantsPermission=Iri('oldap:GenericView'))
|
|
389
|
+
b.create()
|
|
390
|
+
bb = Book.read(con=self._connection, iri=b.iri)
|
|
391
|
+
self.assertEqual(bb.name, "Book")
|
|
392
|
+
self.assertEqual(bb.title, {Xsd_string("The Life and Times of Scrooge")})
|
|
393
|
+
self.assertEqual(bb.author, {Iri("test:TuomasHolopainen")})
|
|
394
|
+
jsonobj = bb.toJsonObject()
|
|
395
|
+
self.assertEqual(jsonobj['test:author'], ['test:TuomasHolopainen'])
|
|
396
|
+
self.assertEqual(jsonobj['test:pubDate'], ['2001-01-01'])
|
|
397
|
+
self.assertEqual(jsonobj['test:title'], ['The Life and Times of Scrooge'])
|
|
398
|
+
|
|
382
399
|
|
|
383
400
|
def test_value_setter(self):
|
|
384
401
|
factory = ResourceInstanceFactory(con=self._connection, project='test')
|
|
@@ -433,7 +450,7 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
433
450
|
self.assertEqual(obj2.decimalSetter, {Xsd_decimal(3.14159), Xsd_decimal(2.71828), Xsd_decimal(1.61803)})
|
|
434
451
|
self.assertFalse(obj2.integerSetter)
|
|
435
452
|
|
|
436
|
-
def
|
|
453
|
+
def test_value_modifier_A(self):
|
|
437
454
|
factory = ResourceInstanceFactory(con=self._connection, project='test')
|
|
438
455
|
SetterTester = factory.createObjectInstance('SetterTester')
|
|
439
456
|
obj1 = SetterTester(stringSetter="This is a test string",
|
|
@@ -459,6 +476,32 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
459
476
|
self.assertEqual(obj1.integerSetter, {Xsd_int(20), Xsd_int(42)})
|
|
460
477
|
self.assertFalse(obj1.booleanSetter)
|
|
461
478
|
|
|
479
|
+
def test_value_modifier_B(self):
|
|
480
|
+
factory = ResourceInstanceFactory(con=self._connection, project='test')
|
|
481
|
+
SetterTester = factory.createObjectInstance('SetterTester')
|
|
482
|
+
obj1 = SetterTester(stringSetter="This is a test string",
|
|
483
|
+
langStringSetter=LangString("C'est un teste@fr", "Dies ist eine Test-Zeichenkette@de"),
|
|
484
|
+
decimalSetter=Xsd_decimal(3.14),
|
|
485
|
+
integerSetter={-10, 20},
|
|
486
|
+
booleanSetter=True,
|
|
487
|
+
grantsPermission={Iri('oldap:GenericView'), Iri('oldap:GenericUpdate')})
|
|
488
|
+
obj1.create()
|
|
489
|
+
obj1 = SetterTester.read(con=self._connection, iri=obj1.iri)
|
|
490
|
+
obj1[Xsd_QName('test:langStringSetter')][Language.FR] = "Qu'est-ce que c'est?"
|
|
491
|
+
obj1[Xsd_QName('test:integerSetter')].add(42)
|
|
492
|
+
obj1[Xsd_QName('test:integerSetter')].discard(-10)
|
|
493
|
+
obj1[Xsd_QName('test:booleanSetter')] = False
|
|
494
|
+
with self.assertRaises(OldapErrorValue):
|
|
495
|
+
obj1[Xsd_QName('test:stringSetter')].pop()
|
|
496
|
+
with self.assertRaises(OldapErrorValue):
|
|
497
|
+
del obj1[Xsd_QName('test:stringSetter')]
|
|
498
|
+
obj1.update()
|
|
499
|
+
obj1 = SetterTester.read(con=self._connection, iri=obj1.iri)
|
|
500
|
+
self.assertEqual(obj1.stringSetter, {"This is a test string"})
|
|
501
|
+
self.assertEqual(obj1.langStringSetter, LangString("Dies ist eine Test-Zeichenkette@de", "Qu'est-ce que c'est?@fr"))
|
|
502
|
+
self.assertEqual(obj1.integerSetter, {Xsd_int(20), Xsd_int(42)})
|
|
503
|
+
self.assertFalse(obj1.booleanSetter)
|
|
504
|
+
|
|
462
505
|
def test_value_maxcount_mincount(self):
|
|
463
506
|
factory = ResourceInstanceFactory(con=self._connection, project='test')
|
|
464
507
|
Person = factory.createObjectInstance('Person')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "oldaplib"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.9"
|
|
4
4
|
description = "Open Media Access Server Library (Linked Open Data middleware/RESTApi)"
|
|
5
5
|
authors = ["Lukas Rosenthaler <lukas.rosenthaler@unibas.ch>"]
|
|
6
6
|
license = "GNU Affero General Public License version 3"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.3.7"
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|