In #317, we started a discussion whether we want to allow nodes with concept classifier in annotations, or nodes with annotation classifier in containments.
NOTE 1: This is a validation issue, not a serialization/protocol issue (in first approximation).
Both bulk and delta protocol are language-agnostic (#226 / #300). Without knowing the language, we cannot tell whether a classifier is a Concept or Annotation.
It influences delta protocol insofar as we might have (or have not) special commands to move nodes between annotations and containments.
NOTE 2: This only applies to nodes directly inside the Host. Both a sub-node with Annotation classifier and a sub-node with Concept classifier can have annotations and containments on their own. Example: A Documentation annotation can have lots of children of Concept Word.
NOTE 3: We always have to adhere to the type of a containment. So a containment of type IMember can never host any sub-node of a classifier that's not a specialization of IMember, irrespective whether that sub-node is of a Concept or Annotation classifier.
Similarly, we always have to adhere to the annotates specification of an Annotation.
Example:
M2:
Concept Host
containment members: IMember[0..*]
Interface IMember
Concept ChildMember implements IMember
Annotation AnnotationMember implements IMember
annotates Host
M1:
MyHost <<Host>>
annotations:
AnnA <<ChildMember>>
AnnB <<AnnotationMember>>
containments:
members:
ContC <<ChildMember>>
ContD <<AnnotationMember>>
Option A: Allow concept nodes in annotations and annotation nodes in containments
Pro:
Con:
- Concept nodes would "fit" to more parents than annotations, as we could only assume a concept "annotates"
INode, i.e. everything.
Option B: Allow annotation nodes in containments
Pro:
- Does not violate containment or annotates types
- Can support edge cases, e.g. we attach a
Documentation node as child to all concepts that are under our control, but as annotation to concepts we use from a third-party (i.e. unchangeable) language.
Con:
- Still requires mechanisms to deal with nodes outside their "natural habitat"
Option C: Disallow concept nodes in annotations and/or annotation nodes in containments
Pro:
- Keeps the original intention of both annotations and containments: Containments are integral part of a Concept, annotations are orthogonal / auxiliary aspects.
- Simplifies delta protocol
- Might introduce issues in deserialization
- Checking is not hard
Decision: Option C
Con:
- Gives up some flexibility
In #317, we started a discussion whether we want to allow nodes with concept classifier in annotations, or nodes with annotation classifier in containments.
NOTE 1: This is a validation issue, not a serialization/protocol issue (in first approximation).
Both bulk and delta protocol are language-agnostic (#226 / #300). Without knowing the language, we cannot tell whether a classifier is a Concept or Annotation.
It influences delta protocol insofar as we might have (or have not) special commands to move nodes between annotations and containments.
NOTE 2: This only applies to nodes directly inside the Host. Both a sub-node with Annotation classifier and a sub-node with Concept classifier can have annotations and containments on their own. Example: A
Documentationannotation can have lots of children of ConceptWord.NOTE 3: We always have to adhere to the type of a containment. So a containment of type
IMembercan never host any sub-node of a classifier that's not a specialization ofIMember, irrespective whether that sub-node is of a Concept or Annotation classifier.Similarly, we always have to adhere to the
annotatesspecification of an Annotation.Example:
Option A: Allow concept nodes in annotations and annotation nodes in containments
Pro:
Con:
INode, i.e. everything.Option B: Allow annotation nodes in containments
Pro:
Documentationnode as child to all concepts that are under our control, but as annotation to concepts we use from a third-party (i.e. unchangeable) language.Con:
Option C: Disallow concept nodes in annotations and/or annotation nodes in containments
Pro:
Decision: Option C
Con: