Domain Patterns

Basic Elements

Range

  • Range of values as a single object.

  • For instance: Oct 22-25.

range

Time Point

Question

How to record an instant in time?

Time Points with different Precisions
Figure 1. Time Points with different Precisions

Multiplicity

Question

How to represent multiplicities, such as "[0..*]"?


Multiplicities
Figure 2. Multiplicities

Observation and Measurements

Quantities and Measurements

  • Quantities can be used as attributes of an object:

    • A person has a height and a weight

  • However, sometimes there are too many attributes !

Diagram

Quantity

Integer Attributes
Figure 3. Integer Attributes
Measurements as Attributes using Quantity
Figure 4. Measurements as Attributes using Quantity

Conversion Ratio

  • Convert quantities from one unit to another

  • Suitable to convert quantities with conversion ration.

Diagram
  • Not adapted to convert non-linear units, e.g. Celsius to Fahrenheit, days to months, etc.

Exchange Table

  • How to convert currencies (variable currency exchange rate)?

    • Create exchange table with the history of rates

Diagram

Compound Units

Problem

How to convert compound units, e.g. km/h to m/s?

Diagram

Measurement

Diagram
PhenomenonType

things to be measured, e.g. height, weight, blood glucose level,

Measurement

concrete measured value

Patient

example of data assigned to the measurement. Another attributes could be associated, e.g. who did the measurement, when it was done, where it was done, etc.

Observation (1/2)

Question

How to record a non-quantitative values, e.g. gender (male/female), blood group (A+,A-,0, …​), etc?

Diagram

Observation (2/2)

Diagram
PhenomenonType

the same as before, e.g. blood group

Phenomenon

possible values, e.g. A+, A-, 0, …

CategoryObservation

Concrete observed qualitative value. It is similar to the measurement but has a general phenomenon instead of quantity.

Protocol

Question

how to record the method by which the observation were made?

Example

a method with a "long parameter list" can be found with PMD or Checkstyle

Diagram

Dual Time Record

Question

how to record the time period during which the observations can be applied?

Example

At a consultation on May 1, 1997, John Smith tells his doctor that he had chest pain six months ago that lasted for a week.

Diagram

Items and Descriptors

Items and Descriptors

book copy
  • Distinguish items and their descriptors:

    • Cars

    • Flights

    • Films and DVD.

Temporal Patterns

Temporal Properties

Question

How to model concepts that change with time?

  • Adresses, Contracts with different versions, Marriage

Stereotype «temporal»
Figure 5. Stereotype «temporal»
Qualified Association
Figure 6. Qualified Association

Temporal Objects

Diagram

Effectivity

Using an explicit date range to show effectivity.
Figure 7. Using an explicit date range to show effectivity.

Recurring Events for Calendars

Party and Schedule

Diagram

Schedule Event

Diagram

Temporal Expression

Diagram

Temporal Expression with Set Expressions

Diagram

Recurring Events

References

  • Fowler, Martin. Analysis patterns: reusable object models. Addison-Wesley Professional, 1997.