4.2.1 Basic principles

From Geostandards

Jump to: navigation, search

4.1 Introduction

4.1.1 Goal and scope of course
4.1.2 Pre-requisites: knowledge of OO-modeling, DBMS DDL/SQL and/or XML schema, specific domain/theme
4.1.3 Introduction of participants & teachers
4.1.4 Tools
4.1.5 Organization of course
4.1.6 Course reading material
4.1.7 Purpose IM: 1. enable communication, 2. built system
4.1.8 Inventory of participants' most favorite domains/themes

4.2 UML Class diagram

4.2.1 Basic principles
4.2.2 Advanced principles

4.3 Hands-on 1: basic tools

4.3.1 Explanation of initial model assignment
4.3.2 Create UML class diagram for model with 3 or 4 classes
4.3.3 Define database tables for these objects (by hand)
4.3.4 Create XML schema for these objects (by hand?)
4.3.5 Evaluation of the results
4.3.6 Use of Enterprise Architect

4.4 Frameworks

4.4.1 OGC/ISO/CEN/NEN
4.4.2 Focus on INSPIRE Generic Conceptual Model
4.4.3 GII context
4.4.4 Generic aspects: id's, references, time,etc
4.4.5 Reusable model patterns:
4.4.5.1 Topology (linear networks, partitions)
4.4.5.2 Observation data - resulting objects
4.4.5.3 Spatial object - relationship - person
4.4.6 Generic models, e.g. the 34 themes of INSPIRE

4.5 Methodology

4.5.1 User requirements, use cases
4.5.2 Inventory of available related data sets
4.5.3 Analyze the differences (data components, checklists)
4.5.4 Take initial decisions and develop model:
4.5.4.1 UML class diagram (with attributes, associations)
4.5.4.2 F&A catalogue with descriptions
4.5.4.3 Specific data types (enummerations, code lists and values)
4.5.5 Cost-benefit analysis
4.5.6 Review with stakeholders (and revise if needed)
4.5.7 Test model, develop prototype data (and revise if needed)

4.6 Example Information Model

4.6.1 xx
4.6.2 Real world example from INSPIRE cadastral parcels
4.6.3 Link to ISO 19152 LADM
4.6.4 In total 8 Categories of use cases identified
4.6.5 Closer look at 2 use cases
4.6.6 Check list with summary of all use cases
4.6.7 Conflicts of interest, feasibility
4.6.8 Vision within a model (growing options)
4.6.8.1 Optional elements (objects, attributes, associations,...)
4.6.8.2 Advanced geometries (3D, non-linear,...)
4.6.8.3 Multi-scale/representations vs. vario-scale

4.7 Hands-on 2: own model

4.7.1 Identify and create two use case descriptions
4.7.2 Go over the data components and describe needs
4.7.3 Explore information content
4.7.4 Analyze differences between needs and availables
4.7.5 Develop UML class diagram for your UML model

4.8 Implement the model

4.8.1 OMG MDA principles PIM, PSM
4.8.2 Generate implementations
4.8.3 Generic PIM - Specific PIM
4.8.3.1 - PSM1 (PostgreSQL/PostGIS) - SQL/DDL
4.8.3.2 - PSM2 (XML/GML schema) - XSD
4.8.3.3 - PSM3...
4.8.4 Run SQL/DDL within DBMS to set up model, load/create data
4.8.5 Generate XML/GML according to XSD

4.9 Adding more semantics

4.9.1 Add business rule, i.e. constraints on the data within the model
4.9.2 Classification main categories of constraint types
4.9.3 Describe in natural text using the literal entities from UML class diagrams (classes, attributes, associations)
4.9.4 Formalize the constraints into OCL (object constraint language)
4.9.5 Implementation/use of constraints ? non trivial
4.9.6.1 DBMS: either constraints views selection violations or triggers and procedures (heavy transform)
4.9.6.2 XML/XSD: literal encoding of OCL string

4.10 Hands-on 3: convert model

4.10.1 Convert model from hands-on 1 to SQL/DDL
4.10.2 Load the script into the DBMS
4.10.3 Insert data and perform some queries
4.10.4 Convert model to XML schema and inspect resulting XSD
4.10.5 Create XML data document from DBMS export to XML
4.10.6 Validate XML data against XML schema (optional)
4.10.7 Same steps as above but now for own model of hands-on 2 (with spatial data), manual corrections...

4.11 Conclusion

4.11.1 Summarize main points
4.11.2 Presentation of participants' hands-on result
4.11.3 Additional tips&tricks
4.11.4 National modeling activities (NEN3610+IMxx)
4.11.5 Discussion on model mapping
4.11.6 Further reading/studying
4.11.7 Evaluation by participants


Contents

4.2.1 Object and Instance

The object is at the heart of object oriented modeling. The principle characteristic of an object is that it is an independent 'entity'. It represents something in reality being physical 'car', 'building', 'chair' or of a non physical nature, concepts, like 'bank account', 'mortgage', 'administrative border'.

The object is a unity that by itself owns and knows its own characteristics and is the sole party that has access to that information. It is the object itself that decides how that information can be accessed.

