-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
1,622 additions
and
0 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
rocrate_validator/profiles/provenance-run-crate/may/1_tool_action.ttl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Copyright (c) 2024 CRS4 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
@prefix ro: <./> . | ||
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> . | ||
@prefix provenance-run-crate: <https://github.com/crs4/rocrate-validator/profiles/provenance-run-crate/> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix bioschemas: <https://bioschemas.org/> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix wfrun: <https://w3id.org/ro/terms/workflow-run#> . | ||
|
||
provenance-run-crate:ProvRCToolActionOptional a sh:NodeShape ; | ||
sh:name "Provenance Run Crate tool action MAY" ; | ||
sh:description "Optional properties of a Provenance Run Crate action that represents a tool execution" ; | ||
sh:target [ | ||
a sh:SPARQLTarget ; | ||
sh:prefixes ro-crate:sparqlPrefixes ; | ||
sh:select """ | ||
SELECT ?this | ||
WHERE { | ||
{ ?this a schema:CreateAction } UNION | ||
{ ?this a schema:ActivateAction } UNION | ||
{ ?this a schema:UpdateAction } . | ||
?this schema:instrument ?tool . | ||
{ ?tool a schema:SoftwareApplication } UNION | ||
{ ?tool a schema:SoftwareSourceCode } UNION | ||
{ ?tool a bioschemas:ComputationalWorkflow } . | ||
?workflow schema:hasPart ?tool . | ||
?workflow a bioschemas:ComputationalWorkflow . | ||
} | ||
""" | ||
] ; | ||
sh:property [ | ||
a sh:PropertyShape ; | ||
sh:name "Tool action resourceUsage" ; | ||
sh:description "A tool action MAY have a resourceUsage" ; | ||
sh:path wfrun:resourceUsage ; | ||
sh:minCount 1 ; | ||
sh:message "A tool action MAY have a resourceUsage" ; | ||
] . |
51 changes: 51 additions & 0 deletions
51
rocrate_validator/profiles/provenance-run-crate/must/1_tool_action.ttl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Copyright (c) 2024 CRS4 | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
@prefix ro: <./> . | ||
@prefix ro-crate: <https://github.com/crs4/rocrate-validator/profiles/ro-crate/> . | ||
@prefix provenance-run-crate: <https://github.com/crs4/rocrate-validator/profiles/provenance-run-crate/> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix bioschemas: <https://bioschemas.org/> . | ||
@prefix sh: <http://www.w3.org/ns/shacl#> . | ||
@prefix wfrun: <https://w3id.org/ro/terms/workflow-run#> . | ||
|
||
provenance-run-crate:ProvRCToolActionRequired a sh:NodeShape ; | ||
sh:name "Provenance Run Crate tool action MUST" ; | ||
sh:description "Required properties of a Provenance Run Crate action that represents a tool execution" ; | ||
sh:target [ | ||
a sh:SPARQLTarget ; | ||
sh:prefixes ro-crate:sparqlPrefixes ; | ||
sh:select """ | ||
SELECT ?this | ||
WHERE { | ||
{ ?this a schema:CreateAction } UNION | ||
{ ?this a schema:ActivateAction } UNION | ||
{ ?this a schema:UpdateAction } . | ||
?this schema:instrument ?tool . | ||
{ ?tool a schema:SoftwareApplication } UNION | ||
{ ?tool a schema:SoftwareSourceCode } UNION | ||
{ ?tool a bioschemas:ComputationalWorkflow } . | ||
?workflow schema:hasPart ?tool . | ||
?workflow a bioschemas:ComputationalWorkflow . | ||
} | ||
""" | ||
] ; | ||
sh:property [ | ||
a sh:PropertyShape ; | ||
sh:name "Tool action resourceUsage" ; | ||
sh:description "If present, resourceUsage MUST point to PropertyValue" ; | ||
sh:path wfrun:resourceUsage ; | ||
sh:class schema:PropertyValue ; | ||
sh:message "If present, resourceUsage MUST point to PropertyValue" ; | ||
] . |
Oops, something went wrong.