shacl2code 0.0.7__tar.gz → 0.0.8__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.
- {shacl2code-0.0.7 → shacl2code-0.0.8}/PKG-INFO +1 -1
- {shacl2code-0.0.7 → shacl2code-0.0.8}/src/shacl2code/model.py +29 -19
- shacl2code-0.0.8/src/shacl2code/version.py +1 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/data/model/test.ttl +14 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/data/python/roundtrip.json +1 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/expect/jsonschema/test-context.json +6 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/expect/jsonschema/test.json +6 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/expect/python/test-context.py +7 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/expect/python/test.py +6 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/expect/raw/test.txt +1 -1
- shacl2code-0.0.7/src/shacl2code/version.py +0 -1
- {shacl2code-0.0.7 → shacl2code-0.0.8}/.flake8 +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/.github/workflows/coverage-generate.yaml +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/.github/workflows/coverage-report.yaml +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/.github/workflows/publish.yaml +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/.github/workflows/test.yaml +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/.gitignore +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/LICENSE +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/README.md +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/pyproject.toml +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/src/shacl2code/__init__.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/src/shacl2code/__main__.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/src/shacl2code/context.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/src/shacl2code/lang/__init__.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/src/shacl2code/lang/common.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/src/shacl2code/lang/jinja.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/src/shacl2code/lang/jsonschema.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/src/shacl2code/lang/lang.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/src/shacl2code/lang/python.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/src/shacl2code/lang/templates/jsonschema.j2 +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/src/shacl2code/lang/templates/python.j2 +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/src/shacl2code/main.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/src/shacl2code/urlcontext.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/conftest.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/data/abort.j2 +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/data/bad-id.j2 +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/data/bad-node-kind.ttl +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/data/bad-pattern-class.ttl +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/data/bad-pattern-integer.ttl +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/data/bad-reference.jsonld +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/data/context-url.j2 +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/data/context.j2 +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/data/missing-range.ttl +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/data/model/test-context.json +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/data/python/links.json +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/data/raw.j2 +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/expect/make_expect.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/expect/raw/test-context.txt +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/test_cli.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/test_common_jinja.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/test_common_prefix.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/test_context.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/test_jsonschema.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/test_model_source.py +0 -0
- {shacl2code-0.0.7 → shacl2code-0.0.8}/tests/test_python.py +0 -0
|
@@ -8,13 +8,13 @@ import typing
|
|
|
8
8
|
from dataclasses import dataclass
|
|
9
9
|
|
|
10
10
|
from rdflib import URIRef
|
|
11
|
-
from rdflib.namespace import RDF, RDFS, OWL, SH, DefinedNamespace, Namespace
|
|
11
|
+
from rdflib.namespace import RDF, RDFS, OWL, SH, XSD, DefinedNamespace, Namespace
|
|
12
12
|
|
|
13
13
|
PATTERN_DATATYPES = [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
str(XSD.string),
|
|
15
|
+
str(XSD.dateTime),
|
|
16
|
+
str(XSD.dateTimeStamp),
|
|
17
|
+
str(XSD.anyURI),
|
|
18
18
|
]
|
|
19
19
|
|
|
20
20
|
|
|
@@ -103,8 +103,10 @@ class Model(object):
|
|
|
103
103
|
class_iris = set()
|
|
104
104
|
enum_iris = set()
|
|
105
105
|
classes_by_iri = {}
|
|
106
|
+
all_class_iris = set()
|
|
106
107
|
|
|
107
108
|
for cls_iri in self.model.subjects(RDF.type, OWL.Class):
|
|
109
|
+
all_class_iris.add(cls_iri)
|
|
108
110
|
enum_values = []
|
|
109
111
|
|
|
110
112
|
for value_iri in self.model.subjects(RDF.type, cls_iri):
|
|
@@ -161,6 +163,25 @@ class Model(object):
|
|
|
161
163
|
return value
|
|
162
164
|
return default
|
|
163
165
|
|
|
166
|
+
def set_prop_range(p, range_id):
|
|
167
|
+
nonlocal enum_iris
|
|
168
|
+
nonlocal class_iris
|
|
169
|
+
nonlocal all_class_iris
|
|
170
|
+
|
|
171
|
+
if range_id in enum_iris:
|
|
172
|
+
p.enum_id = str(range_id)
|
|
173
|
+
return True
|
|
174
|
+
|
|
175
|
+
if range_id in class_iris:
|
|
176
|
+
p.class_id = str(range_id)
|
|
177
|
+
return True
|
|
178
|
+
|
|
179
|
+
if range_id in all_class_iris:
|
|
180
|
+
p.datatype = str(XSD.anyURI)
|
|
181
|
+
return True
|
|
182
|
+
|
|
183
|
+
return False
|
|
184
|
+
|
|
164
185
|
for cls_iri in class_iris:
|
|
165
186
|
c = Class(
|
|
166
187
|
_id=str(cls_iri),
|
|
@@ -203,13 +224,7 @@ class Model(object):
|
|
|
203
224
|
)
|
|
204
225
|
|
|
205
226
|
if range_id := self.model.value(obj_prop, SH["class"]):
|
|
206
|
-
if
|
|
207
|
-
p.enum_id = str(range_id)
|
|
208
|
-
|
|
209
|
-
elif range_id in class_iris:
|
|
210
|
-
p.class_id = str(range_id)
|
|
211
|
-
|
|
212
|
-
else:
|
|
227
|
+
if not set_prop_range(p, range_id):
|
|
213
228
|
raise ModelException(
|
|
214
229
|
f"Prop {prop} has unknown class restriction {range_id}"
|
|
215
230
|
)
|
|
@@ -218,14 +233,9 @@ class Model(object):
|
|
|
218
233
|
p.datatype = str(range_id)
|
|
219
234
|
|
|
220
235
|
elif range_id := self.model.value(prop, RDFS.range):
|
|
221
|
-
if
|
|
222
|
-
p.enum_id = str(range_id)
|
|
223
|
-
|
|
224
|
-
elif range_id in class_iris:
|
|
225
|
-
p.class_id = str(range_id)
|
|
226
|
-
|
|
227
|
-
else:
|
|
236
|
+
if not set_prop_range(p, range_id):
|
|
228
237
|
p.datatype = str(range_id)
|
|
238
|
+
|
|
229
239
|
else:
|
|
230
240
|
raise ModelException(f"Prop '{prop}' is missing range")
|
|
231
241
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VERSION = "0.0.8"
|
|
@@ -140,6 +140,11 @@
|
|
|
140
140
|
sh:path <test-class/regex-datetimestamp> ;
|
|
141
141
|
sh:maxCount 1 ;
|
|
142
142
|
sh:pattern "^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$"
|
|
143
|
+
],
|
|
144
|
+
[
|
|
145
|
+
sh:class <non-shape-class> ;
|
|
146
|
+
sh:path <test-class/non-shape> ;
|
|
147
|
+
sh:maxCount 1
|
|
143
148
|
]
|
|
144
149
|
.
|
|
145
150
|
|
|
@@ -303,6 +308,15 @@
|
|
|
303
308
|
rdfs:range xsd:dateTimeStamp
|
|
304
309
|
.
|
|
305
310
|
|
|
311
|
+
<test-class/non-shape> a rdf:Property ;
|
|
312
|
+
rdfs:comment "A class with no shape" ;
|
|
313
|
+
rdfs:range <non-shape-class>
|
|
314
|
+
.
|
|
315
|
+
|
|
316
|
+
<non-shape-class> a owl:Class ;
|
|
317
|
+
rdfs:comment "A class that is not a nodeshape"
|
|
318
|
+
.
|
|
319
|
+
|
|
306
320
|
<enumType> a owl:Class ;
|
|
307
321
|
rdfs:comment "An enumerated type"
|
|
308
322
|
.
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"test-class/regex-datetime": "2024-03-11T00:00:00+01:00",
|
|
65
65
|
"test-class/regex-datetimestamp": "2024-03-11T00:00:00Z",
|
|
66
66
|
"test-class/regex-list": ["foo2", "foo3"],
|
|
67
|
+
"test-class/non-shape": "http://serialize.example.com/non-shape",
|
|
67
68
|
"import": "foo",
|
|
68
69
|
"encode": "foo"
|
|
69
70
|
},
|
|
@@ -403,6 +403,9 @@
|
|
|
403
403
|
"test-class/named-property": {
|
|
404
404
|
"$ref": "#/$defs/prop_testclass_named_property"
|
|
405
405
|
},
|
|
406
|
+
"test-class/non-shape": {
|
|
407
|
+
"$ref": "#/$defs/prop_testclass_testclassnonshape"
|
|
408
|
+
},
|
|
406
409
|
"test-class/nonnegative-integer-prop": {
|
|
407
410
|
"$ref": "#/$defs/prop_testclass_testclassnonnegativeintegerprop"
|
|
408
411
|
},
|
|
@@ -538,6 +541,9 @@
|
|
|
538
541
|
"prop_testclass_named_property": {
|
|
539
542
|
"type": "string"
|
|
540
543
|
},
|
|
544
|
+
"prop_testclass_testclassnonshape": {
|
|
545
|
+
"$ref": "#/$defs/anyURI"
|
|
546
|
+
},
|
|
541
547
|
"prop_testclass_testclassnonnegativeintegerprop": {
|
|
542
548
|
"type": "integer",
|
|
543
549
|
"minimum": 0
|
|
@@ -399,6 +399,9 @@
|
|
|
399
399
|
"http://example.org/test-class/named-property": {
|
|
400
400
|
"$ref": "#/$defs/prop_http_exampleorgtestclass_named_property"
|
|
401
401
|
},
|
|
402
|
+
"http://example.org/test-class/non-shape": {
|
|
403
|
+
"$ref": "#/$defs/prop_http_exampleorgtestclass_nonshape"
|
|
404
|
+
},
|
|
402
405
|
"http://example.org/test-class/nonnegative-integer-prop": {
|
|
403
406
|
"$ref": "#/$defs/prop_http_exampleorgtestclass_nonnegativeintegerprop"
|
|
404
407
|
},
|
|
@@ -534,6 +537,9 @@
|
|
|
534
537
|
"prop_http_exampleorgtestclass_named_property": {
|
|
535
538
|
"type": "string"
|
|
536
539
|
},
|
|
540
|
+
"prop_http_exampleorgtestclass_nonshape": {
|
|
541
|
+
"$ref": "#/$defs/anyURI"
|
|
542
|
+
},
|
|
537
543
|
"prop_http_exampleorgtestclass_nonnegativeintegerprop": {
|
|
538
544
|
"type": "integer",
|
|
539
545
|
"minimum": 0
|
|
@@ -1775,6 +1775,13 @@ class test_class(parent_class):
|
|
|
1775
1775
|
iri="http://example.org/test-class/named-property",
|
|
1776
1776
|
compact="test-class/named-property",
|
|
1777
1777
|
)
|
|
1778
|
+
# A class with no shape
|
|
1779
|
+
self._add_property(
|
|
1780
|
+
"test_class_non_shape",
|
|
1781
|
+
AnyURIProp(),
|
|
1782
|
+
iri="http://example.org/test-class/non-shape",
|
|
1783
|
+
compact="test-class/non-shape",
|
|
1784
|
+
)
|
|
1778
1785
|
# a non-negative integer
|
|
1779
1786
|
self._add_property(
|
|
1780
1787
|
"test_class_nonnegative_integer_prop",
|
|
@@ -1727,6 +1727,12 @@ class http_example_org_test_class(http_example_org_parent_class):
|
|
|
1727
1727
|
StringProp(),
|
|
1728
1728
|
iri="http://example.org/test-class/named-property",
|
|
1729
1729
|
)
|
|
1730
|
+
# A class with no shape
|
|
1731
|
+
self._add_property(
|
|
1732
|
+
"non_shape",
|
|
1733
|
+
AnyURIProp(),
|
|
1734
|
+
iri="http://example.org/test-class/non-shape",
|
|
1735
|
+
)
|
|
1730
1736
|
# a non-negative integer
|
|
1731
1737
|
self._add_property(
|
|
1732
1738
|
"nonnegative_integer_prop",
|
|
@@ -10,7 +10,7 @@ Class(_id='http://example.org/node-kind-iri', clsname='http_//example.org/node-k
|
|
|
10
10
|
Class(_id='http://example.org/node-kind-iri-or-blank', clsname='http_//example.org/node-kind-iri-or-blank', parent_ids=['http://example.org/link-class'], derived_ids=[], properties=[], comment='A class that can be either a blank node or an IRI', id_property=None, node_kind=rdflib.term.URIRef('http://www.w3.org/ns/shacl#BlankNodeOrIRI'))
|
|
11
11
|
Class(_id='http://example.org/parent-class', clsname='http_//example.org/parent-class', parent_ids=[], derived_ids=['http://example.org/aaa-derived-class', 'http://example.org/test-class'], properties=[], comment='The parent class', id_property=None, node_kind=rdflib.term.URIRef('http://www.w3.org/ns/shacl#BlankNodeOrIRI'))
|
|
12
12
|
Class(_id='http://example.org/test-another-class', clsname='http_//example.org/test-another-class', parent_ids=[], derived_ids=[], properties=[], comment='Another class', id_property=None, node_kind=rdflib.term.URIRef('http://www.w3.org/ns/shacl#BlankNodeOrIRI'))
|
|
13
|
-
Class(_id='http://example.org/test-class', clsname='http_//example.org/test-class', parent_ids=['http://example.org/parent-class'], derived_ids=['http://example.org/test-class-required', 'http://example.org/test-derived-class'], properties=[Property(path='http://example.org/encode', varname='encode', comment='A property that conflicts with an existing SHACLObject property', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern=''), Property(path='http://example.org/import', varname='import', comment='A property that is a keyword', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern=''), Property(path='http://example.org/test-class/anyuri-prop', varname='anyuri-prop', comment='a URI', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#anyURI', pattern=''), Property(path='http://example.org/test-class/boolean-prop', varname='boolean-prop', comment='a boolean property', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#boolean', pattern=''), Property(path='http://example.org/test-class/class-list-prop', varname='class-list-prop', comment='A test-class list property', max_count=None, min_count=None, enum_id='', class_id='http://example.org/test-class', datatype='', pattern=''), Property(path='http://example.org/test-class/class-prop', varname='class-prop', comment='A test-class property', max_count=1, min_count=None, enum_id='', class_id='http://example.org/test-class', datatype='', pattern=''), Property(path='http://example.org/test-class/class-prop-no-class', varname='class-prop-no-class', comment='A test-class property with no sh:class', max_count=1, min_count=None, enum_id='', class_id='http://example.org/test-class', datatype='', pattern=''), Property(path='http://example.org/test-class/datetime-list-prop', varname='datetime-list-prop', comment='A datetime list property', max_count=None, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#dateTime', pattern=''), Property(path='http://example.org/test-class/datetime-scalar-prop', varname='datetime-scalar-prop', comment='A scalar datetime property', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#dateTime', pattern=''), Property(path='http://example.org/test-class/datetimestamp-scalar-prop', varname='datetimestamp-scalar-prop', comment='A scalar dateTimeStamp property', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#dateTimeStamp', pattern=''), Property(path='http://example.org/test-class/enum-list-prop', varname='enum-list-prop', comment='A enum list property', max_count=None, min_count=None, enum_id='http://example.org/enumType', class_id='', datatype='', pattern=''), Property(path='http://example.org/test-class/enum-prop', varname='enum-prop', comment='A enum property', max_count=1, min_count=None, enum_id='http://example.org/enumType', class_id='', datatype='', pattern=''), Property(path='http://example.org/test-class/enum-prop-no-class', varname='enum-prop-no-class', comment='A enum property with no sh:class', max_count=1, min_count=None, enum_id='http://example.org/enumType', class_id='', datatype='', pattern=''), Property(path='http://example.org/test-class/float-prop', varname='float-prop', comment='a float property', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#decimal', pattern=''), Property(path='http://example.org/test-class/integer-prop', varname='integer-prop', comment='a non-negative integer', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#integer', pattern=''), Property(path='http://example.org/test-class/named-property', varname=rdflib.term.Literal('named_property'), comment='A named property', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern=''), Property(path='http://example.org/test-class/nonnegative-integer-prop', varname='nonnegative-integer-prop', comment='a non-negative integer', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#nonNegativeInteger', pattern=''), Property(path='http://example.org/test-class/positive-integer-prop', varname='positive-integer-prop', comment='A positive integer', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#positiveInteger', pattern=''), Property(path='http://example.org/test-class/regex', varname='regex', comment='A regex validated string', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern='^foo\\d'), Property(path='http://example.org/test-class/regex-datetime', varname='regex-datetime', comment='A regex dateTime', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#dateTime', pattern='^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+01:00$'), Property(path='http://example.org/test-class/regex-datetimestamp', varname='regex-datetimestamp', comment='A regex dateTimeStamp', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#dateTimeStamp', pattern='^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$'), Property(path='http://example.org/test-class/regex-list', varname='regex-list', comment='A regex validated string list', max_count=None, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern='^foo\\d'), Property(path='http://example.org/test-class/string-list-no-datatype', varname='string-list-no-datatype', comment='A string list property with no sh:datatype', max_count=None, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern=''), Property(path='http://example.org/test-class/string-list-prop', varname='string-list-prop', comment='A string list property', max_count=None, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern=''), Property(path='http://example.org/test-class/string-scalar-prop', varname='string-scalar-prop', comment='A scalar string propery', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern='')], comment='The test class', id_property=None, node_kind=rdflib.term.URIRef('http://www.w3.org/ns/shacl#BlankNodeOrIRI'))
|
|
13
|
+
Class(_id='http://example.org/test-class', clsname='http_//example.org/test-class', parent_ids=['http://example.org/parent-class'], derived_ids=['http://example.org/test-class-required', 'http://example.org/test-derived-class'], properties=[Property(path='http://example.org/encode', varname='encode', comment='A property that conflicts with an existing SHACLObject property', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern=''), Property(path='http://example.org/import', varname='import', comment='A property that is a keyword', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern=''), Property(path='http://example.org/test-class/anyuri-prop', varname='anyuri-prop', comment='a URI', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#anyURI', pattern=''), Property(path='http://example.org/test-class/boolean-prop', varname='boolean-prop', comment='a boolean property', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#boolean', pattern=''), Property(path='http://example.org/test-class/class-list-prop', varname='class-list-prop', comment='A test-class list property', max_count=None, min_count=None, enum_id='', class_id='http://example.org/test-class', datatype='', pattern=''), Property(path='http://example.org/test-class/class-prop', varname='class-prop', comment='A test-class property', max_count=1, min_count=None, enum_id='', class_id='http://example.org/test-class', datatype='', pattern=''), Property(path='http://example.org/test-class/class-prop-no-class', varname='class-prop-no-class', comment='A test-class property with no sh:class', max_count=1, min_count=None, enum_id='', class_id='http://example.org/test-class', datatype='', pattern=''), Property(path='http://example.org/test-class/datetime-list-prop', varname='datetime-list-prop', comment='A datetime list property', max_count=None, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#dateTime', pattern=''), Property(path='http://example.org/test-class/datetime-scalar-prop', varname='datetime-scalar-prop', comment='A scalar datetime property', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#dateTime', pattern=''), Property(path='http://example.org/test-class/datetimestamp-scalar-prop', varname='datetimestamp-scalar-prop', comment='A scalar dateTimeStamp property', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#dateTimeStamp', pattern=''), Property(path='http://example.org/test-class/enum-list-prop', varname='enum-list-prop', comment='A enum list property', max_count=None, min_count=None, enum_id='http://example.org/enumType', class_id='', datatype='', pattern=''), Property(path='http://example.org/test-class/enum-prop', varname='enum-prop', comment='A enum property', max_count=1, min_count=None, enum_id='http://example.org/enumType', class_id='', datatype='', pattern=''), Property(path='http://example.org/test-class/enum-prop-no-class', varname='enum-prop-no-class', comment='A enum property with no sh:class', max_count=1, min_count=None, enum_id='http://example.org/enumType', class_id='', datatype='', pattern=''), Property(path='http://example.org/test-class/float-prop', varname='float-prop', comment='a float property', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#decimal', pattern=''), Property(path='http://example.org/test-class/integer-prop', varname='integer-prop', comment='a non-negative integer', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#integer', pattern=''), Property(path='http://example.org/test-class/named-property', varname=rdflib.term.Literal('named_property'), comment='A named property', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern=''), Property(path='http://example.org/test-class/non-shape', varname='non-shape', comment='A class with no shape', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#anyURI', pattern=''), Property(path='http://example.org/test-class/nonnegative-integer-prop', varname='nonnegative-integer-prop', comment='a non-negative integer', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#nonNegativeInteger', pattern=''), Property(path='http://example.org/test-class/positive-integer-prop', varname='positive-integer-prop', comment='A positive integer', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#positiveInteger', pattern=''), Property(path='http://example.org/test-class/regex', varname='regex', comment='A regex validated string', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern='^foo\\d'), Property(path='http://example.org/test-class/regex-datetime', varname='regex-datetime', comment='A regex dateTime', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#dateTime', pattern='^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\+01:00$'), Property(path='http://example.org/test-class/regex-datetimestamp', varname='regex-datetimestamp', comment='A regex dateTimeStamp', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#dateTimeStamp', pattern='^\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\dZ$'), Property(path='http://example.org/test-class/regex-list', varname='regex-list', comment='A regex validated string list', max_count=None, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern='^foo\\d'), Property(path='http://example.org/test-class/string-list-no-datatype', varname='string-list-no-datatype', comment='A string list property with no sh:datatype', max_count=None, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern=''), Property(path='http://example.org/test-class/string-list-prop', varname='string-list-prop', comment='A string list property', max_count=None, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern=''), Property(path='http://example.org/test-class/string-scalar-prop', varname='string-scalar-prop', comment='A scalar string propery', max_count=1, min_count=None, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern='')], comment='The test class', id_property=None, node_kind=rdflib.term.URIRef('http://www.w3.org/ns/shacl#BlankNodeOrIRI'))
|
|
14
14
|
Class(_id='http://example.org/test-class-required', clsname='http_//example.org/test-class-required', parent_ids=['http://example.org/test-class'], derived_ids=[], properties=[Property(path='http://example.org/test-class/required-string-list-prop', varname='required-string-list-prop', comment='A required string list property', max_count=2, min_count=1, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern=''), Property(path='http://example.org/test-class/required-string-scalar-prop', varname='required-string-scalar-prop', comment='A required scalar string property', max_count=1, min_count=1, enum_id='', class_id='', datatype='http://www.w3.org/2001/XMLSchema#string', pattern='')], comment='', id_property=None, node_kind=rdflib.term.URIRef('http://www.w3.org/ns/shacl#BlankNodeOrIRI'))
|
|
15
15
|
Class(_id='http://example.org/test-derived-class', clsname='http_//example.org/test-derived-class', parent_ids=['http://example.org/test-class'], derived_ids=[], properties=[], comment='A class derived from test-class', id_property=None, node_kind=rdflib.term.URIRef('http://www.w3.org/ns/shacl#BlankNodeOrIRI'))
|
|
16
16
|
Class(_id='http://example.org/aaa-derived-class', clsname='http_//example.org/aaa-derived-class', parent_ids=['http://example.org/parent-class'], derived_ids=[], properties=[], comment='Derived class that sorts before the parent to test ordering', id_property=None, node_kind=rdflib.term.URIRef('http://www.w3.org/ns/shacl#BlankNodeOrIRI'))
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
VERSION = "0.0.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
|