-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add datatype QC for annotations related to date (#2066)
* add datetime datatype QC * replace string to datetime in date related properties * update illegal date violation from ODK 1.5 * replace string to datetime on date related annotations --------- Co-authored-by: Anita Caron <[email protected]>
- Loading branch information
1 parent
b0a0af1
commit 7990aa5
Showing
7 changed files
with
2,686 additions
and
2,641 deletions.
There are no files selected for viewing
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,12 @@ | ||
PREFIX dct: <http://purl.org/dc/terms/> | ||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | ||
PREFIX oboInOwl: <http://www.geneontology.org/formats/oboInOwl#> | ||
|
||
SELECT DISTINCT ?term ?property ?value WHERE | ||
{ | ||
VALUES ?property {dct:date dct:issued dct:created oboInOwl:creation_date} | ||
?term ?property ?value . | ||
FILTER (datatype(?value) != xsd:date || !regex(str(?value), '^\\d{4}-\\d\\d-\\d\\d$')) | ||
FILTER (datatype(?value) != xsd:dateTime || !regex(str(?value), '^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z')) | ||
} | ||
|
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,21 @@ | ||
PREFIX owl: <http://www.w3.org/2002/07/owl#> | ||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | ||
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
PREFIX dct: <http://purl.org/dc/terms/> | ||
PREFIX oboInOwl: <http://www.geneontology.org/formats/oboInOwl#> | ||
|
||
DELETE { | ||
?sub ?property ?value . | ||
} | ||
|
||
INSERT { | ||
?sub ?property ?new_value. | ||
} | ||
|
||
WHERE { | ||
VALUES ?property {dct:date dct:issued dct:created oboInOwl:creation_date} | ||
?sub ?property ?value . | ||
FILTER(Datatype(?value)!=xsd:dateTime) | ||
BIND(STRDT(?value, xsd:dateTime) as ?new_value) | ||
} |