Global Location Number (GLN) must have exactly 13 digits.
The Global Location Number (GLN, hasGlobalLocationNumber datatype property, sometimes also referred to as International Location Number or ILN) is a thirteen-digit number used to identify parties and physical locations of the respective Business Entity or Location Of Sales Or Service Provisioning. Care must be taken that GLN has exactly 13 digits.
Less than 13 digits
@prefix gr: <http://purl.org/goodrelations/v1#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix toy: <http://www.heppnetz.de/ontologies/examples/toy#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<http://www.heppnetz.de/ontologies/examples/gr> rdf:type owl:Ontology ;
owl:imports <http://www.heppnetz.de/ontologies/examples/toy> ,
<http://purl.org/goodrelations/v1> .
<http://www.heppnetz.de/ontologies/examples/gr#mySony100TVSet> rdf:type gr:ActualProductOrServiceInstance ;
gr:hasGlobalLocationNumber "1234567890" ;
rdf:type toy:TVSet .
<http://www.heppnetz.de/ontologies/examples/gr#ElectronicsCom> rdf:type gr:BusinessEntity ;
gr:legalName "Electronics.com Ltd."^^<http://www.w3.org/2001/XMLSchema#string> ;
rdfs:seeAlso <http://www.electronics.com> .
More than 13 digits
@prefix gr: <http://purl.org/goodrelations/v1#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix toy: <http://www.heppnetz.de/ontologies/examples/toy#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<http://www.heppnetz.de/ontologies/examples/gr> rdf:type owl:Ontology ;
owl:imports <http://www.heppnetz.de/ontologies/examples/toy> ,
<http://purl.org/goodrelations/v1> .
<http://www.heppnetz.de/ontologies/examples/gr#mySony100TVSet> rdf:type gr:ActualProductOrServiceInstance ;
gr:hasGlobalLocationNumber "123456789012345" ;
rdf:type toy:TVSet .
<http://www.heppnetz.de/ontologies/examples/gr#ElectronicsCom> rdf:type gr:BusinessEntity ;
gr:legalName "Electronics.com Ltd."^^<http://www.w3.org/2001/XMLSchema#string> ;
rdfs:seeAlso <http://www.electronics.com>
No digits are included
@prefix gr: <http://purl.org/goodrelations/v1#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix toy: <http://www.heppnetz.de/ontologies/examples/toy#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<http://www.heppnetz.de/ontologies/examples/gr> rdf:type owl:Ontology ;
owl:imports <http://www.heppnetz.de/ontologies/examples/toy> ,
<http://purl.org/goodrelations/v1> .
<http://www.heppnetz.de/ontologies/examples/gr#mySony100TVSet> rdf:type gr:ActualProductOrServiceInstance ;
gr:hasGlobalLocationNumber "123456789o123" ;
rdf:type toy:TVSet .
<http://www.heppnetz.de/ontologies/examples/gr#ElectronicsCom> rdf:type gr:BusinessEntity ;
gr:legalName "Electronics.com Ltd."^^<http://www.w3.org/2001/XMLSchema#string> ;
rdfs:seeAlso <http://www.electronics.com> .
PREFIX gr:<http://purl.org/goodrelations/v1#>
SELECT ?object
WHERE {
?object gr:hasGlobalLocationNumber ?gln .
FILTER (!regex(?gln, "^[0-9]{13}$"))
}