All price specifications must specify a currency value, a minimun currency value or a macimun currency value.
One offering can specify more than one price specification. Care must be taken that all price specifications inlcude a currency value, it can be a fix value by means of gr:hasCurrencyValue or a range by means of gr:hasMinCurrencyValue and/or gr:hasMaxCurrencyValue, otherwise offer will have no price attached.
@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#UnitPriceSpecification_1> rdf:type gr:UnitPriceSpecification ;
gr:hasCurrency "COP"^^<http://www.w3.org/2001/XMLSchema#string> ;
gr:hasCurrencyValue "550.0"^^<http://www.w3.org/2001/XMLSchema#float> .
<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#PaymentChargeSpecification_1> rdf:type gr:PaymentChargeSpecification ;
gr:hasCurrency "COP"^^<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#PaymentChargeSpecification_1> .
<http://www.heppnetz.de/ontologies/examples/gr#DeliveryChargeSpecification_1> rdf:type gr:DeliveryChargeSpecification ;
gr:hasMinCurrencyValue "100.0"^^<http://www.w3.org/2001/XMLSchema#float> .
<http://www.heppnetz.de/ontologies/examples/gr#Offering_1> gr:hasPriceSpecification
<http://www.heppnetz.de/ontologies/examples/gr#DeliveryChargeSpecification_1> .
PREFIX gr:<http://purl.org/goodrelations/v1#>
SELECT ?object
WHERE
{
{ #UnitPriceSpecification
?object a gr:UnitPriceSpecification .
OPTIONAL { ?object gr:hasCurrencyValue ?value . }
OPTIONAL { ?object gr:hasMinCurrencyValue ?min . }
OPTIONAL { ?object gr:hasMaxCurrencyValue ?max . }
FILTER ( !bound(?value) && !bound(?min) && !bound(?max) )
} UNION { #PaymentChargeSpecification
?object a gr:PaymentChargeSpecification .
OPTIONAL { ?object gr:hasCurrencyValue ?value . }
OPTIONAL { ?object gr:hasMinCurrencyValue ?min . }
OPTIONAL { ?object gr:hasMaxCurrencyValue ?max . }
FILTER ( !bound(?value) && !bound(?min) && !bound(?max) )
} UNION { #DeliveryChargeSpecification
?object a gr:DeliveryChargeSpecification .
OPTIONAL { ?object gr:hasCurrencyValue ?value . }
OPTIONAL { ?object gr:hasMinCurrencyValue ?min . }
OPTIONAL { ?object gr:hasMaxCurrencyValue ?max . }
FILTER ( !bound(?value) && !bound(?min) && !bound(?max) )
}
}