Documentation/Structured values and value references

= Structured Values and Value References =

When modeling product features, we sometimes encounter composite values, like *"1024 x 768 pixels resolution",
 * "8 litre of gasoline per 100 km/h", or
 * "a pressure of 101.325 kPa at 20 °C".

There are several ways of handling those cases.

Case 1: Independent Properties
In many cases, the parameters are independent from each other and can simply represented by multiple properties, which will be sub-properties of gr:quantitativeProductOrServiceProperty.

For example, the vertical and horizontal resolution of a smartphone can be modeled using two properties foo:resolutionVertical and foo:resolutionHorizontal:

foo:resolutionVertical a owl:ObjectProperty ; rdfs:subPropertyOf gr:quantitativeProductOrServiceProperty ; rdfs:label "vertical resolution"@en ; rdfs:comment "The vertical resolution of the device"@en ; rdfs:domain gr:ProductOrService ; rdfs:range gr:QuantitativeValue.

foo:resolutionHorizontal a owl:ObjectProperty ; rdfs:subPropertyOf gr:quantitativeProductOrServiceProperty ; rdfs:label "horizontal resolution"@en ; rdfs:comment "The horizontal resolution of the device"@en ; rdfs:domain gr:ProductOrService ; rdfs:range gr:QuantitativeValue.

foo:Smartphone a owl:Class ; rdfs:subClassOf gr:ProductOrService ; rdfs:label "Smartphone"@en ; rdfs:comment "A Smartphone"@en. Then, we can define those two properties for a given product: foo:mySmartphone a foo:Smartphone, gr:Individual ; gr:name "ACME Smartphone"@en ; gr:description "The ACME Smartphone has a screen resolution of 1024x768 pixel"@en ; foo:resolutionHorizontal [ a gr:QuantitativeValue ; gr:hasValue 1024 ; gr:hasUnitOfMeasurement "E37" ] ; # UN/CEFACT Common Code for "pixel" foo:resolutionVertical [ a gr:QuantitativeValue ; gr:hasValue 768 ; gr:hasUnitOfMeasurement "E37" ]. # UN/CEFACT Common Code for "pixel"

This approach is the simplest and can be understood by most clients. The downside is that it cannot be used to model multiple alternative resolutions (e.g. "supports 800x600 and 1024x768 pixel") and it does not represent that one model depends on the other.

Case 2: Value References and Dependencies
Also frequent are cases in which one main value is given with reference to one or more secondary values that influence the measurement or provide context. For example, the pressure of a given gas depends on the temperature when measuring it or the fuel consumption in litres is given for a distance of 100 km at an average speed of 80 km/h.

Case 3: Structured Values
The third class of cases has multiple product features that belong together, e.g. tuples. Practical examples are supported screen resolutions (800x600 and 1024x768).