ADOxx Documentation
Theory - Hands-On - Scenarios - Community - Development Tools
Theory
Relations in ADOxx
Relationships between objects are defined as relation types between classes. Relations are defined by their source and target class, their cardinality, and their attributes.
Relation Class in ADOxx
Source and Target Class
Any class (the pre-defined abstract class, abstract class or class) can act as the source class defining where the relation starts from, as well as target class defining where the relation ends.
Cardinality
Cardinality is like 1:1, 1:n and the n:m relationship is defined in the cardinality of the relation.
Attributes
Attributes are descriptive properties of relations and handled like attributes for classes.
Relation Types
Relations in ADOxx are expressed either as a class "Relation Class" or as a pointer in the form of an attribute called "InterRef."
Relation as Class "RC"
- describes the relationship between two objects from two or more classes within one model.
- has start and endpoints that define which (abstract) classes a relation can connect.
- Cardinality and attribute define the semantic of the relations class.
Relation as Attribute "InterRef"
- Is a special configuration of a Relation Class and describes the relationship between two objects from two or more classes within or across models.
- Is a pointer represented as an attributed in the class the relation starts from, with defined classes the relation can point to.
- Cardinality defines the semantics of the InterRef
Relation Class in ADOxx
Relation Types: Inheritance of Relation Class
Inheritance of Relation Class
Relation Types: Inheritance of InterRef
Relation Type InterRef in ADOxx
Realisation of Relation Classes in ALL
- Specify the meta model starting from the „Empty Meta Model" and add relation classes and interrefs to classes etc. with ALL using a text editor.
- Translate ALL into the ADOxx interpretable ABL format and import the meta model into ADOxx.
relationclass : | relationclass-definition { instanceattribute } | redefrelationclass-definition { redefinstanceattribute } |
relationclass-definition : | RELATIONCLASS identifier FROM identifier TO identifier |
instanceattribute-definition : | ATTRIBUTE identifier TYPE typeidentifier | ATTRIBUTE identifier TYPE typeidentifier VALUE val | ATTRIBUTE identifier VALUE val | ATTRIBUTE identifier TYPE RECORD |
instanceattribute-setting : | ATTRIBUTE identifier VALUE attrval |
typeidentifier : | INTEGER | DOUBLE | STRING | DISTRIBUTION | TIME | ENUMERATION | ENUMERATIONLIST | LONGSTRING | PROGRAMMCALL | INTERREF | EXPRESSION | ATTRPROFREF |