oldaplib 0.4.1__py3-none-any.whl → 0.4.2__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/ontologies/standard/dcterms.ttl +868 -0
- oldaplib/ontologies/standard/schemaorg.ttl +20715 -0
- oldaplib/ontologies/standard/skos.ttl +288 -0
- oldaplib/ontologies/standard/skos.xml +468 -0
- oldaplib/src/connection.py +2 -0
- oldaplib/src/enums/XXXeditor.py +78 -0
- oldaplib/src/enums/attributeclass.py +18 -1
- oldaplib/src/enums/haspropertyattr.py +5 -3
- oldaplib/src/enums/projectattr.py +2 -0
- oldaplib/src/hasproperty.py +13 -9
- oldaplib/src/helpers/context.py +2 -0
- oldaplib/src/helpers/serializer.py +4 -3
- oldaplib/src/model.py +2 -1
- oldaplib/src/propertyclass.py +9 -2
- oldaplib/src/resourceclass.py +7 -4
- oldaplib/src/version.py +1 -1
- oldaplib/test/test_context.py +2 -0
- oldaplib/test/test_datamodel.py +23 -1
- oldaplib/test/test_hasproperty.py +64 -21
- oldaplib/test/test_objectfactory.py +22 -0
- oldaplib/test/xxxx_fasnacht.py +32 -0
- {oldaplib-0.4.1.dist-info → oldaplib-0.4.2.dist-info}/METADATA +1 -1
- {oldaplib-0.4.1.dist-info → oldaplib-0.4.2.dist-info}/RECORD +24 -19
- oldaplib/test/XXX_test_fasnacht.py +0 -17
- {oldaplib-0.4.1.dist-info → oldaplib-0.4.2.dist-info}/WHEEL +0 -0
oldaplib/src/hasproperty.py
CHANGED
|
@@ -206,7 +206,8 @@ class HasProperty(Model, Notify):
|
|
|
206
206
|
return HasPropertyData(minCount=self._attributes.get(HasPropertyAttr.MIN_COUNT, None),
|
|
207
207
|
maxCount=self._attributes.get(HasPropertyAttr.MAX_COUNT, None),
|
|
208
208
|
order=self._attributes.get(HasPropertyAttr.ORDER, None),
|
|
209
|
-
group=self._attributes.get(HasPropertyAttr.GROUP, None)
|
|
209
|
+
group=self._attributes.get(HasPropertyAttr.GROUP, None),
|
|
210
|
+
editor=self._attributes.get(HasPropertyAttr.EDITOR, None))
|
|
210
211
|
|
|
211
212
|
def clear_changeset(self) -> None:
|
|
212
213
|
if hasattr(self._prop, 'clear_changeset'):
|
|
@@ -225,14 +226,17 @@ class HasProperty(Model, Notify):
|
|
|
225
226
|
def create_shacl(self, indent: int = 0, indent_inc: int = 4) -> str:
|
|
226
227
|
blank = ''
|
|
227
228
|
sparql = ''
|
|
228
|
-
|
|
229
|
-
sparql += f' ;\n{blank:{indent * indent_inc}}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
229
|
+
for attr, val in self._attributes.items():
|
|
230
|
+
sparql += f' ;\n{blank:{indent * indent_inc}}{attr.value} {val.toRdf} ;\n'
|
|
231
|
+
|
|
232
|
+
# if self._attributes.get(HasPropertyAttr.MIN_COUNT, None) is not None:
|
|
233
|
+
# sparql += f' ;\n{blank:{indent * indent_inc}}sh:minCount {self._attributes[HasPropertyAttr.MIN_COUNT].toRdf}'
|
|
234
|
+
# if self._attributes.get(HasPropertyAttr.MAX_COUNT, None) is not None:
|
|
235
|
+
# sparql += f' ;\n{blank:{indent * indent_inc}}sh:maxCount {self._attributes[HasPropertyAttr.MAX_COUNT].toRdf}'
|
|
236
|
+
# if self._attributes.get(HasPropertyAttr.ORDER, None) is not None:
|
|
237
|
+
# sparql += f' ;\n{blank:{indent * indent_inc}}sh:order {self._attributes[HasPropertyAttr.ORDER].toRdf}'
|
|
238
|
+
# if self._attributes.get(HasPropertyAttr.GROUP, None) is not None:
|
|
239
|
+
# sparql += f' ;\n{blank:{indent * indent_inc}}sh:group {self._attributes[HasPropertyAttr.GROUP].toRdf}'
|
|
236
240
|
return sparql
|
|
237
241
|
|
|
238
242
|
def create_owl(self, indent: int = 0, indent_inc: int = 4) -> str:
|
oldaplib/src/helpers/context.py
CHANGED
|
@@ -49,6 +49,7 @@ class ContextSingleton(type):
|
|
|
49
49
|
#Xsd_NCName('dc'): NamespaceIRI('http://purl.org/dc/elements/1.1/'),
|
|
50
50
|
Xsd_NCName('dcterms'): NamespaceIRI('http://purl.org/dc/terms/'),
|
|
51
51
|
Xsd_NCName('dcmitype'): NamespaceIRI('http://purl.org/dc/dcmitype/'),
|
|
52
|
+
Xsd_NCName('dash'): NamespaceIRI('http://datashapes.org/dash#'),
|
|
52
53
|
#Xsd_NCName('foaf'): NamespaceIRI('http://xmlns.com/foaf/0.1/'),
|
|
53
54
|
Xsd_NCName('oldap'): NamespaceIRI('http://oldap.org/base#'),
|
|
54
55
|
Xsd_NCName('shared'): NamespaceIRI('http://oldap.org/shared#')
|
|
@@ -65,6 +66,7 @@ class ContextSingleton(type):
|
|
|
65
66
|
#NamespaceIRI('http://purl.org/dc/elements/1.1/'): Xsd_NCName('dc'),
|
|
66
67
|
NamespaceIRI('http://purl.org/dc/terms/'): Xsd_NCName('dcterms'),
|
|
67
68
|
NamespaceIRI('http://purl.org/dc/dcmitype/'): Xsd_NCName('dcmitype'),
|
|
69
|
+
NamespaceIRI('http://datashapes.org/dash#'): Xsd_NCName('dash'),
|
|
68
70
|
#NamespaceIRI('http://xmlns.com/foaf/0.1/'): Xsd_NCName('foaf'),
|
|
69
71
|
NamespaceIRI('http://oldap.org/base#'): Xsd_NCName('oldap'),
|
|
70
72
|
NamespaceIRI('http://oldap.org/shared#'): Xsd_NCName('shared'),
|
|
@@ -53,8 +53,8 @@ class _Serializer:
|
|
|
53
53
|
if isinstance(obj, UUID):
|
|
54
54
|
return {self._key: 'UUID', '__value__': str(obj)}
|
|
55
55
|
if isinstance(obj, Enum):
|
|
56
|
-
if hasattr(obj, '_value'):
|
|
57
|
-
# It's a "complex" enum
|
|
56
|
+
if hasattr(obj, '_value') and hasattr(obj, 'numeric'):
|
|
57
|
+
# It's a "complex" enum like DataPermission
|
|
58
58
|
return {self._key: obj.__class__.__name__, '__value__': [obj.value, obj.numeric]}
|
|
59
59
|
else:
|
|
60
60
|
return {self._key: obj.__class__.__name__, '__value__': obj.value}
|
|
@@ -95,7 +95,8 @@ class _Serializer:
|
|
|
95
95
|
# for bytes datatype
|
|
96
96
|
#
|
|
97
97
|
return b85decode(d['__value__'].encode(encoding='UTF-8'))
|
|
98
|
-
if type(self._classes[classname]) == type(Enum):
|
|
98
|
+
#if type(self._classes[classname]) == type(Enum):
|
|
99
|
+
if isinstance(self._classes[classname], type) and issubclass(self._classes[classname], Enum):
|
|
99
100
|
#
|
|
100
101
|
# for Enums and subclasses
|
|
101
102
|
#
|
oldaplib/src/model.py
CHANGED
|
@@ -218,7 +218,8 @@ class Model:
|
|
|
218
218
|
if self._changeset.get(attr) is None:
|
|
219
219
|
self._changeset[attr] = AttributeChange(deepcopy(self._attributes[attr]), Action.REPLACE)
|
|
220
220
|
if value is None:
|
|
221
|
-
|
|
221
|
+
if self._attributes.get(attr) is not None:
|
|
222
|
+
del self._attributes[attr]
|
|
222
223
|
else:
|
|
223
224
|
if not isinstance(value, attr.datatype):
|
|
224
225
|
self._attributes[attr] = attr.datatype(value, validate=True)
|
oldaplib/src/propertyclass.py
CHANGED
|
@@ -71,6 +71,7 @@ class HasPropertyData:
|
|
|
71
71
|
maxCount: Xsd_integer | None = None
|
|
72
72
|
order: Xsd_decimal | None = None
|
|
73
73
|
group: Xsd_QName | None = None
|
|
74
|
+
editor: Xsd_QName | None = None
|
|
74
75
|
|
|
75
76
|
def create_shacl(self, indent: int = 0, indent_inc: int = 4):
|
|
76
77
|
blank = ''
|
|
@@ -83,6 +84,8 @@ class HasPropertyData:
|
|
|
83
84
|
sparql += f' ;\n{blank:{indent * indent_inc}}sh:order {self.order.toRdf}'
|
|
84
85
|
if self.group is not None:
|
|
85
86
|
sparql += f' ;\n{blank:{indent * indent_inc}}sh:group {self.group.toRdf}'
|
|
87
|
+
if self.editor is not None:
|
|
88
|
+
sparql += f' ;\n{blank:{indent * indent_inc}}dash:editor {self.editor.toRdf}'
|
|
86
89
|
return sparql
|
|
87
90
|
|
|
88
91
|
def create_owl(self, indent: int = 0, indent_inc: int = 4):
|
|
@@ -800,6 +803,7 @@ class PropertyClass(Model, Notify):
|
|
|
800
803
|
maxCount: Xsd_integer | None = None
|
|
801
804
|
order: Xsd_decimal | None = None
|
|
802
805
|
group: Xsd_QName | None = None
|
|
806
|
+
editor: Xsd_QName | None = None
|
|
803
807
|
nodeKind: Xsd_QName | None = None
|
|
804
808
|
propkeys = {Xsd_QName(x.value) for x in PropClassAttr}
|
|
805
809
|
for key, val in attributes.items():
|
|
@@ -863,6 +867,8 @@ class PropertyClass(Model, Notify):
|
|
|
863
867
|
order = val
|
|
864
868
|
elif key == 'sh:group':
|
|
865
869
|
group = val
|
|
870
|
+
elif key == 'dash:editor':
|
|
871
|
+
editor = val
|
|
866
872
|
elif key in propkeys:
|
|
867
873
|
attr = PropClassAttr.from_value(key)
|
|
868
874
|
if not attr.in_shacl:
|
|
@@ -879,7 +885,8 @@ class PropertyClass(Model, Notify):
|
|
|
879
885
|
minCount=minCount,
|
|
880
886
|
maxCount=maxCount,
|
|
881
887
|
order=order,
|
|
882
|
-
group=group
|
|
888
|
+
group=group,
|
|
889
|
+
editor=editor)
|
|
883
890
|
|
|
884
891
|
if self._attributes.get(PropClassAttr.CLASS) is not None:
|
|
885
892
|
self._attributes[PropClassAttr.TYPE].add(OwlPropertyType.OwlObjectProperty)
|
|
@@ -897,7 +904,7 @@ class PropertyClass(Model, Notify):
|
|
|
897
904
|
self.update_notifier()
|
|
898
905
|
|
|
899
906
|
self.__from_triplestore = True
|
|
900
|
-
return HasPropertyData(refprop, minCount, maxCount, order, group)
|
|
907
|
+
return HasPropertyData(refprop, minCount, maxCount, order, group, editor)
|
|
901
908
|
|
|
902
909
|
def read_owl(self) -> None:
|
|
903
910
|
if self._externalOntology:
|
oldaplib/src/resourceclass.py
CHANGED
|
@@ -942,7 +942,8 @@ class ResourceClass(Model, Notify):
|
|
|
942
942
|
minCount=attributes.get(Xsd_QName('sh:minCount')),
|
|
943
943
|
maxCount=attributes.get(Xsd_QName('sh:maxCount')),
|
|
944
944
|
order=attributes.get(Xsd_QName('sh:order')),
|
|
945
|
-
group=attributes.get(Xsd_QName('sh:group'))
|
|
945
|
+
group=attributes.get(Xsd_QName('sh:group')),
|
|
946
|
+
editor=attributes.get(Xsd_QName('dash:editor'))))
|
|
946
947
|
else:
|
|
947
948
|
prop = PropertyClass(con=con, project=project)
|
|
948
949
|
haspropdata = prop.parse_shacl(attributes=attributes)
|
|
@@ -957,7 +958,8 @@ class ResourceClass(Model, Notify):
|
|
|
957
958
|
minCount=haspropdata.minCount,
|
|
958
959
|
maxCount=haspropdata.maxCount,
|
|
959
960
|
order=haspropdata.order,
|
|
960
|
-
group=haspropdata.group
|
|
961
|
+
group=haspropdata.group,
|
|
962
|
+
editor=haspropdata.editor))
|
|
961
963
|
else:
|
|
962
964
|
#
|
|
963
965
|
# Case C, external property
|
|
@@ -971,7 +973,8 @@ class ResourceClass(Model, Notify):
|
|
|
971
973
|
minCount=haspropdata.minCount,
|
|
972
974
|
maxCount=haspropdata.maxCount,
|
|
973
975
|
order=haspropdata.order,
|
|
974
|
-
group=haspropdata.group
|
|
976
|
+
group=haspropdata.group,
|
|
977
|
+
editor=haspropdata.editor))
|
|
975
978
|
return proplist
|
|
976
979
|
|
|
977
980
|
def __read_owl(self) -> None:
|
|
@@ -1178,7 +1181,7 @@ class ResourceClass(Model, Notify):
|
|
|
1178
1181
|
|
|
1179
1182
|
for iri, hp in self._properties.items():
|
|
1180
1183
|
if hp.type == PropType.STANDALONE:
|
|
1181
|
-
if hp.minCount or hp.maxCount or hp.order or hp.group:
|
|
1184
|
+
if hp.minCount or hp.maxCount or hp.order or hp.group or hp.editor:
|
|
1182
1185
|
sparql += f' ;\n{blank:{(indent + 2) * indent_inc}}sh:property {iri}Shape, ['
|
|
1183
1186
|
sparql += f'\n{blank:{(indent + 3) * indent_inc}}sh:path {iri.toRdf}'
|
|
1184
1187
|
sparql += hp.create_shacl(indent=2)
|
oldaplib/src/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.4.
|
|
1
|
+
__version__ = "0.4.2"
|
oldaplib/test/test_context.py
CHANGED
|
@@ -80,6 +80,7 @@ PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
|
|
80
80
|
PREFIX schema: <http://schema.org/>
|
|
81
81
|
PREFIX dcterms: <http://purl.org/dc/terms/>
|
|
82
82
|
PREFIX dcmitype: <http://purl.org/dc/dcmitype/>
|
|
83
|
+
PREFIX dash: <http://datashapes.org/dash#>
|
|
83
84
|
PREFIX oldap: <http://oldap.org/base#>
|
|
84
85
|
PREFIX shared: <http://oldap.org/shared#>
|
|
85
86
|
PREFIX test: <http://www.test.org/gaga#>
|
|
@@ -99,6 +100,7 @@ PREFIX test: <http://www.test.org/gaga#>
|
|
|
99
100
|
@prefix schema: <http://schema.org/> .
|
|
100
101
|
@prefix dcterms: <http://purl.org/dc/terms/> .
|
|
101
102
|
@prefix dcmitype: <http://purl.org/dc/dcmitype/> .
|
|
103
|
+
@prefix dash: <http://datashapes.org/dash#> .
|
|
102
104
|
@prefix oldap: <http://oldap.org/base#> .
|
|
103
105
|
@prefix shared: <http://oldap.org/shared#> .
|
|
104
106
|
@prefix test: <http://www.test.org/gaga#> .
|
oldaplib/test/test_datamodel.py
CHANGED
|
@@ -1105,7 +1105,7 @@ class TestDataModel(unittest.TestCase):
|
|
|
1105
1105
|
resclasses=[page, book, person])
|
|
1106
1106
|
dm.write_as_trig('gaga.trig')
|
|
1107
1107
|
|
|
1108
|
-
unittest.skip('Only during development....')
|
|
1108
|
+
@unittest.skip('Only during development....')
|
|
1109
1109
|
def test_cache(self):
|
|
1110
1110
|
project_root = find_project_root(__file__)
|
|
1111
1111
|
self._connection.clear_graph(Xsd_QName('test:shacl'))
|
|
@@ -1123,3 +1123,25 @@ class TestDataModel(unittest.TestCase):
|
|
|
1123
1123
|
|
|
1124
1124
|
pass
|
|
1125
1125
|
|
|
1126
|
+
@unittest.skip('Only during development....')
|
|
1127
|
+
def test_datamodel_read_fasnacht(self):
|
|
1128
|
+
connection = Connection(userId="rosenth",
|
|
1129
|
+
credentials="RioGrande",
|
|
1130
|
+
context_name="DEFAULT")
|
|
1131
|
+
|
|
1132
|
+
fasnacht = Project.read(connection, "fasnacht")
|
|
1133
|
+
|
|
1134
|
+
model = DataModel.read(connection, fasnacht, ignore_cache=True)
|
|
1135
|
+
print(model)
|
|
1136
|
+
|
|
1137
|
+
@unittest.skip('Only during development....')
|
|
1138
|
+
def test_datamodel_read_shared(self):
|
|
1139
|
+
connection = Connection(userId="rosenth",
|
|
1140
|
+
credentials="RioGrande",
|
|
1141
|
+
context_name="DEFAULT")
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
model = DataModel.read(connection, 'oldap')
|
|
1145
|
+
model = DataModel.read(connection, 'shared')
|
|
1146
|
+
print(model.get_propclasses())
|
|
1147
|
+
|
|
@@ -60,15 +60,28 @@ class TestHasProperty(unittest.TestCase):
|
|
|
60
60
|
#cls._connection.clear_graph(QName('test:onto'))
|
|
61
61
|
pass
|
|
62
62
|
|
|
63
|
-
def
|
|
63
|
+
def test_creation_A(self):
|
|
64
64
|
p1 = PropertyClass(con=self._connection,
|
|
65
65
|
project=self._project,
|
|
66
66
|
property_class_iri=Xsd_QName('test:hasprop_test_A'),
|
|
67
67
|
datatype=XsdDatatypes.string,
|
|
68
68
|
name=LangString(["HasPropTest A"]))
|
|
69
69
|
hasproperties: list[HasProperty] = [
|
|
70
|
-
HasProperty(con=self._connection,
|
|
71
|
-
|
|
70
|
+
HasProperty(con=self._connection,
|
|
71
|
+
project=self._project,
|
|
72
|
+
prop=p1,
|
|
73
|
+
minCount=1,
|
|
74
|
+
maxCount=1,
|
|
75
|
+
group=Xsd_QName('test:group'),
|
|
76
|
+
order=1,
|
|
77
|
+
editor=Xsd_QName("dash:TextAreaEditor")),
|
|
78
|
+
HasProperty(con=self._connection,
|
|
79
|
+
project=self._project,
|
|
80
|
+
prop=Xsd_QName("test:comment"),
|
|
81
|
+
maxCount=1,
|
|
82
|
+
group=Xsd_QName('test:group'),
|
|
83
|
+
order=2,
|
|
84
|
+
editor=Xsd_QName("dash:TextFieldEditor")),
|
|
72
85
|
]
|
|
73
86
|
r1 = ResourceClass(con=self._connection,
|
|
74
87
|
project=self._project,
|
|
@@ -87,21 +100,26 @@ class TestHasProperty(unittest.TestCase):
|
|
|
87
100
|
self.assertEqual(r1[Xsd_QName('test:hasprop_test_A')].maxCount, Xsd_integer(1))
|
|
88
101
|
self.assertEqual(r1[Xsd_QName('test:hasprop_test_A')].order, Xsd_decimal(1))
|
|
89
102
|
self.assertEqual(r1[Xsd_QName('test:hasprop_test_A')].group, Xsd_QName('test:group'))
|
|
103
|
+
self.assertEqual(r1[Xsd_QName('test:hasprop_test_A')].editor, Xsd_QName("dash:TextAreaEditor"))
|
|
90
104
|
|
|
91
105
|
self.assertIsNone(r1[Xsd_QName("test:comment")].minCount)
|
|
92
106
|
self.assertEqual(r1[Xsd_QName("test:comment")].maxCount, Xsd_integer(1))
|
|
93
107
|
self.assertEqual(r1[Xsd_QName("test:comment")].order, Xsd_decimal(2))
|
|
94
108
|
self.assertEqual(r1[Xsd_QName("test:comment")].group, Xsd_QName('test:group'))
|
|
109
|
+
self.assertEqual(r1[Xsd_QName('test:comment')].editor, Xsd_QName("dash:TextFieldEditor"))
|
|
95
110
|
|
|
96
|
-
def
|
|
111
|
+
def test_creation_B(self):
|
|
97
112
|
p1 = PropertyClass(con=self._connection,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
113
|
+
project=self._project,
|
|
114
|
+
property_class_iri=Xsd_QName('test:hasprop_test_B'),
|
|
115
|
+
datatype=XsdDatatypes.string,
|
|
116
|
+
name=LangString(["HasPropTest B"]))
|
|
102
117
|
hasproperties: list[HasProperty] = [
|
|
103
|
-
HasProperty(con=self._connection, project=self._project, prop=p1,
|
|
104
|
-
|
|
118
|
+
HasProperty(con=self._connection, project=self._project, prop=p1,
|
|
119
|
+
minCount=1, maxCount=1, group=Xsd_QName('test:group'),
|
|
120
|
+
order=1, editor=Xsd_QName("dash:TextAreaEditor")),
|
|
121
|
+
HasProperty(con=self._connection, project=self._project, prop=Xsd_QName("test:comment"),
|
|
122
|
+
maxCount=1, group=Xsd_QName('test:group'), order=2, editor=Xsd_QName("dash:TextFieldEditor")),
|
|
105
123
|
]
|
|
106
124
|
r1 = ResourceClass(con=self._connection,
|
|
107
125
|
project=self._project,
|
|
@@ -119,10 +137,12 @@ class TestHasProperty(unittest.TestCase):
|
|
|
119
137
|
r1[Xsd_QName('test:hasprop_test_B')].maxCount = Xsd_integer(2)
|
|
120
138
|
r1[Xsd_QName('test:hasprop_test_B')].order = Xsd_decimal(2)
|
|
121
139
|
r1[Xsd_QName('test:hasprop_test_B')].group = Xsd_QName('test:groupB')
|
|
140
|
+
r1[Xsd_QName('test:hasprop_test_B')].editor = Xsd_QName("dash:TextFieldEditor")
|
|
122
141
|
|
|
123
142
|
r1[Xsd_QName('test:comment')].maxCount = Xsd_integer(2)
|
|
124
143
|
r1[Xsd_QName('test:comment')].order = Xsd_decimal(1)
|
|
125
144
|
r1[Xsd_QName('test:comment')].group = Xsd_QName('test:groupB')
|
|
145
|
+
r1[Xsd_QName('test:comment')].editor = Xsd_QName("dash:TextAreaEditor")
|
|
126
146
|
|
|
127
147
|
r1.update()
|
|
128
148
|
r1 = ResourceClass.read(con=self._connection,
|
|
@@ -131,10 +151,11 @@ class TestHasProperty(unittest.TestCase):
|
|
|
131
151
|
self.assertEqual(Xsd_integer(2), r1[Xsd_QName('test:hasprop_test_B')].maxCount)
|
|
132
152
|
self.assertEqual(Xsd_decimal(2), r1[Xsd_QName('test:hasprop_test_B')].order)
|
|
133
153
|
self.assertEqual(Xsd_QName('test:groupB'), r1[Xsd_QName('test:hasprop_test_B')].group)
|
|
154
|
+
self.assertEqual(Xsd_QName("dash:TextFieldEditor"), r1[Xsd_QName('test:hasprop_test_B')].editor)
|
|
134
155
|
|
|
135
156
|
self.assertEqual(Xsd_integer(2), r1[Xsd_QName('test:comment')].maxCount)
|
|
136
157
|
self.assertEqual(Xsd_decimal(1), r1[Xsd_QName('test:comment')].order)
|
|
137
|
-
self.assertEqual(Xsd_QName(
|
|
158
|
+
self.assertEqual(Xsd_QName("dash:TextAreaEditor"), r1[Xsd_QName('test:comment')].editor)
|
|
138
159
|
|
|
139
160
|
def test_modification_add(self):
|
|
140
161
|
p1 = PropertyClass(con=self._connection,
|
|
@@ -143,8 +164,17 @@ class TestHasProperty(unittest.TestCase):
|
|
|
143
164
|
datatype=XsdDatatypes.string,
|
|
144
165
|
name=LangString(["HasPropTest C"]))
|
|
145
166
|
hasproperties: list[HasProperty] = [
|
|
146
|
-
HasProperty(con=self._connection,
|
|
147
|
-
|
|
167
|
+
HasProperty(con=self._connection,
|
|
168
|
+
project=self._project,
|
|
169
|
+
prop=p1,
|
|
170
|
+
minCount=1,
|
|
171
|
+
order=1,
|
|
172
|
+
editor=Xsd_QName("dash:TextAreaEditor")),
|
|
173
|
+
HasProperty(con=self._connection,
|
|
174
|
+
project=self._project,
|
|
175
|
+
prop=Xsd_QName("test:comment"),
|
|
176
|
+
maxCount=1,
|
|
177
|
+
group=Xsd_QName('test:group')),
|
|
148
178
|
]
|
|
149
179
|
r1 = ResourceClass(con=self._connection,
|
|
150
180
|
project=self._project,
|
|
@@ -160,17 +190,22 @@ class TestHasProperty(unittest.TestCase):
|
|
|
160
190
|
project=self._project,
|
|
161
191
|
owl_class_iri=Xsd_QName("test:HasPropertyTest_C"))
|
|
162
192
|
r1[Xsd_QName('test:hasprop_test_C')].maxCount = Xsd_integer(10)
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
193
|
+
r1[Xsd_QName('test:hasprop_test_C')].group = Xsd_QName('test:group')
|
|
194
|
+
r1[Xsd_QName('test:hasprop_test_C')].editor = None
|
|
195
|
+
r1[Xsd_QName("test:comment")].minCount = Xsd_integer(1)
|
|
196
|
+
r1[Xsd_QName("test:comment")].order = Xsd_decimal(1)
|
|
197
|
+
r1[Xsd_QName("test:comment")].editor = Xsd_QName("dash:TextFieldEditor")
|
|
198
|
+
|
|
166
199
|
r1.update()
|
|
167
200
|
r1 = ResourceClass.read(con=self._connection,
|
|
168
201
|
project=self._project,
|
|
169
202
|
owl_class_iri=Xsd_QName("test:HasPropertyTest_C"))
|
|
170
203
|
self.assertEqual(Xsd_integer(10), r1[Xsd_QName('test:hasprop_test_C')].maxCount)
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
204
|
+
self.assertEqual(Xsd_QName('test:group'), r1[Xsd_QName('test:hasprop_test_C')].group)
|
|
205
|
+
self.assertIsNone(r1[Xsd_QName('test:hasprop_test_C')].editor)
|
|
206
|
+
self.assertEqual(Xsd_integer(1), r1[Xsd_QName("test:comment")].minCount)
|
|
207
|
+
self.assertEqual(Xsd_decimal(1), r1[Xsd_QName("test:comment")].order)
|
|
208
|
+
self.assertEqual(Xsd_QName("dash:TextFieldEditor"), r1[Xsd_QName("test:comment")].editor)
|
|
174
209
|
|
|
175
210
|
def test_modification_delete(self):
|
|
176
211
|
p1 = PropertyClass(con=self._connection,
|
|
@@ -179,8 +214,12 @@ class TestHasProperty(unittest.TestCase):
|
|
|
179
214
|
datatype=XsdDatatypes.string,
|
|
180
215
|
name=LangString(["HasPropTest D"]))
|
|
181
216
|
hasproperties: list[HasProperty] = [
|
|
182
|
-
HasProperty(con=self._connection, project=self._project, prop=p1,
|
|
183
|
-
|
|
217
|
+
HasProperty(con=self._connection, project=self._project, prop=p1,
|
|
218
|
+
minCount=1, maxCount=1, group=Xsd_QName('test:group'), order=1,
|
|
219
|
+
editor=Xsd_QName("dash:TextFieldEditor")),
|
|
220
|
+
HasProperty(con=self._connection, project=self._project, prop=Xsd_QName("test:comment"),
|
|
221
|
+
maxCount=1, group=Xsd_QName('test:group'), order=2,
|
|
222
|
+
editor=Xsd_QName("dash:TextAreaEditor")),
|
|
184
223
|
]
|
|
185
224
|
r1 = ResourceClass(con=self._connection,
|
|
186
225
|
project=self._project,
|
|
@@ -197,9 +236,11 @@ class TestHasProperty(unittest.TestCase):
|
|
|
197
236
|
owl_class_iri=Xsd_QName("test:HasPropertyTest_D"))
|
|
198
237
|
del r1[Xsd_QName('test:hasprop_test_D')].maxCount
|
|
199
238
|
del r1[Xsd_QName('test:hasprop_test_D')].order
|
|
239
|
+
del r1[Xsd_QName('test:hasprop_test_D')].editor
|
|
200
240
|
del r1[Xsd_QName('test:comment')].maxCount
|
|
201
241
|
del r1[Xsd_QName('test:comment')].group
|
|
202
242
|
del r1[Xsd_QName('test:comment')].order
|
|
243
|
+
del r1[Xsd_QName('test:comment')].editor
|
|
203
244
|
r1.update()
|
|
204
245
|
|
|
205
246
|
r1 = ResourceClass.read(con=self._connection,
|
|
@@ -207,9 +248,11 @@ class TestHasProperty(unittest.TestCase):
|
|
|
207
248
|
owl_class_iri=Xsd_QName("test:HasPropertyTest_D"))
|
|
208
249
|
self.assertIsNone(r1[Xsd_QName('test:hasprop_test_D')].maxCount)
|
|
209
250
|
self.assertIsNone(r1[Xsd_QName('test:hasprop_test_D')].order)
|
|
251
|
+
self.assertIsNone(r1[Xsd_QName('test:hasprop_test_D')].editor)
|
|
210
252
|
self.assertIsNone(r1[Xsd_QName('test:comment')].maxCount)
|
|
211
253
|
self.assertIsNone(r1[Xsd_QName('test:comment')].group)
|
|
212
254
|
self.assertIsNone(r1[Xsd_QName('test:comment')].order)
|
|
255
|
+
self.assertIsNone(r1[Xsd_QName('test:comment')].editor)
|
|
213
256
|
|
|
214
257
|
|
|
215
258
|
|
|
@@ -480,6 +480,28 @@ class TestObjectFactory(unittest.TestCase):
|
|
|
480
480
|
|
|
481
481
|
bb.delete()
|
|
482
482
|
|
|
483
|
+
def test_read_D(self):
|
|
484
|
+
factory = ResourceInstanceFactory(con=self._connection, project='test')
|
|
485
|
+
SetterTester = factory.createObjectInstance('SetterTester')
|
|
486
|
+
b = SetterTester(stringSetter="This is a test string",
|
|
487
|
+
langStringSetter=["C'est un string de test@fr", "Dies ist eine Testzeichenkette@de"],
|
|
488
|
+
decimalSetter=Xsd_decimal(3.14),
|
|
489
|
+
integerSetter={20200, 30300},
|
|
490
|
+
attachedToRole={Xsd_QName('oldap:Unknown'): DataPermission.DATA_VIEW})
|
|
491
|
+
b.create()
|
|
492
|
+
bb = SetterTester.read(con=self._connection, iri=b.iri)
|
|
493
|
+
self.assertEqual(bb.name, "test:SetterTester")
|
|
494
|
+
self.assertEqual(bb.stringSetter, {Xsd_string("This is a test string")})
|
|
495
|
+
print(type(bb.langStringSetter).__name__)
|
|
496
|
+
print(bb.langStringSetter)
|
|
497
|
+
# self.assertEqual(bb.author, {Iri("test:TuomasHolopainen")})
|
|
498
|
+
# jsonobj = bb.toJsonObject()
|
|
499
|
+
# self.assertEqual(jsonobj['test:author'], ['test:TuomasHolopainen'])
|
|
500
|
+
# self.assertEqual(jsonobj['test:pubDate'], ['2001-01-01'])
|
|
501
|
+
# self.assertEqual(jsonobj['test:title'], ['The Life and Times of Scrooge'])
|
|
502
|
+
|
|
503
|
+
bb.delete()
|
|
504
|
+
|
|
483
505
|
def test_value_setter(self):
|
|
484
506
|
factory = ResourceInstanceFactory(con=self._connection, project='test')
|
|
485
507
|
SetterTester = factory.createObjectInstance('SetterTester')
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from pprint import pprint
|
|
2
|
+
|
|
3
|
+
from oldaplib.src.connection import Connection
|
|
4
|
+
import unittest
|
|
5
|
+
|
|
6
|
+
from oldaplib.src.datamodel import DataModel
|
|
7
|
+
from oldaplib.src.project import Project
|
|
8
|
+
|
|
9
|
+
class TestDataModel(unittest.TestCase):
|
|
10
|
+
|
|
11
|
+
#@unittest.skip('Work in progress')
|
|
12
|
+
def test_fasnacht(self):
|
|
13
|
+
connection = Connection(userId="rosenth",
|
|
14
|
+
credentials="RioGrande",
|
|
15
|
+
context_name="DEFAULT")
|
|
16
|
+
|
|
17
|
+
dm = DataModel.read(connection, "fasnacht", ignore_cache=False)
|
|
18
|
+
pass
|
|
19
|
+
|
|
20
|
+
def test_datamodel_read_shared(self):
|
|
21
|
+
connection = Connection(userId="rosenth",
|
|
22
|
+
credentials="RioGrande",
|
|
23
|
+
context_name="DEFAULT")
|
|
24
|
+
|
|
25
|
+
model = DataModel.read(connection, 'shared')
|
|
26
|
+
pp = model.get_propclasses()
|
|
27
|
+
for p in pp:
|
|
28
|
+
print(model[p])
|
|
29
|
+
model = DataModel.read(connection, 'shared', ignore_cache=True)
|
|
30
|
+
pp = model.get_propclasses()
|
|
31
|
+
for p in pp:
|
|
32
|
+
print(model[p])
|
|
@@ -7,9 +7,13 @@ oldaplib/ontologies/oldap.trig,sha256=OEcjBUiTdE3SuUA0Z3F20azI8abeK1OIpKqcQo1pjv
|
|
|
7
7
|
oldaplib/ontologies/oldap.ttl,sha256=qdA0uiSjzVhkc1d5IN2y5ioK1QMzwl-TTnn3M_D1Kh8,29446
|
|
8
8
|
oldaplib/ontologies/shared.trig,sha256=8BMbhsqmnGAFUotc1bGc6morWhJqU0pCGy9TlkiEKIY,27550
|
|
9
9
|
oldaplib/ontologies/standard/.gitsave,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
oldaplib/ontologies/standard/dcterms.ttl,sha256=E99AEHLdcBW_nXUWLz5ByBOAdTBLe5zBqh6cFtuXZ5c,47834
|
|
11
|
+
oldaplib/ontologies/standard/schemaorg.ttl,sha256=bTInwDfzT-haiShF2B9ojXmlSVAM4mn-zTPhOetLpWo,1067667
|
|
12
|
+
oldaplib/ontologies/standard/skos.ttl,sha256=mHQeXYTHK4q-potUn_YNKfKfS9ZJXBE8SYhP3T7OKbM,16144
|
|
13
|
+
oldaplib/ontologies/standard/skos.xml,sha256=55YzuNBWSBbO6KmfXJrPmg5vxyV8cgms1oTsrVOondY,28966
|
|
10
14
|
oldaplib/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
15
|
oldaplib/src/cachesingleton.py,sha256=WGhuFER-mTnOJmwaN17fXPAg7zn7GJBm-XadShNUBBk,3687
|
|
12
|
-
oldaplib/src/connection.py,sha256=
|
|
16
|
+
oldaplib/src/connection.py,sha256=E_Y_KpVDGfSi6PCAZVIyVhBOUTy6_5AieP1heRPPYJA,27620
|
|
13
17
|
oldaplib/src/datamodel.py,sha256=Fn9IkU-niOFq7Ih1km9BPHHnCd_klEqU3-6uMGwPKZY,35343
|
|
14
18
|
oldaplib/src/dtypes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
19
|
oldaplib/src/dtypes/bnode.py,sha256=7Swl77PJlzahov7d7ijJExmoVsTkR5JFOvFQf1jDmEg,1555
|
|
@@ -17,18 +21,19 @@ oldaplib/src/dtypes/languagein.py,sha256=6h3VrTH8IcTN6mvnWuGvzDoKX_Jh6h9w3wWrLuA
|
|
|
17
21
|
oldaplib/src/dtypes/namespaceiri.py,sha256=kbLuqS-OzWCelGkGMUP0IN43LibrTDfn4s7cm8p73Ro,2797
|
|
18
22
|
oldaplib/src/dtypes/rdfset.py,sha256=1RNbjQuUknaEfj84o-AsXEJvEWs3OI6QSKe4p6aDXqc,7782
|
|
19
23
|
oldaplib/src/dtypes/xsdset.py,sha256=oMFSY7JGBf0CYneoHL3OtnFIeEPaULN3FdUW7u15_I4,4256
|
|
24
|
+
oldaplib/src/enums/XXXeditor.py,sha256=Jh4_fEKkQjm-eCbZk8eP_DOQZVwwyrXy0UyNr6s-id0,2236
|
|
20
25
|
oldaplib/src/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
26
|
oldaplib/src/enums/action.py,sha256=aL7XXmoZ63_L2TTR37vqHpPPf5H_kYiPunNyiSDN28U,828
|
|
22
27
|
oldaplib/src/enums/adminpermissions.py,sha256=nn76g2E8TIhkiVbZ64LGt81NuPwFXIDRISKBV6l9dyM,1969
|
|
23
|
-
oldaplib/src/enums/attributeclass.py,sha256=
|
|
28
|
+
oldaplib/src/enums/attributeclass.py,sha256=CSXeL0QlLKxbk27vkPmLuFY4QjuUi5xsO9ncOUM3qds,3437
|
|
24
29
|
oldaplib/src/enums/datapermissions.py,sha256=MiaVHXzNDKTGnZJ9pvs-IgQotyV4wA3X484s2RVMOvs,4104
|
|
25
30
|
oldaplib/src/enums/externalontologyattr.py,sha256=H7SrWrhe1Dkz_t1OFCWZVh3_14lJDltYGh3dOFr1Z6w,807
|
|
26
|
-
oldaplib/src/enums/haspropertyattr.py,sha256=
|
|
31
|
+
oldaplib/src/enums/haspropertyattr.py,sha256=x9z2b59aFhV3gx8IVz-743dAQ_wfMTzZuN1IqnLwpBM,831
|
|
27
32
|
oldaplib/src/enums/language.py,sha256=OfQsFpIBj8lGBbZEqVCR_1F-bimPM48vqBl4EKBgggY,4623
|
|
28
33
|
oldaplib/src/enums/oldaplistattr.py,sha256=xuOU3oP35-PFFmlI-jlN28yqdk5lp_OzScKCC1O4IDI,620
|
|
29
34
|
oldaplib/src/enums/oldaplistnodeattr.py,sha256=qokSxE-0FLyWNipjjY3gZJC2bBEt1qS1Z2SFg-gb0kc,722
|
|
30
35
|
oldaplib/src/enums/owlpropertytype.py,sha256=R7DaCV4vtkGeuDhslN3q7719J1sLKUL-x0o91Te7Qk8,989
|
|
31
|
-
oldaplib/src/enums/projectattr.py,sha256=
|
|
36
|
+
oldaplib/src/enums/projectattr.py,sha256=mHtwxqd535cFy5Er3Qsm-clZrzHlfzUppxu5tZq_YlM,1240
|
|
32
37
|
oldaplib/src/enums/propertyclassattr.py,sha256=-F5Pjqj1AAnCrC01en-gGD4M-QoIYbi5QAWL0jQmNVQ,4263
|
|
33
38
|
oldaplib/src/enums/resourceclassattr.py,sha256=g8tc5JDr4wLCteBNnhHMVE4cRZOhlSQqs-qFnRB3_N0,709
|
|
34
39
|
oldaplib/src/enums/roleattr.py,sha256=g4zvVfT6lO_9kKaLpDo9ko_Aw2dzwf9UN64o74_Ln1c,733
|
|
@@ -37,11 +42,11 @@ oldaplib/src/enums/userattr.py,sha256=cMMsuwf5JbEVwl2QHgA0mBU0FUkUzRttBtw8zKCI_6
|
|
|
37
42
|
oldaplib/src/enums/xsd_datatypes.py,sha256=TGpy2TEaYfmCsSCClSyK76ixNP_hR7nEdJvCT6l-Txk,6253
|
|
38
43
|
oldaplib/src/externalontology.py,sha256=VaQvVlq5muzmQ466c1gKrldXn9Wx_WfOR7pUCjw_cYw,23888
|
|
39
44
|
oldaplib/src/globalconfig.py,sha256=zAJmAMQnojbhj8SZFUaPj7DIHN5g3wUwQQhWPMxjDUg,1306
|
|
40
|
-
oldaplib/src/hasproperty.py,sha256=
|
|
45
|
+
oldaplib/src/hasproperty.py,sha256=mHrsClBQ477EcYgPNRp5q_GwQwYmLyhDekVD9XsyJOk,17480
|
|
41
46
|
oldaplib/src/helpers/Notify.py,sha256=9zzO93F4V4lj-xF6b3hpRg1QkI4TR_GYEh3ptsohlfQ,2008
|
|
42
47
|
oldaplib/src/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
48
|
oldaplib/src/helpers/attributechange.py,sha256=aQ5Q9s6U3bVd1WSNQcBpkr5UQVxeP4z_uz0K5_31ZVc,256
|
|
44
|
-
oldaplib/src/helpers/context.py,sha256=
|
|
49
|
+
oldaplib/src/helpers/context.py,sha256=qWv0E_MQKzXYLIt3thd65jfgvPjNL-KQ7RzYirhtYxs,11920
|
|
45
50
|
oldaplib/src/helpers/convert2datatype.py,sha256=jLhcOBfsGQVwYjzvQBUbFrFWoIquS44kU81aJ5BhMaA,6447
|
|
46
51
|
oldaplib/src/helpers/irincname.py,sha256=XZoV6eEsWVssvhQE9w1TD0cYDX1EYQnhN8PiU9gjvng,2473
|
|
47
52
|
oldaplib/src/helpers/json_encoder.py,sha256=c78h9uf58zfLaK8X7S1KCK4otY3iEltGnPBy_5ryiCk,2135
|
|
@@ -53,24 +58,24 @@ oldaplib/src/helpers/oldaperror.py,sha256=2gKgV8FYiEjbcox1KN1PlOIPY4KclxVTnCIOQ6
|
|
|
53
58
|
oldaplib/src/helpers/query_processor.py,sha256=1RJnQ9u6BS58xK0PcTbffzF2W-_K42kw37Vbh2HO5sA,10369
|
|
54
59
|
oldaplib/src/helpers/semantic_version.py,sha256=HLFQO2CPVDz_GKZaFCjR5q_G-aSLQ2XYohCA2tCU9go,3218
|
|
55
60
|
oldaplib/src/helpers/serializeableset.py,sha256=1AWMWm_iEiFu8M2ZdOK_fXE6TyNGLDp6rp1HKryYv-Y,382
|
|
56
|
-
oldaplib/src/helpers/serializer.py,sha256=
|
|
61
|
+
oldaplib/src/helpers/serializer.py,sha256=quaIwTrQ4-2rDFqpvUYSSIuK3uRyBi03qWIFjqQ0iks,5753
|
|
57
62
|
oldaplib/src/helpers/singletonmeta.py,sha256=bz_c5LFcRxxYirL9EDaFrWlc5WhAzR2uz9krHp53INE,429
|
|
58
63
|
oldaplib/src/helpers/tools.py,sha256=sNbiOLucTGNFzZmiWwPLFOb80VTXQH0Zd9uCGubhzAk,12721
|
|
59
64
|
oldaplib/src/iconnection.py,sha256=XlOc2Kh4tK_UOHydLQwlWjUFLUze-Aq_vEZpf9KS1-s,3677
|
|
60
65
|
oldaplib/src/in_project.py,sha256=ZnfeOFwpdPh1oyC2mAGH8DnSD9afxYtvsh7_GrfGVgQ,10663
|
|
61
|
-
oldaplib/src/model.py,sha256=
|
|
66
|
+
oldaplib/src/model.py,sha256=wgvXaR2GVHk4hJxoL6rigFHwjPYEukBOjtf1Jmo-m9A,19326
|
|
62
67
|
oldaplib/src/objectfactory.py,sha256=3xzXXVRBLernA-JD3NHZ2-FLaywWI6opWIaJfLGv2uk,85975
|
|
63
68
|
oldaplib/src/oldaplist.py,sha256=s5afrHtUnvDfMUFoZTt-jMxlBlmK2c0tLeTMp0KiIfg,43077
|
|
64
69
|
oldaplib/src/oldaplist_helpers.py,sha256=D_X7KdFjPNlX-OwR04D6onxhFucrGo8052WuJPRjLkA,14213
|
|
65
70
|
oldaplib/src/oldaplistnode.py,sha256=NnC2juEGTtEkDO6OlB9PjSw_zTF-wSsRUgEk-6VV9DA,87344
|
|
66
71
|
oldaplib/src/oldaplogging.py,sha256=IDSOylms9OSTInYPC4Y2QrTTEzRL0T5I2QssCevOhTU,1242
|
|
67
72
|
oldaplib/src/project.py,sha256=ic0cIYYcPk--7XsfbymuGkFbiUFmFJqNgjTWY2Rws7Q,35266
|
|
68
|
-
oldaplib/src/propertyclass.py,sha256=
|
|
69
|
-
oldaplib/src/resourceclass.py,sha256=
|
|
73
|
+
oldaplib/src/propertyclass.py,sha256=6PP7dp64UIk4EjoMp4VgRKyFwTP27Aj28SNsTJ5NCuI,97569
|
|
74
|
+
oldaplib/src/resourceclass.py,sha256=zJNWNY1TfhGs-A2HNa1DO0KAajps_1jMQsoEkUsr7P0,103980
|
|
70
75
|
oldaplib/src/role.py,sha256=AWtZx80OVERT2xbKeuP8g32VSXkm4MVlzeUWd9nh6mQ,30741
|
|
71
76
|
oldaplib/src/user.py,sha256=iTJzSvR0xfc3FFkoKG-q5LptkWB_PGpRGpG-L3271z8,55833
|
|
72
77
|
oldaplib/src/userdataclass.py,sha256=4kWktau9XSv5alfEVuOvikfxnSSUSKT8cw77TWdMhQM,13921
|
|
73
|
-
oldaplib/src/version.py,sha256=
|
|
78
|
+
oldaplib/src/version.py,sha256=Y-I6FXKes4hB39WcBm3HZ1OCtCWiErPB6YZ-YSgexuE,21
|
|
74
79
|
oldaplib/src/xsd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
75
80
|
oldaplib/src/xsd/floatingpoint.py,sha256=rDReKqh0mXyc4F5wslgTUxbeGf3-PGERyughj5_62YI,8852
|
|
76
81
|
oldaplib/src/xsd/iri.py,sha256=w1Dr0z-REi7yPe3GPGnyzGrLVMvLY03kEeK-AmZ9sxw,8383
|
|
@@ -115,19 +120,18 @@ oldaplib/src/xsd/xsd_unsignedbyte.py,sha256=Nro864cBM_Su7dwY_UXvGBwItsqy9jwuZffy
|
|
|
115
120
|
oldaplib/src/xsd/xsd_unsignedint.py,sha256=q4qN706kocmMoQemg1ayig3tM26emvK8crFphZPZzqs,1041
|
|
116
121
|
oldaplib/src/xsd/xsd_unsignedlong.py,sha256=5fGH8_SAV1x6b0YGiIR44ZlJXjUiCUW6XHhCWbGgcVA,1008
|
|
117
122
|
oldaplib/src/xsd/xsd_unsignedshort.py,sha256=M1E8SDR33rPJ0jUpRkzcDCcJYg17YfVbaItTuJeEibc,1013
|
|
118
|
-
oldaplib/test/XXX_test_fasnacht.py,sha256=BH_0osp1LpyXNWjU_OPXvpT7RyF9aeYMrPIa1JiQKiA,573
|
|
119
123
|
oldaplib/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
120
124
|
oldaplib/test/test_cache.py,sha256=6TGukPUruuj5BsZaPGZdIx9L7v39qB9jIKZkg_GkbW4,702
|
|
121
125
|
oldaplib/test/test_connection.py,sha256=wM2AWcwcNcd1_W857by_QKmdnEabsOcjOec-8JrfHdc,13339
|
|
122
|
-
oldaplib/test/test_context.py,sha256=
|
|
123
|
-
oldaplib/test/test_datamodel.py,sha256=
|
|
126
|
+
oldaplib/test/test_context.py,sha256=0qCTOOS6lKjjlZXRxXOoWeix5HnvgwcmKzOF17Fou6M,4977
|
|
127
|
+
oldaplib/test/test_datamodel.py,sha256=AHClO0KyYFGI44OBO5wA21GOQDXL8NrVsE3skhojrUo,59921
|
|
124
128
|
oldaplib/test/test_dtypes.py,sha256=ifXWUc6ExAKGukyM1ziku7Xd9eehg4J7HZy9B63-aPo,8601
|
|
125
129
|
oldaplib/test/test_externalontologies.py,sha256=WUPjTbklMmrM4OucPXOChyNmwFD9qdYVKkZyo0WHlP0,7797
|
|
126
|
-
oldaplib/test/test_hasproperty.py,sha256=
|
|
130
|
+
oldaplib/test/test_hasproperty.py,sha256=cU9t7uBaMxtIVbpk3UyGjPyIzQKDSS2PzqGHIINYZRw,13515
|
|
127
131
|
oldaplib/test/test_in_project.py,sha256=OV5csuPwxcctmOM2HsB_ITmXXASRcH9-A2GlWW5foa4,7580
|
|
128
132
|
oldaplib/test/test_langstring.py,sha256=37BeKiQzj63G-SyS_paK_SEG7ulRbGrE89Mz40UB_bE,15146
|
|
129
133
|
oldaplib/test/test_language_in.py,sha256=ELqHO-YIsZSCPF3E3rWde4J7rERL7En7sV_pzQ00zgs,8826
|
|
130
|
-
oldaplib/test/test_objectfactory.py,sha256=
|
|
134
|
+
oldaplib/test/test_objectfactory.py,sha256=QJ4di0qJ48tVC3wPELSGMt4KoYb7wPpyk2BS-Efb2PY,48317
|
|
131
135
|
oldaplib/test/test_observable_dict.py,sha256=GxD0sM0nsVfVRBu92SFGkJ6--YXq4ibBWI4IpjZZzDU,1396
|
|
132
136
|
oldaplib/test/test_observable_set.py,sha256=JWZSoAsr8XIEBXPVgSVJjQQEEc8uSAme5IrFYLYVVXw,6313
|
|
133
137
|
oldaplib/test/test_oldaplist.py,sha256=jMM3HiSFs7YcS2ltEvot6637EhK-fMV0W5DSUlFdTRI,20098
|
|
@@ -140,6 +144,7 @@ oldaplib/test/test_role.py,sha256=mr4uNkamfb8T8ehyMf2dfPCXmxe7lvZPdhE-hdB_QN4,19
|
|
|
140
144
|
oldaplib/test/test_semantic_version.py,sha256=OSJYHWDpKBqk-HsxJ2nFpSr14a4OEZTFCogzEni8mcE,3392
|
|
141
145
|
oldaplib/test/test_user.py,sha256=S34Y36xz6zgmVkVZf8tg_LkFbw3XkstunjmpjvOa7Fw,76600
|
|
142
146
|
oldaplib/test/test_xsd_datatypes.py,sha256=Ey2RMMs9a3cNlFe4PHTGcLl5MRlkPBxJTid1NLSe-yg,67959
|
|
147
|
+
oldaplib/test/xxxx_fasnacht.py,sha256=F1m4SpamgsSNvoZkT-_k0EesSBy62Pb9IRjvpaXoyew,1061
|
|
143
148
|
oldaplib/testdata/Gender.yaml,sha256=54ohJWToiuO2rMOUJ85JOsZf2TSrIuPLarHriXa6Lww,235
|
|
144
149
|
oldaplib/testdata/collections_type.yaml,sha256=03MNQVUoLlq7A1OOtSvACeRs32VfP5eS8av-mPLGoEI,2737
|
|
145
150
|
oldaplib/testdata/connection_test.trig,sha256=LFTGLEae7SaTU67rwvgvg_epi09O7oPZwfarvBVbhho,23078
|
|
@@ -159,6 +164,6 @@ oldaplib/testdata/source_type.yaml,sha256=dSihKikw3O-IlGf6anj5KWMoBYLaweLVF1Zojm
|
|
|
159
164
|
oldaplib/testdata/test_move_left_of_toL.yaml,sha256=2m1OSQrQFlsCQxeJrjzBAO74LMprNDo_HuyrYGsOeXI,787
|
|
160
165
|
oldaplib/testdata/testlist.yaml,sha256=AT11nXEG81Sfyb-tr1gQV0H_dZBrOCcFuHf7YtL8P2g,1994
|
|
161
166
|
oldaplib/testit.http,sha256=qW7mnr6aNLXFG6lQdLgyhXILOPN6qc5iFVZclLyVvkY,303
|
|
162
|
-
oldaplib-0.4.
|
|
163
|
-
oldaplib-0.4.
|
|
164
|
-
oldaplib-0.4.
|
|
167
|
+
oldaplib-0.4.2.dist-info/METADATA,sha256=8sOUpxHNqa4-ldp3AtofTxcuXhIaChtz8HN5NfC-nmM,3009
|
|
168
|
+
oldaplib-0.4.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
169
|
+
oldaplib-0.4.2.dist-info/RECORD,,
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
from oldaplib.src.connection import Connection
|
|
2
|
-
import unittest
|
|
3
|
-
|
|
4
|
-
from oldaplib.src.datamodel import DataModel
|
|
5
|
-
from oldaplib.src.project import Project
|
|
6
|
-
|
|
7
|
-
class TestDataModel(unittest.TestCase):
|
|
8
|
-
|
|
9
|
-
# @unittest.skip('Work in progress')
|
|
10
|
-
def test_fasnacht(self):
|
|
11
|
-
connection = Connection(userId="rosenth",
|
|
12
|
-
credentials="RioGrande",
|
|
13
|
-
context_name="DEFAULT")
|
|
14
|
-
|
|
15
|
-
project = Project.read(connection, "fasnacht")
|
|
16
|
-
dm = DataModel.read(connection, project, ignore_cache=False)
|
|
17
|
-
pass
|
|
File without changes
|