GRValidator Implemented E5
From Wiki of the E-Business and Web Science Research Group
Contents |
Error 5
E5: Check that the UnitOfMeasurement for Price specifications is C62 for all bundles (i.e. offerings including more than one type of product)
Validator Tool: Step # 5
Error Message
The UnitOfMeasurement must be C62 when more than one type of product is offer (more than one includesObject is specified).
Potential Problem
Offerings can include more than one Unit Price Specification. A unit price specification helps to describe price type, valid dates (from - throught), and unit of measurements. Care must be taken that hasUnitOfMeasurement value must be C62 when more than unit price specification is present.
Examples of Wrong Data
@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#Offering_1> rdf:type gr:Offering . <http://www.heppnetz.de/ontologies/examples/gr#PoS_1> rdf:type gr:ActualProductOrServiceInstance . <http://www.heppnetz.de/ontologies/examples/gr#Offering_1> gr:includesObject <http://www.heppnetz.de/ontologies/examples/gr#PoS_1> . <http://www.heppnetz.de/ontologies/examples/gr#PoS_2> rdf:type gr:ProductOrServicesSomeInstancesPlaceHolder . <http://www.heppnetz.de/ontologies/examples/gr#Offering_1> gr:includesObject <http://www.heppnetz.de/ontologies/examples/gr#PoS_2> . <http://www.heppnetz.de/ontologies/examples/gr#UnitPriceSpecification_1> rdf:type gr:UnitPriceSpecification ; gr:hasUnitOfMeasurement "C62"^^<http://www.w3.org/2001/XMLSchema#string> . <http://www.heppnetz.de/ontologies/examples/gr#Offering_1> gr:hasPriceSpecification <http://www.heppnetz.de/ontologies/examples/gr#UnitPriceSpecification_1> . <http://www.heppnetz.de/ontologies/examples/gr#UnitPriceSpecification_2> rdf:type gr:UnitPriceSpecification ; gr:hasUnitOfMeasurement "DAY"^^<http://www.w3.org/2001/XMLSchema#string> . <http://www.heppnetz.de/ontologies/examples/gr#Offering_1> gr:hasPriceSpecification <http://www.heppnetz.de/ontologies/examples/gr#UnitPriceSpecification_2> .
SPARQL Query
PREFIX gr:<http://purl.org/goodrelations/v1#>
SELECT distinct ?object
WHERE {
?object a gr:Offering .
?object gr:includesObject ?includesObj1 .
?object gr:includesObject ?includesObj2 .
?object gr:hasPriceSpecification ?priceSpec .
?priceSpec gr:hasUnitOfMeasurement ?UOM .
FILTER (?includesObj1 != ?includesObj2)
FILTER (!regex(str(?UOM), "^C62$", "i"))
}
