oldaplib 0.3.29__py3-none-any.whl → 0.3.30__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.
@@ -1271,7 +1271,6 @@ class ResourceInstance:
1271
1271
  }}
1272
1272
  }}
1273
1273
  """
1274
- print(sparql)
1275
1274
  try:
1276
1275
  jsonres = con.query(sparql)
1277
1276
  except OldapError:
@@ -1601,10 +1601,21 @@ class ResourceClass(Model, Notify):
1601
1601
  sparql = f'INSERT DATA {{#E\n'
1602
1602
  sparql += f' GRAPH {self._graph}:onto {{\n'
1603
1603
  sparql += f'{blank:{indent * indent_inc}}{self._owlclass_iri} rdfs:subClassOf [\n'
1604
+ sparql += f'{blank:{(indent + 1) * indent_inc}}rdf:type owl:Restriction ;\n'
1604
1605
  if isinstance(prop, Xsd_QName):
1605
- sparql += prop.create_owl_part2(haspropdata=hasprop.haspropdata)
1606
+ # sparql += prop.create_owl_part2(haspropdata=hasprop.haspropdata)
1607
+ sparql += f'{blank:{(indent + 1) * indent_inc}}owl:onProperty {prop.toRdf}'
1608
+ if hasprop.haspropdata.minCount and hasprop.haspropdata.maxCount and hasprop.haspropdata.minCount == hasprop.haspropdata.maxCount:
1609
+ tmp = Xsd_nonNegativeInteger(hasprop.haspropdata.minCount)
1610
+ sparql += f' ;\n{blank:{(indent + 1) * indent_inc}}owl:qualifiedCardinality {tmp.toRdf}'
1611
+ else:
1612
+ if hasprop.haspropdata.minCount:
1613
+ tmp = Xsd_nonNegativeInteger(hasprop.haspropdata.minCount)
1614
+ sparql += f' ;\n{blank:{(indent + 1) * indent_inc}}owl:minQualifiedCardinality {tmp.toRdf}'
1615
+ if hasprop.haspropdata.maxCount:
1616
+ tmp = Xsd_nonNegativeInteger(hasprop.haspropdata.maxCount)
1617
+ sparql += f' ;\n{blank:{(indent + 1) * indent_inc}}owl:maxQualifiedCardinality {tmp.toRdf}'
1606
1618
  elif isinstance(prop, PropertyClass):
1607
- sparql += f'{blank:{(indent + 1) * indent_inc}}rdf:type owl:Restriction ;\n'
1608
1619
  sparql += f'{blank:{(indent + 1) * indent_inc}}owl:onProperty {prop.property_class_iri.toRdf}'
1609
1620
  sparql += hasprop.create_owl(indent=1)
1610
1621
  else:
oldaplib/src/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.3.29"
1
+ __version__ = "0.3.30"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: oldaplib
3
- Version: 0.3.29
3
+ Version: 0.3.30
4
4
  Summary: Open Media Access Server Library (Linked Open Data middleware/RESTApi)
5
5
  License: GNU Affero General Public License version 3
6
6
  Author: Lukas Rosenthaler
@@ -58,7 +58,7 @@ oldaplib/src/helpers/tools.py,sha256=sNbiOLucTGNFzZmiWwPLFOb80VTXQH0Zd9uCGubhzAk
58
58
  oldaplib/src/iconnection.py,sha256=XlOc2Kh4tK_UOHydLQwlWjUFLUze-Aq_vEZpf9KS1-s,3677
59
59
  oldaplib/src/in_project.py,sha256=2KuhHPj8DNveFRBeImrRfxlCOYhBK-mcxXYUp6s--j8,10672
60
60
  oldaplib/src/model.py,sha256=VACR3T6zJYFaE5J1PFFdP0OSwhbu4sahoLMWg6_L_rE,19267
61
- oldaplib/src/objectfactory.py,sha256=4HHgkCNATZVgZD-PZHvAEs-Ndl2Q2yDFnAm5W0P-itI,72103
61
+ oldaplib/src/objectfactory.py,sha256=O9f4U74aMYb-ilRRp4-0Bf02Nr242zkpSGjQieXCx-w,72081
62
62
  oldaplib/src/oldaplist.py,sha256=s5afrHtUnvDfMUFoZTt-jMxlBlmK2c0tLeTMp0KiIfg,43077
63
63
  oldaplib/src/oldaplist_helpers.py,sha256=D_X7KdFjPNlX-OwR04D6onxhFucrGo8052WuJPRjLkA,14213
64
64
  oldaplib/src/oldaplistnode.py,sha256=NnC2juEGTtEkDO6OlB9PjSw_zTF-wSsRUgEk-6VV9DA,87344
@@ -66,10 +66,10 @@ oldaplib/src/oldaplogging.py,sha256=IDSOylms9OSTInYPC4Y2QrTTEzRL0T5I2QssCevOhTU,
66
66
  oldaplib/src/permissionset.py,sha256=JU9cwgAEf3ppHvSzPZEgKxhYcYVxZoN1mqP96lexOSA,32912
67
67
  oldaplib/src/project.py,sha256=ic0cIYYcPk--7XsfbymuGkFbiUFmFJqNgjTWY2Rws7Q,35266
68
68
  oldaplib/src/propertyclass.py,sha256=OuzCSCRp8Qfz-PolmoH7FARfTEvWJd42ghLgvPsgT78,97213
69
- oldaplib/src/resourceclass.py,sha256=_WEyZRlt_sA_q8vzoOP8PdkBtjje8khiVHyvr_-1_ro,102817
69
+ oldaplib/src/resourceclass.py,sha256=E_CT3MKgFyLUtvtrUtRU7sV5s0TPwxEb6l74PsnbgrI,103724
70
70
  oldaplib/src/user.py,sha256=fJVTbKjFi2WvnEzyDt77_Yh9s1X1Er3JkWHBQd-hF20,51805
71
71
  oldaplib/src/userdataclass.py,sha256=FbZkcRt0pKbOeqsZ7HbpwoKE-XPWH2AqpHG1GcsrBPo,12364
72
- oldaplib/src/version.py,sha256=paNs3dbDlGHdAwO8lKlskh0eO_-9UA9yzRqzr3R1j0E,22
72
+ oldaplib/src/version.py,sha256=oBh5g9gWulwxsDtRAyFCLUGwW6sQ-rbAyv9UolefvTY,22
73
73
  oldaplib/src/xsd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
74
  oldaplib/src/xsd/floatingpoint.py,sha256=rDReKqh0mXyc4F5wslgTUxbeGf3-PGERyughj5_62YI,8852
75
75
  oldaplib/src/xsd/iri.py,sha256=w1Dr0z-REi7yPe3GPGnyzGrLVMvLY03kEeK-AmZ9sxw,8383
@@ -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.29.dist-info/METADATA,sha256=jDHfVZ4RdSPGmoYYWcql2Spq5a0Bvpk6K1esAf0alGA,3010
162
- oldaplib-0.3.29.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
163
- oldaplib-0.3.29.dist-info/RECORD,,
161
+ oldaplib-0.3.30.dist-info/METADATA,sha256=vOTAT5ZHrbqKmyOnlj995JTMD0YM4Seco8czXKub8uw,3010
162
+ oldaplib-0.3.30.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
163
+ oldaplib-0.3.30.dist-info/RECORD,,