GRValidator Implemented E12
From Wiki of the E-Business and Web Science Research Group
Contents |
Error 12
E12: Check that validThrough is later than validFrom.
Validator Tool: Step # 19
Error Message
validFrom must be strictly smaller than validThrough.
Potential Problem
One offering can specify valid dates by means of gr:validFrom and gr:validThrough. Care must be taken that for all open-close ranges in opening hour specifications gr:validFrom is less than gr:validThrough.
Examples of Wrong Data
@prefix toy: <http://www.heppnetz.de/ontologies/examples/toy#> . @prefix protege: <http://protege.stanford.edu/plugins/owl/protege#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix gr: <http://purl.org/goodrelations/v1#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix xml: <http://www.w3.org/XML/1998/namespace> . @prefix dc: <http://purl.org/dc/elements/1.1/> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . <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#ElectronicsCom> rdf:type gr:BusinessEntity ; gr:legalName "Electronics.com Ltd."^^<&xsd;string> ; rdfs:seeAlso "" ; gr:offers <http://www.heppnetz.de/ontologies/examples/gr#Offering_1> . <http://www.heppnetz.de/ontologies/examples/gr#mySony100TVSet> rdf:type gr:ActualProductOrServiceInstance , <http://www.heppnetz.de/ontologies/examples/&toy;TVSet> ; toy:hasScreenSize <http://www.heppnetz.de/ontologies/examples/gr#QuantitativeValueFloat_1> . <http://www.heppnetz.de/ontologies/examples/gr#Offering_1> rdf:type gr:Offering ; gr:hasPriceSpecification <http://www.heppnetz.de/ontologies/examples/gr#UnitPriceSpecification_1> ; gr:hasBusinessFunction <http://www.heppnetz.de/ontologies/examples/&gr;Sell> ; gr:includesObject <http://www.heppnetz.de/ontologies/examples/gr#TypeAndQuantityNode_1> ; gr:validFrom "2009-04-24T00:00:00+01:00"^^<&xsd;dateTime> ; gr:validThrough "2009-04-24T00:00:00+01:00"^^<&xsd;dateTime> . <http://www.heppnetz.de/ontologies/examples/gr#QuantitativeValueFloat_1> rdf:type gr:QuantitativeValueFloat ; gr:hasValueFloat "30.0"^^<&xsd;float> ; gr:hasUnitOfMeasurement "CMT"^^<&xsd;string> . <http://www.heppnetz.de/ontologies/examples/gr#TypeAndQuantityNode_1> rdf:type gr:TypeAndQuantityNode ; gr:hasUnitOfMeasurement "C62"@en ; gr:typeOfGood <http://www.heppnetz.de/ontologies/examples/gr#mySony100TVSet> . <http://www.heppnetz.de/ontologies/examples/gr#UnitPriceSpecification_1> rdf:type gr:UnitPriceSpecification ; gr:hasCurrencyValue "200.0"^^<&xsd;float> ; gr:hasUnitOfMeasurement "C62"^^<&xsd;string> ; gr:hasCurrency "EUR"^^<&xsd;string> .
SPARQL Query
PREFIX gr:<http://purl.org/goodrelations/v1#>
SELECT ?object
WHERE {
?object a gr:Offering .
?object gr:validFrom ?from .
?object gr:validThrough ?through .
FILTER (?from >= ?through)
}
