GRValidator Implemented E7
From Wiki of the E-Business and Web Science Research Group
Contents |
Error 7
E7: Check that GLN has the correct number of digits and contains only numbers.
Validator Tool: Step # 8
Error Message
Global Location Number (GLN) must have exactly 13 digits.
Potential Problem
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.
Examples of Wrong Data
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> .
SPARQL Query
PREFIX gr:<http://purl.org/goodrelations/v1#>
SELECT ?object
WHERE {
?object gr:hasGlobalLocationNumber ?gln .
FILTER (!regex(?gln, "^[0-9]{13}$"))
}