|The GoodRelations User's Guide|
|Conceptual Model ←||Quantitative values||→ Qualitative Values|
Representing Quantitative Values
GoodRelations provides a flexible mechanism for representing quantitative values that has several nice features:
- It can handle point values and open and closed intervals with one mechanism.
- It supports arbitrary units of measurement (e.g. kilograms, miles, inches, seconds, decibel, ...).
- It supports value references, dependencies, and measurement meta-data (e.g. this value was measured at a speed of 80 km/h; this value was determined using the ABCD methodology).
to be added
foo:PointValue a schema:QuantitativeValue; schema:value 3.
foo:ClosedInterval a schema:QuantitativeValue; schema:minValue 3; schema:maxValue 7.
foo:RightOpenInterval a schema:QuantitativeValue; schema:minValue 3.
foo:LeftOpenInterval a schema:QuantitativeValue; schema:maxValue 7.
A reasoner should expand a point value to
foo:ClosedInterval a schema:QuantitativeValue; schema:value 3; schema:minValue 3; schema:maxValue 3.
thanks to value being a subproperty of both minValue and maxValue - these subproperty axioms are not yet in schema.org, because at the time of the GoodRelations integration, there was no notion of subproperties in schema.org. The nice thing about this is that you can handle point values and intervals with the same queries - a search for a car with 3 seats will also find a car that has 2 - 4 seats, because you will simply search for a car with at least 3 seats).
This is suitable for all quantities except for datetime and date intervals (hours, seconds, months is fine thanks to respective unit codes for schema:unitCode).
foo:AtLeastOneMinute a schema:QuantitativeValue; schema:minValue 3; schema:unitCode "MIN".
foo:UpToThreeHours a schema:QuantitativeValue; schema:maxValue 3; schema:unitCode "HUR".
For datetime and date intervals, I decided back then that dedicated pairs of properties like validFrom and validThrough were more useful.