Skip to content

Commit

Permalink
provrc: resourceusage propertyvalue propertyid and unitcode
Browse files Browse the repository at this point in the history
  • Loading branch information
simleo committed Oct 23, 2024
1 parent ec81c0f commit b51c29a
Show file tree
Hide file tree
Showing 7 changed files with 1,604 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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:ProvRCRUPropertyValueRequired a sh:NodeShape ;
sh:name "Provenance Run Crate resource usage PropertyValue MUST" ;
sh:description "Required properties of a PropertyValue used to represent resource usage" ;
sh:target [
a sh:SPARQLTarget ;
sh:prefixes ro-crate:sparqlPrefixes ;
sh:select """
SELECT ?this
WHERE {
?this a schema:PropertyValue .
?action wfrun:resourceUsage ?this .
{ ?action a schema:CreateAction } UNION
{ ?action a schema:ActivateAction } UNION
{ ?action a schema:UpdateAction } .
}
"""
] ;
sh:property [
a sh:PropertyShape ;
sh:name "RU PropertyValue propertyID" ;
sh:description "A PropertyValue used to represent resourceUsage MUST have a propertyID" ;
sh:path schema:propertyID ;
sh:minCount 1 ;
sh:message "A PropertyValue used to represent resourceUsage MUST have a propertyID" ;
] .
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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:ProvRCRUPropertyValueRecommended a sh:NodeShape ;
sh:name "Provenance Run Crate resource usage PropertyValue SHOULD" ;
sh:description "Recommended properties of a PropertyValue used to represent resource usage" ;
sh:target [
a sh:SPARQLTarget ;
sh:prefixes ro-crate:sparqlPrefixes ;
sh:select """
SELECT ?this
WHERE {
?this a schema:PropertyValue .
?action wfrun:resourceUsage ?this .
{ ?action a schema:CreateAction } UNION
{ ?action a schema:ActivateAction } UNION
{ ?action a schema:UpdateAction } .
}
"""
] ;
sh:property [
a sh:PropertyShape ;
sh:name "RU PropertyValue unitCode" ;
sh:description "A PropertyValue used to represent resourceUsage SHOULD have a unitCode" ;
sh:path schema:unitCode ;
sh:minCount 1 ;
sh:message "A PropertyValue used to represent resourceUsage SHOULD have a unitCode" ;
] .
Loading

0 comments on commit b51c29a

Please sign in to comment.