[QUANTITY] The quandary

Gerard Lemson gerard.lemson at mpe.mpg.de
Wed May 21 06:33:33 PDT 2003


As I mentioned to Ray in Cambridge, there are actually standard design
patterns, or better analysis patterns,
dealing with Quantity, Measurement and Observation and such. The original
reference is in a book by M. Fowler,
"Analysis Patterns: Reusable Object models",
Reading Ma., Addison-Wesley 1997

I do currently not have access to this reference, but there are some
articles on the web dealing with
it which a simple Google search on "analysis pattern observation" will
return.
What I can extract from there and from memory is that in that design a
Quantity is described by a value
and a unit only, similar to David Barnes's suggestion. It also has methods
for conversions.
Units are described as possibly compound, for example m/s.

In contrast to Ray's suggestion, where for example Height and Flux are
subclasses of Quantity (if I
read the XMLSchema correctly), Fowler introduces a "Phenomenon Type",
corresponding to a property an
object may have. Height and Flux are examples of the latter, and may not
require separate classes but
could be an enumerated list. (I wonder if Phenomenon Type has some relation
to UCDs).

A Measurement is the assignment of a Quantity to a Phenomenon Type for an
Object on which the
measurement is made. For example, a person's height is 6 feet. In Fowler's
design, Measuement is actually
a subclass of Observation, and a sibling of CategoryObservation. The latter
assigns not a Quantity to
a Phenomenon Type, but a classification, for example, this person has
bloodgroup O (his examples come from
the medical profession.

I do not recall whether in his design uncertainty/error etc are taken into
account explicitly, but
the obvious place to put these is in the Measurement, not in Quantity.

I'm not advocating that we should follow the specific designs as proposed in
that book as I think they are
not yet a complete fit to our specific case, but it is certainly valuable to
study them.
In particular I think it should be adapted to deal with errors and the
concept of Observable (which may be
our generalized version of Phenomenon Type) we discussed in the DM meeting.

Some references I found on the web:
http://www.martinfowler.com/ap2/quantity.html
http://www.cbop.gr.jp/dl/semi/000208/000208_martin02.pdf
http://www.joeyoder.com/Research/metadata/Observation/observationmodel.pdf

As soon as I get hold of the original reference I'll try to capture all of
this in a UML diagram adapted
to our case and submit it to this group.

Gerard Lemson



More information about the dm mailing list