Instance is the equivalent of object with the addition that it includes the information to which group or class of objects it belongs. The object 'Highway A1' is an instance of the class 'Highway'.

Choosing and defining objects and deciding what information they contain is the first and most important step in designing class diagrams. Always ask the question if the supposed object is a self containing unit of information.


ISO and Inspire definitions.

The ISO19100 series of geo related standards and Inspire have the following geo related definitions.

(Inspire) Spatial object: abstract representation of a real-world phenomenon related to a specific location or geographical area.

(iso) (geographical) feature: abstraction of a real world phenomena

Naming conventions

Naming conventions

Choosing the right name for classes and attributes is step one in making a readable model. In ISO19103 rules for naming of UML objects are given. An overview is given below.

The names of UML elements shall:

  • Be case-insensitive unique within their namespace
  • Not contain white space

The names of UML elements should:

  • Use precise and understandable technical names for classes, attributes, operations, and parameters
  • Combine multiple words as needed to form precise and understandable names without using any intervening characters (such as “_”, “-”, or space).
  • For attributes and operation names, association roles and parameters, capitalize only the first letter of each word after the first word that is combined in a name. Capitalize the first letter of the first word for each name of a class, package, type-specification and association names.
  • Use documentation fields to further explain the meanings (semantics) of names.
  • Keep names as short as practical. Use standard abbreviations if understandable, skip prepositions, and drop verbs when they do not significantly add to the meaning of the name.EN3610 Nederlands.

4.2.2 Class

A Class is a collection of objects with similar characteristics. A class therefore is not an abstraction of an individual object but represents a group of similar objects as a whole. A class has a definition and contains a list of characteristics that instances might have. The classification of objects within a domain into classes leads to set of classes that can be used to make a first abstraction of reality. For instance in topography ‘road’, ‘water’, ‘bridge’, ‘railroad’ can be the basic classes of a transportation network. A classification is successful when all the objects within a domain can be grouped in one of the defined classes.


ISO and INSPIRE definitions.

(inspire) Class: Description of a set of objects that share the same properties, constraints, and semantics

(iso) Feature: abstraction of a real world phenomena


UML Notation

Image:Class.GIF

4.2.3 Attribute

An attribute contains the information of a property of an object. For instance, ‘constructiondate’, ‘name’, ‘owner’ are attributes of a building. The attributes contain information that belong and are maintained by the object.

UML Notation

Image:Attribute.GIF

4.2.4 Operations

Operations describe services that can be delivered by the objects. For instance an object traffic light can turn to red. Operations are triggered by messages between objects. Operations might also lead to sending of messages.

UML Notation.

4.2.5 Associations

Associations are used to describe the principal relations between classes. An object building is owned by an object person. A object road is maintained by a company. In UML the association is drawn by a line between classes. An association can have a name that describes the type of relation. Basically the names of associations are read from left to right, or if otherwise the direction is indicated.


UML Notation:

Image:Association1.GIF

4.2.6 Roles

When assigning associations objects can have different roles. A building can have a role as a property in an ownedBy association. The building can provides a house in a livesIn association. The roles that objects play within an association are described at the beginning of the association line. In an association objects refer to each other by the name of the roles at the association end. In the figure below a building is owned by an owner. A building refers to a person by an attribute named ‘owner’. Similarly refers a person to a building he lives in by an attribute ‘residence’.


UML Notation

Image:Association2.GIF

4.2.7 Multiplicity

Of attributes and roles the number or range of numbers that they can occur can be specified. The term for this is multiplicity. Multiplicity can be described in several ways of which the following are examples:

2: exactly two occurrences

5: exactly 5 occurrences

0..4: between and including 0 to 4 occurrences

1..3: 1,2 or 3 occurrences

0..*: between 0 and indefinite occurrences


When nothing is declared the default of one is expected. The example shows that a building has exactly one name, can have 1 or several construction dates, has 1 or several owners, and has 0 or more inhabitants.

Image:Association3.GIF

4.2.8 Generalization and specialization

Just as objects are classified in classes, classes can be classified in superclasses. A superclass is a class that contains the characteristics that several classes have in common. A superclass in this respect is a generalization of its subclasses. In defining superclasses one has to look for the characteristics that are shared by several classes and that are worthwhile combining in a new class. An example is a superclass ‘building’ that has three subclasses ‘house’, ‘church’, ‘railwaystation’. The class ‘building’ is the generalization of ‘house’. ‘house’ is a specialization of ‘building’.


UML Notation: The generalization is defined as an arrow with a closed arrowhead. The arrow is directed form subclass to superclass.


Image:Generalization.GIF


Inheritance. As the superclass combines the common properties of the subclasses, a subclass inherits all the properties of the superclass. In the above figure has in instance of the class Church the properties: name. height, constructiondate, religion and capacity. An instance of House has the properties: name, height, constructiondate and information on a garden.

The generalization also has a semantic meaning. An instance of a subclass is also an instance of its superclass. In the example: a church is a building; a railwaystation is a building. If this semantic rule is not valid, the generalization is not valid.


previous Information modeling next
Personal tools