Convert string to date
There are many strings in the RDL that should be dates. These should be converted.
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX fn: <http://www.w3.org/2005/xpath-functions#>
PREFIX p2: <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#>
PREFIX rds: <http://rdl.rdlfacade.org/data#>
PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX rdl: <http://data.posccaesar.org/rdl/>
PREFIX ptrn: <http://data.posccaesar.org/ptrn/>
construct {
?a rdl:hasCreationDate ?date.
}
where {
?a rdl:hasCreationDate ?x.
BIND(strdt(str(replace(?x, "\\.", "-")), xsd:date) as ?date)
}
-
EditedPREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX fn: <http://www.w3.org/2005/xpath-functions#> PREFIX p2: <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#> PREFIX rds: <http://rdl.rdlfacade.org/data#> PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX rdl: <http://data.posccaesar.org/rdl/> PREFIX ptrn: <http://data.posccaesar.org/ptrn/> delete{ ?a rdl:hasCreationDate ?x. } insert { ?a rdl:hasCreationDate ?date. } where { ?a rdl:hasCreationDate ?x. BIND(strdt(str(replace(?x, "\\.", "-")), xsd:date) as ?date) }
-
mentioned in commit 181fae66
-
Please register or login to post a comment