Skip to content

Commit 008082e

Browse files
committed
it works!!
1 parent adde452 commit 008082e

File tree

2 files changed

+15
-64
lines changed

2 files changed

+15
-64
lines changed

rocrate_validator/profiles/workflow-ro-crate-linkml/workflow-ro-crate.ttl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
66

77
ro-crate:RootDataEntity a sh:NodeShape ;
8-
sh:closed true ;
8+
sh:closed false ;
99
sh:ignoredProperties ( rdf:type ) ;
10-
sh:property [ sh:datatype xsd:string ;
10+
sh:property [ sh:class schema1:CreativeWork ;
1111
sh:description "Check if the Main Workflow is specified through a `mainEntity` property in the root data entity" ;
1212
sh:maxCount 1 ;
1313
sh:message "The Main Workflow must be specified through a `mainEntity` property in the root data entity"^^xsd:string ;
1414
sh:minCount 1 ;
15-
sh:nodeKind sh:Literal ;
15+
sh:nodeKind sh:BlankNodeOrIRI ;
1616
sh:order 0 ;
1717
sh:path schema1:mainEntity ] ;
1818
sh:targetClass ro-crate:RootDataEntity .
@@ -22,14 +22,19 @@ ro-crate:RootDataEntity a sh:NodeShape ;
2222
sh:description "The Main Workflow must be specified through a `mainEntity` property in the root data entity" ;
2323
sh:ignoredProperties ( rdf:type ) ;
2424
sh:name "Main Workflow entity existence" ;
25-
sh:property [ sh:datatype xsd:string ;
25+
sh:property [ sh:class schema1:CreativeWork ;
2626
sh:description "Check if the Main Workflow is specified through a `mainEntity` property in the root data entity" ;
2727
sh:maxCount 1 ;
2828
sh:message "The Main Workflow must be specified through a `mainEntity` property in the root data entity"^^xsd:string ;
2929
sh:minCount 1 ;
30-
sh:nodeKind sh:Literal ;
30+
sh:nodeKind sh:BlankNodeOrIRI ;
3131
sh:order 0 ;
3232
sh:path schema1:mainEntity ] ;
3333
sh:targetClass <https://github.com/crs4/rocrate-validator/profiles/workflow-ro-crate/linkml/:MainEntityPropertyMustExist> .
3434

35+
schema1:CreativeWork a sh:NodeShape ;
36+
sh:closed false ;
37+
sh:ignoredProperties ( rdf:type ) ;
38+
sh:targetClass schema1:CreativeWork .
39+
3540

rocrate_validator/profiles/workflow-ro-crate-linkml/workflow-ro-crate.yaml

Lines changed: 5 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,11 @@ imports:
1515
default_range: string
1616

1717
classes:
18-
## --
19-
## New parent class
20-
## --
21-
# Entity:
22-
# abstract: true ## should not be instantiated directly
23-
# slots:
24-
# - id
25-
# - type
26-
# close_mappings:
27-
# - schema:Thing
28-
29-
# basic classes, no validation performed
18+
# basic classes, no validation performed?
3019
WorkflowROCrateRootDataEntity:
3120
class_uri: ro-crate:RootDataEntity
3221
mixins:
3322
- MainEntityPropertyMustExist
34-
- ForceFailure
3523

3624
# validation classes
3725
MainEntityPropertyMustExist:
@@ -41,59 +29,17 @@ classes:
4129
The Main Workflow must be specified through a `mainEntity` property in the root data entity
4230
slots:
4331
- main_entity #pattern: "^\.\/$"
44-
# - conforms_to
4532
slot_usage:
4633
- main_entity:
4734
description: Check if the Main Workflow is specified through a `mainEntity` property in the root data entity
4835
annotations:
4936
sh:message: The Main Workflow must be specified through a `mainEntity` property in the root data entity
50-
# range: schema:SoftwareSourceCode # update this
51-
# - conforms_to:
52-
53-
ForceFailure:
54-
mixin: true
55-
title: forces failure
56-
slots:
57-
- fail
58-
59-
# MainWorkflow:
60-
# slots:
61-
# - type_workflow
62-
# - programming_language
63-
64-
# Person:
65-
# is_a: NamedThing
66-
# description: >-
67-
# A person....
68-
# class_uri: schema:Person
69-
# slots:
70-
# - primary_email
71-
# slot_usage:
72-
# primary_email:
73-
# pattern: "^\\S+@[\\S+\\.]+\\S+"
74-
# recommended: true
75-
# annotations:
76-
# sh:severity: sh:Warning
77-
# sh:name: "Primary Email Validation"
78-
# sh:description: "This requirement checks the validity of the primary email address."
79-
# sh:message: "The primary email address is not valid."
8037

38+
Workflow:
39+
class_uri: schema:CreativeWork
40+
8141
slots:
82-
id:
83-
identifier: true
84-
required: true
85-
range: uriorcurie
86-
type:
87-
designates_type: true
88-
required: true
89-
range: uriorcurie
90-
name:
91-
required: true
92-
slot_uri: schema:name
93-
range: string
9442
main_entity:
9543
required: true
9644
slot_uri: schema:mainEntity
97-
fail:
98-
required: true
99-
slot_uri: schema:lyrics
45+
range: Workflow

0 commit comments

Comments
 (0)