examples/CQL/MetamodelNext.cql in activefacts-0.8.8 vs examples/CQL/MetamodelNext.cql in activefacts-0.8.9
- old
+ new
@@ -30,10 +30,11 @@
Ring Type is written as String;
Role Sequence Id is written as Auto Counter;
Rotation Setting is written as String restricted to {'left', 'right'};
Scale is written as Unsigned Integer(32);
Shape Id is written as Auto Counter;
+Subscript is written as String;
Text is written as String(256);
Unit Id is written as Auto Counter;
X is written as Signed Integer(32);
Y is written as Signed Integer(32);
@@ -85,18 +86,13 @@
Join Node is identified by Join and Ordinal where
Join includes Join Node,
Join Node is in one Join,
Join Node has one Ordinal position;
+Join Node has at most one Subscript,
+ Subscript is of Join Node;
-Join Step is identified by input-Join Node and output-Join Node where
- Join Step has one input-Join Node,
- Join Step has one output-Join Node;
-Join Step traverses one Fact Type;
-is anti Join Step;
-Join Step is outer;
-
Object Type is a kind of Concept [partitioned];
Instance is of one Object Type;
Join Node is for one Object Type,
Object Type is referenced in Join Node;
Object Type uses at most one Pronoun;
@@ -127,17 +123,16 @@
Implicit Fact Type is implied by one Role,
Role implies at most one Implicit Fact Type;
Object Type plays Role,
Role is played by one Object Type;
Ring Constraint has at most one other-Role;
-Ring Constraint has other-Role,
+Ring Constraint has at most one other-Role,
other-Role is of Ring Constraint;
Role is of Ring Constraint,
Ring Constraint has at most one Role;
Role Sequence is identified by its Id;
-Join projects one Role Sequence;
Presence Constraint covers one Role Sequence;
Reading is in one Role Sequence,
Role Sequence is for Reading;
Role Sequence has unused dependency to force table in norma;
@@ -173,10 +168,11 @@
Literal represents Value,
Value is a string,
Value is in at most one Unit,
Unit is of Value;
Instance has at most one Value;
+Join Node has at most one Value;
Value Constraint is a kind of Constraint;
Role has at most one role-Value Constraint,
Value Constraint applies to at most one Role;
@@ -243,10 +239,22 @@
Fact Type has Fact Type Shape;
Fact Type Shape has at most one Rotation Setting;
ImplicitBooleanValueType is a kind of Value Type;
+Join Role is where
+ Join Node includes Role,
+ Role connects to Join Node;
+
+Join Step is identified by input-Join Role and output-Join Role where
+ Join Step has one input-Join Role,
+ Join Step has one output-Join Role;
+Join Step traverses one Fact Type,
+ Fact Type directs Join Step;
+is anti Join Step;
+Join Step is outer;
+
Model Note Shape is a kind of Shape;
Model Note Shape is for one Context Note;
Object Type Shape is a kind of Shape;
Object Type Shape is for one Object Type,
@@ -282,33 +290,32 @@
Ring Constraint Shape is a kind of Constraint Shape;
Ring Constraint Shape is attached to one Fact Type;
Role Display is where
Fact Type Shape displays Role in Ordinal position,
- Fact Type Shape displays in Ordinal position at most one Role;
+ Fact Type Shape displays in Ordinal position one Role;
Role Name Shape is a kind of Shape;
Role Name Shape is for one Role Display,
Role Display has at most one Role Name Shape;
Role Ref is where
- Role Sequence in Ordinal position includes at most one Role,
- Role is in Role Sequence in at most one Ordinal place,
+ Role Sequence in Ordinal position includes one Role,
+ Role is in Role Sequence in one Ordinal place,
Role Sequence includes Role in Ordinal place,
Role has Ordinal place in Role Sequence;
-Join Node includes Role Ref,
- Role Ref connects to at most one Join Node;
+Join Role projects at most one Role Ref;
Role Ref has at most one leading-Adjective;
Role Ref has at most one trailing-Adjective;
Set Comparison Constraint is a kind of Set Constraint;
Set Comparison Roles is where
- Set Comparison Constraint has in Ordinal position at most one Role Sequence,
+ Set Comparison Constraint has in Ordinal position one Role Sequence,
Role Sequence is Ordinal in Set Comparison Constraint,
in Ordinal position Set Comparison Constraint has Role Sequence,
- Set Comparison Constraint has Role Sequence in at most one Ordinal position;
+ Set Comparison Constraint has Role Sequence in one Ordinal position;
Set Equality Constraint is a kind of Set Comparison Constraint;
Set Exclusion Constraint is a kind of Set Comparison Constraint;
Set Exclusion Constraint is mandatory;
@@ -341,17 +348,17 @@
Allowed Range is where
Value Constraint allows at least one Value Range;
Param Value is where
- Value for Parameter applies to at most one Value Type;
+ Value for Parameter applies to one Value Type;
/*
* Constraints:
*/
for each Concept exactly one of these holds:
- Concept is a Object Type,
+ Concept is an Object Type,
Concept is a Fact Type,
Concept is a Constraint,
Concept is a Role;
for each Constraint exactly one of these holds:
Constraint is a Presence Constraint,
@@ -380,10 +387,13 @@
Term designates Object Type(1),
Term is secondary for Object Type(2);
for each Term at most one of these holds:
Term is secondary for Object Type,
Term is name of Role Ref;
+Join Node is for Object Type that plays Role
+ if and only if
+ Join Node includes Role;
Role Value is of Instance that is of Object Type
if and only if
Role Value is of Role that is played by Object Type;
Role Value fulfils Fact that is of Fact Type
if and only if
@@ -401,9 +411,11 @@
Type Inheritance provides identification;
each Presence Constraint occurs at least one time in
Presence Constraint has min Frequency,
Presence Constraint has max Frequency,
Presence Constraint is mandatory;
+each Role Ref occurs at most one time in
+ Join Role projects Role Ref;
each Role Sequence occurs at least one time in
Role Sequence in Ordinal position includes Role;
each Set Comparison Constraint occurs at least 2 times in
Set Comparison Constraint has in Ordinal position Role Sequence;
each Term occurs at least one time in