"Seegrid will be due for a migration to confluence on the 1st of August. Any update on or after the 1st of August will NOT be migrated"

Outline of class modelling in UML


Related pages


UML (the Unified Modelling Language) provides a formal notation for modelling software and business systems. Many UML tools also support automatic production of software from a model expressed in UML. This allows analysis and design to be undertaken in a graphical environment, proceeding seamlessly into implementation. This approach, which places the structure of the information at the centre of the design process, is known as Model Driven Architecture (MDA).

Several types of UML diagram are provided, of which the most important to us are
  • class diagrams
  • sequence diagrams.

UML class diagrams

A class diagram portrays elements of an information model based on the object-oriented paradigm. For example, here is the UML for the XMML Specimen model:


Each class is indicated by a box, containing
  • the name of the class (required), with an (optional) <<stereotype>>
  • a list of attributes bound to the class, each with its type and cardinality;
  • and a list of operations (optional - not shown here).
Since our interest is in data transfer using XML, which is a static data encoding, the corresponding UML diagrams will not normally include operations.

Kinds of Relationships in Class Diagrams

Relationships between classes come in several forms, indicated by different styles of connectors and arrows, labelled in various ways. The most important relationships are
  • specialisation/inheritance - the "is a kind of" relationship between the classes. I.e. it applies at the model meta-level ("Specimens are a kind of SamplingFeature"). This is indicated graphically by an open-triangle arrowhead generalization.png pointing to the parent or more generalised class.
  • association - the "has a" relationship between objects (members of the classes). I.e it defines relationships that are seen at the instance level ("Specimen-A is related to Observation-B"). This may be navigable in both or only one direction - indicated by an open arrowhead directedAssociation.png . An association may be qualified into either
    • composition - strong association in which the associated objects cannot exist in the absence of the container - indicated with a filled diamond adjacent to the container
    • aggregation - weak association in which the associated objects exist independently of the container - indicated with an open diamond adjacent to the container
    • general association - no explicit existence constraint.

Note 1. There is some skepticism regarding the usefulness of the formal aggregation association. It is rarely used in the models here.

Note 2. A composition association is functionally equivalent to a class attribute. The roleName on the target end of the association is equivalent to the attribute name.

The variety of relationships, each having very specific semantics, is one of the key differences between UML and Entity-Relationship modelling. In particular, E-R models have no equivalent to the inheritance relationships.


The number of instances of an attribute, or the count of objects on both ends of the association may be indicated as a range (e.g. [0..1] for "optional", [1..*] for "at least one").


An association may have a <<stereotype>>, a Name, and each end may have a roleName - e.g. role.png. The roleName describes the role of the object at this end of this association, with respect to the object at the other end (e.g. an Observation is a relatedObservation from the point of view of the Specimen).

Relationships as "Direction of Knowledge"

When an associations is directed the related object is visible from one end of the association, but not the other (e.g. a Specimen knows which reportingSpecimen it is related to, but the reporting specimen does not know about all the specimens derived from it). This applies to anywhere you see arrows. (The knows about way of thinking makes more sense in object-oriented software development when objects have active roles but may still help in considering schema design.)

Topic attachments
I Attachment Action Size Date Who Comment
directedAssociation.pngpng directedAssociation.png manage 0.2 K 04 Jul 2005 - 14:25 SimonCox  
generalization.pngpng generalization.png manage 0.3 K 04 Jul 2005 - 10:18 SimonCox  
role.pngpng role.png manage 0.4 K 04 Jul 2005 - 09:24 SimonCox  
specimen.PNGPNG specimen.PNG manage 8.4 K 01 Jul 2005 - 17:46 SimonCox Specimen model - example of UML style
Topic revision: r5 - 15 Oct 2010, UnknownUser

Current license: All material on this collaboration platform is licensed under a Creative Commons Attribution 3.0 Australia Licence (CC BY 3.0).