Note: This validation must be done after E3
Note: This property is currently DEPRECATED. Use the gr:priceType property instead.
Only one ListPrice (true) can be specified per each Offering.
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 list price in unit price specifications for the same offering is defined as true only once.
@prefix gr: <http://purl.org/goodrelations/v1#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
<http://www.ebusiness-unibw.org/lgarcia/grValidatorSparql/checkN4_OnlyOneIsListPrice.rdf> rdf:type owl:Ontology ;
owl:imports <http://purl.org/goodrelations/v1> .
<http://www.ebusiness-unibw.org/lgarcia/grValidatorSparql/checkN4_OnlyOneIsListPrice.rdf#Offering_CheckN4_1> rdf:type gr:Offering .
<http://www.ebusiness-unibw.org/lgarcia/grValidatorSparql/checkN4_OnlyOneIsListPrice.rdf#UnitPriceSpecification_CheckN4_1>
rdf:type gr:UnitPriceSpecification ;
gr:hasUnitOfMeasurement "CMT"^^<http://www.w3.org/2001/XMLSchema#string> ;
gr:hasMinCurrencyValue "300.0"^^<http://www.w3.org/2001/XMLSchema#float> ;
gr:hasCurrencyValue "150.0"^^<http://www.w3.org/2001/XMLSchema#float> ;
gr:isListPrice "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<http://www.ebusiness-unibw.org/lgarcia/grValidatorSparql/checkN4_OnlyOneIsListPrice.rdf#Offering_CheckN4_1> gr:hasPriceSpecification
<http://www.ebusiness-unibw.org/lgarcia/grValidatorSparql/checkN4_OnlyOneIsListPrice.rdf#UnitPriceSpecification_CheckN4_1> .
<http://www.ebusiness-unibw.org/lgarcia/grValidatorSparql/checkN4_OnlyOneIsListPrice.rdf#UnitPriceSpecification_CheckN4_2>
rdf:type gr:UnitPriceSpecification ;
gr:hasUnitOfMeasurement "CMT"^^<http://www.w3.org/2001/XMLSchema#string> ;
gr:hasMinCurrencyValue "300.0"^^<http://www.w3.org/2001/XMLSchema#float> ;
gr:hasCurrencyValue "150.0"^^<http://www.w3.org/2001/XMLSchema#float> ;
gr:isListPrice "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<http://www.ebusiness-unibw.org/lgarcia/grValidatorSparql/checkN4_OnlyOneIsListPrice.rdf#Offering_CheckN4_1> gr:hasPriceSpecification
<http://www.ebusiness-unibw.org/lgarcia/grValidatorSparql/checkN4_OnlyOneIsListPrice.rdf#UnitPriceSpecification_CheckN4_2> .
PREFIX gr:<http://purl.org/goodrelations/v1#>
SELECT distinct ?object
WHERE {
?object a gr:Offering .
#cardinality (0..1), count = 0 and count = 1 is OK, check count >= 2
FILTER (2 <= (
SELECT count(*)
WHERE {
?object gr:hasPriceSpecification ?ups .
?ups a gr:UnitPriceSpecification .
?ups gr:isListPrice ?listPriceCount .
FILTER (?listPriceCount = true)
}
))
}