GRValidator Implemented E6
From Wiki of the E-Business and Web Science Research Group
Contents |
Error 6
E6: Check that EAN-UCC has 13 digits and only numbers.
Validator Tool: Step # 7
Error Message
Global Trade Identifier Number (GTIN, before known as EAN·UCC-13) must have exactly 13 digits.
Potential Problem
The EAN·UCC-13 is the code of the given Product Or Service or Offering (hasEAN_UCC-13 datatype property). This code is now officially called GTIN-13 (Global Trade Identifier Number) or EAN·UCC-13. Former 12-digit UPC codes can be converted into EAN·UCC-13 code by simply adding a preceeding zero. Care must be taken that EAN·UCC-13 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:hasEAN_UCC-13 "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:hasEAN_UCC-13 "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:hasEAN_UCC-13 "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:hasEAN_UCC-13 ?ean .
FILTER (!regex(?ean, "^[0-9]{13}$"))
}