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