include "primitives.alh"

SimpleAttribute Natural {}
SimpleAttribute String {}
SimpleAttribute Boolean {}

Class GraphicalElement {
    x : Natural
    y : Natural
    layer : Natural
}

Class Group : GraphicalElement {
    __asid : String
    dirty : Boolean
}

Association ConnectingLine (Group, Group) {
    offsetSourceX : Natural
    offsetSourceY : Natural
    offsetTargetX : Natural
    offsetTargetY : Natural
    lineWidth : Natural
    lineColour : String
    arrow : Boolean
    __asid : String
    dirty : Boolean
    layer : Natural
}

Class LineElement : GraphicalElement {
    lineWidth : Natural
    lineColour : String
}

Class Text : LineElement {
    text : String
}

Class Line : LineElement {
    targetX : Natural
    targetY : Natural
    arrow : Boolean
}

Class Shape : LineElement {
    fillColour : String
    width : Natural
    height : Natural
}

Class Figure : GraphicalElement {
    width : Natural
    height : Natural
}

Class SVG {
    data : String
}

Class Rectangle : Shape {
}

Class Ellipse : Shape {
}

Association contains (Group, GraphicalElement) {}
Association renders (Figure, SVG) {
    source_lower_cardinality = 1
    target_lower_cardinality = 1
    target_upper_cardinality = 1
}
