Skip to content

Commit 62cbdc1

Browse files
holycrab13github-actions[bot]
authored andcommitted
Action to generate files for Model docu with PHP magic
1 parent ecb0b24 commit 62cbdc1

10 files changed

Lines changed: 38 additions & 26 deletions

File tree

docs/account.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Spec (OWL, SHACL, JSON-LD Context)
9898
"@id": "foaf:primaryTopic",
9999
"@type": "@id"
100100
},
101-
"name": {"@id": "foaf:name"},
101+
"displayName": {"@id": "foaf:name"},
102102
"account": {
103103
"@id": "databus:account",
104104
"@type": "@id"

docs/artifact.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ databus:Artifact a owl:Class ;
3131
sh:property [
3232
sh:path [ sh:inversePath rdf:type ] ;
3333
sh:nodekind sh:IRI ;
34-
sh:pattern "/[a-zA-Z0-9\\-_]{4,}/[a-zA-Z0-9\\-_\\.]{3,}/[a-zA-Z0-9\\-_\\.]{3,}$" ;
35-
sh:message "IRI for databus:Artifact must match /[a-zA-Z0-9\\-_]{4,}/[a-zA-Z0-9\\-_\\.]{3,}/[a-zA-Z0-9\\-_\\.]{3,}$"@en ;
34+
sh:pattern "^[\\w+.-]+:\\/\\/[\\w+.:-]+\\/[\\w+.-]{4,}(?:\\/[\\w+.-]{3,}){2,2}$" ;
35+
sh:message "IRI for databus:Artifact must be a 3-segment URI and match ^[\\w+.-]+:\\/\\/[\\w+.:-]+\\/[\\w+.-]{4,}(?:\\/[\\w+.-]{3,}){3,3}$"@en ;
3636
] .
3737
```
3838
```javascript
@@ -75,10 +75,10 @@ dct:title
7575
sh:qualifiedValueShape [ sh:datatype xsd:string ] ;
7676
sh:qualifiedMaxCount 1 ;
7777
] ;
78-
sh:property [
78+
sh:property [
7979
sh:path dct:title ;
8080
sh:severity sh:Violation ;
81-
sh:maxLength 100 ;
81+
sh:maxLength 300 ;
8282
sh:message "dct:title must have less than 100 characters and each language must occure only once."@en ;
8383
sh:uniqueLang true ;
8484
] .

docs/group.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ databus:Group a owl:Class ;
3131
sh:property [
3232
sh:path [ sh:inversePath rdf:type ] ;
3333
sh:nodekind sh:IRI ;
34-
sh:pattern "/[a-zA-Z0-9\\-_]{4,}/[a-zA-Z0-9\\-_\\.]{3,}$" ;
35-
sh:message "IRI for databus:Group must match /[a-zA-Z0-9\\-_]{4,}/[a-zA-Z0-9\\-_\\.]{3,}$"@en ;
34+
sh:pattern "^[\\w+.-]+:\\/\\/[\\w+.:-]+\\/[\\w+.-]{4,}\\/[\\w+.-]{3,}$" ;
35+
sh:message "IRI for databus:Group must be a 2-segment URI and match ^[\\w+.-]+:\\/\\/[\\w+.:-]+\\/[\\w+.-]{4,}\\/[\\w+.-]{3,}$"@en ;
3636
] .
3737
```
3838
```javascript
@@ -75,9 +75,10 @@ dct:title
7575
sh:qualifiedValueShape [ sh:datatype xsd:string ] ;
7676
sh:qualifiedMaxCount 1 ;
7777
] ;
78-
sh:property [
78+
sh:property [
7979
sh:path dct:title ;
8080
sh:severity sh:Violation ;
81+
sh:maxLength 300 ;
8182
sh:message "dct:title can be used with language tag, but each language only once."@en ;
8283
sh:uniqueLang true ;
8384
] .

docs/version.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ databus:Version a owl:Class ;
4242
sh:property [
4343
sh:path [ sh:inversePath rdf:type ] ;
4444
sh:nodekind sh:IRI ;
45-
sh:pattern "/[a-zA-Z0-9\\-_]{4,}/[a-zA-Z0-9\\-_\\.]{1,}/[a-zA-Z0-9\\-_\\.]{1,}/[a-zA-Z0-9\\-_\\.]{1,}$" ;
46-
sh:message "IRI for databus:Version must match /USER/GROUP/ARTIFACT/VERSION , |USER|>3"@en ;
45+
sh:pattern "^[\\w+.-]+:\\/\\/[\\w+.:-]+\\/[\\w+.-]{4,}(?:\\/[\\w+.-]{3,}){3,3}$" ;
46+
sh:message "IRI for databus:Version must be a 4-segment URI and match ^[\\w+.-]+:\\/\\/[\\w+.:-]+\\/[\\w+.-]{4,}(?:\\/[\\w+.-]{3,}){3,3}$"@en ;
4747
] .
4848
```
4949
```javascript
50-
"Version": "databus:Version"
50+
"Version": "databus:Version",
51+
"Dataset": "dcat:Dataset"
5152
```
5253

5354
## 1. General Metadata
@@ -296,7 +297,13 @@ prov:wasDerivedFrom a owl:ObjectProperty ;
296297
297298
```
298299
```turtle
299-
300+
<#was-derived-from>
301+
a sh:PropertyShape ;
302+
sh:targetClass databus:Version ;
303+
sh:severity sh:Violation ;
304+
sh:message "Value of prov:wasDerivedFrom from must be a valid IRI."@en ;
305+
sh:path prov:wasDerivedFrom ;
306+
sh:nodeKind sh:IRI .
300307
```
301308
```javascript
302309
"wasDerivedFrom": {
@@ -398,7 +405,7 @@ databus:group rdf:type owl:ObjectProperty ;
398405
a sh:NodeShape;
399406
sh:targetClass databus:Version ;
400407
sh:sparql [
401-
sh:message "Dataset URI must contain the group URI of the associated group." ;
408+
sh:message "Version URI must contain the group URI of the associated group." ;
402409
sh:prefixes databus: ;
403410
sh:select """
404411
SELECT $this ?group

model/generated/context.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"@type": "@id"
3434
},
3535

36-
"Version": "databus:Version" ,
37-
"Dataset": "dcat:Dataset",
36+
"Version": "databus:Version",
37+
"Dataset": "dcat:Dataset" ,
3838

3939
"publisher": {
4040
"@id": "dct:publisher",
@@ -122,7 +122,7 @@
122122
"@id": "foaf:primaryTopic",
123123
"@type": "@id"
124124
},
125-
"name": {"@id": "foaf:name"},
125+
"displayName": {"@id": "foaf:name"},
126126
"account": {
127127
"@id": "databus:account",
128128
"@type": "@id"

model/generated/shacl/account.shacl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@prefix dbo: <http://dbpedia.org/ontology/> .
1212
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
1313
@prefix db: <https://databus.dbpedia.org/sys/ont/> .
14+
@prefix prov: <http://www.w3.org/ns/prov-o#> .
1415

1516
<#person-exists>
1617
a sh:NodeShape ;

model/generated/shacl/artifact.shacl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@prefix dbo: <http://dbpedia.org/ontology/> .
1212
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
1313
@prefix db: <https://databus.dbpedia.org/sys/ont/> .
14+
@prefix prov: <http://www.w3.org/ns/prov-o#> .
1415

1516
<#artifact-exists>
1617
a sh:NodeShape ;
@@ -24,8 +25,8 @@
2425
sh:property [
2526
sh:path [ sh:inversePath rdf:type ] ;
2627
sh:nodekind sh:IRI ;
27-
sh:pattern "/[a-zA-Z0-9\\-_]{4,}/[a-zA-Z0-9\\-_\\.]{3,}/[a-zA-Z0-9\\-_\\.]{3,}$" ;
28-
sh:message "IRI for databus:Artifact must match /[a-zA-Z0-9\\-_]{4,}/[a-zA-Z0-9\\-_\\.]{3,}/[a-zA-Z0-9\\-_\\.]{3,}$"@en ;
28+
sh:pattern "^[\\w+.-]+:\\/\\/[\\w+.:-]+\\/[\\w+.-]{4,}(?:\\/[\\w+.-]{3,}){2,2}$" ;
29+
sh:message "IRI for databus:Artifact must be a 3-segment URI and match ^[\\w+.-]+:\\/\\/[\\w+.:-]+\\/[\\w+.-]{4,}(?:\\/[\\w+.-]{3,}){3,3}$"@en ;
2930
] .
3031

3132
<#title-artifact>
@@ -38,10 +39,10 @@
3839
sh:qualifiedValueShape [ sh:datatype xsd:string ] ;
3940
sh:qualifiedMaxCount 1 ;
4041
] ;
41-
sh:property [
42+
sh:property [
4243
sh:path dct:title ;
4344
sh:severity sh:Violation ;
44-
sh:maxLength 100 ;
45+
sh:maxLength 300 ;
4546
sh:message "dct:title must have less than 100 characters and each language must occure only once."@en ;
4647
sh:uniqueLang true ;
4748
] .

model/generated/shacl/collection.shacl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@prefix dbo: <http://dbpedia.org/ontology/> .
1212
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
1313
@prefix db: <https://databus.dbpedia.org/sys/ont/> .
14+
@prefix prov: <http://www.w3.org/ns/prov-o#> .
1415

1516
<#collection-exists>
1617
a sh:NodeShape ;

model/generated/shacl/group.shacl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
@prefix dbo: <http://dbpedia.org/ontology/> .
1212
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
1313
@prefix db: <https://databus.dbpedia.org/sys/ont/> .
14+
@prefix prov: <http://www.w3.org/ns/prov-o#> .
1415

1516
<#group-exists>
1617
a sh:NodeShape ;
@@ -24,8 +25,8 @@
2425
sh:property [
2526
sh:path [ sh:inversePath rdf:type ] ;
2627
sh:nodekind sh:IRI ;
27-
sh:pattern "/[a-zA-Z0-9\\-_]{4,}/[a-zA-Z0-9\\-_\\.]{3,}$" ;
28-
sh:message "IRI for databus:Group must match /[a-zA-Z0-9\\-_]{4,}/[a-zA-Z0-9\\-_\\.]{3,}$"@en ;
28+
sh:pattern "^[\\w+.-]+:\\/\\/[\\w+.:-]+\\/[\\w+.-]{4,}\\/[\\w+.-]{3,}$" ;
29+
sh:message "IRI for databus:Group must be a 2-segment URI and match ^[\\w+.-]+:\\/\\/[\\w+.:-]+\\/[\\w+.-]{4,}\\/[\\w+.-]{3,}$"@en ;
2930
] .
3031

3132
<#title-group>
@@ -38,9 +39,10 @@
3839
sh:qualifiedValueShape [ sh:datatype xsd:string ] ;
3940
sh:qualifiedMaxCount 1 ;
4041
] ;
41-
sh:property [
42+
sh:property [
4243
sh:path dct:title ;
4344
sh:severity sh:Violation ;
45+
sh:maxLength 300 ;
4446
sh:message "dct:title can be used with language tag, but each language only once."@en ;
4547
sh:uniqueLang true ;
4648
] .

model/generated/shacl/version.shacl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
@prefix db: <https://databus.dbpedia.org/sys/ont/> .
1414
@prefix prov: <http://www.w3.org/ns/prov-o#> .
1515

16-
1716
<#version-exists>
1817
a sh:NodeShape ;
1918
sh:targetNode databus:Version ;
@@ -27,7 +26,7 @@
2726
sh:path [ sh:inversePath rdf:type ] ;
2827
sh:nodekind sh:IRI ;
2928
sh:pattern "^[\\w+.-]+:\\/\\/[\\w+.:-]+\\/[\\w+.-]{4,}(?:\\/[\\w+.-]{3,}){3,3}$" ;
30-
sh:message "IRI for databus:Artifact must be a 4-segment URI and match ^[\\w+.-]+:\\/\\/[\\w+.:-]+\\/[\\w+.-]{4,}(?:\\/[\\w+.-]{3,}){3,3}$)"@en ;
29+
sh:message "IRI for databus:Version must be a 4-segment URI and match ^[\\w+.-]+:\\/\\/[\\w+.:-]+\\/[\\w+.-]{4,}(?:\\/[\\w+.-]{3,}){3,3}$"@en ;
3130
] .
3231

3332
<#title-version>
@@ -130,7 +129,7 @@
130129
a sh:NodeShape;
131130
sh:targetClass databus:Version ;
132131
sh:sparql [
133-
sh:message "Dataset URI must contain the group URI of the associated group." ;
132+
sh:message "Version URI must contain the group URI of the associated group." ;
134133
sh:prefixes databus: ;
135134
sh:select """
136135
SELECT $this ?group

0 commit comments

Comments
 (0)