diff --git a/src/sparql/inject-version-info.ru b/src/sparql/inject-version-info.ru index a2c8b0a..90beb88 100644 --- a/src/sparql/inject-version-info.ru +++ b/src/sparql/inject-version-info.ru @@ -11,13 +11,14 @@ INSERT { WHERE { ?ontology rdf:type owl:Ontology ; owl:versionIRI ?versionIRI . - # regex matches date and the previous text in the iri. When replaced string after the date remains - BIND (REPLACE(str(?versionIRI), "^.*\\d{4}[\\-]\\d{2}[\\-]\\d{2}", "") AS ?dateTrailingStr) - # regex matches date and the trailing text in the iri. When replaced string before the date remains - BIND (REPLACE(str(?versionIRI), "\\d{4}[\\-]\\d{2}[\\-]\\d{2}.*$", "") AS ?dateHeadingStr) - # replace heading and trailing text in the versionIRI to remain only the date - BIND (REPLACE(str(?versionIRI), ?dateTrailingStr, "") AS ?versionSubStr) - BIND (REPLACE(str(?versionSubStr), ?dateHeadingStr, "") AS ?versionStr) + BIND (str(?versionIRI) AS ?versionStr) +# # regex matches date and the previous text in the iri. When replaced string after the date remains +# BIND (REPLACE(str(?versionIRI), "^.*\\d{4}[\\-]\\d{2}[\\-]\\d{2}", "") AS ?dateTrailingStr) +# # regex matches date and the trailing text in the iri. When replaced string before the date remains +# BIND (REPLACE(str(?versionIRI), "\\d{4}[\\-]\\d{2}[\\-]\\d{2}.*$", "") AS ?dateHeadingStr) +# # replace heading and trailing text in the versionIRI to remain only the date +# # BIND (REPLACE(str(?versionIRI), ?dateTrailingStr, "") AS ?versionSubStr) +# # BIND (REPLACE(str(?versionSubStr), ?dateHeadingStr, "") AS ?versionStr) ?class rdf:type owl:Class . OPTIONAL { ?individual rdf:type owl:NamedIndividual . FILTER NOT EXISTS {?individual owl:versionInfo ?o1} }