fixnig remarks

This commit is contained in:
Elias Papanikitas
2023-11-20 11:03:31 +01:00
parent 57e09e9b47
commit 30f4341e01

View File

@@ -1,42 +1,86 @@
DELETE { DELETE {
GRAPH ?g { GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?s <http://schema.org/telephone> ?o . ?s <http://schema.org/telephone> ?o .
} }
} }
INSERT { INSERT {
GRAPH ?g { GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?s <http://schema.org/telephone> ?newPhoneNumber . ?s <http://schema.org/telephone> ?newPhoneNumber .
} }
} }
WHERE { WHERE {
GRAPH ?g { GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?s <http://schema.org/telephone> ?o . ?s <http://schema.org/telephone> ?o .
} }
FILTER (SUBSTR(?o, 1, 1) != "+" AND STRLEN(STR(?o)) > 4) FILTER (SUBSTR(?o, 1, 1) != "+" AND STRLEN(STR(?o)) > 4 and !regex(?o, ".*[a-zA-Z].*", "i"))
BIND(REPLACE(STR(?o),"[. - /]","") AS ?removedSpaces) . BIND(REPLACE(STR(?o),"[. -/()]","") AS ?removedSpaces) .
BIND (CONCAT('tel:+32', SUBSTR(?removedSpaces, 2)) as ?newPhoneNumber) BIND (CONCAT('tel:+32', SUBSTR(?removedSpaces, 2)) as ?newPhoneNumber)
} }
; ;
DELETE { DELETE {
GRAPH ?g { GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?s <http://schema.org/telephone> ?o . ?s <http://schema.org/telephone> ?o .
} }
} }
INSERT { INSERT {
GRAPH ?g { GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?s <http://schema.org/telephone> ?newPhoneNumber . ?s <http://schema.org/telephone> ?newPhoneNumber .
} }
} }
WHERE { WHERE {
GRAPH ?g { GRAPH <http://mu.semte.ch/graphs/administrative-unit> {
?s <http://schema.org/telephone> ?o . ?s <http://schema.org/telephone> ?o .
} }
FILTER (SUBSTR(?o, 1, 1) = "+") FILTER (SUBSTR(?o, 1, 1) = "+" and !regex(?o, ".*[a-zA-Z].*", "i"))
BIND(REPLACE(STR(?o),"[. - /]","") AS ?removedSpaces) . BIND(REPLACE(STR(?o),"[. -/()]","") AS ?removedSpaces) .
BIND (CONCAT('tel:', ?removedSpaces, 2) as ?newPhoneNumber) BIND (CONCAT('tel:', ?removedSpaces) as ?newPhoneNumber)
} }
;
DELETE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?s <http://schema.org/telephone> ?o .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?s <http://schema.org/telephone> ?newPhoneNumber .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?s <http://schema.org/telephone> ?o .
}
FILTER (SUBSTR(?o, 1, 1) != "+" AND STRLEN(STR(?o)) > 4 and !regex(?o, ".*[a-zA-Z].*", "i"))
BIND(REPLACE(STR(?o),"[. -/()]","") AS ?removedSpaces) .
BIND (CONCAT('tel:+32', SUBSTR(?removedSpaces, 2)) as ?newPhoneNumber)
}
;
DELETE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?s <http://schema.org/telephone> ?o .
}
}
INSERT {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?s <http://schema.org/telephone> ?newPhoneNumber .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/worship-service> {
?s <http://schema.org/telephone> ?o .
}
FILTER (SUBSTR(?o, 1, 1) = "+" and !regex(?o, ".*[a-zA-Z].*", "i"))
BIND(REPLACE(STR(?o),"[. -/()]","") AS ?removedSpaces) .
BIND (CONCAT('tel:', ?removedSpaces) as ?newPhoneNumber)
}