GoodRelationsVariants

This page is a stub and will be completed shortly.
The gr:isVariantOf object property allows for modeling product model variants. This states that a particular ProductOrServiceModel instance is a variant of another ProductOrServiceModel. It is pretty safe to infer that the variant inherits all gr:quantitativeProductOrServiceProperties, gr:qualitativeProductOrServiceProperties, and gr:datatypeProductOrServiceProperties that are defined for the first gr:ProductOrServiceModel, except for those defined for the variant individually.

Exception:gr:hasEAN_UCC-13 and gr:hasStockKeepingUnit should not be inferred for the variant.
Example: foo:Red_Ford_T_Model gr:isVariantOf foo:Ford_T_Model

SPARQL CONSTRUCT Rule:

# Rule for product variants
CONSTRUCT {?model2 ?property ?valueModel1.}
WHERE
{
   ?model1 a gr:ProductOrServiceModel.
   ?model2 a gr:ProductOrServiceModel.
   ?model2 gr:isVariantOf ?model1.
   ?model1 ?property ?valueModel1.
 {
   {?property rdfs:subPropertyOf gr:qualitativeProductOrServiceProperty.}
   UNION
   {?property rdfs:subPropertyOf gr:quantitativeProductOrServiceProperty.}
   UNION
   {?property rdfs:subPropertyOf gr:datatypeProductOrServiceProperty.}
   FILTER (?property!=<http://purl.org/goodrelations/v1#hasEAN_UCC-13> && ?property!=<http://purl.org/goodrelations/v1#hasStockKeepingUnit>)
 }
 OPTIONAL {?model2 ?property ?valueModel2.}
 FILTER (!bound(?valueModel2) && ?model1!=?model2)
}


See also the recommended SPARQL CONSTRUCT rules for product model variants.