oldaplib 0.2.11__py3-none-any.whl → 0.3.0__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/example.trig +52 -0
- oldaplib/ontologies/oldap.trig +518 -425
- oldaplib/ontologies/oldap.ttl +38 -38
- oldaplib/ontologies/shared.trig +74 -116
- oldaplib/src/cachesingleton.py +4 -0
- oldaplib/src/datamodel.py +8 -1
- oldaplib/src/dtypes/bnode.py +1 -0
- oldaplib/src/enums/haspropertyattr.py +4 -2
- oldaplib/src/enums/projectattr.py +4 -0
- oldaplib/src/hasproperty.py +36 -5
- oldaplib/src/helpers/observable_dict.py +13 -6
- oldaplib/src/helpers/serializer.py +1 -1
- oldaplib/src/objectfactory.py +1 -1
- oldaplib/src/oldaplist.py +2 -2
- oldaplib/src/oldaplistnode.py +24 -24
- oldaplib/src/project.py +144 -12
- oldaplib/src/propertyclass.py +39 -30
- oldaplib/src/resourceclass.py +174 -161
- oldaplib/src/version.py +1 -1
- oldaplib/test/test_datamodel.py +19 -14
- oldaplib/test/test_project.py +79 -3
- oldaplib/test/test_propertyclass.py +2 -2
- oldaplib/test/test_resourceclass.py +160 -9
- oldaplib/testdata/connection_test.trig +8 -19
- oldaplib/testdata/objectfactory_test.trig +67 -67
- {oldaplib-0.2.11.dist-info → oldaplib-0.3.0.dist-info}/METADATA +1 -1
- {oldaplib-0.2.11.dist-info → oldaplib-0.3.0.dist-info}/RECORD +28 -27
- {oldaplib-0.2.11.dist-info → oldaplib-0.3.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@prefix dc: <http://purl.org/dc/elements/1.1/> .
|
|
2
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
3
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
4
|
+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
5
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
6
|
+
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
|
|
7
|
+
@prefix schema: <http://schema.org/> .
|
|
8
|
+
@prefix sh: <http://www.w3.org/ns/shacl#> .
|
|
9
|
+
@prefix oldap: <http://oldap.org/base#> .
|
|
10
|
+
@prefix dcterms: <http://purl.org/dc/terms/> .
|
|
11
|
+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
|
12
|
+
|
|
13
|
+
@prefix ex: <http://example.org/> .
|
|
14
|
+
@prefix : <http://example.org/> .
|
|
15
|
+
|
|
16
|
+
:shacl {
|
|
17
|
+
# Reusable standalone PropertyShape
|
|
18
|
+
:reusableShape a sh:PropertyShape ;
|
|
19
|
+
sh:path :reusable ;
|
|
20
|
+
sh:datatype xsd:string .
|
|
21
|
+
|
|
22
|
+
# Resource shape
|
|
23
|
+
:TestThingShape a sh:NodeShape ;
|
|
24
|
+
sh:targetClass :TestThing ;
|
|
25
|
+
|
|
26
|
+
# Reuse the standalone property shape (datatype xsd:string)
|
|
27
|
+
sh:property :reusableShape ,
|
|
28
|
+
|
|
29
|
+
# Add local cardinality for the same path
|
|
30
|
+
[
|
|
31
|
+
sh:path :reusable ;
|
|
32
|
+
sh:minCount 1 ;
|
|
33
|
+
sh:maxCount 1 ;
|
|
34
|
+
sh:order 1.0
|
|
35
|
+
] ;
|
|
36
|
+
|
|
37
|
+
# Constrain a standard property (inline)
|
|
38
|
+
sh:property [
|
|
39
|
+
sh:path dcterms:description ;
|
|
40
|
+
sh:maxCount 1 ;
|
|
41
|
+
sh:order 2.0
|
|
42
|
+
# (Optionally add: sh:datatype rdf:langString or allow literals with language)
|
|
43
|
+
] ;
|
|
44
|
+
|
|
45
|
+
# Define an internal property inline
|
|
46
|
+
sh:property [
|
|
47
|
+
sh:path :internal ;
|
|
48
|
+
sh:datatype xsd:string ;
|
|
49
|
+
sh:minCount 1 ;
|
|
50
|
+
sh:order 3.0
|
|
51
|
+
] .
|
|
52
|
+
}
|