diff --git a/Resources/KerML-textual-bnf.kebnf b/Resources/KerML-textual-bnf.kebnf new file mode 100644 index 000000000..2837bcfd8 --- /dev/null +++ b/Resources/KerML-textual-bnf.kebnf @@ -0,0 +1,1467 @@ +// Manual corrections by HP de Koning + +// Part 1 - Kernel Modeling Language (KerML) + +// Clause 8.2 Concrete Syntax + +// Clause 8.2.1 Concrete Syntax Overview + +// Clause 8.2.2 Lexical Structure + +// Clause 8.2.2.1 Line Terminators and White Space + +LINE_TERMINATOR = + '\n' | '\r' | '\r\n' +// implementation defined character sequence + +LINE_TEXT = + '[^\r\n]*' +// character sequence excluding LINE_TERMINATORs + +WHITE_SPACE = + ' ' | '\t' | '\f' | LINE_TERMINATOR +// space | tab | form_feed | LINE_TERMINATOR + +// Notes: +// 1. Notation text is divided up into lines separated by line terminators. A line terminator may be a single character (such as a line feed) or a sequence of characters (such as a carriage return/line feed combination). This specification does not require any specific encoding for a line terminator, but any encoding used must be consistent throughout any specific input text. +// 2. Any characters in text line that are not a part of the line terminator are referred to as line text. +// 3. A white space character is a space, tab, form feed or line terminator. Any contiguous sequence of white space characters can be used to separate tokens that would otherwise be considered to be part of a single token. It is otherwise ignored, with the single exception that a line terminator is used to mark the end of a single-line note (see 8.2.2.2). + +// Clause 8.2.2.2 Notes and Comments + +SINGLE_LINE_NOTE = + '//' LINE_TEXT + +MULTILINE_NOTE = + '//*' COMMENT_TEXT '*/' + +REGULAR_COMMENT = + '/*' COMMENT_TEXT '*/' + +COMMENT_TEXT = + ( COMMENT_LINE_TEXT | LINE_TERMINATOR )* + +COMMENT_LINE_TEXT = + '.*(?=(\r|\n|\*/))' +// LINE_TEXT excluding the sequence '*/' + +// Clause 8.2.2.3 Names + +NAME = + BASIC_NAME | UNRESTRICTED_NAME + +BASIC_NAME = + BASIC_INITIAL_CHARACTER BASIC_NAME_CHARACTER* + +SINGLE_QUOTE = + '#x27' + +UNRESTRICTED_NAME = + SINGLE_QUOTE ( NAME_CHARACTER | ESCAPE_SEQUENCE )* SINGLE_QUOTE + +// (See Note 1) + +BASIC_INITIAL_CHARACTER = + ALPHABETIC_CHARACTER | '_' + +BASIC_NAME_CHARACTER = + BASIC_INITIAL_CHARACTER | DECIMAL_DIGIT + +ALPHABETIC_CHARACTER = + 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | + 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' +// any character 'a' through 'z' or 'A' through 'Z' + +DECIMAL_DIGIT = + '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' + +NAME_CHARACTER = + 'any printable character other than backslash or single_quote' + +ESCAPE_SEQUENCE = + '\f' | '\n' | '\t' | '\r' | '\v' +// (See Note 2) + +// Notes: +// 1. The single_quote character is '. The name represented by an UNRESTRICTED_NAME shall consist of the characters within the single quotes, with escape characters resolved as described below. The surrounding single quote characters are not part of the represented name. +// 2. An ESCAPE_SEQUENCE is a sequence of two text characters starting with a backslash that actually denotes only a single character, except for the newline escape sequence, which represents however many characters is necessary to represent an end of line in a specific implementation (see also 8.2.2.1). Table 4 shows the meaning of the allowed escape sequences. The ESCAPE_SEQUENCES in an UNRESTRICTED_NAME shall be replaced by the characters specified as their meanings in the actual represented name. + +// Clause 8.2.2.4 Numeric Values + +DECIMAL_VALUE = + DECIMAL_DIGIT+ + +EXPONENTIAL_VALUE = + DECIMAL_VALUE ('e' | 'E') ('+' | '-')? DECIMAL_VALUE + +// Notes: +// 1. A DECIMAL_VALUE may specify a natural literal, or it may be part of the specification of a real literal (see 8.2.5.8.4). Note that a DECIMAL_VALUE does not include a sign, because negating a literal is an operator in the KerML Expression syntax. +// 2. An EXPONENTIAL_VALUE may be used in the specification of a real literal (see 8.2.5.8.4). Note that a decimal point and fractional part are not included in the lexical structure of an exponential value. They are handled as part of the syntax of real literals. + +// Clause 8.2.2.5 String Value + +STRING_VALUE = + '"' ( STRING_CHARACTER | ESCAPE_SEQUENCE )* '"' + +STRING_CHARACTER = + 'any printable character other than backslash or "' + +// Notes: +// 1. ESCAPE_SEQUENCE is specified in 8.2.2.3. + +// Clause 8.2.2.6 Reserved Words + +RESERVED_KEYWORD = + 'about' | 'abstract' | 'alias' | 'all' | 'and' | 'as' | 'assoc' | 'behavior' | 'binding' | 'bool' | 'by' | 'chains' + | 'class' | 'classifier' | 'comment' | 'composite' | 'conjugate' | 'conjugates' | 'conjugation' | 'connector' + | 'const' | 'crosses' | 'datatype' | 'default' | 'dependency' | 'derived' | 'differences' | 'disjoining' | 'disjoint' + | 'doc' | 'else' | 'end' | 'expr' | 'false' | 'feature' | 'featured' | 'featuring' | 'filter' | 'first' | 'flow' + | 'for' | 'from' | 'function' | 'hastype' | 'if' | 'implies' | 'import' | 'in' | 'inout' | 'interaction' + | 'intersects' | 'inv' | 'inverse' | 'inverting' | 'istype' | 'language' | 'library' | 'locale' | 'member' | 'meta' + | 'metaclass' | 'metadata' | 'multiplicity' | 'namespace' | 'nonunique' | 'not' | 'null' | 'of' | 'or' | 'ordered' + | 'out' | 'package' | 'portion' | 'predicate' | 'private' | 'protected' | 'public' | 'redefines' | 'redefinition' + | 'references' | 'rep' | 'return' | 'specialization' | 'specializes' | 'standard' | 'step' | 'struct' + | 'subclassifier' | 'subset' | 'subsets' | 'subtype' | 'succession' | 'then' | 'to' | 'true' | 'type' | 'typed' + | 'typing' | 'unions' | 'var' | 'xor' + +// Clause 8.2.2.7 Symbols + +RESERVED_SYMBOL = + '~' | '}' | '|' | '{' | '^' | ']' | '[' | '@' | '??' | '?' | '>=' | '>' | '=>' | '===' | '==' | '=' | '<=' | '<' + | ';' | ':>>' | ':>' | ':=' | '::>' | '::' | ':' | '/' | '.?' | '..' | '.' | '->' | '-' | ',' | '+' | '**' | '*' | ')' + | '(' | '&' | '%' | '$' | '#' | '!==' | '!=' + +TYPED_BY = ':' | 'typed' 'by' + +SPECIALIZES = ':>' | 'specializes' + +SUBSETS = ':>' | 'subsets' + +REFERENCES = '::>' | 'references' + +CROSSES = '=>' | 'crosses' + +REDEFINES = ':>>' | 'redefines' + +CONJUGATES = '~' | 'conjugates' + +// Clause 8.2.3 Root Concrete Syntax + +// Clause 8.2.3.1 Elements and Relationships Concrete Syntax + +Identification : Element = + ( '<' declaredShortName = NAME '>' )? + ( declaredName = NAME )? + +RelationshipBody : Relationship = + ';' | '{' RelationshipOwnedElement* '}' + +RelationshipOwnedElement : Relationship = + ownedRelatedElement += OwnedRelatedElement + | ownedRelationship += OwnedAnnotation + +OwnedRelatedElement : Element = + NonFeatureElement | FeatureElement + +// Clause 8.2.3.2 Dependencies Concrete Syntax + +Dependency = + ( ownedRelationship += PrefixMetadataAnnotation )* + 'dependency' ( Identification? 'from' )? + client += [QualifiedName] ( ',' client += [QualifiedName] )* 'to' + supplier += [QualifiedName] ( ',' supplier += [QualifiedName] )* + RelationshipBody + +// Notes: +// 1. PrefixMetadataAnnotation is defined in the Kernel layer (see 8.2.5.12). + +// Clause 8.2.3.3 Annotations Concrete Syntax + +// Clause 8.2.3.3.1 Annotations + +Annotation = + annotatedElement = [QualifiedName] + +OwnedAnnotation : Annotation = + ownedRelatedElement += AnnotatingElement + +AnnotatingElement = + Comment + | Documentation + | TextualRepresentation + | MetadataFeature + +// Notes: +// 1. MetadataFeature is defined in the Kernel layer (see 8.2.5.12). + +// Clause 8.2.3.3.2 Comments and Documentation + +Comment = + ( 'comment' Identification + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + )? + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT + +Documentation = + 'doc' Identification + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT + +// Notes: +// 1. The text of a lexical REGULAR_COMMENT or PREFIX_COMMENT shall be processed as follows before it is included as the body of a Comment or Documentation: +// • Remove the initial /* and final */ characters. +// • Remove any white space immediately after the initial /*, up to and including the first line terminator (if any). +// • On each subsequent line of the text: +// • Strip initial white space other than line terminators. +// • Then, if the first remaining character is "*", remove it. +// • Then, if the first remaining character is now a space, remove it. +// 2. The body text of a Comment can include markup information (such as HTML), and a conforming tool may display such text as rendered according to the markup. However, marked up "rich text" for a Comment written using the KerML textual concrete syntax shall be stored in the Comment body in plain text including all mark up text, with all line terminators and white space included as entered, other than what is removed according to the rules above. + +// Clause 8.2.3.3.3 Textual Representation + +TextualRepresentation = + ( 'rep' Identification )? + 'language' language = STRING_VALUE + body = REGULAR_COMMENT + +// Notes: +// 1. The lexical text of a REGULAR_COMMENT shall be processed as specified in 8.2.3.3.2 for Comments before being included as the body of a TextualRepresentation. +// 2. See also 8.3.2.3.6 on the standard language names recognized for a TextualRepresentation. + +// Clause 8.2.3.4 Namespaces Concrete Syntax + +// Clause 8.2.3.4.1 Namespaces + +RootNamespace : Namespace = + NamespaceBodyElement* + +// (See Note 1) + +Namespace = + ( ownedRelationship += PrefixMetadataMember )* + NamespaceDeclaration NamespaceBody + +// (See Note 2) + +NamespaceDeclaration : Namespace = + 'namespace' Identification + +NamespaceBody : Namespace = + ';' | '{' NamespaceBodyElement* '}' + +NamespaceBodyElement : Namespace = + ownedRelationship += NamespaceMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + +MemberPrefix : Membership = + ( visibility = VisibilityIndicator )? + +VisibilityIndicator : VisibilityKind = + 'public' | 'private' | 'protected' + +NamespaceMember : OwningMembership = + NonFeatureMember + | NamespaceFeatureMember + +NonFeatureMember : OwningMembership = + MemberPrefix + ownedRelatedElement += MemberElement + +NamespaceFeatureMember : OwningMembership = + MemberPrefix + ownedRelatedElement += FeatureElement + +AliasMember : Membership = + MemberPrefix + 'alias' ( '<' memberShortName = NAME '>' )? + ( memberName = NAME )? + 'for' memberElement = [QualifiedName] + RelationshipBody + +QualifiedName = + ( '$' '::' )? ( NAME '::' )* NAME + +// (See Note 3) + +// Notes: +// 1. A root Namespace is a Namespace that has no owningNamespace (see 8.3.2.4). Every Element other than a root Namespace must be contained, directly or indirectly, within some root Namespace. Therefore, every valid KerML concrete syntax text can be parsed starting from the RootNamespace production. +// 2. PrefixMetadataMember is defined in the Kernel layer (see 8.2.5.12). +// 3. A qualified name is notated as a sequence of segment names separated by "::" punctuation, optionally with the global scope qualifier "$" as an initial segment. An unqualified name can be considered the degenerate case of a qualified name with a single segment name. A qualified name is used in the KerML textual concrete syntax to identify an Element that is being referred to in the representation of another Element. A qualified name used in this way does not appear in the corresponding abstract syntax—instead, the abstract syntax representation contains an actual reference to the identified Element. Name resolution is the process of determining the Element that is identified by a qualified name. The segment names of the qualified name other than the last identify a sequence of nested Namespaces that provide the context for resolving the final segment name (see 8.2.3.5). The notation [QualifiedName] is used in concrete syntax grammar productions to indicate the result of resolving text parsed as a QualifiedName (see also 8.2.1). + +// Clause 8.2.3.4.2 Imports + +Import = + visibility = VisibilityIndicator + 'import' ( isImportAll ?= 'all' )? + ImportDeclaration RelationshipBody + +ImportDeclaration : Import = + MembershipImport | NamespaceImport + +MembershipImport = + importedMembership = [QualifiedName] + ( '::' isRecursive ?= '**' )? + +// (See Note 1) + +NamespaceImport = + importedNamespace = [QualifiedName] '::' '*' + ( '::' isRecursive ?= '**' )? + | importedNamespace = FilterPackage + { ownedRelatedElement += importedNamespace } + +FilterPackage : Package = + ownedRelationship += ImportDeclaration + ( ownedRelationship += FilterPackageMember )+ + +FilterPackageMember : ElementFilterMembership = + '[' ownedRelatedElement += OwnedExpression ']' + +// Notes: +// 1. The importedMembership of a MembershipImport is the single case in which the Element required from the resolution [QualifiedName] is the actual Membership identified by the QualifedName, not the memberElement of that Membership (see 8.2.3.5). + +// Clause 8.2.3.4.3 Namespace Elements + +MemberElement : Element = + AnnotatingElement | NonFeatureElement + +NonFeatureElement : Element = + Dependency + | Namespace + | Type + | Classifier + | DataType + | Class + | Structure + | Metaclass + | Association + | AssociationStructure + | Interaction + | Behavior + | Function + | Predicate + | Multiplicity + | Package + | LibraryPackage + | Specialization + | Conjugation + | Subclassification + | Disjoining + | FeatureInverting + | FeatureTyping + | Subsetting + | Redefinition + | TypeFeaturing + +FeatureElement : Feature = + Feature + | Step + | Expression + | BooleanExpression + | Invariant + | Connector + | BindingConnector + | Succession + | Flow + | SuccessionFlow + +// Clause 8.2.3.5 Name Resolution + +// Clause 8.2.3.5.1 Name Resolution Overview + +// Clause 8.2.3.5.2 Local and Global Namespaces + +// Clause 8.2.3.5.3 Local and Visible Resolution + +// Clause 8.2.3.5.4 Full Resolution + +// Clause 8.2.4 Core Concrete Syntax + +// Clause 8.2.4.1 Types Concrete Syntax + +// Clause 8.2.4.1.1 Types + +Type = + TypePrefix 'type' + TypeDeclaration TypeBody + +TypePrefix : Type = + ( isAbstract ?= 'abstract' )? + ( ownedRelationship += PrefixMetadataMember )* + +TypeDeclaration : Type = + ( isSufficient ?= 'all' )? Identification + ( ownedRelationship += OwnedMultiplicity )? + ( SpecializationPart | ConjugationPart )+ + TypeRelationshipPart* + +SpecializationPart : Type = + SPECIALIZES ownedRelationship += OwnedSpecialization + ( ',' ownedRelationship += OwnedSpecialization )* + +ConjugationPart : Type = + CONJUGATES ownedRelationship += OwnedConjugation + +TypeRelationshipPart : Type = + DisjoiningPart + | UnioningPart + | IntersectingPart + | DifferencingPart + +DisjoiningPart : Type = + 'disjoint' 'from' ownedRelationship += OwnedDisjoining + ( ',' ownedRelationship += OwnedDisjoining )* + +UnioningPart : Type = + 'unions' ownedRelationship += Unioning + ( ',' ownedRelationship += Unioning )* + +IntersectingPart : Type = + 'intersects' ownedRelationship += Intersecting + ( ',' ownedRelationship += Intersecting )* + +DifferencingPart : Type = + 'differences' ownedRelationship += Differencing + ( ',' ownedRelationship += Differencing )* + +TypeBody : Type = + ';' | '{' TypeBodyElement* '}' + +TypeBodyElement : Type = + ownedRelationship += NonFeatureMember + | ownedRelationship += FeatureMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + +// Clause 8.2.4.1.2 Specialization + +Specialization = + ( 'specialization' Identification )? + 'subtype' SpecificType + SPECIALIZES GeneralType + RelationshipBody + +OwnedSpecialization : Specialization = + GeneralType + +SpecificType : Specialization = + specific = [QualifiedName] + | specific += OwnedFeatureChain + { ownedRelatedElement += specific } + +GeneralType : Specialization = + general = [QualifiedName] + | general += OwnedFeatureChain + { ownedRelatedElement += general } + +// Clause 8.2.4.1.3 Conjugation + +Conjugation = + ( 'conjugation' Identification )? + 'conjugate' + ( conjugatedType = [QualifiedName] + | conjugatedType = FeatureChain + { ownedRelatedElement += conjugatedType } + ) + CONJUGATES + ( originalType = [QualifiedName] + | originalType = FeatureChain + { ownedRelatedElement += originalType } + ) + RelationshipBody + +OwnedConjugation : Conjugation = + originalType = [QualifiedName] + | originalType = FeatureChain + { ownedRelatedElement += originalType } + +// Clause 8.2.4.1.4 Disjoining + +Disjoining = + ( 'disjoining' Identification )? + 'disjoint' + ( typeDisjoined = [QualifiedName] + | typeDisjoined = FeatureChain + { ownedRelatedElement += typeDisjoined } + ) + 'from' + ( disjoiningType = [QualifiedName] + | disjoiningType = FeatureChain + { ownedRelatedElement += disjoiningType } + ) + RelationshipBody + +OwnedDisjoining : Disjoining = + disjoiningType = [QualifiedName] + | disjoiningType = FeatureChain + { ownedRelatedElement += disjoiningType } + +// Clause 8.2.4.1.5 Unioning, Intersecting and Differencing + +Unioning = + unioningType = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain + +Intersecting = + intersectingType = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain + +Differencing = + differencingType = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain + +// Clause 8.2.4.1.6 Feature Membership + +FeatureMember : OwningMembership = + TypeFeatureMember + | OwnedFeatureMember + +TypeFeatureMember : OwningMembership = + MemberPrefix 'member' ownedRelatedElement += FeatureElement + +OwnedFeatureMember : FeatureMembership = + MemberPrefix ownedRelatedElement += FeatureElement + +// Clause 8.2.4.2 Classifiers Concrete Syntax + +// Clause 8.2.4.2.1 Classifiers + +Classifier = + TypePrefix 'classifier' + ClassifierDeclaration TypeBody + +ClassifierDeclaration : Classifier = + ( isSufficient ?= 'all' )? Identification + ( ownedRelationship += OwnedMultiplicity )? + ( SuperclassingPart | ConjugationPart )? + TypeRelationshipPart* + +SuperclassingPart : Classifier = + SPECIALIZES ownedRelationship += OwnedSubclassification + ( ',' ownedRelationship += OwnedSubclassification )* + +// Clause 8.2.4.2.2 Subclassification + +Subclassification = + ( 'specialization' Identification )? + 'subclassifier' subclassifier = [QualifiedName] + SPECIALIZES superclassifier = [QualifiedName] + RelationshipBody + +OwnedSubclassification : Subclassification = + superclassifier = [QualifiedName] + +// Clause 8.2.4.3 Features Concrete Syntax + +// Clause 8.2.4.3.1 Features + +Feature = + ( FeaturePrefix + ( 'feature' | ownedRelationship += PrefixMetadataMember ) + FeatureDeclaration? + | ( EndFeaturePrefix | BasicFeaturePrefix ) + FeatureDeclaration + ) + ValuePart? TypeBody + +// (See Note 1) + +EndFeaturePrefix : Feature = + ( isConstant ?= 'const' { isVariable = true } )? + isEnd ?= 'end' + +BasicFeaturePrefix : Feature = + ( direction = FeatureDirection )? + ( isDerived ?= 'derived' )? + ( isAbstract ?= 'abstract' )? + ( isComposite ?= 'composite' | isPortion ?= 'portion' )? + ( isVariable ?= 'var' | isConstant ?= 'const' { isVariable = true } )? + +FeaturePrefix = + ( EndFeaturePrefix ( ownedRelationship += OwnedCrossFeatureMember )? + | BasicFeaturePrefix + ) + ( ownedRelationship += PrefixMetadataMember )* + +// (See Note 1) + +OwnedCrossFeatureMember : OwningMembership = + ownedRelatedElement += OwnedCrossFeature + +OwnedCrossFeature : Feature = + BasicFeaturePrefix FeatureDeclaration + +FeatureDirection : FeatureDirectionKind = + 'in' | 'out' | 'inout' + +FeatureDeclaration : Feature = + ( isSufficient ?= 'all' )? + ( FeatureIdentification + ( FeatureSpecializationPart | ConjugationPart )? + | FeatureSpecializationPart + | ConjugationPart + ) + FeatureRelationshipPart* + +FeatureIdentification : Feature = + '<' declaredShortName = NAME '>' ( declaredName = NAME )? + | declaredName = NAME + +FeatureRelationshipPart : Feature = + TypeRelationshipPart + | ChainingPart + | InvertingPart + | TypeFeaturingPart + +ChainingPart : Feature = + 'chains' + ( ownedRelationship += OwnedFeatureChaining + | FeatureChain ) + +InvertingPart : Feature = + 'inverse' 'of' ownedRelationship += OwnedFeatureInverting + +TypeFeaturingPart : Feature = + 'featured' 'by' ownedRelationship += OwnedTypeFeaturing + ( ',' ownedTypeFeaturing += OwnedTypeFeaturing )* + +FeatureSpecializationPart : Feature = + FeatureSpecialization+ MultiplicityPart? FeatureSpecialization* + | MultiplicityPart FeatureSpecialization* + +MultiplicityPart : Feature = + ownedRelationship += OwnedMultiplicity + | ( ownedRelationship += OwnedMultiplicity )? + ( isOrdered ?= 'ordered' ( {isUnique = false} 'nonunique' )? + | {isUnique = false} 'nonunique' ( isOrdered ?= 'ordered' )? ) + +FeatureSpecialization : Feature = + Typings | Subsettings | References | Crosses | Redefinitions + +Typings : Feature = + TypedBy ( ',' ownedRelationship += OwnedFeatureTyping )* + +TypedBy : Feature = + TYPED_BY ownedRelationship += OwnedFeatureTyping + +Subsettings : Feature = + Subsets ( ',' ownedRelationship += OwnedSubsetting )* + +Subsets : Feature = + SUBSETS ownedRelationship += OwnedSubsetting + +References : Feature = + REFERENCES ownedRelationship += OwnedReferenceSubsetting + +Crosses : Feature = + CROSSES ownedRelationship += OwnedCrossSubsetting + +Redefinitions : Feature = + Redefines ( ',' ownedRelationship += OwnedRedefinition )* + +Redefines : Feature = + REDEFINES ownedRelationship += OwnedRedefinition + +// Notes: +// 1. PrefixMetadataMember is defined in the Kernel layer (see 8.3.4.12). + +// Clause 8.2.4.3.2 Feature Typing + +FeatureTyping = + ( 'specialization' Identification )? + 'typing' typedFeature = [QualifiedName] + TYPED_BY GeneralType + RelationshipBody + +OwnedFeatureTyping : FeatureTyping = + GeneralType + +// Clause 8.2.4.3.3 Subsetting + +Subsetting = + ( 'specialization' Identification )? + 'subset' SpecificType + SUBSETS GeneralType + RelationshipBody + +OwnedSubsetting : Subsetting = + GeneralType + +OwnedReferenceSubsetting : ReferenceSubsetting = + GeneralType + +OwnedCrossSubsetting : CrossSubsetting = + GeneralType + +// Clause 8.2.4.3.4 Redefinition + +Redefinition = + ( 'specialization' Identification )? + 'redefinition' SpecificType + REDEFINES GeneralType + RelationshipBody + +OwnedRedefinition : Redefinition = + GeneralType + +// Clause 8.2.4.3.5 Feature Chaining + +OwnedFeatureChain : Feature = + FeatureChain + +FeatureChain : Feature = + ownedRelationship += OwnedFeatureChaining + ( '.' ownedRelationship += OwnedFeatureChaining )+ + +OwnedFeatureChaining : FeatureChaining = + chainingFeature = [QualifiedName] + +// Clause 8.2.4.3.6 Feature Inverting + +FeatureInverting = + ( 'inverting' Identification? )? + 'inverse' + ( featureInverted = [QualifiedName] + | featureInverted = OwnedFeatureChain + { ownedRelatedElement += featureInverted } + ) + 'of' + ( invertingFeature = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain + { ownedRelatedElement += invertingFeature } + ) + RelationshipBody + +OwnedFeatureInverting : FeatureInverting = + invertingFeature = [QualifiedName] + | invertingFeature = OwnedFeatureChain + { ownedRelatedElement += invertingFeature } + +// Clause 8.2.4.3.7 Type Featuring + +TypeFeaturing = + 'featuring' ( Identification 'of' )? + featureOfType = [QualifiedName] + 'by' featuringType = [QualifiedName] + RelationshipBody + +OwnedTypeFeaturing : TypeFeaturing = + featuringType = [QualifiedName] + +// Clause 8.2.5 Kernel Concrete Syntax + +// Clause 8.2.5.1 Data Types Concrete Syntax + +DataType = + TypePrefix 'datatype' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.2 Classes Concrete Syntax + +Class = + TypePrefix 'class' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.3 Structures Concrete Syntax + +Structure = + TypePrefix 'struct' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.4 Associations Concrete Syntax + +Association = + TypePrefix 'assoc' + ClassifierDeclaration TypeBody + +AssociationStructure = + TypePrefix 'assoc' 'struct' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.5 Connectors Concrete Syntax + +// Clause 8.2.5.5.1 Connectors + +Connector = + FeaturePrefix 'connector' + ( FeatureDeclaration? ValuePart? + | ConnectorDeclaration + ) + TypeBody + +ConnectorDeclaration : Connector = + BinaryConnectorDeclaration | NaryConnectorDeclaration + +BinaryConnectorDeclaration : Connector = + ( FeatureDeclaration? 'from' | isSufficient ?= 'all' 'from'? )? + ownedRelationship += ConnectorEndMember 'to' + ownedRelationship += ConnectorEndMember + +NaryConnectorDeclaration : Connector = + FeatureDeclaration? + '(' ownedRelationship += ConnectorEndMember ',' + ownedRelationship += ConnectorEndMember + ( ',' ownedRelationship += ConnectorEndMember )* + ')' + +ConnectorEndMember : EndFeatureMembership = + ownedRelatedElement += ConnectorEnd + +ConnectorEnd : Feature = + ( ownedRelationship += OwnedCrossMultiplicityMember )? + ( declaredName = NAME REFERENCES )? + ownedRelationship += OwnedReferenceSubsetting + +OwnedCrossMultiplicityMember : OwningMembership = + ownedRelatedElement += OwnedCrossMultiplicity + +OwnedCrossMultiplicity : Feature = + ownedRelationship += OwnedMultiplicity + +// Clause 8.2.5.5.2 Binding Connectors + +BindingConnector = + FeaturePrefix 'binding' + BindingConnectorDeclaration TypeBody + +BindingConnectorDeclaration : BindingConnector = + FeatureDeclaration + ( 'of' ownedRelationship += ConnectorEndMember + '=' ownedRelationship += ConnectorEndMember )? + | ( isSufficient ?= 'all' )? + ( 'of'? ownedRelationship += ConnectorEndMember + '=' ownedRelationship += ConnectorEndMember )? + +// Clause 8.2.5.5.3 Successions + +Succession = + FeaturePrefix 'succession' + SuccessionDeclaration TypeBody + +SuccessionDeclaration : Succession = + FeatureDeclaration + ( 'first' ownedRelationship += ConnectorEndMember + 'then' ownedRelationship += ConnectorEndMember )? + | ( s.isSufficient ?= 'all' )? + ( 'first'? ownedRelationship += ConnectorEndMember + 'then' ownedRelationship += ConnectorEndMember )? + +// Clause 8.2.5.6 Behaviors Concrete Syntax + +// Clause 8.2.5.6.1 Behaviors + +Behavior = + TypePrefix 'behavior' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.6.2 Steps + +Step = + FeaturePrefix + 'step' FeatureDeclaration ValuePart? + TypeBody + +// Clause 8.2.5.7 Functions Concrete Syntax + +// Clause 8.2.5.7.1 Functions + +Function = + TypePrefix 'function' + ClassifierDeclaration FunctionBody + +FunctionBody : Type = + ';' | '{' FunctionBodyPart '}' + +FunctionBodyPart : Type = + ( TypeBodyElement + | ownedRelationship += ReturnFeatureMember + )* + ( ownedRelationship += ResultExpressionMember )? + +ReturnFeatureMember : ReturnParameterMembership = + MemberPrefix 'return' + ownedRelatedElement += FeatureElement + +ResultExpressionMember : ResultExpressionMembership = + MemberPrefix + ownedRelatedElement += OwnedExpression + +// Clause 8.2.5.7.2 Expressions + +Expression = + FeaturePrefix + 'expr' FeatureDeclaration ValuePart? + FunctionBody + +// Clause 8.2.5.7.3 Predicates + +Predicate = + TypePrefix 'predicate' + ClassifierDeclaration FunctionBody + +// Clause 8.2.5.7.4 Boolean Expressions and Invariants + +BooleanExpression = + FeaturePrefix + 'bool' FeatureDeclaration ValuePart? + FunctionBody + +Invariant = + FeaturePrefix + 'inv' ( 'true' | isNegated ?= 'false' )? + FeatureDeclaration ValuePart? + FunctionBody + +// Clause 8.2.5.8 Expressions Concrete Syntax + +// Clause 8.2.5.8.1 Operator Expressions + +OwnedExpressionReferenceMember : FeatureMembership = + ownedRelationship += OwnedExpressionReference + +OwnedExpressionReference : FeatureReferenceExpression = + ownedRelationship += OwnedExpressionMember + +OwnedExpressionMember : FeatureMembership = + ownedFeatureMember = OwnedExpression + +OwnedExpression : Expression = + ConditionalExpression + | ConditionalBinaryOperatorExpression + | BinaryOperatorExpression + | UnaryOperatorExpression + | ClassificationExpression + | MetaclassificationExpression + | ExtentExpression + | PrimaryExpression + +ConditionalExpression : OperatorExpression = + operator = 'if' + ownedRelationship += ArgumentMember '?' + ownedRelationship += ArgumentExpressionMember 'else' + ownedRelationship += ArgumentExpressionMember + ownedRelationship += EmptyResultMember + +ConditionalBinaryOperatorExpression : OperatorExpression = + ownedRelationship += ArgumentMember + operator = ConditionalBinaryOperator + ownedRelationship += ArgumentExpressionMember + ownedRelationship += EmptyResultMember + +ConditionalBinaryOperator = + '??' | 'or' | 'and' | 'implies' + +BinaryOperatorExpression : OperatorExpression = + ownedRelationship += ArgumentMember + operator = BinaryOperator + ownedRelationship += ArgumentMember + ownedRelationship += EmptyResultMember + +BinaryOperator = + '|' | '&' | 'xor' | '..' + | '==' | '!=' | '===' | '!==' + | '<' | '>' | '<=' | '>=' + | '+' | '-' | '*' | '/' + | '%' | '^' | '**' + +UnaryOperatorExpression : OperatorExpression = + operator = UnaryOperator + ownedRelationship += ArgumentMember + ownedRelationship += EmptyResultMember + +UnaryOperator = + '+' | '-' | '~' | 'not' + +ClassificationExpression : OperatorExpression = + ( ownedRelationship += ArgumentMember )? + ( operator = ClassificationTestOperator + ownedRelationship += TypeReferenceMember + | operator = CastOperator + ownedRelationship += TypeResultMember + ) + ownedRelationship += EmptyResultMember + +ClassificationTestOperator = + 'istype' | 'hastype' | '@' + +CastOperator = + 'as' + +MetaclassificationExpression : OperatorExpression = + ownedRelationship += MetadataArgumentMember + ( operator = ClassificationTestOperator + ownedRelationship += TypeReferenceMember + | operator = MetaCastOperator + ownedRelationship += TypeResultMember + ) + ownedRelationship += EmptyResultMember + +ArgumentMember : ParameterMembership = + ownedMemberParameter = Argument + +Argument : Feature = + ownedRelationship += ArgumentValue + +ArgumentValue : FeatureValue = + value = OwnedExpression + +ArgumentExpressionMember : FeatureMembership = + ownedRelatedElement += ArgumentExpression + +ArgumentExpression : Feature = + ownedRelationship += ArgumentExpressionValue + +ArgumentExpressionValue : FeatureValue = + value = OwnedExpressionReference + +MetadataArgumentMember : ParameterMembership = + ownedRelatedElement += MetadataArgument + +MetadataArgument : Feature = + ownedRelationship += MetadataValue + +MetadataValue : FeatureValue = + value = MetadataReference + +MetadataReference : MetadataAccessExpression = + ownedRelationship += ElementReferenceMember + +MetaclassificationTestOperator = + '@@' + +MetaCastOperator = + 'meta' + +ExtentExpression : OperatorExpression = + operator = 'all' + ownedRelationship += TypeReferenceMember + +TypeReferenceMember : ParameterMembership = + ownedMemberFeature = TypeReference + +TypeResultMember : ResultParameterMembership = + ownedMemberFeature = TypeReference + +TypeReference : Feature = + ownedRelationship += ReferenceTyping + +ReferenceTyping : FeatureTyping = + type = [QualifiedName] + +EmptyResultMember : ReturnParameterMembership = + ownedRelatedElement += EmptyFeature + +EmptyFeature : Feature = + { } + +// Notes: +// 1. OperatorExpressions provide a shorthand notation for InvocationExpressions that invoke a library Function represented as an operator symbol. Table 5 shows the mapping from operator symbols to the Functions they represent from the Kernel Model Library (see Clause 9). An OperatorExpression contains subexpressions called its operands that generally correspond to the argument Expressions of the OperatorExpression, except in the case of operators representing control Functions, in which case the evaluation of certain operands is as determined by the Function (see 8.4.4.9 for details). +// 2. Though not directly expressed in the syntactic productions given above, in any OperatorExpression containing nested OperatorExpressions, the nested OperatorExpressions shall be implicitly grouped according to the precedence of the operators involved, as given in Table 6. OperatorExpressions with higher precedence operators shall be grouped more tightly than those with lower precedence operators. Further, all BinaryOperators other than exponentiation are left-associative (i.e, they group to the left), while the exponentiation operators (^ and **) are right-associative (i.e., they group to the right). +// 3. The unary operator symbol ~ maps to the library Function DataFunctions::'~', as shown in Table 5. This abstract Function may be given a concrete definition in a domain-specific Function library, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used. + +// Clause 8.2.5.8.2 Primary Expressions + +PrimaryExpression : Expression = + FeatureChainExpression + | NonFeatureChainPrimaryExpression + +PrimaryArgumentValue : FeatureValue = + value = PrimaryExpression + +PrimaryArgument : Feature = + ownedRelationship += PrimaryArgumentValue + +PrimaryArgumentMember : ParameterMembership = + ownedMemberParameter = PrimaryArgument + +NonFeatureChainPrimaryExpression : Expression = + BracketExpression + | IndexExpression + | SequenceExpression + | SelectExpression + | CollectExpression + | FunctionOperationExpression + | BaseExpression + +NonFeatureChainPrimaryArgumentValue : FeatureValue = + value = NonFeatureChainPrimaryExpression + +NonFeatureChainPrimaryArgument : Feature = + ownedRelationship += NonFeatureChainPrimaryArgumentValue + +NonFeatureChainPrimaryArgumentMember : ParameterMembership = + ownedMemberParameter = PrimaryArgument + +BracketExpression : OperatorExpression = + ownedRelationship += PrimaryArgumentMember + operator = '[' + ownedRelationship += SequenceExpressionListMember ']' + +IndexExpression = + ownedRelationship += PrimaryArgumentMember '#' + '(' ownedRelationship += SequenceExpressionListMember ')' + +SequenceExpression : Expression = + '(' SequenceExpressionList ')' + +SequenceExpressionList : Expression = + OwnedExpression ','? | SequenceOperatorExpression + +SequenceOperatorExpression : OperatorExpression = + ownedRelationship += OwnedExpressionMember + operator = ',' + ownedRelationship += SequenceExpressionListMember + +SequenceExpressionListMember : FeatureMembership = + ownedMemberFeature = SequenceExpressionList + +FeatureChainExpression = + ownedRelationship += NonFeatureChainPrimaryArgumentMember '.' + ownedRelationship += FeatureChainMember + +CollectExpression = + ownedRelationship += PrimaryArgumentMember '.' + ownedRelationship += BodyArgumentMember + +SelectExpression = + ownedRelationship += PrimaryArgumentMember '.?' + ownedRelationship += BodyArgumentMember + +FunctionOperationExpression : InvocationExpression = + ownedRelationship += PrimaryArgumentMember '->' + ownedRelationship += InvocationTypeMember + ( ownedRelationship += BodyArgumentMember + | ownedRelationship += FunctionReferenceArgumentMember + | ArgumentList ) + ownedRelationship += EmptyResultMember + +BodyArgumentMember : ParameterMembership = + ownedMemberParameter = BodyArgument + +BodyArgument : Feature = + ownedRelationship += BodyArgumentValue + +BodyArgumentValue : FeatureValue = + value = BodyExpression + +FunctionReferenceArgumentMember : ParameterMembership = + ownedMemberParameter = FunctionReferenceArgument + +FunctionReferenceArgument : Feature = + ownedRelationship += FunctionReferenceArgumentValue + +FunctionReferenceArgumentValue : FeatureValue = + value = FunctionReferenceExpression + +FunctionReferenceExpression : FeatureReferenceExpression = + ownedRelationship += FunctionReferenceMember + +FunctionReferenceMember : FeatureMembership = + ownedMemberFeature = FunctionReference + +FunctionReference : Expression = + ownedRelationship += ReferenceTyping + +FeatureChainMember : Membership = + FeatureReferenceMember + | OwnedFeatureChainMember + +OwnedFeatureChainMember : OwningMembership = + ownedMemberElement = FeatureChain + +// Notes: +// 1. Primary expressions provide additional shorthand notations for certain kinds of InvocationExpressions. For those cases in which the InvocationExpression is an OperatorExpression, its operator shall be resolved to the appropriate library function as given in Table 7. Note also that, for a CollectionExpression or SelectExpression, the abstract syntax constrains the operator to be collect and select, respectively, separately from the . and .? symbols used in their concrete syntax notation (see 8.3.4.8.2 and 8.3.4.8.18). +// 2. The grammar allows a bracket syntax [...]that parses to an invocation of the library Function BaseFunctions::'[', as shown in Table 7. This notation is available for use with domain-specific library models that given a concrete definition to the abstract base '[' Function, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used. + +// Clause 8.2.5.8.3 Base Expressions + +BaseExpression : Expression = + NullExpression + | LiteralExpression + | FeatureReferenceExpression + | MetadataAccessExpression + | InvocationExpression + | ConstructorExpression + | BodyExpression + +NullExpression : NullExpression = + 'null' | '(' ')' + +FeatureReferenceExpression : FeatureReferenceExpression = + ownedRelationship += FeatureReferenceMember + ownedRelationship += EmptyResultMember + +FeatureReferenceMember : Membership = + memberElement = FeatureReference + +FeatureReference : Feature = + [QualifiedName] + +MetadataAccessExpression = + ownedRelationship += ElementReferenceMember '.' 'metadata' + +ElementReferenceMember : Membership = + memberElement = [QualifiedName] + +InvocationExpression : InvocationExpression = + ownedRelationship += InstantiatedTypeMember + ArgumentList + ownedRelationship += EmptyResultMember + +ConstructorExpression = + 'new' ownedRelationship += InstantiatedTypeMember + ownedRelationship += ConstructorResultMember + +ConstructorResultMember : ReturnParameterMembership = + ownedRelatedElement += ConstructorResult + +ConstructorResult : Feature = + ArgumentList + +InstantiatedTypeMember : Membership = + memberElement = InstantiatedTypeReference + | OwnedFeatureChainMember + +InstantiatedTypeReference : Type = + [QualifiedName] + +ArgumentList : Feature = + '(' ( PositionalArgumentList | NamedArgumentList )? ')' + +PositionalArgumentList : Feature = + e.ownedRelationship += ArgumentMember + ( ',' e.ownedRelationship += ArgumentMember )* + +NamedArgumentList : Feature = + ownedRelationship += NamedArgumentMember + ( ',' ownedRelationship += NamedArgumentMember )* + +NamedArgumentMember : FeatureMembership = + ownedMemberFeature = NamedArgument + +NamedArgument : Feature = + ownedRelationship += ParameterRedefinition '=' + ownedRelationship += ArgumentValue + +ParameterRedefinition : Redefinition = + redefinedFeature = [QualifiedName] + +BodyExpression : FeatureReferenceExpression = + ownedRelationship += ExpressionBodyMember + +ExpressionBodyMember : FeatureMembership = + ownedMemberFeature = ExpressionBody + +ExpressionBody : Expression = + '{' FunctionBodyPart '}' + +// Clause 8.2.5.8.4 Literal Expressions + +LiteralExpression = + LiteralBoolean + | LiteralString + | LiteralInteger + | LiteralReal + | LiteralInfinity + +LiteralBoolean = + value = BooleanValue + +BooleanValue : Boolean = + 'true' | 'false' + +LiteralString = + value = STRING_VALUE + +LiteralInteger = + value = DECIMAL_VALUE + +LiteralReal = + value = RealValue + +RealValue : Real = + DECIMAL_VALUE? '.' ( DECIMAL_VALUE | EXPONENTIAL_VALUE ) + | EXPONENTIAL_VALUE + +LiteralInfinity = + '*' + +// Clause 8.2.5.9 Interactions Concrete Syntax + +// Clause 8.2.5.9.1 Interactions + +Interaction = + TypePrefix 'interaction' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.9.2 Flows + +Flow = + FeaturePrefix 'flow' + FlowDeclaration TypeBody + +SuccessionFlow = + FeaturePrefix 'succession' 'flow' + FlowDeclaration TypeBody + +FlowDeclaration : Flow = + FeatureDeclaration ValuePart? + ( 'of' ownedRelationship += PayloadFeatureMember )? + ( 'from' ownedRelationship += FlowEndMember + 'to' ownedRelationship += FlowEndMember )? + | ( isSufficient ?= 'all' )? + ownedRelationship += FlowEndMember 'to' + ownedRelationship += FlowEndMember + +PayloadFeatureMember : FeatureMembership = + ownedRelatedElement = PayloadFeature + +PayloadFeature = + Identification PayloadFeatureSpecializationPart ValuePart? + | Identification ValuePart + | ownedRelationship += OwnedFeatureTyping + ( ownedRelationship += OwnedMultiplicity )? + | ownedRelationship += OwnedMultiplicity + ( ownedRelationship += OwnedFeatureTyping )? + +PayloadFeatureSpecializationPart : Feature = + FeatureSpecialization+ MultiplicityPart? + FeatureSpecialization* + | MultiplicityPart FeatureSpecialization+ + +FlowEndMember : EndFeatureMembership = + ownedRelatedElement += FlowEnd + +FlowEnd = + ( ownedRelationship += OwnedReferenceSubsetting '.' )? + ownedRelationship += FlowFeatureMember + +FlowFeatureMember : FeatureMembership = + ownedRelatedElement += FlowFeature + +FlowFeature : Feature = + ownedRelationship += FlowFeatureRedefinition + +// (See Note 1) + +FlowFeatureRedefinition : Redefinition = + redefinedFeature = [QualifiedName] + +// Notes: +// 1. To ensure that an FlowFeature passes the validateRedefinitionDirectionConformance constraint (see 8.3.3.3.8), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature) + +// Clause 8.2.5.10 Feature Values Concrete Syntax + +ValuePart : Feature = + ownedRelationship += FeatureValue + +FeatureValue = + ( '=' + | isInitial ?= ':=' + | isDefault ?= 'default' ( '=' | isInitial ?= ':=' )? + ) + ownedRelatedElement += OwnedExpression + +// Clause 8.2.5.11 Multiplicities Concrete Syntax + +Multiplicity = + MultiplicitySubset | MultiplicityRange + +MultiplicitySubset : Multiplicity = + 'multiplicity' Identification Subsets + TypeBody + +MultiplicityRange = + 'multiplicity' Identification MultiplicityBounds + TypeBody + +OwnedMultiplicity : OwningMembership = + ownedRelatedElement += OwnedMultiplicityRange + +OwnedMultiplicityRange : MultiplicityRange = + MultiplicityBounds + +MultiplicityBounds : MultiplicityRange = + '[' ( ownedRelationship += MultiplicityExpressionMember '..' )? + ownedRelationship += MultiplicityExpressionMember ']' + +MultiplicityExpressionMember : OwningMembership = + ownedRelatedElement += ( LiteralExpression | FeatureReferenceExpression ) + +// Clause 8.2.5.12 Metadata Concrete Syntax + +Metaclass = + TypePrefix 'metaclass' + ClassifierDeclaration TypeBody + +PrefixMetadataAnnotation : Annotation = + '#' ownedRelatedElement += PrefixMetadataFeature + +PrefixMetadataMember : OwningMembership = + '#' ownedRelatedElement += PrefixMetadataFeature + +PrefixMetadataFeature : MetadataFeature = + ownedRelationship += OwnedFeatureTyping + +MetadataFeature = + ( ownedRelationship += PrefixMetadataMember )* + ( '@' | 'metadata' ) + MetadataFeatureDeclaration + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + MetadataBody + +MetadataFeatureDeclaration : MetadataFeature = + ( Identification ( ':' | 'typed' 'by' ) )? + ownedRelationship += OwnedFeatureTyping + +MetadataBody : Feature = + ';' | '{' ( ownedRelationship += MetadataBodyElement )* '}' + +MetadataBodyElement : Membership = + NonFeatureMember + | MetadataBodyFeatureMember + | AliasMember + | Import + +MetadataBodyFeatureMember : FeatureMembership = + ownedMemberFeature = MetadataBodyFeature + +MetadataBodyFeature : Feature = + 'feature'? ( ':>>' | 'redefines')? ownedRelationship += OwnedRedefinition + FeatureSpecializationPart? ValuePart? + MetadataBody + +// Clause 8.2.5.13 Packages Concrete Syntax + +Package = + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody + +LibraryPackage = + ( isStandard ?= 'standard' ) 'library' + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody + +PackageDeclaration : Package = + 'package' Identification + +PackageBody : Package = + ';' + | '{' ( NamespaceBodyElement + | ownedRelationship += ElementFilterMember + )* + '}' + +ElementFilterMember : ElementFilterMembership = + MemberPrefix + 'filter' condition = OwnedExpression ';' + +// End of BNF + + diff --git a/Resources/SysML-textual-bnf.kebnf b/Resources/SysML-textual-bnf.kebnf new file mode 100644 index 000000000..e5c771e9e --- /dev/null +++ b/Resources/SysML-textual-bnf.kebnf @@ -0,0 +1,1705 @@ +// Manual corrections by HP de Koning + +// Part 2 - Systems Modeling Language (SysML) + +// Clause 8.2.2 Textual Notation + +// Clause 8.2.2.1 Textual Notation Overview + +// Clause 8.2.2.1.1 EBNF Conventions + +// Clause 8.2.2.1.2 Lexical Structure + +RESERVED_KEYWORD = + 'about' | 'abstract' | 'accept' | 'action' | 'actor' | 'after' | 'alias' | 'all' | 'allocate' | 'allocation' + | 'analysis' | 'and' | 'as' | 'assert' | 'assign' | 'assume' | 'at' | 'attribute' | 'bind' | 'binding' | 'by' | 'calc' + | 'case' | 'comment' | 'concern' | 'connect' | 'connection' | 'constant' | 'constraint' | 'crosses' | 'decide' + | 'def' | 'default' | 'defined' | 'dependency' | 'derived' | 'do' | 'doc' | 'else' | 'end' | 'entry' | 'enum' + | 'event' | 'exhibit' | 'exit' | 'expose' | 'false' | 'filter' | 'first' | 'flow' | 'for' | 'fork' | 'frame' | 'from' + | 'hastype' | 'if' | 'implies' | 'import' | 'in' | 'include' | 'individual' | 'inout' | 'interface' | 'istype' + | 'item' | 'join' | 'language' | 'library' | 'locale' | 'loop' | 'merge' | 'message' | 'meta' | 'metadata' + | 'nonunique' | 'not' | 'null' | 'objective' | 'occurrence' | 'of' | 'or' | 'ordered' | 'out' | 'package' | 'parallel' + | 'part' | 'perform' | 'port' | 'private' | 'protected' | 'public' | 'redefines' | 'ref' | 'references' | 'render' + | 'rendering' | 'rep' | 'require' | 'requirement' | 'return' | 'satisfy' | 'send' | 'snapshot' | 'specializes' + | 'stakeholder' | 'standard' | 'state' | 'subject' | 'subsets' | 'succession' | 'terminate' | 'then' | 'timeslice' + | 'to' | 'transition' | 'true' | 'until' | 'use' | 'variant' | 'variation' | 'verification' | 'verify' | 'via' + | 'view' | 'viewpoint' | 'when' | 'while' | 'xor' + +DEFINED_BY = ':' | 'defined' 'by' + +SPECIALIZES = ':>' | 'specializes' + +SUBSETS = ':>' | 'subsets' + +REFERENCES = '::>' | 'references' + +CROSSES = '=>' | 'crosses' + +REDEFINES = ':>>' | 'redefines' + +// Clause 8.2.2.2 Elements and Relationships Textual Notation + +Identification : Element = + ( '<' declaredShortName = NAME '>' )? + ( declaredName = NAME )? + +RelationshipBody : Relationship = + ';' | '{' ( ownedRelationship += OwnedAnnotation )* '}' + +// Clause 8.2.2.3 Dependencies Textual Notation + +Dependency = + ( ownedRelationship += PrefixMetadataAnnotation )* + 'dependency' DependencyDeclaration + RelationshipBody + +DependencyDeclaration = + ( Identification 'from' )? + client += [QualifiedName] ( ',' client += [QualifiedName] )* 'to' + supplier += [QualifiedName] ( ',' supplier += [QualifiedName] )* + +// Clause 8.2.2.4 Annotations Textual Notation + +// Clause 8.2.2.4.1 Annotations + +Annotation = + annotatedElement = [QualifiedName] + +OwnedAnnotation : Annotation = + ownedRelatedElement += AnnotatingElement + +AnnotatingMember : OwningMembership = + ownedRelatedElement += AnnotatingElement + +AnnotatingElement = + Comment + | Documentation + | TextualRepresentation + | MetadataFeature + +// Clause 8.2.2.4.2 Comments and Documentation + +Comment = + ( 'comment' Identification + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + )? + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT + +Documentation = + 'doc' Identification + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT + +// Clause 8.2.2.4.3 Textual Representation + +TextualRepresentation = + ( 'rep' Identification )? + 'language' language = STRING_VALUE body = REGULAR_COMMENT + +// Clause 8.2.2.5 Namespaces and Packages Textual Notation + +// Clause 8.2.2.5.1 Packages + +RootNamespace : Namespace = + PackageBodyElement* + +Package = + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody + +LibraryPackage = + ( isStandard ?= 'standard' ) 'library' + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody + +PackageDeclaration : Package = + 'package' Identification + +PackageBody : Package = + ';' | '{' PackageBodyElement* '}' + +PackageBodyElement : Package = + ownedRelationship += PackageMember + | ownedRelationship += ElementFilterMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + +MemberPrefix : Membership = + ( visibility = VisibilityIndicator )? + +PackageMember : OwningMembership = + MemberPrefix + ( ownedRelatedElement += DefinitionElement + | ownedRelatedElement = UsageElement ) + +ElementFilterMember : ElementFilterMembership = + MemberPrefix + 'filter' ownedRelatedElement += OwnedExpression ';' + +AliasMember : Membership = + MemberPrefix + 'alias' ( '<' memberShortName = NAME '>' )? + ( memberName = NAME )? + 'for' memberElement = [QualifiedName] + RelationshipBody + +Import = + visibility = VisibilityIndicator + 'import' ( isImportAll ?= 'all' )? + ImportDeclaration + RelationshipBody + +ImportDeclaration : Import = + MembershipImport | NamespaceImport + +MembershipImport = + importedMembership = [QualifiedName] + ( '::' isRecursive ?= '**' )? + +NamespaceImport = + importedNamespace = [QualifiedName] '::' '*' + ( '::' isRecursive ?= '**' )? + | importedNamespace = FilterPackage + { ownedRelatedElement += importedNamespace } + +FilterPackage : Package = + ownedRelationship += FilterPackageImport + ( ownedRelationship += FilterPackageMember )+ + +FilterPackageMember : ElementFilterMembership = + '[' ownedRelatedElement += OwnedExpression ']' + +VisibilityIndicator : VisibilityKind = + 'public' | 'private' | 'protected' + +// Clause 8.2.2.5.2 Package Elements + +DefinitionElement : Element = + Package + | LibraryPackage + | AnnotatingElement + | Dependency + | AttributeDefinition + | EnumerationDefinition + | OccurrenceDefinition + | IndividualDefinition + | ItemDefinition + | PartDefinition + | ConnectionDefinition + | FlowDefinition + | InterfaceDefinition + | PortDefinition + | ActionDefinition + | CalculationDefinition + | StateDefinition + | ConstraintDefinition + | RequirementDefinition + | ConcernDefinition + | CaseDefinition + | AnalysisCaseDefinition + | VerificationCaseDefinition + | UseCaseDefinition + | ViewDefinition + | ViewpointDefinition + | RenderingDefinition + | MetadataDefinition + | ExtendedDefinition + +UsageElement : Usage = + NonOccurrenceUsageElement + | OccurrenceUsageElement + +// Clause 8.2.2.6 Definition and Usage Textual Notation + +// Clause 8.2.2.6.1 Definitions + +BasicDefinitionPrefix = + isAbstract ?= 'abstract' | isVariation ?= 'variation' + +DefinitionExtensionKeyword : Definition = + ownedRelationship += PrefixMetadataMember + +DefinitionPrefix : Definition = + BasicDefinitionPrefix? DefinitionExtensionKeyword* + +Definition = + DefinitionDeclaration DefinitionBody + +DefinitionDeclaration : Definition = + Identification SubclassificationPart? + +DefinitionBody : Type = + ';' | '{' DefinitionBodyItem* '}' + +DefinitionBodyItem : Type = + ownedRelationship += DefinitionMember + | ownedRelationship += VariantUsageMember + | ownedRelationship += NonOccurrenceUsageMember + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += OccurrenceUsageMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + +DefinitionMember : OwningMembership = + MemberPrefix + ownedRelatedElement += DefinitionElement + +VariantUsageMember : VariantMembership = + MemberPrefix 'variant' + ownedVariantUsage = VariantUsageElement + +NonOccurrenceUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += NonOccurrenceUsageElement + +OccurrenceUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += OccurrenceUsageElement + +StructureUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += StructureUsageElement + +BehaviorUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += BehaviorUsageElement + +// Clause 8.2.2.6.2 Usages + +FeatureDirection : FeatureDirectionKind = + 'in' | 'out' | 'inout' + +RefPrefix : Usage = + ( direction = FeatureDirection )? + ( isDerived ?= 'derived' )? + ( isAbstract ?= 'abstract' | isVariation ?= 'variation' )? + ( isConstant ?= 'constant' )? + +BasicUsagePrefix : Usage = + RefPrefix + ( isReference ?= 'ref' )? + +EndUsagePrefix : Usage = + isEnd ?= 'end' ( ownedRelationship += OwnedCrossFeatureMember )? + +// (See Note 1) + +OwnedCrossFeatureMember : OwningMembership = + ownedRelatedElement += OwnedCrossFeature + +OwnedCrossFeature : ReferenceUsage = + BasicUsagePrefix UsageDeclaration + +UsageExtensionKeyword : Usage = + ownedRelationship += PrefixMetadataMember + +UnextendedUsagePrefix : Usage = + EndUsagePrefix | BasicUsagePrefix + +UsagePrefix : Usage = + UnextendedUsagePrefix UsageExtensionKeyword* + +Usage = + UsageDeclaration UsageCompletion + +UsageDeclaration : Usage = + Identification FeatureSpecializationPart? + +UsageCompletion : Usage = + ValuePart? UsageBody + +UsageBody : Usage = + DefinitionBody + +ValuePart : Feature = + ownedRelationship += FeatureValue + +FeatureValue = + ( '=' + | isInitial ?= ':=' + | isDefault ?= 'default' ( '=' | isInitial ?= ':=' )? + ) + ownedRelatedElement += OwnedExpression + +// Notes: +// 1. A Usage parsed with isEnd = true for which mayTimeVary = true must also have isConstant set to true, even though this is not explicitly notated in the textual notation, in order to satisfy the KerML constraint checkFeatureEndIsConstant. + +// Clause 8.2.2.6.3 Reference Usages + +DefaultReferenceUsage : ReferenceUsage = + RefPrefix Usage + +ReferenceUsage = + ( EndUsagePrefix | RefPrefix ) + 'ref' Usage + +VariantReference : ReferenceUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecialization* UsageBody + +// Clause 8.2.2.6.4 Body Elements + +NonOccurrenceUsageElement : Usage = + DefaultReferenceUsage + | ReferenceUsage + | AttributeUsage + | EnumerationUsage + | BindingConnectorAsUsage + | SuccessionAsUsage + | ExtendedUsage + +OccurrenceUsageElement : Usage = + StructureUsageElement | BehaviorUsageElement + +StructureUsageElement : Usage = + OccurrenceUsage + | IndividualUsage + | PortionUsage + | EventOccurrenceUsage + | ItemUsage + | PartUsage + | ViewUsage + | RenderingUsage + | PortUsage + | ConnectionUsage + | InterfaceUsage + | AllocationUsage + | Message + | FlowUsage + | SuccessionFlowUsage + +BehaviorUsageElement : Usage = + ActionUsage + | CalculationUsage + | StateUsage + | ConstraintUsage + | RequirementUsage + | ConcernUsage + | CaseUsage + | AnalysisCaseUsage + | VerificationCaseUsage + | UseCaseUsage + | ViewpointUsage + | PerformActionUsage + | ExhibitStateUsage + | IncludeUseCaseUsage + | AssertConstraintUsage + | SatisfyRequirementUsage + +VariantUsageElement : Usage = + VariantReference + | ReferenceUsage + | AttributeUsage + | BindingConnectorAsUsage + | SuccessionAsUsage + | OccurrenceUsage + | IndividualUsage + | PortionUsage + | EventOccurrenceUsage + | ItemUsage + | PartUsage + | ViewUsage + | RenderingUsage + | PortUsage + | ConnectionUsage + | InterfaceUsage + | AllocationUsage + | Message + | FlowUsage + | SuccessionFlowUsage + | BehaviorUsageElement + +// Clause 8.2.2.6.5 Specialization + +SubclassificationPart : Classifier = + SPECIALIZES ownedRelationship += OwnedSubclassification + ( ',' ownedRelationship += OwnedSubclassification )* + +OwnedSubclassification : Subclassification = + superClassifier = [QualifiedName] + +FeatureSpecializationPart : Feature = + FeatureSpecialization+ MultiplicityPart? FeatureSpecialization* + | MultiplicityPart FeatureSpecialization* + +FeatureSpecialization : Feature = + Typings | Subsettings | References | Crosses | Redefinitions + +Typings : Feature = + TypedBy ( ',' ownedRelationship += FeatureTyping )* + +TypedBy : Feature = + DEFINED_BY ownedRelationship += FeatureTyping + +FeatureTyping = + OwnedFeatureTyping | ConjugatedPortTyping + +OwnedFeatureTyping : FeatureTyping = + type = [QualifiedName] + | type = OwnedFeatureChain + { ownedRelatedElement += type } + +Subsettings : Feature = + Subsets ( ',' ownedRelationship += OwnedSubsetting )* + +Subsets : Feature = + SUBSETS ownedRelationship += OwnedSubsetting + +OwnedSubsetting : Subsetting = + subsettedFeature = [QualifiedName] + | subsettedFeature = OwnedFeatureChain + { ownedRelatedElement += subsettedFeature } + +References : Feature = + REFERENCES ownedRelationship += OwnedReferenceSubsetting + +OwnedReferenceSubsetting : ReferenceSubsetting = + referencedFeature = [QualifiedName] + | referencedFeature = OwnedFeatureChain + { ownedRelatedElement += referenceFeature } + +Crosses : Feature = + CROSSES ownedRelationship += OwnedCrossSubsetting + +OwnedCrossSubsetting : CrossSubsetting = + crossedFeature = [QualifiedName] + | crossedFeature = OwnedFeatureChain + { ownedRelatedElement += crossedFeature } + +Redefinitions : Feature = + Redefines ( ',' ownedRelationship += OwnedRedefinition )* + +Redefines : Feature = + REDEFINES ownedRelationship += OwnedRedefinition + +OwnedRedefinition : Redefinition = + redefinedFeature = [QualifiedName] + | redefinedFeature = OwnedFeatureChain + { ownedRelatedElement += redefinedFeature } + +OwnedFeatureChain : Feature = + ownedRelationship += OwnedFeatureChaining + ( '.' ownedRelationship += OwnedFeatureChaining )+ + +OwnedFeatureChaining : FeatureChaining = + chainingFeature = [QualifiedName] + +// Clause 8.2.2.6.6 Multiplicity + +MultiplicityPart : Feature = + ownedRelationship += OwnedMultiplicity + | ( ownedRelationship += OwnedMultiplicity )? + ( isOrdered ?= 'ordered' ( { isUnique = false } 'nonunique' )? + | { isUnique = false } 'nonunique' ( isOrdered ?= 'ordered' )? ) + +OwnedMultiplicity : OwningMembership = + ownedRelatedElement += MultiplicityRange + +MultiplicityRange = + '[' ( ownedRelationship += MultiplicityExpressionMember '..' )? + ownedRelationship += MultiplicityExpressionMember ']' + +MultiplicityExpressionMember : OwningMembership = + ownedRelatedElement += ( LiteralExpression | FeatureReferenceExpression ) + +// Clause 8.2.2.7 Attributes Textual Notation + +AttributeDefinition : AttributeDefinition = + DefinitionPrefix 'attribute' 'def' Definition + +AttributeUsage : AttributeUsage = + UsagePrefix 'attribute' Usage + +// Clause 8.2.2.8 Enumerations Textual Notation + +EnumerationDefinition = + DefinitionExtensionKeyword* + 'enum' 'def' DefinitionDeclaration EnumerationBody + +EnumerationBody : EnumerationDefinition = + ';' + | '{' ( ownedRelationship += AnnotatingMember + | ownedRelationship += EnumerationUsageMember )* + '}' + +EnumerationUsageMember : VariantMembership = + MemberPrefix ownedRelatedElement += EnumeratedValue + +EnumeratedValue : EnumerationUsage = + 'enum'? Usage + +EnumerationUsage : EnumerationUsage = + UsagePrefix 'enum' Usage + +// Clause 8.2.2.9 Occurrences Textual Notation + +// Clause 8.2.2.9.1 Occurrence Definitions + +OccurrenceDefinitionPrefix : OccurrenceDefinition = + BasicDefinitionPrefix? + ( isIndividual ?= 'individual' + ownedRelationship += EmptyMultiplicityMember + )? + DefinitionExtensionKeyword* + +OccurrenceDefinition = + OccurrenceDefinitionPrefix 'occurrence' 'def' Definition + +IndividualDefinition : OccurrenceDefinition = + BasicDefinitionPrefix? isIndividual ?= 'individual' + DefinitionExtensionKeyword* 'def' Definition + ownedRelationship += EmptyMultiplicityMember + +EmptyMultiplicityMember : OwningMembership = + ownedRelatedElement += EmptyMultiplicity + +EmptyMultiplicity : Multiplicity = + { } + +// Clause 8.2.2.9.2 Occurrence Usages + +OccurrenceUsagePrefix : OccurrenceUsage = + BasicUsagePrefix + ( isIndividual ?= 'individual' )? + ( portionKind = PortionKind + { isPortion = true } + )? + UsageExtensionKeyword* + +OccurrenceUsage = + OccurrenceUsagePrefix 'occurrence' Usage + +IndividualUsage : OccurrenceUsage = + BasicUsagePrefix isIndividual ?= 'individual' + UsageExtensionKeyword* Usage + +PortionUsage : OccurrenceUsage = + BasicUsagePrefix ( isIndividual ?= 'individual' )? + portionKind = PortionKind + UsageExtensionKeyword* Usage + { isPortion = true } + +PortionKind = + 'snapshot' | 'timeslice' + +EventOccurrenceUsage = + OccurrenceUsagePrefix 'event' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'occurrence' UsageDeclaration? ) + UsageCompletion + +// Clause 8.2.2.9.3 Occurrence Successions + +SourceSuccessionMember : FeatureMembership = + 'then' ownedRelatedElement += SourceSuccession + +SourceSuccession : SuccessionAsUsage = + ownedRelationship += SourceEndMember + +SourceEndMember : EndFeatureMembership = + ownedRelatedElement += SourceEnd + +SourceEnd : ReferenceUsage = + ( ownedRelationship += OwnedMultiplicity )? + +// Clause 8.2.2.10 Items Textual Notation + +ItemDefinition = + OccurrenceDefinitionPrefix + 'item' 'def' Definition + +ItemUsage = + OccurrenceUsagePrefix 'item' Usage + +// Clause 8.2.2.11 Parts Textual Notation + +PartDefinition = + OccurrenceDefinitionPrefix 'part' 'def' Definition + +PartUsage = + OccurrenceUsagePrefix 'part' Usage + +// Clause 8.2.2.12 Ports Textual Notation + +PortDefinition = + DefinitionPrefix 'port' 'def' Definition + ownedRelationship += ConjugatedPortDefinitionMember + { conjugatedPortDefinition.ownedPortConjugator. + originalPortDefinition = this } + +// (See Note 1) + +ConjugatedPortDefinitionMember : OwningMembership = + ownedRelatedElement += ConjugatedPortDefinition + +ConjugatedPortDefinition = + ownedRelationship += PortConjugation + +PortConjugation = + {} + +PortUsage = + OccurrenceUsagePrefix 'port' Usage + +ConjugatedPortTyping : ConjugatedPortTyping = + '~' originalPortDefinition = ~[QualifiedName] + +// (See Note 2) + +// Notes: +// 1. Even though it is not explicitly represented in the text, a PortDefinition is always parsed as containing a nested ConjugatedPortDefinition with a PortDefinition Relationship pointing back to the containing PortDefinition. The abstract syntax for ConjugatedPortDefinition sets its effectiveName to the name of its originalPortDefinition with the symbol ~ prepended to it (see 8.3.12.2). (See also 8.4.8.1.) +// 2. The notation ~[QualifiedName] indicates that a QualifiedName shall be parsed from the input text, but that it shall be resolved as if it was the qualified name constructed as follows: +// • Extract the last segment name of the given QualifiedName and prepend the symbol ~ to it. +// • Append the name so constructed to the end of the entire original QualifiedName. +// For example, if the ConjugatedPortTyping is ~A::B::C, then the given QualifiedName is A::B::C, and ~[QualifiedName] is resolved as A::B::C::'~C'. Alternatively, a conforming tool may first resolve the given QualifiedName as usual to a PortDefinition and then use the conjugatedPortDefinition of this PortDefinition as the resolution of ~[QualifiedName]. + +// Clause 8.2.2.13 Connections Textual Notation + +// Clause 8.2.2.13.1 Connection Definition and Usage + +ConnectionDefinition = + OccurrenceDefinitionPrefix 'connection' 'def' Definition + +ConnectionUsage = + OccurrenceUsagePrefix + ( 'connection' UsageDeclaration ValuePart? + ( 'connect' ConnectorPart )? + | 'connect' ConnectorPart ) + UsageBody + +ConnectorPart : ConnectionUsage = + BinaryConnectorPart | NaryConnectorPart + +BinaryConnectorPart : ConnectionUsage = + ownedRelationship += ConnectorEndMember 'to' + ownedRelationship += ConnectorEndMember + +NaryConnectorPart : ConnectionUsage = + '(' ownedRelationship += ConnectorEndMember ',' + ownedRelationship += ConnectorEndMember + ( ',' ownedRelationship += ConnectorEndMember )* ')' + +ConnectorEndMember : EndFeatureMembership = + ownedRelatedElement += ConnectorEnd + +ConnectorEnd : ReferenceUsage = + ( ownedRelationship += OwnedCrossMultiplicityMember )? + ( declaredName = NAME REFERENCES )? + ownedRelationship += OwnedReferenceSubsetting + +OwnedCrossMultiplicityMember : OwningMembership = + ownedRelatedElement += OwnedCrossMultiplicity + +OwnedCrossMultiplicity : Feature = + ownedRelationship += OwnedMultiplicity + +// Clause 8.2.2.13.2 Binding Connectors + +BindingConnectorAsUsage = + UsagePrefix ( 'binding' UsageDeclaration )? + 'bind' ownedRelationship += ConnectorEndMember + '=' ownedRelationship += ConnectorEndMember + UsageBody + +// Clause 8.2.2.13.3 Successions + +SuccessionAsUsage = + UsagePrefix ( 'succession' UsageDeclaration )? + 'first' s.ownedRelationship += ConnectorEndMember + 'then' s.ownedRelationship += ConnectorEndMember + UsageBody + +// Clause 8.2.2.14 Interfaces Textual Notation + +// Clause 8.2.2.14.1 Interface Definitions + +InterfaceDefinition = + OccurrenceDefinitionPrefix 'interface' 'def' + DefinitionDeclaration InterfaceBody + +InterfaceBody : Type = + ';' | '{' InterfaceBodyItem* '}' + +InterfaceBodyItem : Type = + ownedRelationship += DefinitionMember + | ownedRelationship += VariantUsageMember + | ownedRelationship += InterfaceNonOccurrenceUsageMember + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += InterfaceOccurrenceUsageMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + +InterfaceNonOccurrenceUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += InterfaceNonOccurrenceUsageElement + +InterfaceNonOccurrenceUsageElement : Usage = + ReferenceUsage + | AttributeUsage + | EnumerationUsage + | BindingConnectorAsUsage + | SuccessionAsUsage + +InterfaceOccurrenceUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += InterfaceOccurrenceUsageElement + +InterfaceOccurrenceUsageElement : Usage = + DefaultInterfaceEnd | StructureUsageElement | BehaviorUsageElement + +DefaultInterfaceEnd : PortUsage = + isEnd ?= 'end' Usage + +// Clause 8.2.2.14.2 Interface Usages + +InterfaceUsage = + OccurrenceUsagePrefix 'interface' + InterfaceUsageDeclaration InterfaceBody + +InterfaceUsageDeclaration : InterfaceUsage = + UsageDeclaration ValuePart? + ( 'connect' InterfacePart )? + | InterfacePart + +InterfacePart : InterfaceUsage = + BinaryInterfacePart | NaryInterfacePart + +BinaryInterfacePart : InterfaceUsage = + ownedRelationship += InterfaceEndMember 'to' + ownedRelationship += InterfaceEndMember + +NaryInterfacePart : InterfaceUsage = + '(' ownedRelationship += InterfaceEndMember ',' + ownedRelationship += InterfaceEndMember + ( ',' ownedRelationship += InterfaceEndMember )* ')' + +InterfaceEndMember : EndFeatureMembership = + ownedRelatedElement += InterfaceEnd + +InterfaceEnd : PortUsage = + ( ownedRelationship += OwnedCrossMultiplicityMember )? + ( declaredName = NAME REFERENCES )? + ownedRelationship += OwnedReferenceSubsetting + +// Clause 8.2.2.15 Allocations Textual Notation + +AllocationDefinition = + OccurrenceDefinitionPrefix 'allocation' 'def' Definition + +AllocationUsage = + OccurrenceUsagePrefix + AllocationUsageDeclaration UsageBody + +AllocationUsageDeclaration : AllocationUsage = + 'allocation' UsageDeclaration + ( 'allocate' ConnectorPart )? + | 'allocate' ConnectorPart + +// Clause 8.2.2.16 Flows Textual Notation + +FlowDefinition = + OccurrenceDefinitionPrefix 'flow' 'def' Definition + +Message : FlowUsage = + OccurrenceUsagePrefix 'message' + MessageDeclaration DefinitionBody + { isAbstract = true } + +MessageDeclaration : FlowUsage = + UsageDeclaration ValuePart? + ( 'of' ownedRelationship += FlowPayloadFeatureMember )? + ( 'from' ownedRelationship += MessageEventMember + 'to' ownedRelationship += MessageEventMember + )? + | ownedRelationship += MessageEventMember 'to' + ownedRelationship += MessageEventMember + +MessageEventMember : ParameterMembership = + ownedRelatedElement += MessageEvent + +MessageEvent : EventOccurrenceUsage = + ownedRelationship += OwnedReferenceSubsetting + +FlowUsage = + OccurrenceUsagePrefix 'flow' + FlowDeclaration DefinitionBody + +SuccessionFlowUsage = + OccurrenceUsagePrefix 'succession' 'flow' + FlowDeclaration DefinitionBody + +FlowDeclaration : FlowUsage = + UsageDeclaration ValuePart? + ( 'of' ownedRelationship += FlowPayloadFeatureMember )? + ( 'from' ownedRelationship += FlowEndMember + 'to' ownedRelationship += FlowEndMember )? + | ownedRelationship += FlowEndMember 'to' + ownedRelationship += FlowEndMember + +FlowPayloadFeatureMember : FeatureMembership = + ownedRelatedElement += FlowPayloadFeature + +FlowPayloadFeature : PayloadFeature = + PayloadFeature + +PayloadFeature : Feature = + Identification? PayloadFeatureSpecializationPart + ValuePart? + | ownedRelationship += OwnedFeatureTyping + ( ownedRelationship += OwnedMultiplicity )? + | ownedRelationship += OwnedMultiplicity + ownedRelationship += OwnedFeatureTyping + +PayloadFeatureSpecializationPart : Feature = + ( FeatureSpecialization )+ MultiplicityPart? + FeatureSpecialization* + | MultiplicityPart FeatureSpecialization+ + +FlowEndMember : EndFeatureMembership = + ownedRelatedElement += FlowEnd + +FlowEnd = + ( ownedRelationship += FlowEndSubsetting )? + ownedRelationship += FlowFeatureMember + +FlowEndSubsetting : ReferenceSubsetting = + referencedFeature = [QualifiedName] + | referencedFeature = FeatureChainPrefix + { ownedRelatedElement += referencedFeature } + +FeatureChainPrefix : Feature = + ( ownedRelationship += OwnedFeatureChaining '.' )+ + ownedRelationship += OwnedFeatureChaining '.' + +FlowFeatureMember : FeatureMembership = + ownedRelatedElement += FlowFeature + +FlowFeature : ReferenceUsage = + ownedRelationship += FlowFeatureRedefinition + +// (See Note 1) + +FlowFeatureRedefinition : Redefinition = + redefinedFeature = [QualifiedName] + +// Notes: +// 1. To ensure that a FlowFeature passes the validateRedefinitionDirectionConformance constraint (see [KerML, 8.3.3.3.8]), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature) + +// Clause 8.2.2.17 Actions Textual Notation + +// Clause 8.2.2.17.1 Action Definitions + +ActionDefinition = + OccurrenceDefinitionPrefix 'action' 'def' + DefinitionDeclaration ActionBody + +ActionBody : Type = + ';' | '{' ActionBodyItem* '}' + +ActionBodyItem : Type = + NonBehaviorBodyItem + | ownedRelationship += InitialNodeMember + ( ownedRelationship += ActionTargetSuccessionMember )* + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += ActionBehaviorMember + ( ownedRelationship += ActionTargetSuccessionMember )* + | ownedRelationship += GuardedSuccessionMember + +NonBehaviorBodyItem = + ownedRelationship += Import + | ownedRelationship += AliasMember + | ownedRelationship += DefinitionMember + | ownedRelationship += VariantUsageMember + | ownedRelationship += NonOccurrenceUsageMember + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += StructureUsageMember + +ActionBehaviorMember : FeatureMembership = + BehaviorUsageMember | ActionNodeMember + +InitialNodeMember : FeatureMembership = + MemberPrefix 'first' memberFeature = [QualifiedName] + RelationshipBody + +ActionNodeMember : FeatureMembership = + MemberPrefix ownedRelatedElement += ActionNode + +ActionTargetSuccessionMember : FeatureMembership = + MemberPrefix ownedRelatedElement += ActionTargetSuccession + +GuardedSuccessionMember : FeatureMembership = + MemberPrefix ownedRelatedElement += GuardedSuccession + +// Clause 8.2.2.17.2 Action Usages + +ActionUsage = + OccurrenceUsagePrefix 'action' + ActionUsageDeclaration ActionBody + +ActionUsageDeclaration : ActionUsage = + UsageDeclaration ValuePart? + +PerformActionUsage = + OccurrenceUsagePrefix 'perform' + PerformActionUsageDeclaration ActionBody + +PerformActionUsageDeclaration : PerformActionUsage = + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'action' UsageDeclaration ) + ValuePart? + +ActionNode : ActionUsage = + ControlNode + | SendNode | AcceptNode + | AssignmentNode + | TerminateNode + | IfNode | WhileLoopNode | ForLoopNode + +ActionNodeUsageDeclaration : ActionUsage = + 'action' UsageDeclaration? + +ActionNodePrefix : ActionUsage = + OccurrenceUsagePrefix ActionNodeUsageDeclaration? + +// Clause 8.2.2.17.3 Control Nodes + +ControlNode = + MergeNode | DecisionNode | JoinNode| ForkNode + +ControlNodePrefix : OccurrenceUsage = + RefPrefix + ( isIndividual ?= 'individual' )? + ( portionKind = PortionKind + { isPortion = true } + )? + UsageExtensionKeyword* + +MergeNode = + ControlNodePrefix + isComposite ?= 'merge' UsageDeclaration + ActionBody + +DecisionNode = + ControlNodePrefix + isComposite ?= 'decide' UsageDeclaration + ActionBody + +JoinNode = + ControlNodePrefix + isComposite ?= 'join' UsageDeclaration + ActionBody + +ForkNode = + ControlNodePrefix + isComposite ?= 'fork' UsageDeclaration + ActionBody + +// Clause 8.2.2.17.4 Send and Accept Action Usages + +AcceptNode : AcceptActionUsage = + OccurrenceUsagePrefix + AcceptNodeDeclaration ActionBody + +AcceptNodeDeclaration : AcceptActionUsage = + ActionNodeUsageDeclaration? + 'accept' AcceptParameterPart + +AcceptParameterPart : AcceptActionUsage = + ownedRelationship += PayloadParameterMember + ( 'via' ownedRelationship += NodeParameterMember )? + +PayloadParameterMember : ParameterMembership = + ownedRelatedElement += PayloadParameter + +PayloadParameter : ReferenceUsage = + PayloadFeature + | Identification PayloadFeatureSpecializationPart? + TriggerValuePart + +TriggerValuePart : Feature = + ownedRelationship += TriggerFeatureValue + +TriggerFeatureValue : FeatureValue = + ownedRelatedElement += TriggerExpression + +TriggerExpression : TriggerInvocationExpression = + kind = ( 'at' | 'after' ) + ownedRelationship += ArgumentMember + | kind = 'when' + ownedRelationship += ArgumentExpressionMember + +ArgumentMember : ParameterMembership = + ownedMemberParameter = Argument + +Argument : Feature = + ownedRelationship += ArgumentValue + +ArgumentValue : FeatureValue = + value = OwnedExpression + +ArgumentExpressionMember : ParameterMembership = + ownedRelatedElement += ArgumentExpression + +ArgumentExpression : Feature = + ownedRelationship += ArgumentExpressionValue + +ArgumentExpressionValue : FeatureValue = + ownedRelatedElement += OwnedExpressionReference + +SendNode : SendActionUsage = + OccurrenceUsagePrefix ActionUsageDeclaration? 'send' + ( ownedRelationship += NodeParameterMember SenderReceiverPart? + | ownedRelationship += EmptyParameterMember SenderReceiverPart )? + ActionBody + +SendNodeDeclaration : SendActionUsage = + ActionNodeUsageDeclaration? 'send' + ownedRelationship += NodeParameterMember SenderReceiverPart? + +SenderReceiverPart : SendActionUsage = + 'via' ownedRelationship += NodeParameterMember + ( 'to' ownedRelationship += NodeParameterMember )? + | ownedRelationship += EmptyParameterMember + 'to' ownedRelationship += NodeParameterMember + +NodeParameterMember : ParameterMembership = + ownedRelatedElement += NodeParameter + +NodeParameter : ReferenceUsage = + ownedRelationship += FeatureBinding + +FeatureBinding : FeatureValue = + ownedRelatedElement += OwnedExpression + +EmptyParameterMember : ParameterMembership = + ownedRelatedElement += EmptyUsage + +EmptyUsage : ReferenceUsage = + {} + +// Notes: +// 1. The productions for ArgumentMember, Argument, ArgumentValue, ArgumentExpressionMember, ArgumentExpression and ArgumentExpressionValue are the same as given in [KerML, 8.2.5.8.1]. + +// Clause 8.2.2.17.5 Assignment Action Usages + +AssignmentNode : AssignmentActionUsage = + OccurrenceUsagePrefix + AssignmentNodeDeclaration ActionBody + +AssignmentNodeDeclaration: ActionUsage = + ( ActionNodeUsageDeclaration )? 'assign' + ownedRelationship += AssignmentTargetMember + ownedRelationship += FeatureChainMember ':=' + ownedRelationship += NodeParameterMember + +AssignmentTargetMember : ParameterMembership = + ownedRelatedElement += AssignmentTargetParameter + +AssignmentTargetParameter : ReferenceUsage = + ( ownedRelationship += AssignmentTargetBinding '.' )? + +AssignmentTargetBinding : FeatureValue = + ownedRelatedElement += NonFeatureChainPrimaryExpression + +FeatureChainMember : Membership = + memberElement = [QualifiedName] + | OwnedFeatureChainMember + +OwnedFeatureChainMember : OwningMembership = + ownedRelatedElement += OwnedFeatureChain + +// Clause 8.2.2.17.6 Terminate Action Usages + +TerminateNode : TerminateActionUsage = + OccurrenceUsagePrefix ActionNodeUsageDeclaration? + 'terminate' ( ownedRelationship += NodeParameterMember )? + ActionBody + +// Clause 8.2.2.17.7 Structured Control Action Usages + +IfNode : IfActionUsage = + ActionNodePrefix + 'if' ownedRelationship += ExpressionParameterMember + ownedRelationship += ActionBodyParameterMember + ( 'else' ownedRelationship += + ( ActionBodyParameterMember | IfNodeParameterMember ) )? + +ExpressionParameterMember : ParameterMembership = + ownedRelatedElement += OwnedExpression + +ActionBodyParameterMember : ParameterMembership = + ownedRelatedElement += ActionBodyParameter + +ActionBodyParameter : ActionUsage = + ( 'action' UsageDeclaration? )? + '{' ActionBodyItem* '}' + +IfNodeParameterMember : ParameterMembership = + ownedRelatedElement += IfNode + +WhileLoopNode : WhileLoopActionUsage = + ActionNodePrefix + ( 'while' ownedRelationship += ExpressionParameterMember + | 'loop' ownedRelationship += EmptyParameterMember + ) + ownedRelationship += ActionBodyParameterMember + ( 'until' ownedRelationship += ExpressionParameterMember ';' )? + +ForLoopNode : ForLoopActionUsage = + ActionNodePrefix + 'for' ownedRelationship += ForVariableDeclarationMember + 'in' ownedRelationship += NodeParameterMember + ownedRelationship += ActionBodyParameterMember + +ForVariableDeclarationMember : FeatureMembership = + ownedRelatedElement += UsageDeclaration + +ForVariableDeclaration : ReferenceUsage = + UsageDeclaration + +// Clause 8.2.2.17.8 Action Successions + +ActionTargetSuccession : Usage = + ( TargetSuccession | GuardedTargetSuccession | DefaultTargetSuccession ) + UsageBody + +TargetSuccession : SuccessionAsUsage = + ownedRelationship += SourceEndMember + 'then' ownedRelationship += ConnectorEndMember + +GuardedTargetSuccession : TransitionUsage = + ownedRelationship += GuardExpressionMember + 'then' ownedRelationship += TransitionSuccessionMember + +DefaultTargetSuccession : TransitionUsage = + 'else' ownedRelationship += TransitionSuccessionMember + +GuardedSuccession : TransitionUsage = + ( 'succession' UsageDeclaration )? + 'first' ownedRelationship += FeatureChainMember + ownedRelationship += GuardExpressionMember + 'then' ownedRelationship += TransitionSuccessionMember + UsageBody + +// Clause 8.2.2.18 States Textual Notation + +// Clause 8.2.2.18.1 State Definitions + +StateDefinition = + OccurrenceDefinitionPrefix 'state' 'def' + DefinitionDeclaration StateDefBody + +StateDefBody : StateDefinition = + ';' + | ( isParallel ?= 'parallel' )? + '{' StateBodyItem* '}' + +StateBodyItem : Type = + NonBehaviorBodyItem + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += BehaviorUsageMember + ( ownedRelationship += TargetTransitionUsageMember )* + | ownedRelationship += TransitionUsageMember + | ownedRelationship += EntryActionMember + ( ownedRelationship += EntryTransitionMember )* + | ownedRelationship += DoActionMember + | ownedRelationship += ExitActionMember + +EntryActionMember : StateSubactionMembership = + MemberPrefix kind = 'entry' + ownedRelatedElement += StateActionUsage + +DoActionMember : StateSubactionMembership = + MemberPrefix kind = 'do' + ownedRelatedElement += StateActionUsage + +ExitActionMember : StateSubactionMembership = + MemberPrefix kind = 'exit' + ownedRelatedElement += StateActionUsage + +EntryTransitionMember : FeatureMembership = + MemberPrefix + ( ownedRelatedElement += GuardedTargetSuccession + | 'then' ownedRelatedElement += TargetSuccession + ) ';' + +StateActionUsage : ActionUsage = + EmptyActionUsage ';' + | StatePerformActionUsage + | StateAcceptActionUsage + | StateSendActionUsage + | StateAssignmentActionUsage + +EmptyActionUsage : ActionUsage = + {} + +StatePerformActionUsage : PerformActionUsage = + PerformActionUsageDeclaration ActionBody + +StateAcceptActionUsage : AcceptActionUsage = + AcceptNodeDeclaration ActionBody + +StateSendActionUsage : SendActionUsage = + SendNodeDeclaration ActionBody + +StateAssignmentActionUsage : AssignmentActionUsage = + AssignmentNodeDeclaration ActionBody + +TransitionUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += TransitionUsage + +TargetTransitionUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += TargetTransitionUsage + +// Clause 8.2.2.18.2 State Usages + +StateUsage = + OccurrenceUsagePrefix 'state' + ActionUsageDeclaration StateUsageBody + +StateUsageBody : StateUsage = + ';' + | ( isParallel ?= 'parallel' )? + '{' StateBodyItem* '}' + +ExhibitStateUsage = + OccurrenceUsagePrefix 'exhibit' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'state' UsageDeclaration ) + ValuePart? StateUsageBody + +// Clause 8.2.2.18.3 Transition Usages + +TransitionUsage = + 'transition' ( UsageDeclaration 'first' )? + ownedRelationship += FeatureChainMember + ownedRelationship += EmptyParameterMember + ( ownedRelationship += EmptyParameterMember + ownedRelationship += TriggerActionMember )? + ( ownedRelationship += GuardExpressionMember )? + ( ownedRelationship += EffectBehaviorMember )? + 'then' ownedRelationship += TransitionSuccessionMember + ActionBody + +TargetTransitionUsage : TransitionUsage = + ownedRelationship += EmptyParameterMember + ( 'transition' + ( ownedRelationship += EmptyParameterMember + ownedRelationship += TriggerActionMember )? + ( ownedRelationship += GuardExpressionMember )? + ( ownedRelationship += EffectBehaviorMember )? + | ownedRelationship += EmptyParameterMember + ownedRelationship += TriggerActionMember + ( ownedRelationship += GuardExpressionMember )? + ( ownedRelationship += EffectBehaviorMember )? + | ownedRelationship += GuardExpressionMember + ( ownedRelationship += EffectBehaviorMember )? + )? + 'then' ownedRelationship += TransitionSuccessionMember + ActionBody + +TriggerActionMember : TransitionFeatureMembership = + 'accept' { kind = 'trigger' } ownedRelatedElement += TriggerAction + +TriggerAction : AcceptActionUsage = + AcceptParameterPart + +GuardExpressionMember : TransitionFeatureMembership = + 'if' { kind = 'guard' } ownedRelatedElement += OwnedExpression + +EffectBehaviorMember : TransitionFeatureMembership = + 'do' { kind = 'effect' } ownedRelatedElement += EffectBehaviorUsage + +EffectBehaviorUsage : ActionUsage = + EmptyActionUsage + | TransitionPerformActionUsage + | TransitionAcceptActionUsage + | TransitionSendActionUsage + | TransitionAssignmentActionUsage + +TransitionPerformActionUsage : PerformActionUsage = + PerformActionUsageDeclaration ( '{' ActionBodyItem* '}' )? + +TransitionAcceptActionUsage : AcceptActionUsage = + AcceptNodeDeclaration ( '{' ActionBodyItem* '}' )? + +TransitionSendActionUsage : SendActionUsage = + SendNodeDeclaration ( '{' ActionBodyItem* '}' )? + +TransitionAssignmentActionUsage : AssignmentActionUsage = + AssignmentNodeDeclaration ( '{' ActionBodyItem* '}' )? + +TransitionSuccessionMember : OwningMembership = + ownedRelatedElement += TransitionSuccession + +TransitionSuccession : Succession = + ownedRelationship += EmptyEndMember + ownedRelationship += ConnectorEndMember + +EmptyEndMember : EndFeatureMembership = + ownedRelatedElement += EmptyFeature + +EmptyFeature : ReferenceUsage = + {} + +// Clause 8.2.2.19 Calculations Textual Notation + +CalculationDefinition = + OccurrenceDefinitionPrefix 'calc' 'def' + DefinitionDeclaration CalculationBody + +CalculationUsage : CalculationUsage = + OccurrenceUsagePrefix 'calc' + ActionUsageDeclaration CalculationBody + +CalculationBody : Type = + ';' | '{' CalculationBodyPart '}' + +CalculationBodyPart : Type = + CalculationBodyItem* + ( ownedRelationship += ResultExpressionMember )? + +CalculationBodyItem : Type = + ActionBodyItem + | ownedRelationship += ReturnParameterMember + +ReturnParameterMember : ReturnParameterMembership = + MemberPrefix? 'return' ownedRelatedElement += UsageElement + +ResultExpressionMember : ResultExpressionMembership = + MemberPrefix? ownedRelatedElement += OwnedExpression + +// Clause 8.2.2.20 Constraints Textual Notation + +ConstraintDefinition = + OccurrenceDefinitionPrefix 'constraint' 'def' + DefinitionDeclaration CalculationBody + +ConstraintUsage = + OccurrenceUsagePrefix 'constraint' + ConstraintUsageDeclaration CalculationBody + +AssertConstraintUsage = + OccurrenceUsagePrefix 'assert' ( isNegated ?= 'not' )? + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'constraint' ConstraintUsageDeclaration ) + CalculationBody + +ConstraintUsageDeclaration : ConstraintUsage = + UsageDeclaration ValuePart? + +// Clause 8.2.2.21 Requirements Textual Notation + +// Clause 8.2.2.21.1 Requirement Definitions + +RequirementDefinition = + OccurrenceDefinitionPrefix 'requirement' 'def' + DefinitionDeclaration RequirementBody + +RequirementBody : Type = + ';' | '{' RequirementBodyItem* '}' + +RequirementBodyItem : Type = + DefinitionBodyItem + | ownedRelationship += SubjectMember + | ownedRelationship += RequirementConstraintMember + | ownedRelationship += FramedConcernMember + | ownedRelationship += RequirementVerificationMember + | ownedRelationship += ActorMember + | ownedRelationship += StakeholderMember + +SubjectMember : SubjectMembership = + MemberPrefix ownedRelatedElement += SubjectUsage + +SubjectUsage : ReferenceUsage = + 'subject' UsageExtensionKeyword* Usage + +RequirementConstraintMember : RequirementConstraintMembership = + MemberPrefix? RequirementKind + ownedRelatedElement += RequirementConstraintUsage + +RequirementKind : RequirementConstraintMembership = + 'assume' { kind = 'assumption' } + | 'require' { kind = 'requirement' } + +RequirementConstraintUsage : ConstraintUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? RequirementBody + | ( UsageExtensionKeyword* 'constraint' + | UsageExtensionKeyword+ ) + ConstraintUsageDeclaration CalculationBody + +FramedConcernMember : FramedConcernMembership = + MemberPrefix? 'frame' + ownedRelatedElement += FramedConcernUsage + +FramedConcernUsage : ConcernUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? CalculationBody + | ( UsageExtensionKeyword* 'concern' + | UsageExtensionKeyword+ ) + CalculationUsageDeclaration CalculationBody + +ActorMember : ActorMembership = + MemberPrefix ownedRelatedElement += ActorUsage + +ActorUsage : PartUsage = + 'actor' UsageExtensionKeyword* Usage + +StakeholderMember : StakeholderMembership = + MemberPrefix ownedRelatedElement += StakeholderUsage + +StakeholderUsage : PartUsage = + 'stakeholder' UsageExtensionKeyword* Usage + +// Clause 8.2.2.21.2 Requirement Usages + +RequirementUsage = + OccurrenceUsagePrefix 'requirement' + ConstraintUsageDeclaration RequirementBody + +SatisfyRequirementUsage = + OccurrenceUsagePrefix 'assert' ( isNegated ?= 'not' ) 'satisfy' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'requirement' UsageDeclaration ) + ValuePart? + ( 'by' ownedRelationship += SatisfactionSubjectMember )? + RequirementBody + +SatisfactionSubjectMember : SubjectMembership = + ownedRelatedElement += SatisfactionParameter + +SatisfactionParameter : ReferenceUsage = + ownedRelationship += SatisfactionFeatureValue + +SatisfactionFeatureValue : FeatureValue = + ownedRelatedElement += SatisfactionReferenceExpression + +SatisfactionReferenceExpression : FeatureReferenceExpression = + ownedRelationship += FeatureChainMember + +// Clause 8.2.2.21.3 Concerns + +ConcernDefinition = + OccurrenceDefinitionPrefix 'concern' 'def' + DefinitionDeclaration RequirementBody + +ConcernUsage = + OccurrenceUsagePrefix 'concern' + ConstraintUsageDeclaration RequirementBody + +// Clause 8.2.2.22 Cases Textual Notation + +CaseDefinition = + OccurrenceDefinitionPrefix 'case' 'def' + DefinitionDeclaration CaseBody + +CaseUsage = + OccurrenceUsagePrefix 'case' + ConstraintUsageDeclaration CaseBody + +CaseBody : Type = + ';' + | '{' CaseBodyItem* + ( ownedRelationship += ResultExpressionMember )? + '}' + +CaseBodyItem : Type = + ActionBodyItem + | ownedRelationship += SubjectMember + | ownedRelationship += ActorMember + | ownedRelationship += ObjectiveMember + +ObjectiveMember : ObjectiveMembership = + MemberPrefix 'objective' + ownedRelatedElement += ObjectiveRequirementUsage + +ObjectiveRequirementUsage : RequirementUsage = + UsageExtensionKeyword* ConstraintUsageDeclaration + RequirementBody + +// Clause 8.2.2.23 Analysis Cases Textual Notation + +AnalysisCaseDefinition = + OccurrenceDefinitionPrefix 'analysis' 'def' + DefinitionDeclaration CaseBody + +AnalysisCaseUsage = + OccurrenceUsagePrefix 'analysis' + ConstraintUsageDeclaration CaseBody + +// Clause 8.2.2.24 Verification Cases Textual Notation + +VerificationCaseDefinition = + OccurrenceDefinitionPrefix 'verification' 'def' + DefinitionDeclaration CaseBody + +VerificationCaseUsage = + OccurrenceUsagePrefix 'verification' + ConstraintUsageDeclaration CaseBody + +RequirementVerificationMember : RequirementVerificationMembership = + MemberPrefix 'verify' { kind = 'requirement' } + ownedRelatedElement += RequirementVerificationUsage + +RequirementVerificationUsage : RequirementUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecialization* RequirementBody + | ( UsageExtensionKeyword* 'requirement' + | UsageExtensionKeyword+ ) + ConstraintUsageDeclaration RequirementBody + +// Clause 8.2.2.25 Use Cases Textual Notation + +UseCaseDefinition = + OccurrenceDefinitionPrefix 'use' 'case' 'def' + DefinitionDeclaration CaseBody + +UseCaseUsage = + OccurrenceUsagePrefix 'use' 'case' + ConstraintUsageDeclaration CaseBody + +IncludeUseCaseUsage = + OccurrenceUsagePrefix 'include' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'use' 'case' UsageDeclaration ) + ValuePart? + CaseBody + +// Clause 8.2.2.26 Views and Viewpoints Textual Notation + +// Clause 8.2.2.26.1 View Definitions + +ViewDefinition = + OccurrenceDefinitionPrefix 'view' 'def' + DefinitionDeclaration ViewDefinitionBody + +ViewDefinitionBody : ViewDefinition = + ';' | '{' ViewDefinitionBodyItem* '}' + +ViewDefinitionBodyItem : ViewDefinition = + DefinitionBodyItem + | ownedRelationship += ElementFilterMember + | ownedRelationship += ViewRenderingMember + +ViewRenderingMember : ViewRenderingMembership = + MemberPrefix 'render' + ownedRelatedElement += ViewRenderingUsage + +ViewRenderingUsage : RenderingUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + UsageBody + | ( UsageExtensionKeyword* 'rendering' + | UsageExtensionKeyword+ ) + Usage + +// Clause 8.2.2.26.2 View Usages + +ViewUsage = + OccurrenceUsagePrefix 'view' + UsageDeclaration? ValuePart? + ViewBody + +ViewBody : ViewUsage = + ';' | '{' ViewBodyItem* '}' + +ViewBodyItem : ViewUsage = + DefinitionBodyItem + | ownedRelationship += ElementFilterMember + | ownedRelationship += ViewRenderingMember + | ownedRelationship += Expose + +Expose = + 'expose' ( MembershipExpose | NamespaceExpose ) + RelationshipBody + +MembershipExpose = + MembershipImport + +NamespaceExpose = + NamespaceImport + +// Clause 8.2.2.26.3 Viewpoints + +ViewpointDefinition = + OccurrenceDefinitionPrefix 'viewpoint' 'def' + DefinitionDeclaration RequirementBody + +ViewpointUsage = + OccurrenceUsagePrefix 'viewpoint' + ConstraintUsageDeclaration RequirementBody + +// Clause 8.2.2.26.4 Renderings + +RenderingDefinition = + OccurrenceDefinitionPrefix 'rendering' 'def' + Definition + +RenderingUsage = + OccurrenceUsagePrefix 'rendering' + Usage + +// Clause 8.2.2.27 Metadata Textual Notation + +MetadataDefinition = + ( isAbstract ?= 'abstract')? DefinitionExtensionKeyword* + 'metadata' 'def' Definition + +PrefixMetadataAnnotation : Annotation = + '#' annotatingElement = PrefixMetadataUsage + { ownedRelatedElement += annotatingElement } + +PrefixMetadataMember : OwningMembership = + '#' ownedRelatedElement = PrefixMetadataUsage + +PrefixMetadataUsage : MetadataUsage = + ownedRelationship += OwnedFeatureTyping + +MetadataUsage = + UsageExtensionKeyword* ( '@' | 'metadata' ) + MetadataUsageDeclaration + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + MetadataBody + +MetadataUsageDeclaration : MetadataUsage = + ( Identification ( ':' | 'typed' 'by' ) )? + ownedRelationship += OwnedFeatureTyping + +MetadataBody : Type = + ';' | + '{' ( ownedRelationship += DefinitionMember + | ownedRelationship += MetadataBodyUsageMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + )* + '}' + +MetadataBodyUsageMember : FeatureMembership = + ownedMemberFeature = MetadataBodyUsage + +MetadataBodyUsage : ReferenceUsage = + 'ref'? ( ':>>' | 'redefines' )? ownedRelationship += OwnedRedefinition + FeatureSpecializationPart? ValuePart? + MetadataBody + +ExtendedDefinition : Definition = + BasicDefinitionPrefix? DefinitionExtensionKeyword+ + 'def' Definition + +ExtendedUsage : Usage = + UnextendedUsagePrefix UsageExtensionKeyword+ + Usage + +// End of BNF + + diff --git a/Resources/kebnf.g4 b/Resources/kebnf.g4 new file mode 100644 index 000000000..d059914a1 --- /dev/null +++ b/Resources/kebnf.g4 @@ -0,0 +1,104 @@ +// Grammar + +grammar kebnf; + +specification : (NL)* rule_definition+ EOF ; + +rule_definition + : name=UPPER_ID (params=parameter_list)? (COLON target_ast=UPPER_ID)? ASSIGN rule_body=alternatives SEMICOLON? NL+ + ; + +parameter_list + : LPAREN param_name=ID COLON param_type=ID RPAREN + ; + +alternatives + : alternative (PIPE alternative)* + ; + +alternative + : element* + ; + +element + : assignment + | non_parsing_assignment + | non_parsing_empty + | cross_reference + | group + | terminal + | non_terminal + | value_literal + ; + +assignment + : property=dotted_id op=(ASSIGN | ADD_ASSIGN | BOOL_ASSIGN) (prefix=TILDE)?content=element_core (suffix=suffix_op)? + ; + +non_parsing_assignment + : LBRACE property=dotted_id op=(ASSIGN | ADD_ASSIGN) val=value_literal RBRACE + ; + +non_parsing_empty + : LBRACE RBRACE + ; + +cross_reference + : TILDE? LBRACK ref=ID RBRACK + ; + +group + : LPAREN alternatives RPAREN (suffix=suffix_op)? + ; + +terminal + : val=SINGLE_QUOTED_STRING (suffix=suffix_op)? + ; + +non_terminal + : name=UPPER_ID (suffix=suffix_op)? + ; + +element_core + : cross_reference + | group + | terminal + | non_terminal + | value_literal + ; + +dotted_id + : ID (DOT ID)* + ; + +suffix_op : '*' | '+' | '?' ; + +value_literal : ID | INT | STRING | '[QualifiedName]' | SINGLE_QUOTED_STRING; + +// Lexer +ASSIGN : '::=' | '=' ; +ADD_ASSIGN : '+=' ; +BOOL_ASSIGN : '?=' ; +PIPE : '|' ; +COLON : ':' ; +SEMICOLON : ';' ; +COMMA : ',' ; +LPAREN : '(' ; +RPAREN : ')' ; +LBRACK : '[' ; +RBRACK : ']' ; +LBRACE : '{' ; +RBRACE : '}' ; +DOT : '.' ; +TILDE : '~' ; + +UPPER_ID : [A-Z] [a-zA-Z0-9_]* ; +ID : [a-zA-Z_][a-zA-Z0-9_]* ; +SINGLE_QUOTED_STRING : '\'' (~['\\] | '\\' .)* '\'' ; +INT : [0-9]+ ; +STRING : '\'' ( ~['\\] | '\\' . )* '\'' ; + +COMMENT : '//' ~[\r\n]* -> skip ; +WS : [ \t]+ -> skip ; +CONTINUATION : '\r'? '\n' [ \t]+ -> skip ; +NL : '\r'? '\n' ; \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGeneratorTestFixture.cs new file mode 100644 index 000000000..373705c59 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGeneratorTestFixture.cs @@ -0,0 +1,71 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Tests.Generators.UmlHandleBarsGenerators +{ + using System.IO; + using System.Linq; + using System.Threading.Tasks; + + using NUnit.Framework; + + using SysML2.NET.CodeGenerator.Generators.UmlHandleBarsGenerators; + using SysML2.NET.CodeGenerator.Grammar; + using SysML2.NET.CodeGenerator.Grammar.Model; + + [TestFixture] + public class UmlCoreTextualNotationBuilderGeneratorTestFixture + { + private DirectoryInfo umlPocoDirectoryInfo; + private UmlCoreTextualNotationBuilderGenerator umlCoreTextualNotationBuilderGenerator; + private TextualNotationSpecification textualNotationSpecification; + + [OneTimeSetUp] + public void OneTimeSetup() + { + var directoryInfo = new DirectoryInfo(TestContext.CurrentContext.TestDirectory); + + var path = Path.Combine("UML", "_SysML2.NET.Core.UmlCoreTextualNotationBuilderGenerator"); + + this.umlPocoDirectoryInfo = directoryInfo.CreateSubdirectory(path); + this.umlCoreTextualNotationBuilderGenerator = new UmlCoreTextualNotationBuilderGenerator(); + + var textualRulesFolder = Path.Combine(TestContext.CurrentContext.TestDirectory, "datamodel"); + var kermlRules = GrammarLoader.LoadTextualNotationSpecification(Path.Combine(textualRulesFolder, "KerML-textual-bnf.kebnf")); + var sysmlRules = GrammarLoader.LoadTextualNotationSpecification(Path.Combine(textualRulesFolder, "SysML-textual-bnf.kebnf")); + + var combinesRules = new TextualNotationSpecification(); + combinesRules.Rules.AddRange(sysmlRules.Rules); + + foreach (var rule in kermlRules.Rules.Where(rule => combinesRules.Rules.All(r => r.RuleName != rule.RuleName))) + { + combinesRules.Rules.Add(rule); + } + + this.textualNotationSpecification = combinesRules; + } + + [Test] + public async Task VerifyCanGenerateTextualNotation() + { + await Assert.ThatAsync(() => this.umlCoreTextualNotationBuilderGenerator.GenerateAsync(GeneratorSetupFixture.XmiReaderResult, this.textualNotationSpecification, this.umlPocoDirectoryInfo), Throws.Nothing); + } + } +} diff --git a/SysML2.NET.CodeGenerator.Tests/Grammar/TextualNotationSpecificationVisitorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Grammar/TextualNotationSpecificationVisitorTestFixture.cs new file mode 100644 index 000000000..7990d4cc7 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Grammar/TextualNotationSpecificationVisitorTestFixture.cs @@ -0,0 +1,64 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Tests.Grammar +{ + using System; + using System.IO; + using System.Linq; + + using Antlr4.Runtime; + + using NUnit.Framework; + + using SysML2.NET.CodeGenerator.Grammar; + using SysML2.NET.CodeGenerator.Grammar.Model; + + [TestFixture] + public class TextualNotationSpecificationVisitorTestFixture + { + [Test] + [TestCase("KerML-textual-bnf.kebnf")] + [TestCase("SysML-textual-bnf.kebnf")] + public void VerifyCanParseGrammar(string modelName) + { + var filePath = Path.Combine(TestContext.CurrentContext.TestDirectory, "datamodel",modelName ); + + var stream = CharStreams.fromPath(filePath); + var lexer = new kebnfLexer(stream); + var tokens = new CommonTokenStream(lexer); + var parser = new kebnfParser(tokens); + + var tree = parser.specification(); + var explorer = new TextualNotationSpecificationVisitor(); + var result = (TextualNotationSpecification)explorer.Visit(tree); + var rules = result.Rules; + + using (Assert.EnterMultipleScope()) + { + Assert.That(rules, Is.Not.Null); + Assert.That(rules, Is.Not.Empty); + Assert.That(rules.DistinctBy(x => x.RuleName), Is.EquivalentTo(rules)); + } + + Console.WriteLine($"Found {rules.Count} rules"); + } + } +} diff --git a/SysML2.NET.CodeGenerator/Extensions/ClassExtensions.cs b/SysML2.NET.CodeGenerator/Extensions/ClassExtensions.cs index a59fea305..3eadb42bf 100644 --- a/SysML2.NET.CodeGenerator/Extensions/ClassExtensions.cs +++ b/SysML2.NET.CodeGenerator/Extensions/ClassExtensions.cs @@ -20,18 +20,15 @@ namespace SysML2.NET.CodeGenerator.Extensions { - using System; - using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using uml4net.Classification; using uml4net.Extensions; - using uml4net.Packages; using uml4net.StructuredClassifiers; /// - /// Extension methods for interface + /// Extension methods for interface /// public static class ClassExtensions { @@ -40,10 +37,10 @@ public static class ClassExtensions /// or interface implementations EXCLUDING IsDerived /// /// - /// The from which to query the properties + /// The from which to query the properties /// /// - /// A of + /// A of /// public static ReadOnlyCollection QueryAllNonDerivedProperties(this IClass @class) { @@ -59,10 +56,10 @@ public static ReadOnlyCollection QueryAllNonDerivedProperties(this IC /// redefined in the context of the current class /// /// - /// The from which to query the properties + /// The from which to query the properties /// /// - /// A of + /// A of /// public static ReadOnlyCollection QueryAllNonDerivedNonRedefinedProperties(this IClass @class) { @@ -78,7 +75,7 @@ public static ReadOnlyCollection QueryAllNonDerivedNonRedefinedProper /// Counts and returns to amount of non derived properties /// /// - /// The subject + /// The subject /// /// /// the amount of non derived properties @@ -92,7 +89,7 @@ public static int CountAllNonDerivedProperties(this IClass @class) /// Counts and returns to amount of non derived properties /// /// - /// The subject + /// The subject /// /// /// the amount of non derived properties @@ -103,20 +100,36 @@ public static int CountAllNonDerivedNonRedefinedProperties(this IClass @class) } /// - /// Query the name of the internal interface to implement for an + /// Query the name of the internal interface to implement for an /// - /// The + /// The /// The name of the internal interface to implement, if any public static string QueryInternalInterfaceName(this IClass umlClass) { var classifiers = umlClass.QueryAllGeneralClassifiers(); - + if (classifiers.Any(x => x.Name == "Relationship")) { return "IContainedRelationship"; } - + return classifiers.Any(x => x.Name == "Element") ? "IContainedElement" : string.Empty; } + + /// + /// Asserts that an is a subclass of another + /// + /// The to check + /// + /// The that is potentially a super class of + /// + /// + /// + /// True if the is a super class of the + /// + public static bool QueryIsSubclassOf(this IClass umlClass, IClass potentialSuperClass) + { + return umlClass.QueryAllGeneralClassifiers().Contains(potentialSuperClass); + } } } diff --git a/SysML2.NET.CodeGenerator/Extensions/NamedElementExtensions.cs b/SysML2.NET.CodeGenerator/Extensions/NamedElementExtensions.cs index 402bc3454..9bea96a6c 100644 --- a/SysML2.NET.CodeGenerator/Extensions/NamedElementExtensions.cs +++ b/SysML2.NET.CodeGenerator/Extensions/NamedElementExtensions.cs @@ -20,9 +20,11 @@ namespace SysML2.NET.CodeGenerator.Extensions { + using System; using System.Linq; using uml4net.CommonStructure; + using uml4net.SimpleClassifiers; /// /// Extension class for @@ -40,5 +42,36 @@ public static string QueryNamespace(this INamedElement namedElement) var namespaces = qualifiedNameSpaces.Skip(1).Take(qualifiedNameSpaces.Length - 2); return string.Join('.', namespaces); } + + /// + /// Query the fully qualified type name (Namespace + Type name). + /// + /// The specific that should have the fully qualified type name computed + /// A specific namespace part (POCO/DTO distinction) + /// Asserts if the type should be the interface name or not + /// The fully qualified type name + public static string QueryFullyQualifiedTypeName(this INamedElement namedElement, string namespacePart = "POCO", bool targetInterface = true) + { + ArgumentNullException.ThrowIfNull(namedElement); + ArgumentException.ThrowIfNullOrWhiteSpace(namespacePart); + + var typeName = "SysML2.NET.Core."; + + if (namedElement is not IEnumeration) + { + typeName += $"{namespacePart}."; + } + + typeName += namedElement.QueryNamespace(); + typeName += "."; + + if (namedElement is not IEnumeration && targetInterface) + { + typeName += "I"; + } + + typeName += namedElement.Name; + return typeName; + } } } diff --git a/SysML2.NET.CodeGenerator/Extensions/PropertyExtension.cs b/SysML2.NET.CodeGenerator/Extensions/PropertyExtension.cs index e90320150..c56b1937d 100644 --- a/SysML2.NET.CodeGenerator/Extensions/PropertyExtension.cs +++ b/SysML2.NET.CodeGenerator/Extensions/PropertyExtension.cs @@ -92,5 +92,49 @@ public static bool QueryPropertyIsPartOfNonDerivedCompositeAggregation(this IPro return property.Opposite is { IsComposite: true, IsDerived: false }; } + + /// + /// Queries the content of a IF statement for non-empty values + /// + /// The property that have to be used to produce the content + /// The name of the name + /// The If Statement content + public static string QueryIfStatementContentForNonEmpty(this IProperty property, string variableName) + { + var propertyName = property.QueryPropertyNameBasedOnUmlProperties(); + + if (property.QueryIsEnumerable()) + { + return $"{variableName}.MoveNext()"; + } + + if (property.QueryIsReferenceProperty()) + { + return $"{variableName}.{propertyName} != null"; + } + + if (property.QueryIsNullableAndNotString()) + { + return $"{variableName}.{propertyName}.HasValue"; + } + + if (property.QueryIsString()) + { + return $"!string.IsNullOrWhiteSpace({variableName}.{propertyName})"; + } + + if (property.QueryIsBool()) + { + return $"{variableName}.{propertyName}"; + } + + if (property.QueryIsEnum()) + { + var defaultValue = property.QueryIsEnumPropertyWithDefaultValue() ? $"{property.Type.QueryFullyQualifiedTypeName()}.{property.QueryDefaultValueAsString().CapitalizeFirstLetter()}" : ((IEnumeration)property.Type).OwnedLiteral[0].Name; + return $"{variableName}.{propertyName} != {defaultValue}"; + } + + return "THIS WILL PRODUCE COMPILE ERROR"; + } } } diff --git a/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs b/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs new file mode 100644 index 000000000..9b45ddb9b --- /dev/null +++ b/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs @@ -0,0 +1,224 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Generators.UmlHandleBarsGenerators +{ + using System; + using System.IO; + using System.Linq; + using System.Threading.Tasks; + + using SysML2.NET.CodeGenerator.Extensions; + using SysML2.NET.CodeGenerator.Grammar.Model; + using SysML2.NET.CodeGenerator.HandleBarHelpers; + + using uml4net.CommonStructure; + using uml4net.Extensions; + using uml4net.HandleBars; + using uml4net.StructuredClassifiers; + using uml4net.xmi.Readers; + + using NamedElementHelper = SysML2.NET.CodeGenerator.HandleBarHelpers.NamedElementHelper; + + /// + /// An to generate Textual Notation Builder + /// + public class UmlCoreTextualNotationBuilderGenerator: UmlHandleBarsGenerator + { + /// + /// Gets the name of template for builder classes + /// + private const string BuilderTemplateName = "core-textual-notation-builder-template"; + + /// + /// Gets the name of template for builder facade class + /// + private const string BuilderFacadeTemplateName = "core-textual-notation-builder-facade-template"; + + /// + /// Register the custom helpers + /// + protected override void RegisterHelpers() + { + NamedElementHelper.RegisterNamedElementHelper(this.Handlebars); + this.Handlebars.RegisterStringHelper(); + this.Handlebars.RegisterRulesHelper(); + } + + /// + /// Register the code templates + /// + protected override void RegisterTemplates() + { + this.RegisterTemplate(BuilderTemplateName); + this.RegisterTemplate(BuilderFacadeTemplateName); + } + + /// + /// Generates code specific to the concrete implementation + /// + /// + /// the that contains the UML model to generate from + /// + /// + /// The target + /// + /// This method cannot be used since it requires to have . Uses + /// + /// an awaitable + /// + public override Task GenerateAsync(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory) + { + throw new NotSupportedException("The generator needs TextualNotationSpecification access"); + } + + /// + /// Generates code specific to the concrete implementation + /// + /// + /// the that contains the UML model to generate from + /// + /// The that contains specific grammar rules to produce textual notation + /// + /// The target + /// + /// + /// an awaitable + /// + public async Task GenerateAsync(XmiReaderResult xmiReaderResult, TextualNotationSpecification textualNotationSpecification, DirectoryInfo outputDirectory) + { + await this.GenerateBuilderClasses(xmiReaderResult, textualNotationSpecification, outputDirectory); + // await this.GenerateBuilderFacade(xmiReaderResult, outputDirectory); + } + + /// + /// Generates Textual Notation builder classes for each targeted by a rule + /// + /// + /// the that contains the UML model to generate from + /// + /// The that contains specific grammar rules to produce textual notation + /// + /// The target + /// + /// If one of the given parameters is null + /// + /// an awaitable + /// + private Task GenerateBuilderClasses(XmiReaderResult xmiReaderResult, TextualNotationSpecification textualNotationSpecification, DirectoryInfo outputDirectory) + { + ArgumentNullException.ThrowIfNull(xmiReaderResult); + ArgumentNullException.ThrowIfNull(textualNotationSpecification); + ArgumentNullException.ThrowIfNull(outputDirectory); + + return this.GenerateBuilderClassesInternal(xmiReaderResult, textualNotationSpecification, outputDirectory); + } + + /// + /// Generates Textual Notation builder classes for each targeted by a rule + /// + /// + /// the that contains the UML model to generate from + /// + /// The that contains specific grammar rules to produce textual notation + /// + /// The target + /// + /// + /// an awaitable + /// + private async Task GenerateBuilderClassesInternal(XmiReaderResult xmiReaderResult, TextualNotationSpecification textualNotationSpecification, DirectoryInfo outputDirectory) + { + var template = this.Templates[BuilderTemplateName]; + + var namedElements = xmiReaderResult.QueryContainedAndImported("SysML") + .SelectMany(x => x.PackagedElement.OfType()) + .ToList(); + + var rulesGroupedByType = textualNotationSpecification.Rules + .Where(x => !string.IsNullOrWhiteSpace(x.TargetElementName) && namedElements.Any(n => n.Name == x.TargetElementName)) + .GroupBy(x => x.TargetElementName).ToDictionary(x => x.Key, x => x.ToList()); + + foreach (var nonTargetingRule in textualNotationSpecification.Rules.Where(x => string.IsNullOrWhiteSpace(x.TargetElementName))) + { + var matchingClass = namedElements.SingleOrDefault(x => x.Name == nonTargetingRule.RuleName); + + if (matchingClass != null) + { + if (rulesGroupedByType.TryGetValue(matchingClass.Name, out var existingRules)) + { + existingRules.Add(nonTargetingRule); + } + else + { + rulesGroupedByType[matchingClass.Name] = [nonTargetingRule]; + } + } + } + + foreach (var rulesPerType in rulesGroupedByType) + { + var targetClassContext = namedElements.Single(x => x.Name == rulesPerType.Key); + + var generatedBuilder = template(new {Context = targetClassContext, Rules = rulesPerType.Value, AllRules = textualNotationSpecification.Rules}); + generatedBuilder = this.CodeCleanup(generatedBuilder); + + var fileName = $"{targetClassContext.Name.CapitalizeFirstLetter()}TextualNotationBuilder.cs"; + + await WriteAsync(generatedBuilder, outputDirectory, fileName); + } + } + + /// + /// Generates the Textual Notation builder facade + /// + /// the that contains the UML model to generate from + /// The target + /// If one of the given parameters is null + /// an awaitable + private Task GenerateBuilderFacade(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory) + { + ArgumentNullException.ThrowIfNull(xmiReaderResult); + ArgumentNullException.ThrowIfNull(outputDirectory); + return this.GenerateBuilderFacadeInternal(xmiReaderResult, outputDirectory); + } + + /// + /// Generates the Textual Notation builder facade + /// + /// the that contains the UML model to generate from + /// The target + /// an awaitable + private async Task GenerateBuilderFacadeInternal(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory) + { + var template = this.Templates[BuilderFacadeTemplateName]; + + var classes = xmiReaderResult.QueryContainedAndImported("SysML") + .SelectMany(x => x.PackagedElement.OfType()) + .Where(x => !x.IsAbstract) + .ToList(); + + var generatedFacade = template(classes); + generatedFacade = this.CodeCleanup(generatedFacade); + + await WriteAsync(generatedFacade, outputDirectory, "TextualNotationBuilderFacade.cs"); + } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp new file mode 100644 index 000000000..1291cb779 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp @@ -0,0 +1,84 @@ +token literal names: +null +'*' +'+' +'?' +'[QualifiedName]' +null +'+=' +'?=' +'|' +':' +';' +',' +'(' +')' +'[' +']' +'{' +'}' +'.' +'~' +null +null +null +null +null +null +null +null +null + +token symbolic names: +null +null +null +null +null +ASSIGN +ADD_ASSIGN +BOOL_ASSIGN +PIPE +COLON +SEMICOLON +COMMA +LPAREN +RPAREN +LBRACK +RBRACK +LBRACE +RBRACE +DOT +TILDE +UPPER_ID +ID +SINGLE_QUOTED_STRING +INT +STRING +COMMENT +WS +CONTINUATION +NL + +rule names: +specification +rule_definition +parameter_list +alternatives +alternative +element +assignment +non_parsing_assignment +non_parsing_empty +cross_reference +group +terminal +non_terminal +element_core +dotted_id +suffix_op +value_literal + + +atn: +[4, 1, 28, 154, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 1, 0, 5, 0, 36, 8, 0, 10, 0, 12, 0, 39, 9, 0, 1, 0, 4, 0, 42, 8, 0, 11, 0, 12, 0, 43, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 50, 8, 1, 1, 1, 1, 1, 3, 1, 54, 8, 1, 1, 1, 1, 1, 1, 1, 3, 1, 59, 8, 1, 1, 1, 4, 1, 62, 8, 1, 11, 1, 12, 1, 63, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 5, 3, 75, 8, 3, 10, 3, 12, 3, 78, 9, 3, 1, 4, 5, 4, 81, 8, 4, 10, 4, 12, 4, 84, 9, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 94, 8, 5, 1, 6, 1, 6, 1, 6, 3, 6, 99, 8, 6, 1, 6, 1, 6, 3, 6, 103, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 3, 9, 115, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 125, 8, 10, 1, 11, 1, 11, 3, 11, 129, 8, 11, 1, 12, 1, 12, 3, 12, 133, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 140, 8, 13, 1, 14, 1, 14, 1, 14, 5, 14, 145, 8, 14, 10, 14, 12, 14, 148, 9, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 0, 0, 17, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 0, 4, 1, 0, 5, 7, 1, 0, 5, 6, 1, 0, 1, 3, 2, 0, 4, 4, 21, 24, 162, 0, 37, 1, 0, 0, 0, 2, 47, 1, 0, 0, 0, 4, 65, 1, 0, 0, 0, 6, 71, 1, 0, 0, 0, 8, 82, 1, 0, 0, 0, 10, 93, 1, 0, 0, 0, 12, 95, 1, 0, 0, 0, 14, 104, 1, 0, 0, 0, 16, 110, 1, 0, 0, 0, 18, 114, 1, 0, 0, 0, 20, 120, 1, 0, 0, 0, 22, 126, 1, 0, 0, 0, 24, 130, 1, 0, 0, 0, 26, 139, 1, 0, 0, 0, 28, 141, 1, 0, 0, 0, 30, 149, 1, 0, 0, 0, 32, 151, 1, 0, 0, 0, 34, 36, 5, 28, 0, 0, 35, 34, 1, 0, 0, 0, 36, 39, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 37, 38, 1, 0, 0, 0, 38, 41, 1, 0, 0, 0, 39, 37, 1, 0, 0, 0, 40, 42, 3, 2, 1, 0, 41, 40, 1, 0, 0, 0, 42, 43, 1, 0, 0, 0, 43, 41, 1, 0, 0, 0, 43, 44, 1, 0, 0, 0, 44, 45, 1, 0, 0, 0, 45, 46, 5, 0, 0, 1, 46, 1, 1, 0, 0, 0, 47, 49, 5, 20, 0, 0, 48, 50, 3, 4, 2, 0, 49, 48, 1, 0, 0, 0, 49, 50, 1, 0, 0, 0, 50, 53, 1, 0, 0, 0, 51, 52, 5, 9, 0, 0, 52, 54, 5, 20, 0, 0, 53, 51, 1, 0, 0, 0, 53, 54, 1, 0, 0, 0, 54, 55, 1, 0, 0, 0, 55, 56, 5, 5, 0, 0, 56, 58, 3, 6, 3, 0, 57, 59, 5, 10, 0, 0, 58, 57, 1, 0, 0, 0, 58, 59, 1, 0, 0, 0, 59, 61, 1, 0, 0, 0, 60, 62, 5, 28, 0, 0, 61, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 61, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 3, 1, 0, 0, 0, 65, 66, 5, 12, 0, 0, 66, 67, 5, 21, 0, 0, 67, 68, 5, 9, 0, 0, 68, 69, 5, 21, 0, 0, 69, 70, 5, 13, 0, 0, 70, 5, 1, 0, 0, 0, 71, 76, 3, 8, 4, 0, 72, 73, 5, 8, 0, 0, 73, 75, 3, 8, 4, 0, 74, 72, 1, 0, 0, 0, 75, 78, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 7, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 79, 81, 3, 10, 5, 0, 80, 79, 1, 0, 0, 0, 81, 84, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 82, 83, 1, 0, 0, 0, 83, 9, 1, 0, 0, 0, 84, 82, 1, 0, 0, 0, 85, 94, 3, 12, 6, 0, 86, 94, 3, 14, 7, 0, 87, 94, 3, 16, 8, 0, 88, 94, 3, 18, 9, 0, 89, 94, 3, 20, 10, 0, 90, 94, 3, 22, 11, 0, 91, 94, 3, 24, 12, 0, 92, 94, 3, 32, 16, 0, 93, 85, 1, 0, 0, 0, 93, 86, 1, 0, 0, 0, 93, 87, 1, 0, 0, 0, 93, 88, 1, 0, 0, 0, 93, 89, 1, 0, 0, 0, 93, 90, 1, 0, 0, 0, 93, 91, 1, 0, 0, 0, 93, 92, 1, 0, 0, 0, 94, 11, 1, 0, 0, 0, 95, 96, 3, 28, 14, 0, 96, 98, 7, 0, 0, 0, 97, 99, 5, 19, 0, 0, 98, 97, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 100, 1, 0, 0, 0, 100, 102, 3, 26, 13, 0, 101, 103, 3, 30, 15, 0, 102, 101, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 13, 1, 0, 0, 0, 104, 105, 5, 16, 0, 0, 105, 106, 3, 28, 14, 0, 106, 107, 7, 1, 0, 0, 107, 108, 3, 32, 16, 0, 108, 109, 5, 17, 0, 0, 109, 15, 1, 0, 0, 0, 110, 111, 5, 16, 0, 0, 111, 112, 5, 17, 0, 0, 112, 17, 1, 0, 0, 0, 113, 115, 5, 19, 0, 0, 114, 113, 1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 117, 5, 14, 0, 0, 117, 118, 5, 21, 0, 0, 118, 119, 5, 15, 0, 0, 119, 19, 1, 0, 0, 0, 120, 121, 5, 12, 0, 0, 121, 122, 3, 6, 3, 0, 122, 124, 5, 13, 0, 0, 123, 125, 3, 30, 15, 0, 124, 123, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 21, 1, 0, 0, 0, 126, 128, 5, 22, 0, 0, 127, 129, 3, 30, 15, 0, 128, 127, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 23, 1, 0, 0, 0, 130, 132, 5, 20, 0, 0, 131, 133, 3, 30, 15, 0, 132, 131, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0, 133, 25, 1, 0, 0, 0, 134, 140, 3, 18, 9, 0, 135, 140, 3, 20, 10, 0, 136, 140, 3, 22, 11, 0, 137, 140, 3, 24, 12, 0, 138, 140, 3, 32, 16, 0, 139, 134, 1, 0, 0, 0, 139, 135, 1, 0, 0, 0, 139, 136, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 139, 138, 1, 0, 0, 0, 140, 27, 1, 0, 0, 0, 141, 146, 5, 21, 0, 0, 142, 143, 5, 18, 0, 0, 143, 145, 5, 21, 0, 0, 144, 142, 1, 0, 0, 0, 145, 148, 1, 0, 0, 0, 146, 144, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 29, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 149, 150, 7, 2, 0, 0, 150, 31, 1, 0, 0, 0, 151, 152, 7, 3, 0, 0, 152, 33, 1, 0, 0, 0, 17, 37, 43, 49, 53, 58, 63, 76, 82, 93, 98, 102, 114, 124, 128, 132, 139, 146] \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.tokens b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.tokens new file mode 100644 index 000000000..5c28d84ec --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.tokens @@ -0,0 +1,46 @@ +T__0=1 +T__1=2 +T__2=3 +T__3=4 +ASSIGN=5 +ADD_ASSIGN=6 +BOOL_ASSIGN=7 +PIPE=8 +COLON=9 +SEMICOLON=10 +COMMA=11 +LPAREN=12 +RPAREN=13 +LBRACK=14 +RBRACK=15 +LBRACE=16 +RBRACE=17 +DOT=18 +TILDE=19 +UPPER_ID=20 +ID=21 +SINGLE_QUOTED_STRING=22 +INT=23 +STRING=24 +COMMENT=25 +WS=26 +CONTINUATION=27 +NL=28 +'*'=1 +'+'=2 +'?'=3 +'[QualifiedName]'=4 +'+='=6 +'?='=7 +'|'=8 +':'=9 +';'=10 +','=11 +'('=12 +')'=13 +'['=14 +']'=15 +'{'=16 +'}'=17 +'.'=18 +'~'=19 diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseListener.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseListener.cs new file mode 100644 index 000000000..1593400e7 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseListener.cs @@ -0,0 +1,257 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.2 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/CODE/SysML2.NET/Resources/kebnf.g4 by ANTLR 4.13.2 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace SysML2.NET.CodeGenerator.Grammar { + +using Antlr4.Runtime.Misc; +using IErrorNode = Antlr4.Runtime.Tree.IErrorNode; +using ITerminalNode = Antlr4.Runtime.Tree.ITerminalNode; +using IToken = Antlr4.Runtime.IToken; +using ParserRuleContext = Antlr4.Runtime.ParserRuleContext; + +/// +/// This class provides an empty implementation of , +/// which can be extended to create a listener which only needs to handle a subset +/// of the available methods. +/// +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.2")] +[System.Diagnostics.DebuggerNonUserCode] +[System.CLSCompliant(false)] +public partial class kebnfBaseListener : IkebnfListener { + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSpecification([NotNull] kebnfParser.SpecificationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSpecification([NotNull] kebnfParser.SpecificationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRule_definition([NotNull] kebnfParser.Rule_definitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRule_definition([NotNull] kebnfParser.Rule_definitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterParameter_list([NotNull] kebnfParser.Parameter_listContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitParameter_list([NotNull] kebnfParser.Parameter_listContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAlternatives([NotNull] kebnfParser.AlternativesContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAlternatives([NotNull] kebnfParser.AlternativesContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAlternative([NotNull] kebnfParser.AlternativeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAlternative([NotNull] kebnfParser.AlternativeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterElement([NotNull] kebnfParser.ElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitElement([NotNull] kebnfParser.ElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAssignment([NotNull] kebnfParser.AssignmentContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAssignment([NotNull] kebnfParser.AssignmentContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNon_parsing_assignment([NotNull] kebnfParser.Non_parsing_assignmentContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNon_parsing_assignment([NotNull] kebnfParser.Non_parsing_assignmentContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNon_parsing_empty([NotNull] kebnfParser.Non_parsing_emptyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNon_parsing_empty([NotNull] kebnfParser.Non_parsing_emptyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterCross_reference([NotNull] kebnfParser.Cross_referenceContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitCross_reference([NotNull] kebnfParser.Cross_referenceContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterGroup([NotNull] kebnfParser.GroupContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitGroup([NotNull] kebnfParser.GroupContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTerminal([NotNull] kebnfParser.TerminalContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTerminal([NotNull] kebnfParser.TerminalContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNon_terminal([NotNull] kebnfParser.Non_terminalContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNon_terminal([NotNull] kebnfParser.Non_terminalContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterElement_core([NotNull] kebnfParser.Element_coreContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitElement_core([NotNull] kebnfParser.Element_coreContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDotted_id([NotNull] kebnfParser.Dotted_idContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDotted_id([NotNull] kebnfParser.Dotted_idContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSuffix_op([NotNull] kebnfParser.Suffix_opContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSuffix_op([NotNull] kebnfParser.Suffix_opContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterValue_literal([NotNull] kebnfParser.Value_literalContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitValue_literal([NotNull] kebnfParser.Value_literalContext context) { } + + /// + /// The default implementation does nothing. + public virtual void EnterEveryRule([NotNull] ParserRuleContext context) { } + /// + /// The default implementation does nothing. + public virtual void ExitEveryRule([NotNull] ParserRuleContext context) { } + /// + /// The default implementation does nothing. + public virtual void VisitTerminal([NotNull] ITerminalNode node) { } + /// + /// The default implementation does nothing. + public virtual void VisitErrorNode([NotNull] IErrorNode node) { } +} +} // namespace SysML2.NET.CodeGenerator.Grammar diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseVisitor.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseVisitor.cs new file mode 100644 index 000000000..3a64587f2 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseVisitor.cs @@ -0,0 +1,209 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.2 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/CODE/SysML2.NET/Resources/kebnf.g4 by ANTLR 4.13.2 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace SysML2.NET.CodeGenerator.Grammar { +using Antlr4.Runtime.Misc; +using Antlr4.Runtime.Tree; +using IToken = Antlr4.Runtime.IToken; +using ParserRuleContext = Antlr4.Runtime.ParserRuleContext; + +/// +/// This class provides an empty implementation of , +/// which can be extended to create a visitor which only needs to handle a subset +/// of the available methods. +/// +/// The return type of the visit operation. +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.2")] +[System.Diagnostics.DebuggerNonUserCode] +[System.CLSCompliant(false)] +public partial class kebnfBaseVisitor : AbstractParseTreeVisitor, IkebnfVisitor { + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSpecification([NotNull] kebnfParser.SpecificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRule_definition([NotNull] kebnfParser.Rule_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitParameter_list([NotNull] kebnfParser.Parameter_listContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAlternatives([NotNull] kebnfParser.AlternativesContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAlternative([NotNull] kebnfParser.AlternativeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitElement([NotNull] kebnfParser.ElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAssignment([NotNull] kebnfParser.AssignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNon_parsing_assignment([NotNull] kebnfParser.Non_parsing_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNon_parsing_empty([NotNull] kebnfParser.Non_parsing_emptyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCross_reference([NotNull] kebnfParser.Cross_referenceContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGroup([NotNull] kebnfParser.GroupContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTerminal([NotNull] kebnfParser.TerminalContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNon_terminal([NotNull] kebnfParser.Non_terminalContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitElement_core([NotNull] kebnfParser.Element_coreContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDotted_id([NotNull] kebnfParser.Dotted_idContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSuffix_op([NotNull] kebnfParser.Suffix_opContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitValue_literal([NotNull] kebnfParser.Value_literalContext context) { return VisitChildren(context); } +} +} // namespace SysML2.NET.CodeGenerator.Grammar diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs new file mode 100644 index 000000000..bae07a492 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs @@ -0,0 +1,176 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.2 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/CODE/SysML2.NET/Resources/kebnf.g4 by ANTLR 4.13.2 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace SysML2.NET.CodeGenerator.Grammar { +using System; +using System.IO; +using System.Text; +using Antlr4.Runtime; +using Antlr4.Runtime.Atn; +using Antlr4.Runtime.Misc; +using DFA = Antlr4.Runtime.Dfa.DFA; + +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.2")] +[System.CLSCompliant(false)] +public partial class kebnfLexer : Lexer { + protected static DFA[] decisionToDFA; + protected static PredictionContextCache sharedContextCache = new PredictionContextCache(); + public const int + T__0=1, T__1=2, T__2=3, T__3=4, ASSIGN=5, ADD_ASSIGN=6, BOOL_ASSIGN=7, + PIPE=8, COLON=9, SEMICOLON=10, COMMA=11, LPAREN=12, RPAREN=13, LBRACK=14, + RBRACK=15, LBRACE=16, RBRACE=17, DOT=18, TILDE=19, UPPER_ID=20, ID=21, + SINGLE_QUOTED_STRING=22, INT=23, STRING=24, COMMENT=25, WS=26, CONTINUATION=27, + NL=28; + public static string[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }; + + public static string[] modeNames = { + "DEFAULT_MODE" + }; + + public static readonly string[] ruleNames = { + "T__0", "T__1", "T__2", "T__3", "ASSIGN", "ADD_ASSIGN", "BOOL_ASSIGN", + "PIPE", "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", "LBRACK", "RBRACK", + "LBRACE", "RBRACE", "DOT", "TILDE", "UPPER_ID", "ID", "SINGLE_QUOTED_STRING", + "INT", "STRING", "COMMENT", "WS", "CONTINUATION", "NL" + }; + + + public kebnfLexer(ICharStream input) + : this(input, Console.Out, Console.Error) { } + + public kebnfLexer(ICharStream input, TextWriter output, TextWriter errorOutput) + : base(input, output, errorOutput) + { + Interpreter = new LexerATNSimulator(this, _ATN, decisionToDFA, sharedContextCache); + } + + private static readonly string[] _LiteralNames = { + null, "'*'", "'+'", "'?'", "'[QualifiedName]'", null, "'+='", "'?='", + "'|'", "':'", "';'", "','", "'('", "')'", "'['", "']'", "'{'", "'}'", + "'.'", "'~'" + }; + private static readonly string[] _SymbolicNames = { + null, null, null, null, null, "ASSIGN", "ADD_ASSIGN", "BOOL_ASSIGN", "PIPE", + "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", "LBRACK", "RBRACK", + "LBRACE", "RBRACE", "DOT", "TILDE", "UPPER_ID", "ID", "SINGLE_QUOTED_STRING", + "INT", "STRING", "COMMENT", "WS", "CONTINUATION", "NL" + }; + public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); + + [NotNull] + public override IVocabulary Vocabulary + { + get + { + return DefaultVocabulary; + } + } + + public override string GrammarFileName { get { return "kebnf.g4"; } } + + public override string[] RuleNames { get { return ruleNames; } } + + public override string[] ChannelNames { get { return channelNames; } } + + public override string[] ModeNames { get { return modeNames; } } + + public override int[] SerializedAtn { get { return _serializedATN; } } + + static kebnfLexer() { + decisionToDFA = new DFA[_ATN.NumberOfDecisions]; + for (int i = 0; i < _ATN.NumberOfDecisions; i++) { + decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i); + } + } + private static int[] _serializedATN = { + 4,0,28,190,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, + 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14, + 7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21, + 7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,1,0,1, + 0,1,1,1,1,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, + 1,3,1,3,1,3,1,4,1,4,1,4,1,4,3,4,84,8,4,1,5,1,5,1,5,1,6,1,6,1,6,1,7,1,7, + 1,8,1,8,1,9,1,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,15, + 1,15,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,5,19,118,8,19,10,19,12,19, + 121,9,19,1,20,1,20,5,20,125,8,20,10,20,12,20,128,9,20,1,21,1,21,1,21,1, + 21,5,21,134,8,21,10,21,12,21,137,9,21,1,21,1,21,1,22,4,22,142,8,22,11, + 22,12,22,143,1,23,1,23,1,23,1,23,5,23,150,8,23,10,23,12,23,153,9,23,1, + 23,1,23,1,24,1,24,1,24,1,24,5,24,161,8,24,10,24,12,24,164,9,24,1,24,1, + 24,1,25,4,25,169,8,25,11,25,12,25,170,1,25,1,25,1,26,3,26,176,8,26,1,26, + 1,26,4,26,180,8,26,11,26,12,26,181,1,26,1,26,1,27,3,27,187,8,27,1,27,1, + 27,0,0,28,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25, + 13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49, + 25,51,26,53,27,55,28,1,0,7,1,0,65,90,4,0,48,57,65,90,95,95,97,122,3,0, + 65,90,95,95,97,122,2,0,39,39,92,92,1,0,48,57,2,0,10,10,13,13,2,0,9,9,32, + 32,202,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11, + 1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0, + 0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33, + 1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0, + 0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55, + 1,0,0,0,1,57,1,0,0,0,3,59,1,0,0,0,5,61,1,0,0,0,7,63,1,0,0,0,9,83,1,0,0, + 0,11,85,1,0,0,0,13,88,1,0,0,0,15,91,1,0,0,0,17,93,1,0,0,0,19,95,1,0,0, + 0,21,97,1,0,0,0,23,99,1,0,0,0,25,101,1,0,0,0,27,103,1,0,0,0,29,105,1,0, + 0,0,31,107,1,0,0,0,33,109,1,0,0,0,35,111,1,0,0,0,37,113,1,0,0,0,39,115, + 1,0,0,0,41,122,1,0,0,0,43,129,1,0,0,0,45,141,1,0,0,0,47,145,1,0,0,0,49, + 156,1,0,0,0,51,168,1,0,0,0,53,175,1,0,0,0,55,186,1,0,0,0,57,58,5,42,0, + 0,58,2,1,0,0,0,59,60,5,43,0,0,60,4,1,0,0,0,61,62,5,63,0,0,62,6,1,0,0,0, + 63,64,5,91,0,0,64,65,5,81,0,0,65,66,5,117,0,0,66,67,5,97,0,0,67,68,5,108, + 0,0,68,69,5,105,0,0,69,70,5,102,0,0,70,71,5,105,0,0,71,72,5,101,0,0,72, + 73,5,100,0,0,73,74,5,78,0,0,74,75,5,97,0,0,75,76,5,109,0,0,76,77,5,101, + 0,0,77,78,5,93,0,0,78,8,1,0,0,0,79,80,5,58,0,0,80,81,5,58,0,0,81,84,5, + 61,0,0,82,84,5,61,0,0,83,79,1,0,0,0,83,82,1,0,0,0,84,10,1,0,0,0,85,86, + 5,43,0,0,86,87,5,61,0,0,87,12,1,0,0,0,88,89,5,63,0,0,89,90,5,61,0,0,90, + 14,1,0,0,0,91,92,5,124,0,0,92,16,1,0,0,0,93,94,5,58,0,0,94,18,1,0,0,0, + 95,96,5,59,0,0,96,20,1,0,0,0,97,98,5,44,0,0,98,22,1,0,0,0,99,100,5,40, + 0,0,100,24,1,0,0,0,101,102,5,41,0,0,102,26,1,0,0,0,103,104,5,91,0,0,104, + 28,1,0,0,0,105,106,5,93,0,0,106,30,1,0,0,0,107,108,5,123,0,0,108,32,1, + 0,0,0,109,110,5,125,0,0,110,34,1,0,0,0,111,112,5,46,0,0,112,36,1,0,0,0, + 113,114,5,126,0,0,114,38,1,0,0,0,115,119,7,0,0,0,116,118,7,1,0,0,117,116, + 1,0,0,0,118,121,1,0,0,0,119,117,1,0,0,0,119,120,1,0,0,0,120,40,1,0,0,0, + 121,119,1,0,0,0,122,126,7,2,0,0,123,125,7,1,0,0,124,123,1,0,0,0,125,128, + 1,0,0,0,126,124,1,0,0,0,126,127,1,0,0,0,127,42,1,0,0,0,128,126,1,0,0,0, + 129,135,5,39,0,0,130,134,8,3,0,0,131,132,5,92,0,0,132,134,9,0,0,0,133, + 130,1,0,0,0,133,131,1,0,0,0,134,137,1,0,0,0,135,133,1,0,0,0,135,136,1, + 0,0,0,136,138,1,0,0,0,137,135,1,0,0,0,138,139,5,39,0,0,139,44,1,0,0,0, + 140,142,7,4,0,0,141,140,1,0,0,0,142,143,1,0,0,0,143,141,1,0,0,0,143,144, + 1,0,0,0,144,46,1,0,0,0,145,151,5,39,0,0,146,150,8,3,0,0,147,148,5,92,0, + 0,148,150,9,0,0,0,149,146,1,0,0,0,149,147,1,0,0,0,150,153,1,0,0,0,151, + 149,1,0,0,0,151,152,1,0,0,0,152,154,1,0,0,0,153,151,1,0,0,0,154,155,5, + 39,0,0,155,48,1,0,0,0,156,157,5,47,0,0,157,158,5,47,0,0,158,162,1,0,0, + 0,159,161,8,5,0,0,160,159,1,0,0,0,161,164,1,0,0,0,162,160,1,0,0,0,162, + 163,1,0,0,0,163,165,1,0,0,0,164,162,1,0,0,0,165,166,6,24,0,0,166,50,1, + 0,0,0,167,169,7,6,0,0,168,167,1,0,0,0,169,170,1,0,0,0,170,168,1,0,0,0, + 170,171,1,0,0,0,171,172,1,0,0,0,172,173,6,25,0,0,173,52,1,0,0,0,174,176, + 5,13,0,0,175,174,1,0,0,0,175,176,1,0,0,0,176,177,1,0,0,0,177,179,5,10, + 0,0,178,180,7,6,0,0,179,178,1,0,0,0,180,181,1,0,0,0,181,179,1,0,0,0,181, + 182,1,0,0,0,182,183,1,0,0,0,183,184,6,26,0,0,184,54,1,0,0,0,185,187,5, + 13,0,0,186,185,1,0,0,0,186,187,1,0,0,0,187,188,1,0,0,0,188,189,5,10,0, + 0,189,56,1,0,0,0,14,0,83,119,126,133,135,143,149,151,162,170,175,181,186, + 1,6,0,0 + }; + + public static readonly ATN _ATN = + new ATNDeserializer().Deserialize(_serializedATN); + + +} +} // namespace SysML2.NET.CodeGenerator.Grammar diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp new file mode 100644 index 000000000..753b3d36c --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp @@ -0,0 +1,101 @@ +token literal names: +null +'*' +'+' +'?' +'[QualifiedName]' +null +'+=' +'?=' +'|' +':' +';' +',' +'(' +')' +'[' +']' +'{' +'}' +'.' +'~' +null +null +null +null +null +null +null +null +null + +token symbolic names: +null +null +null +null +null +ASSIGN +ADD_ASSIGN +BOOL_ASSIGN +PIPE +COLON +SEMICOLON +COMMA +LPAREN +RPAREN +LBRACK +RBRACK +LBRACE +RBRACE +DOT +TILDE +UPPER_ID +ID +SINGLE_QUOTED_STRING +INT +STRING +COMMENT +WS +CONTINUATION +NL + +rule names: +T__0 +T__1 +T__2 +T__3 +ASSIGN +ADD_ASSIGN +BOOL_ASSIGN +PIPE +COLON +SEMICOLON +COMMA +LPAREN +RPAREN +LBRACK +RBRACK +LBRACE +RBRACE +DOT +TILDE +UPPER_ID +ID +SINGLE_QUOTED_STRING +INT +STRING +COMMENT +WS +CONTINUATION +NL + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[4, 0, 28, 190, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 84, 8, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 5, 19, 118, 8, 19, 10, 19, 12, 19, 121, 9, 19, 1, 20, 1, 20, 5, 20, 125, 8, 20, 10, 20, 12, 20, 128, 9, 20, 1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 134, 8, 21, 10, 21, 12, 21, 137, 9, 21, 1, 21, 1, 21, 1, 22, 4, 22, 142, 8, 22, 11, 22, 12, 22, 143, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 150, 8, 23, 10, 23, 12, 23, 153, 9, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 161, 8, 24, 10, 24, 12, 24, 164, 9, 24, 1, 24, 1, 24, 1, 25, 4, 25, 169, 8, 25, 11, 25, 12, 25, 170, 1, 25, 1, 25, 1, 26, 3, 26, 176, 8, 26, 1, 26, 1, 26, 4, 26, 180, 8, 26, 11, 26, 12, 26, 181, 1, 26, 1, 26, 1, 27, 3, 27, 187, 8, 27, 1, 27, 1, 27, 0, 0, 28, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 1, 0, 7, 1, 0, 65, 90, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 3, 0, 65, 90, 95, 95, 97, 122, 2, 0, 39, 39, 92, 92, 1, 0, 48, 57, 2, 0, 10, 10, 13, 13, 2, 0, 9, 9, 32, 32, 202, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 1, 57, 1, 0, 0, 0, 3, 59, 1, 0, 0, 0, 5, 61, 1, 0, 0, 0, 7, 63, 1, 0, 0, 0, 9, 83, 1, 0, 0, 0, 11, 85, 1, 0, 0, 0, 13, 88, 1, 0, 0, 0, 15, 91, 1, 0, 0, 0, 17, 93, 1, 0, 0, 0, 19, 95, 1, 0, 0, 0, 21, 97, 1, 0, 0, 0, 23, 99, 1, 0, 0, 0, 25, 101, 1, 0, 0, 0, 27, 103, 1, 0, 0, 0, 29, 105, 1, 0, 0, 0, 31, 107, 1, 0, 0, 0, 33, 109, 1, 0, 0, 0, 35, 111, 1, 0, 0, 0, 37, 113, 1, 0, 0, 0, 39, 115, 1, 0, 0, 0, 41, 122, 1, 0, 0, 0, 43, 129, 1, 0, 0, 0, 45, 141, 1, 0, 0, 0, 47, 145, 1, 0, 0, 0, 49, 156, 1, 0, 0, 0, 51, 168, 1, 0, 0, 0, 53, 175, 1, 0, 0, 0, 55, 186, 1, 0, 0, 0, 57, 58, 5, 42, 0, 0, 58, 2, 1, 0, 0, 0, 59, 60, 5, 43, 0, 0, 60, 4, 1, 0, 0, 0, 61, 62, 5, 63, 0, 0, 62, 6, 1, 0, 0, 0, 63, 64, 5, 91, 0, 0, 64, 65, 5, 81, 0, 0, 65, 66, 5, 117, 0, 0, 66, 67, 5, 97, 0, 0, 67, 68, 5, 108, 0, 0, 68, 69, 5, 105, 0, 0, 69, 70, 5, 102, 0, 0, 70, 71, 5, 105, 0, 0, 71, 72, 5, 101, 0, 0, 72, 73, 5, 100, 0, 0, 73, 74, 5, 78, 0, 0, 74, 75, 5, 97, 0, 0, 75, 76, 5, 109, 0, 0, 76, 77, 5, 101, 0, 0, 77, 78, 5, 93, 0, 0, 78, 8, 1, 0, 0, 0, 79, 80, 5, 58, 0, 0, 80, 81, 5, 58, 0, 0, 81, 84, 5, 61, 0, 0, 82, 84, 5, 61, 0, 0, 83, 79, 1, 0, 0, 0, 83, 82, 1, 0, 0, 0, 84, 10, 1, 0, 0, 0, 85, 86, 5, 43, 0, 0, 86, 87, 5, 61, 0, 0, 87, 12, 1, 0, 0, 0, 88, 89, 5, 63, 0, 0, 89, 90, 5, 61, 0, 0, 90, 14, 1, 0, 0, 0, 91, 92, 5, 124, 0, 0, 92, 16, 1, 0, 0, 0, 93, 94, 5, 58, 0, 0, 94, 18, 1, 0, 0, 0, 95, 96, 5, 59, 0, 0, 96, 20, 1, 0, 0, 0, 97, 98, 5, 44, 0, 0, 98, 22, 1, 0, 0, 0, 99, 100, 5, 40, 0, 0, 100, 24, 1, 0, 0, 0, 101, 102, 5, 41, 0, 0, 102, 26, 1, 0, 0, 0, 103, 104, 5, 91, 0, 0, 104, 28, 1, 0, 0, 0, 105, 106, 5, 93, 0, 0, 106, 30, 1, 0, 0, 0, 107, 108, 5, 123, 0, 0, 108, 32, 1, 0, 0, 0, 109, 110, 5, 125, 0, 0, 110, 34, 1, 0, 0, 0, 111, 112, 5, 46, 0, 0, 112, 36, 1, 0, 0, 0, 113, 114, 5, 126, 0, 0, 114, 38, 1, 0, 0, 0, 115, 119, 7, 0, 0, 0, 116, 118, 7, 1, 0, 0, 117, 116, 1, 0, 0, 0, 118, 121, 1, 0, 0, 0, 119, 117, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 40, 1, 0, 0, 0, 121, 119, 1, 0, 0, 0, 122, 126, 7, 2, 0, 0, 123, 125, 7, 1, 0, 0, 124, 123, 1, 0, 0, 0, 125, 128, 1, 0, 0, 0, 126, 124, 1, 0, 0, 0, 126, 127, 1, 0, 0, 0, 127, 42, 1, 0, 0, 0, 128, 126, 1, 0, 0, 0, 129, 135, 5, 39, 0, 0, 130, 134, 8, 3, 0, 0, 131, 132, 5, 92, 0, 0, 132, 134, 9, 0, 0, 0, 133, 130, 1, 0, 0, 0, 133, 131, 1, 0, 0, 0, 134, 137, 1, 0, 0, 0, 135, 133, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 138, 1, 0, 0, 0, 137, 135, 1, 0, 0, 0, 138, 139, 5, 39, 0, 0, 139, 44, 1, 0, 0, 0, 140, 142, 7, 4, 0, 0, 141, 140, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 141, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 46, 1, 0, 0, 0, 145, 151, 5, 39, 0, 0, 146, 150, 8, 3, 0, 0, 147, 148, 5, 92, 0, 0, 148, 150, 9, 0, 0, 0, 149, 146, 1, 0, 0, 0, 149, 147, 1, 0, 0, 0, 150, 153, 1, 0, 0, 0, 151, 149, 1, 0, 0, 0, 151, 152, 1, 0, 0, 0, 152, 154, 1, 0, 0, 0, 153, 151, 1, 0, 0, 0, 154, 155, 5, 39, 0, 0, 155, 48, 1, 0, 0, 0, 156, 157, 5, 47, 0, 0, 157, 158, 5, 47, 0, 0, 158, 162, 1, 0, 0, 0, 159, 161, 8, 5, 0, 0, 160, 159, 1, 0, 0, 0, 161, 164, 1, 0, 0, 0, 162, 160, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 165, 1, 0, 0, 0, 164, 162, 1, 0, 0, 0, 165, 166, 6, 24, 0, 0, 166, 50, 1, 0, 0, 0, 167, 169, 7, 6, 0, 0, 168, 167, 1, 0, 0, 0, 169, 170, 1, 0, 0, 0, 170, 168, 1, 0, 0, 0, 170, 171, 1, 0, 0, 0, 171, 172, 1, 0, 0, 0, 172, 173, 6, 25, 0, 0, 173, 52, 1, 0, 0, 0, 174, 176, 5, 13, 0, 0, 175, 174, 1, 0, 0, 0, 175, 176, 1, 0, 0, 0, 176, 177, 1, 0, 0, 0, 177, 179, 5, 10, 0, 0, 178, 180, 7, 6, 0, 0, 179, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 179, 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 184, 6, 26, 0, 0, 184, 54, 1, 0, 0, 0, 185, 187, 5, 13, 0, 0, 186, 185, 1, 0, 0, 0, 186, 187, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, 189, 5, 10, 0, 0, 189, 56, 1, 0, 0, 0, 14, 0, 83, 119, 126, 133, 135, 143, 149, 151, 162, 170, 175, 181, 186, 1, 6, 0, 0] \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.tokens b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.tokens new file mode 100644 index 000000000..5c28d84ec --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.tokens @@ -0,0 +1,46 @@ +T__0=1 +T__1=2 +T__2=3 +T__3=4 +ASSIGN=5 +ADD_ASSIGN=6 +BOOL_ASSIGN=7 +PIPE=8 +COLON=9 +SEMICOLON=10 +COMMA=11 +LPAREN=12 +RPAREN=13 +LBRACK=14 +RBRACK=15 +LBRACE=16 +RBRACE=17 +DOT=18 +TILDE=19 +UPPER_ID=20 +ID=21 +SINGLE_QUOTED_STRING=22 +INT=23 +STRING=24 +COMMENT=25 +WS=26 +CONTINUATION=27 +NL=28 +'*'=1 +'+'=2 +'?'=3 +'[QualifiedName]'=4 +'+='=6 +'?='=7 +'|'=8 +':'=9 +';'=10 +','=11 +'('=12 +')'=13 +'['=14 +']'=15 +'{'=16 +'}'=17 +'.'=18 +'~'=19 diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfListener.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfListener.cs new file mode 100644 index 000000000..154345220 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfListener.cs @@ -0,0 +1,205 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.2 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/CODE/SysML2.NET/Resources/kebnf.g4 by ANTLR 4.13.2 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace SysML2.NET.CodeGenerator.Grammar { +using Antlr4.Runtime.Misc; +using IParseTreeListener = Antlr4.Runtime.Tree.IParseTreeListener; +using IToken = Antlr4.Runtime.IToken; + +/// +/// This interface defines a complete listener for a parse tree produced by +/// . +/// +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.2")] +[System.CLSCompliant(false)] +public interface IkebnfListener : IParseTreeListener { + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSpecification([NotNull] kebnfParser.SpecificationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSpecification([NotNull] kebnfParser.SpecificationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRule_definition([NotNull] kebnfParser.Rule_definitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRule_definition([NotNull] kebnfParser.Rule_definitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterParameter_list([NotNull] kebnfParser.Parameter_listContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitParameter_list([NotNull] kebnfParser.Parameter_listContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAlternatives([NotNull] kebnfParser.AlternativesContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAlternatives([NotNull] kebnfParser.AlternativesContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAlternative([NotNull] kebnfParser.AlternativeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAlternative([NotNull] kebnfParser.AlternativeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterElement([NotNull] kebnfParser.ElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitElement([NotNull] kebnfParser.ElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAssignment([NotNull] kebnfParser.AssignmentContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAssignment([NotNull] kebnfParser.AssignmentContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNon_parsing_assignment([NotNull] kebnfParser.Non_parsing_assignmentContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNon_parsing_assignment([NotNull] kebnfParser.Non_parsing_assignmentContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNon_parsing_empty([NotNull] kebnfParser.Non_parsing_emptyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNon_parsing_empty([NotNull] kebnfParser.Non_parsing_emptyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterCross_reference([NotNull] kebnfParser.Cross_referenceContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitCross_reference([NotNull] kebnfParser.Cross_referenceContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterGroup([NotNull] kebnfParser.GroupContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitGroup([NotNull] kebnfParser.GroupContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTerminal([NotNull] kebnfParser.TerminalContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTerminal([NotNull] kebnfParser.TerminalContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNon_terminal([NotNull] kebnfParser.Non_terminalContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNon_terminal([NotNull] kebnfParser.Non_terminalContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterElement_core([NotNull] kebnfParser.Element_coreContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitElement_core([NotNull] kebnfParser.Element_coreContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDotted_id([NotNull] kebnfParser.Dotted_idContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDotted_id([NotNull] kebnfParser.Dotted_idContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSuffix_op([NotNull] kebnfParser.Suffix_opContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSuffix_op([NotNull] kebnfParser.Suffix_opContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterValue_literal([NotNull] kebnfParser.Value_literalContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitValue_literal([NotNull] kebnfParser.Value_literalContext context); +} +} // namespace SysML2.NET.CodeGenerator.Grammar diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs new file mode 100644 index 000000000..7cfb9dadc --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs @@ -0,0 +1,1447 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.2 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/CODE/SysML2.NET/Resources/kebnf.g4 by ANTLR 4.13.2 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace SysML2.NET.CodeGenerator.Grammar { +using System; +using System.IO; +using System.Text; +using System.Diagnostics; +using System.Collections.Generic; +using Antlr4.Runtime; +using Antlr4.Runtime.Atn; +using Antlr4.Runtime.Misc; +using Antlr4.Runtime.Tree; +using DFA = Antlr4.Runtime.Dfa.DFA; + +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.2")] +[System.CLSCompliant(false)] +public partial class kebnfParser : Parser { + protected static DFA[] decisionToDFA; + protected static PredictionContextCache sharedContextCache = new PredictionContextCache(); + public const int + T__0=1, T__1=2, T__2=3, T__3=4, ASSIGN=5, ADD_ASSIGN=6, BOOL_ASSIGN=7, + PIPE=8, COLON=9, SEMICOLON=10, COMMA=11, LPAREN=12, RPAREN=13, LBRACK=14, + RBRACK=15, LBRACE=16, RBRACE=17, DOT=18, TILDE=19, UPPER_ID=20, ID=21, + SINGLE_QUOTED_STRING=22, INT=23, STRING=24, COMMENT=25, WS=26, CONTINUATION=27, + NL=28; + public const int + RULE_specification = 0, RULE_rule_definition = 1, RULE_parameter_list = 2, + RULE_alternatives = 3, RULE_alternative = 4, RULE_element = 5, RULE_assignment = 6, + RULE_non_parsing_assignment = 7, RULE_non_parsing_empty = 8, RULE_cross_reference = 9, + RULE_group = 10, RULE_terminal = 11, RULE_non_terminal = 12, RULE_element_core = 13, + RULE_dotted_id = 14, RULE_suffix_op = 15, RULE_value_literal = 16; + public static readonly string[] ruleNames = { + "specification", "rule_definition", "parameter_list", "alternatives", + "alternative", "element", "assignment", "non_parsing_assignment", "non_parsing_empty", + "cross_reference", "group", "terminal", "non_terminal", "element_core", + "dotted_id", "suffix_op", "value_literal" + }; + + private static readonly string[] _LiteralNames = { + null, "'*'", "'+'", "'?'", "'[QualifiedName]'", null, "'+='", "'?='", + "'|'", "':'", "';'", "','", "'('", "')'", "'['", "']'", "'{'", "'}'", + "'.'", "'~'" + }; + private static readonly string[] _SymbolicNames = { + null, null, null, null, null, "ASSIGN", "ADD_ASSIGN", "BOOL_ASSIGN", "PIPE", + "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", "LBRACK", "RBRACK", + "LBRACE", "RBRACE", "DOT", "TILDE", "UPPER_ID", "ID", "SINGLE_QUOTED_STRING", + "INT", "STRING", "COMMENT", "WS", "CONTINUATION", "NL" + }; + public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); + + [NotNull] + public override IVocabulary Vocabulary + { + get + { + return DefaultVocabulary; + } + } + + public override string GrammarFileName { get { return "kebnf.g4"; } } + + public override string[] RuleNames { get { return ruleNames; } } + + public override int[] SerializedAtn { get { return _serializedATN; } } + + static kebnfParser() { + decisionToDFA = new DFA[_ATN.NumberOfDecisions]; + for (int i = 0; i < _ATN.NumberOfDecisions; i++) { + decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i); + } + } + + public kebnfParser(ITokenStream input) : this(input, Console.Out, Console.Error) { } + + public kebnfParser(ITokenStream input, TextWriter output, TextWriter errorOutput) + : base(input, output, errorOutput) + { + Interpreter = new ParserATNSimulator(this, _ATN, decisionToDFA, sharedContextCache); + } + + public partial class SpecificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Eof() { return GetToken(kebnfParser.Eof, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] NL() { return GetTokens(kebnfParser.NL); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NL(int i) { + return GetToken(kebnfParser.NL, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Rule_definitionContext[] rule_definition() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Rule_definitionContext rule_definition(int i) { + return GetRuleContext(i); + } + public SpecificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterSpecification(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitSpecification(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitSpecification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SpecificationContext specification() { + SpecificationContext _localctx = new SpecificationContext(Context, State); + EnterRule(_localctx, 0, RULE_specification); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 37; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==NL) { + { + { + State = 34; + Match(NL); + } + } + State = 39; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 41; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + { + State = 40; + rule_definition(); + } + } + State = 43; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( _la==UPPER_ID ); + State = 45; + Match(Eof); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Rule_definitionContext : ParserRuleContext { + public IToken name; + public Parameter_listContext @params; + public IToken target_ast; + public AlternativesContext rule_body; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ASSIGN() { return GetToken(kebnfParser.ASSIGN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] UPPER_ID() { return GetTokens(kebnfParser.UPPER_ID); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode UPPER_ID(int i) { + return GetToken(kebnfParser.UPPER_ID, i); + } + [System.Diagnostics.DebuggerNonUserCode] public AlternativesContext alternatives() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(kebnfParser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMICOLON() { return GetToken(kebnfParser.SEMICOLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] NL() { return GetTokens(kebnfParser.NL); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NL(int i) { + return GetToken(kebnfParser.NL, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Parameter_listContext parameter_list() { + return GetRuleContext(0); + } + public Rule_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_rule_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterRule_definition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitRule_definition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitRule_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Rule_definitionContext rule_definition() { + Rule_definitionContext _localctx = new Rule_definitionContext(Context, State); + EnterRule(_localctx, 2, RULE_rule_definition); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 47; + _localctx.name = Match(UPPER_ID); + State = 49; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LPAREN) { + { + State = 48; + _localctx.@params = parameter_list(); + } + } + + State = 53; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==COLON) { + { + State = 51; + Match(COLON); + State = 52; + _localctx.target_ast = Match(UPPER_ID); + } + } + + State = 55; + Match(ASSIGN); + State = 56; + _localctx.rule_body = alternatives(); + State = 58; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==SEMICOLON) { + { + State = 57; + Match(SEMICOLON); + } + } + + State = 61; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + { + State = 60; + Match(NL); + } + } + State = 63; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( _la==NL ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Parameter_listContext : ParserRuleContext { + public IToken param_name; + public IToken param_type; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(kebnfParser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(kebnfParser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(kebnfParser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] ID() { return GetTokens(kebnfParser.ID); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID(int i) { + return GetToken(kebnfParser.ID, i); + } + public Parameter_listContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_parameter_list; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterParameter_list(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitParameter_list(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitParameter_list(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Parameter_listContext parameter_list() { + Parameter_listContext _localctx = new Parameter_listContext(Context, State); + EnterRule(_localctx, 4, RULE_parameter_list); + try { + EnterOuterAlt(_localctx, 1); + { + State = 65; + Match(LPAREN); + State = 66; + _localctx.param_name = Match(ID); + State = 67; + Match(COLON); + State = 68; + _localctx.param_type = Match(ID); + State = 69; + Match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AlternativesContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public AlternativeContext[] alternative() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public AlternativeContext alternative(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] PIPE() { return GetTokens(kebnfParser.PIPE); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PIPE(int i) { + return GetToken(kebnfParser.PIPE, i); + } + public AlternativesContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_alternatives; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterAlternatives(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitAlternatives(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitAlternatives(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AlternativesContext alternatives() { + AlternativesContext _localctx = new AlternativesContext(Context, State); + EnterRule(_localctx, 6, RULE_alternatives); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 71; + alternative(); + State = 76; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==PIPE) { + { + { + State = 72; + Match(PIPE); + State = 73; + alternative(); + } + } + State = 78; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AlternativeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ElementContext[] element() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ElementContext element(int i) { + return GetRuleContext(i); + } + public AlternativeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_alternative; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterAlternative(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitAlternative(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitAlternative(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AlternativeContext alternative() { + AlternativeContext _localctx = new AlternativeContext(Context, State); + EnterRule(_localctx, 8, RULE_alternative); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 82; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 33116176L) != 0)) { + { + { + State = 79; + element(); + } + } + State = 84; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public AssignmentContext assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Non_parsing_assignmentContext non_parsing_assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Non_parsing_emptyContext non_parsing_empty() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Cross_referenceContext cross_reference() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public GroupContext group() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TerminalContext terminal() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Non_terminalContext non_terminal() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Value_literalContext value_literal() { + return GetRuleContext(0); + } + public ElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_element; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ElementContext element() { + ElementContext _localctx = new ElementContext(Context, State); + EnterRule(_localctx, 10, RULE_element); + try { + State = 93; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,8,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 85; + assignment(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 86; + non_parsing_assignment(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 87; + non_parsing_empty(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 88; + cross_reference(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 89; + group(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 90; + terminal(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 91; + non_terminal(); + } + break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 92; + value_literal(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AssignmentContext : ParserRuleContext { + public Dotted_idContext property; + public IToken op; + public IToken prefix; + public Element_coreContext content; + public Suffix_opContext suffix; + [System.Diagnostics.DebuggerNonUserCode] public Dotted_idContext dotted_id() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Element_coreContext element_core() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ASSIGN() { return GetToken(kebnfParser.ASSIGN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ADD_ASSIGN() { return GetToken(kebnfParser.ADD_ASSIGN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BOOL_ASSIGN() { return GetToken(kebnfParser.BOOL_ASSIGN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TILDE() { return GetToken(kebnfParser.TILDE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Suffix_opContext suffix_op() { + return GetRuleContext(0); + } + public AssignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterAssignment(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitAssignment(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitAssignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AssignmentContext assignment() { + AssignmentContext _localctx = new AssignmentContext(Context, State); + EnterRule(_localctx, 12, RULE_assignment); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 95; + _localctx.property = dotted_id(); + State = 96; + _localctx.op = TokenStream.LT(1); + _la = TokenStream.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 224L) != 0)) ) { + _localctx.op = ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 98; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,9,Context) ) { + case 1: + { + State = 97; + _localctx.prefix = Match(TILDE); + } + break; + } + State = 100; + _localctx.content = element_core(); + State = 102; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 14L) != 0)) { + { + State = 101; + _localctx.suffix = suffix_op(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Non_parsing_assignmentContext : ParserRuleContext { + public Dotted_idContext property; + public IToken op; + public Value_literalContext val; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(kebnfParser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(kebnfParser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Dotted_idContext dotted_id() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Value_literalContext value_literal() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ASSIGN() { return GetToken(kebnfParser.ASSIGN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ADD_ASSIGN() { return GetToken(kebnfParser.ADD_ASSIGN, 0); } + public Non_parsing_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_non_parsing_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterNon_parsing_assignment(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitNon_parsing_assignment(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitNon_parsing_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Non_parsing_assignmentContext non_parsing_assignment() { + Non_parsing_assignmentContext _localctx = new Non_parsing_assignmentContext(Context, State); + EnterRule(_localctx, 14, RULE_non_parsing_assignment); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 104; + Match(LBRACE); + State = 105; + _localctx.property = dotted_id(); + State = 106; + _localctx.op = TokenStream.LT(1); + _la = TokenStream.LA(1); + if ( !(_la==ASSIGN || _la==ADD_ASSIGN) ) { + _localctx.op = ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 107; + _localctx.val = value_literal(); + State = 108; + Match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Non_parsing_emptyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(kebnfParser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(kebnfParser.RBRACE, 0); } + public Non_parsing_emptyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_non_parsing_empty; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterNon_parsing_empty(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitNon_parsing_empty(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitNon_parsing_empty(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Non_parsing_emptyContext non_parsing_empty() { + Non_parsing_emptyContext _localctx = new Non_parsing_emptyContext(Context, State); + EnterRule(_localctx, 16, RULE_non_parsing_empty); + try { + EnterOuterAlt(_localctx, 1); + { + State = 110; + Match(LBRACE); + State = 111; + Match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Cross_referenceContext : ParserRuleContext { + public IToken @ref; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACK() { return GetToken(kebnfParser.LBRACK, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACK() { return GetToken(kebnfParser.RBRACK, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(kebnfParser.ID, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TILDE() { return GetToken(kebnfParser.TILDE, 0); } + public Cross_referenceContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_cross_reference; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterCross_reference(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitCross_reference(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitCross_reference(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Cross_referenceContext cross_reference() { + Cross_referenceContext _localctx = new Cross_referenceContext(Context, State); + EnterRule(_localctx, 18, RULE_cross_reference); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 114; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==TILDE) { + { + State = 113; + Match(TILDE); + } + } + + State = 116; + Match(LBRACK); + State = 117; + _localctx.@ref = Match(ID); + State = 118; + Match(RBRACK); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class GroupContext : ParserRuleContext { + public Suffix_opContext suffix; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(kebnfParser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public AlternativesContext alternatives() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(kebnfParser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Suffix_opContext suffix_op() { + return GetRuleContext(0); + } + public GroupContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_group; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterGroup(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitGroup(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitGroup(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public GroupContext group() { + GroupContext _localctx = new GroupContext(Context, State); + EnterRule(_localctx, 20, RULE_group); + try { + EnterOuterAlt(_localctx, 1); + { + State = 120; + Match(LPAREN); + State = 121; + alternatives(); + State = 122; + Match(RPAREN); + State = 124; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,12,Context) ) { + case 1: + { + State = 123; + _localctx.suffix = suffix_op(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TerminalContext : ParserRuleContext { + public IToken val; + public Suffix_opContext suffix; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SINGLE_QUOTED_STRING() { return GetToken(kebnfParser.SINGLE_QUOTED_STRING, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Suffix_opContext suffix_op() { + return GetRuleContext(0); + } + public TerminalContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_terminal; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterTerminal(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitTerminal(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitTerminal(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TerminalContext terminal() { + TerminalContext _localctx = new TerminalContext(Context, State); + EnterRule(_localctx, 22, RULE_terminal); + try { + EnterOuterAlt(_localctx, 1); + { + State = 126; + _localctx.val = Match(SINGLE_QUOTED_STRING); + State = 128; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,13,Context) ) { + case 1: + { + State = 127; + _localctx.suffix = suffix_op(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Non_terminalContext : ParserRuleContext { + public IToken name; + public Suffix_opContext suffix; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode UPPER_ID() { return GetToken(kebnfParser.UPPER_ID, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Suffix_opContext suffix_op() { + return GetRuleContext(0); + } + public Non_terminalContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_non_terminal; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterNon_terminal(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitNon_terminal(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitNon_terminal(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Non_terminalContext non_terminal() { + Non_terminalContext _localctx = new Non_terminalContext(Context, State); + EnterRule(_localctx, 24, RULE_non_terminal); + try { + EnterOuterAlt(_localctx, 1); + { + State = 130; + _localctx.name = Match(UPPER_ID); + State = 132; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,14,Context) ) { + case 1: + { + State = 131; + _localctx.suffix = suffix_op(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Element_coreContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Cross_referenceContext cross_reference() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public GroupContext group() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TerminalContext terminal() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Non_terminalContext non_terminal() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Value_literalContext value_literal() { + return GetRuleContext(0); + } + public Element_coreContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_element_core; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterElement_core(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitElement_core(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitElement_core(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Element_coreContext element_core() { + Element_coreContext _localctx = new Element_coreContext(Context, State); + EnterRule(_localctx, 26, RULE_element_core); + try { + State = 139; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,15,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 134; + cross_reference(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 135; + group(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 136; + terminal(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 137; + non_terminal(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 138; + value_literal(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Dotted_idContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] ID() { return GetTokens(kebnfParser.ID); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID(int i) { + return GetToken(kebnfParser.ID, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(kebnfParser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(kebnfParser.DOT, i); + } + public Dotted_idContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_dotted_id; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterDotted_id(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitDotted_id(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitDotted_id(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Dotted_idContext dotted_id() { + Dotted_idContext _localctx = new Dotted_idContext(Context, State); + EnterRule(_localctx, 28, RULE_dotted_id); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 141; + Match(ID); + State = 146; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 142; + Match(DOT); + State = 143; + Match(ID); + } + } + State = 148; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Suffix_opContext : ParserRuleContext { + public Suffix_opContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_suffix_op; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterSuffix_op(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitSuffix_op(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitSuffix_op(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Suffix_opContext suffix_op() { + Suffix_opContext _localctx = new Suffix_opContext(Context, State); + EnterRule(_localctx, 30, RULE_suffix_op); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 149; + _la = TokenStream.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 14L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Value_literalContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(kebnfParser.ID, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INT() { return GetToken(kebnfParser.INT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STRING() { return GetToken(kebnfParser.STRING, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SINGLE_QUOTED_STRING() { return GetToken(kebnfParser.SINGLE_QUOTED_STRING, 0); } + public Value_literalContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_value_literal; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterValue_literal(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitValue_literal(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitValue_literal(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Value_literalContext value_literal() { + Value_literalContext _localctx = new Value_literalContext(Context, State); + EnterRule(_localctx, 32, RULE_value_literal); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 151; + _la = TokenStream.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 31457296L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + private static int[] _serializedATN = { + 4,1,28,154,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7, + 7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14, + 2,15,7,15,2,16,7,16,1,0,5,0,36,8,0,10,0,12,0,39,9,0,1,0,4,0,42,8,0,11, + 0,12,0,43,1,0,1,0,1,1,1,1,3,1,50,8,1,1,1,1,1,3,1,54,8,1,1,1,1,1,1,1,3, + 1,59,8,1,1,1,4,1,62,8,1,11,1,12,1,63,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1, + 3,5,3,75,8,3,10,3,12,3,78,9,3,1,4,5,4,81,8,4,10,4,12,4,84,9,4,1,5,1,5, + 1,5,1,5,1,5,1,5,1,5,1,5,3,5,94,8,5,1,6,1,6,1,6,3,6,99,8,6,1,6,1,6,3,6, + 103,8,6,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,9,3,9,115,8,9,1,9,1,9,1, + 9,1,9,1,10,1,10,1,10,1,10,3,10,125,8,10,1,11,1,11,3,11,129,8,11,1,12,1, + 12,3,12,133,8,12,1,13,1,13,1,13,1,13,1,13,3,13,140,8,13,1,14,1,14,1,14, + 5,14,145,8,14,10,14,12,14,148,9,14,1,15,1,15,1,16,1,16,1,16,0,0,17,0,2, + 4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,1,0,5,7,1,0,5,6,1,0,1,3, + 2,0,4,4,21,24,162,0,37,1,0,0,0,2,47,1,0,0,0,4,65,1,0,0,0,6,71,1,0,0,0, + 8,82,1,0,0,0,10,93,1,0,0,0,12,95,1,0,0,0,14,104,1,0,0,0,16,110,1,0,0,0, + 18,114,1,0,0,0,20,120,1,0,0,0,22,126,1,0,0,0,24,130,1,0,0,0,26,139,1,0, + 0,0,28,141,1,0,0,0,30,149,1,0,0,0,32,151,1,0,0,0,34,36,5,28,0,0,35,34, + 1,0,0,0,36,39,1,0,0,0,37,35,1,0,0,0,37,38,1,0,0,0,38,41,1,0,0,0,39,37, + 1,0,0,0,40,42,3,2,1,0,41,40,1,0,0,0,42,43,1,0,0,0,43,41,1,0,0,0,43,44, + 1,0,0,0,44,45,1,0,0,0,45,46,5,0,0,1,46,1,1,0,0,0,47,49,5,20,0,0,48,50, + 3,4,2,0,49,48,1,0,0,0,49,50,1,0,0,0,50,53,1,0,0,0,51,52,5,9,0,0,52,54, + 5,20,0,0,53,51,1,0,0,0,53,54,1,0,0,0,54,55,1,0,0,0,55,56,5,5,0,0,56,58, + 3,6,3,0,57,59,5,10,0,0,58,57,1,0,0,0,58,59,1,0,0,0,59,61,1,0,0,0,60,62, + 5,28,0,0,61,60,1,0,0,0,62,63,1,0,0,0,63,61,1,0,0,0,63,64,1,0,0,0,64,3, + 1,0,0,0,65,66,5,12,0,0,66,67,5,21,0,0,67,68,5,9,0,0,68,69,5,21,0,0,69, + 70,5,13,0,0,70,5,1,0,0,0,71,76,3,8,4,0,72,73,5,8,0,0,73,75,3,8,4,0,74, + 72,1,0,0,0,75,78,1,0,0,0,76,74,1,0,0,0,76,77,1,0,0,0,77,7,1,0,0,0,78,76, + 1,0,0,0,79,81,3,10,5,0,80,79,1,0,0,0,81,84,1,0,0,0,82,80,1,0,0,0,82,83, + 1,0,0,0,83,9,1,0,0,0,84,82,1,0,0,0,85,94,3,12,6,0,86,94,3,14,7,0,87,94, + 3,16,8,0,88,94,3,18,9,0,89,94,3,20,10,0,90,94,3,22,11,0,91,94,3,24,12, + 0,92,94,3,32,16,0,93,85,1,0,0,0,93,86,1,0,0,0,93,87,1,0,0,0,93,88,1,0, + 0,0,93,89,1,0,0,0,93,90,1,0,0,0,93,91,1,0,0,0,93,92,1,0,0,0,94,11,1,0, + 0,0,95,96,3,28,14,0,96,98,7,0,0,0,97,99,5,19,0,0,98,97,1,0,0,0,98,99,1, + 0,0,0,99,100,1,0,0,0,100,102,3,26,13,0,101,103,3,30,15,0,102,101,1,0,0, + 0,102,103,1,0,0,0,103,13,1,0,0,0,104,105,5,16,0,0,105,106,3,28,14,0,106, + 107,7,1,0,0,107,108,3,32,16,0,108,109,5,17,0,0,109,15,1,0,0,0,110,111, + 5,16,0,0,111,112,5,17,0,0,112,17,1,0,0,0,113,115,5,19,0,0,114,113,1,0, + 0,0,114,115,1,0,0,0,115,116,1,0,0,0,116,117,5,14,0,0,117,118,5,21,0,0, + 118,119,5,15,0,0,119,19,1,0,0,0,120,121,5,12,0,0,121,122,3,6,3,0,122,124, + 5,13,0,0,123,125,3,30,15,0,124,123,1,0,0,0,124,125,1,0,0,0,125,21,1,0, + 0,0,126,128,5,22,0,0,127,129,3,30,15,0,128,127,1,0,0,0,128,129,1,0,0,0, + 129,23,1,0,0,0,130,132,5,20,0,0,131,133,3,30,15,0,132,131,1,0,0,0,132, + 133,1,0,0,0,133,25,1,0,0,0,134,140,3,18,9,0,135,140,3,20,10,0,136,140, + 3,22,11,0,137,140,3,24,12,0,138,140,3,32,16,0,139,134,1,0,0,0,139,135, + 1,0,0,0,139,136,1,0,0,0,139,137,1,0,0,0,139,138,1,0,0,0,140,27,1,0,0,0, + 141,146,5,21,0,0,142,143,5,18,0,0,143,145,5,21,0,0,144,142,1,0,0,0,145, + 148,1,0,0,0,146,144,1,0,0,0,146,147,1,0,0,0,147,29,1,0,0,0,148,146,1,0, + 0,0,149,150,7,2,0,0,150,31,1,0,0,0,151,152,7,3,0,0,152,33,1,0,0,0,17,37, + 43,49,53,58,63,76,82,93,98,102,114,124,128,132,139,146 + }; + + public static readonly ATN _ATN = + new ATNDeserializer().Deserialize(_serializedATN); + + +} +} // namespace SysML2.NET.CodeGenerator.Grammar diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfVisitor.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfVisitor.cs new file mode 100644 index 000000000..658bbffc8 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfVisitor.cs @@ -0,0 +1,138 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.2 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/CODE/SysML2.NET/Resources/kebnf.g4 by ANTLR 4.13.2 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace SysML2.NET.CodeGenerator.Grammar { +using Antlr4.Runtime.Misc; +using Antlr4.Runtime.Tree; +using IToken = Antlr4.Runtime.IToken; + +/// +/// This interface defines a complete generic visitor for a parse tree produced +/// by . +/// +/// The return type of the visit operation. +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.2")] +[System.CLSCompliant(false)] +public interface IkebnfVisitor : IParseTreeVisitor { + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSpecification([NotNull] kebnfParser.SpecificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRule_definition([NotNull] kebnfParser.Rule_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitParameter_list([NotNull] kebnfParser.Parameter_listContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAlternatives([NotNull] kebnfParser.AlternativesContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAlternative([NotNull] kebnfParser.AlternativeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitElement([NotNull] kebnfParser.ElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAssignment([NotNull] kebnfParser.AssignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNon_parsing_assignment([NotNull] kebnfParser.Non_parsing_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNon_parsing_empty([NotNull] kebnfParser.Non_parsing_emptyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCross_reference([NotNull] kebnfParser.Cross_referenceContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGroup([NotNull] kebnfParser.GroupContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTerminal([NotNull] kebnfParser.TerminalContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNon_terminal([NotNull] kebnfParser.Non_terminalContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitElement_core([NotNull] kebnfParser.Element_coreContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDotted_id([NotNull] kebnfParser.Dotted_idContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSuffix_op([NotNull] kebnfParser.Suffix_opContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitValue_literal([NotNull] kebnfParser.Value_literalContext context); +} +} // namespace SysML2.NET.CodeGenerator.Grammar diff --git a/SysML2.NET.CodeGenerator/Grammar/GrammarLoader.cs b/SysML2.NET.CodeGenerator/Grammar/GrammarLoader.cs new file mode 100644 index 000000000..9aa3d884b --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/GrammarLoader.cs @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Grammar +{ + using System.IO; + + using Antlr4.Runtime; + + using SysML2.NET.CodeGenerator.Grammar.Model; + + /// + /// Provides direct access to by providing file path + /// + public static class GrammarLoader + { + /// + /// Loads the + /// + /// The string uri that locates the KEBNF file to load + /// The loaded + /// If the does not locate an existing + public static TextualNotationSpecification LoadTextualNotationSpecification(string fileUri) + { + if (!File.Exists(fileUri)) + { + throw new FileNotFoundException("File not found", fileUri); + } + + var stream = CharStreams.fromPath(fileUri); + var lexer = new kebnfLexer(stream); + var tokens = new CommonTokenStream(lexer); + var parser = new kebnfParser(tokens); + + var tree = parser.specification(); + var explorer = new TextualNotationSpecificationVisitor(); + return (TextualNotationSpecification)explorer.Visit(tree); + } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/Alternatives.cs b/SysML2.NET.CodeGenerator/Grammar/Model/Alternatives.cs new file mode 100644 index 000000000..37fb9503f --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/Alternatives.cs @@ -0,0 +1,59 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Grammar.Model +{ + using System.Collections.Generic; + using System.Linq; + + /// + /// Provides mapping data class for the alternative grammar part + /// + public class Alternatives: IPartOfTextualRule + { + /// + /// Gets a collection of that is part of the + /// + public List Elements { get; } = []; + + /// + /// Gets the + /// + public TextualNotationRule TextualNotationRule { get; init; } + + /// + /// Asserts that the current contains that are part of a collection iteration that could be called from + /// another rule + /// + /// The computation of the assertion + internal bool ContainsAssignmentRequiringDispatch() + { + var assignments = this.Elements.OfType().Where(x => x.Operator == "+=").ToList(); + var groupElements = this.Elements.OfType().Where(x => x.IsCollection).ToList(); + + if (assignments.Count == 0) + { + return false; + } + + return groupElements.Count == 0; + } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/AssignmentElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/AssignmentElement.cs new file mode 100644 index 000000000..719dd5d2d --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/AssignmentElement.cs @@ -0,0 +1,48 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Grammar.Model +{ + /// + /// Defines the assignment element + /// + public class AssignmentElement: RuleElement + { + /// + /// Gets or set the property's name + /// + public string Property { get; set; } + + /// + /// Gets or sets the assignment operator + /// + public string Operator { get; set; } + + /// + /// Gets or sets the assignment value + /// + public RuleElement Value { get; set; } + + /// + /// Gets or sets an optional prefix + /// + public string Prefix { get; set; } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/GroupElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/GroupElement.cs new file mode 100644 index 000000000..820bbf6f5 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/GroupElement.cs @@ -0,0 +1,35 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Grammar.Model +{ + using System.Collections.Generic; + + /// + /// Defines a group of + /// + public class GroupElement: RuleElement + { + /// + /// Gets the collection that are part of the + /// + public List Alternatives { get; } = []; + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/IPartOfTextualRule.cs b/SysML2.NET.CodeGenerator/Grammar/Model/IPartOfTextualRule.cs new file mode 100644 index 000000000..c47436d8a --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/IPartOfTextualRule.cs @@ -0,0 +1,33 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Grammar.Model +{ + /// + /// Asserts that the current element is part of + /// + public interface IPartOfTextualRule + { + /// + /// Gets the + /// + TextualNotationRule TextualNotationRule { get; } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/NonParsingAssignmentElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/NonParsingAssignmentElement.cs new file mode 100644 index 000000000..54060b604 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/NonParsingAssignmentElement.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Grammar.Model +{ + /// + /// Defines the non-parsing assignment element + /// + public class NonParsingAssignmentElement : RuleElement + { + /// + /// Gets or sets the property's name + /// + public string PropertyName { get; set; } + + /// + /// Gets or sets the assignment operator + /// + public string Operator { get; set; } + + /// + /// Gets or sets the assigned value + /// + public string Value { get; set; } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/NonTerminalElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/NonTerminalElement.cs new file mode 100644 index 000000000..48d3d91a5 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/NonTerminalElement.cs @@ -0,0 +1,33 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Grammar.Model +{ + /// + /// Describes a non-terminal Element + /// + public class NonTerminalElement: RuleElement + { + /// + /// Gets or sets the non-terminal element name + /// + public string Name { get; set; } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/RuleElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/RuleElement.cs new file mode 100644 index 000000000..dc937d23e --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/RuleElement.cs @@ -0,0 +1,65 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Grammar.Model +{ + using System.Linq; + + /// + /// Base class that provides information about element that is part of a rule + /// + public abstract class RuleElement: IPartOfTextualRule + { + /// + /// Defines all suffix that defines optional elements + /// + private static readonly string[] OptionalSuffix = ["?", "*"]; + + /// + /// Defines all suffix that defines collection elements + /// + private static readonly string[] CollectionSuffix = ["*", "+"]; + + /// + /// Gets or sets an optional suffix + /// + public string Suffix { get; set; } + + /// + /// Asserts that the current rule element defines an optional element + /// + public bool IsOptional => !string.IsNullOrEmpty(this.Suffix) && OptionalSuffix.Contains(this.Suffix); + + /// + /// Asserts that the current rule element defines an collection element + /// + public bool IsCollection => !string.IsNullOrEmpty(this.Suffix) && CollectionSuffix.Contains(this.Suffix); + + /// + /// Gets or sets an optional that acts as container + /// + public RuleElement Container { get; set; } + + /// + /// Gets the + /// + public TextualNotationRule TextualNotationRule { get; init; } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/RuleParameter.cs b/SysML2.NET.CodeGenerator/Grammar/Model/RuleParameter.cs new file mode 100644 index 000000000..aa4978756 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/RuleParameter.cs @@ -0,0 +1,38 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Grammar.Model +{ + /// + /// Defines possible parameter that could be added to a + /// + public class RuleParameter + { + /// + /// Gets the parameter's name + /// + public string ParameterName { get; set; } + + /// + /// Gets the name of the target Element + /// + public string TargetElementName { get; set; } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/TerminalElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/TerminalElement.cs new file mode 100644 index 000000000..ac2f8abe7 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/TerminalElement.cs @@ -0,0 +1,33 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Grammar.Model +{ + /// + /// Describes a terminal Element + /// + public class TerminalElement: RuleElement + { + /// + /// Gets or sets the terminal element value + /// + public string Value { get; set; } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationRule.cs b/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationRule.cs new file mode 100644 index 000000000..e5791d4bf --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationRule.cs @@ -0,0 +1,125 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Grammar.Model +{ + using System.Collections.Generic; + using System.Linq; + + /// + /// Describe the content of a rule + /// + public class TextualNotationRule + { + /// + /// Get or set rule's name + /// + public string RuleName { get; set; } + + /// + /// Gets or set the name of the KerML Element that the rule target + /// + public string TargetElementName { get; set; } + + /// + /// Gets or set an optional + /// + public RuleParameter Parameter { get; set; } + + /// + /// Gets or sets the raw string that declares the rule + /// + public string RawRule { get; set; } + + /// + /// Gets or the collection of defined by the rule + /// + public List Alternatives { get; } = []; + + /// + /// Asserts that the current Rule acts has a dispatcher or not. A dispatcher needs to have index access to access element into a collection. + /// + public bool IsDispatcherRule => this.ComputeIsDispatcherRule(); + + /// + /// Asserts that the rule described assignment of multiple collection + /// + public bool IsMultiCollectionAssignment => this.ComputeIsMultiCollectionAssigment(); + + /// + /// Gets names of property that a multicollection assignment defines + /// + /// The collection of property names + public IReadOnlyCollection QueryMultiCollectionPropertiesName() + { + if (!this.IsMultiCollectionAssignment) + { + return Enumerable.Empty().ToList(); + } + + var assignments = this.Alternatives.SelectMany(x => x.Elements).OfType(); + return assignments.Where(x => x.Operator == "+=").DistinctBy(x => x.Property).Select(x => x.Property).ToList(); + } + + /// + /// Computes the value of the + /// + /// The result of the assertion computation + private bool ComputeIsMultiCollectionAssigment() + { + if (this.Alternatives.Count == 1) + { + return false; + } + + var assignments = this.Alternatives.SelectMany(x => x.Elements).OfType(); + return assignments.Where(x => x.Operator == "+=").DistinctBy(x => x.Property).Count() > 1; + } + + /// + /// Computes the assertion that the is a dispatcher or not + /// + /// The result of the assertion computation + private bool ComputeIsDispatcherRule() + { + return this.Alternatives.Count > 1 && this.Alternatives.Any(x => x.Elements.OfType().Any(a => a.Operator == "+=")) + || this.Alternatives.Count == 1 && this.Alternatives[0].Elements.Count == 1 && this.Alternatives[0].Elements[0] is AssignmentElement { Operator: "+="}; + } + + /// + /// Gets the that requires a dispatcher + /// + /// The + public AssignmentElement GetAssignmentElementNeedingDispatcher() + { + if (!this.IsDispatcherRule) + { + return null; + } + + if (this.Alternatives.Count == 1) + { + return this.Alternatives[0].Elements[0] as AssignmentElement; + } + + return this.Alternatives.SelectMany(x => x.Elements).OfType().FirstOrDefault(x => x.Operator == "+="); + } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationSpecification.cs b/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationSpecification.cs new file mode 100644 index 000000000..affae75c2 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationSpecification.cs @@ -0,0 +1,35 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Grammar.Model +{ + using System.Collections.Generic; + + /// + /// Provides access to all defined into the textual notation specification + /// + public class TextualNotationSpecification + { + /// + /// Gets the collection of all + /// + public List Rules { get; } = []; + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/ValueLiteralElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/ValueLiteralElement.cs new file mode 100644 index 000000000..1bf518797 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/ValueLiteralElement.cs @@ -0,0 +1,39 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Grammar.Model +{ + /// + /// Defines a that is a value literal + /// + public class ValueLiteralElement: RuleElement + { + /// + /// Gets or sets the literal value + /// + public string Value { get; init; } + + /// + /// Asserts that this value literal is to + /// + /// + public bool QueryIsQualifiedName() => this.Value == "[QualifiedName]"; + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs b/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs new file mode 100644 index 000000000..2a17f4dd6 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs @@ -0,0 +1,215 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.Grammar +{ + using System.Collections.Generic; + using System.Linq; + + using SysML2.NET.CodeGenerator.Grammar.Model; + + /// + /// Custom to read + /// + public class TextualNotationSpecificationVisitor: kebnfBaseVisitor + { + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as . + public override object VisitSpecification(kebnfParser.SpecificationContext context) + { + var specification = new TextualNotationSpecification(); + + specification.Rules.AddRange(context.rule_definition().Select(rule => (TextualNotationRule)this.Visit(rule))); + return specification; + } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as + public override object VisitRule_definition(kebnfParser.Rule_definitionContext context) + { + var rule = new TextualNotationRule() + { + RuleName = context.name.Text, + TargetElementName = context.target_ast?.Text, + RawRule = context.GetText().Trim() + }; + + this.CurrentRule = rule; + + if (string.IsNullOrWhiteSpace(rule.RuleName)) + { + rule.RuleName = rule.TargetElementName; + } + + if (context.parameter_list() != null) + { + rule.Parameter = new RuleParameter() + { + ParameterName = context.parameter_list().param_name.Text, + TargetElementName = context.parameter_list().param_type.Text + }; + } + + rule.Alternatives.AddRange((IEnumerable)this.Visit(context.rule_body)); + return rule; + } + + /// + /// Gets or sets the current that is processed + /// + public TextualNotationRule CurrentRule { get; set; } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as an + public override object VisitAlternatives(kebnfParser.AlternativesContext context) + { + return context.alternative().Select(a => (Alternatives)this.Visit(a)); + } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as an . + public override object VisitAlternative(kebnfParser.AlternativeContext context) + { + var alternatives = new Alternatives() + { + TextualNotationRule = this.CurrentRule + }; + + alternatives.Elements.AddRange(context.element().Select(e => (RuleElement)this.Visit(e)).Where(x => x != null)); + return alternatives; + } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as . + public override object VisitAssignment(kebnfParser.AssignmentContext context) + { + var assignement = new AssignmentElement() + { + Property = context.property.GetText().Split(".")[^1], + Operator = context.op.Text, + Suffix = context.suffix?.GetText(), + Value = (RuleElement)this.Visit(context.content), + Prefix = context.prefix?.Text, + TextualNotationRule = this.CurrentRule + }; + + assignement.Value.Container = assignement; + return assignement; + } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as + public override object VisitNon_parsing_assignment(kebnfParser.Non_parsing_assignmentContext context) + { + return new NonParsingAssignmentElement() + { + PropertyName = context.property.GetText(), + Operator = context.op.Text, + Value = context.val.GetText(), + TextualNotationRule = this.CurrentRule + }; + } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + public override object VisitValue_literal(kebnfParser.Value_literalContext context) + { + return new ValueLiteralElement() + { + Value = context.GetText(), + TextualNotationRule = this.CurrentRule + }; + } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as . + public override object VisitGroup(kebnfParser.GroupContext context) + { + var group = new GroupElement + { + Suffix = context.suffix?.GetText(), + TextualNotationRule = this.CurrentRule + }; + + group.Alternatives.AddRange((IEnumerable)this.Visit(context.alternatives())); + + foreach (var element in group.Alternatives.SelectMany(x => x.Elements)) + { + element.Container = group; + } + + return group; + } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as . + public override object VisitTerminal(kebnfParser.TerminalContext context) + { + return new TerminalElement() + { + Value = context.val.Text.Trim('\''), + Suffix = context.suffix?.GetText(), + TextualNotationRule = this.CurrentRule + }; + } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as . + public override object VisitNon_terminal(kebnfParser.Non_terminalContext context) + { + return new NonTerminalElement() + { + Name = context.name.Text, + Suffix = context.suffix?.GetText(), + TextualNotationRule = this.CurrentRule + }; + } + } +} diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/NamedElementHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/NamedElementHelper.cs index 2705fd893..1a7e63dc8 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/NamedElementHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/NamedElementHelper.cs @@ -52,6 +52,16 @@ public static void RegisterNamedElementHelper(this IHandlebars handlebars) writer.WriteSafeString(namedElement.QueryNamespace()); }); + + handlebars.RegisterHelper("NamedElement.WriteFullyQualifiedTypeName", (writer, _, arguments) => + { + if (arguments[0] is not INamedElement namedElement) + { + throw new ArgumentException("supposed to be INamedElement"); + } + + writer.WriteSafeString(namedElement.QueryFullyQualifiedTypeName()); + }); } } } diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/PropertyHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/PropertyHelper.cs index 85f8861ce..6858162bd 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/PropertyHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/PropertyHelper.cs @@ -300,7 +300,7 @@ public static void RegisterPropertyHelper(this IHandlebars handlebars) { if (property.QueryPropertyIsPartOfNonDerivedCompositeAggregation()) { - sb.Append($"IReadOnlyCollection<{typeName}> "); + sb.Append($"IReadOnlyList<{typeName}> "); } else { @@ -378,7 +378,7 @@ public static void RegisterPropertyHelper(this IHandlebars handlebars) { if (property.QueryPropertyIsPartOfNonDerivedCompositeAggregation()) { - sb.Append($"IReadOnlyCollection<{typeName}> "); + sb.Append($"IReadOnlyList<{typeName}> "); } else { diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs new file mode 100644 index 000000000..e02fc39aa --- /dev/null +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs @@ -0,0 +1,1259 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.CodeGenerator.HandleBarHelpers +{ + using System; + using System.Collections.Generic; + using System.Linq; + + using HandlebarsDotNet; + + using SysML2.NET.CodeGenerator.Extensions; + using SysML2.NET.CodeGenerator.Grammar.Model; + + using uml4net; + using uml4net.Classification; + using uml4net.CommonStructure; + using uml4net.Extensions; + using uml4net.StructuredClassifiers; + + /// + /// Provides textual notation rules related helper for + /// + public static class RulesHelper + { + /// + /// Register this helper + /// + /// The context with which the helper needs to be registered + public static void RegisterRulesHelper(this IHandlebars handlebars) + { + handlebars.RegisterHelper("RulesHelper.ContainsAnyDispatcherRules", (_, arguments) => + { + if (arguments.Length != 1) + { + throw new ArgumentException("RulesHelper.ContainsAnyDispatcherRules expects to have 3 arguments"); + } + + return arguments[0] is not List allRules + ? throw new ArgumentException("RulesHelper.ContainsAnyDispatcherRules expects a list of TextualNotationRule as only argument") + : allRules.Any(x => x.IsDispatcherRule); + }); + + handlebars.RegisterHelper("RulesHelper.WriteRule", (writer, _, arguments) => + { + if (arguments.Length != 3) + { + throw new ArgumentException("RulesHelper.WriteRule expects to have 3 arguments"); + } + + if (arguments[0] is not TextualNotationRule textualRule) + { + throw new ArgumentException("RulesHelper.WriteRule expects TextualNotationRule as first argument"); + } + + if (arguments[1] is not INamedElement namedElement) + { + throw new ArgumentException("RulesHelper.WriteRule expects INamedElement as second argument"); + } + + if (arguments[2] is not List allRules) + { + throw new ArgumentException("RulesHelper.WriteRule expects a list of TextualNotationRule as third argument"); + } + + if (namedElement is IClass umlClass) + { + var ruleGenerationContext = new RuleGenerationContext(namedElement) + { + CurrentVariableName = "poco" + }; + + ruleGenerationContext.AllRules.AddRange(allRules); + ProcessAlternatives(writer, umlClass, textualRule.Alternatives, ruleGenerationContext); + } + }); + } + + /// + /// Processes a collection of a + /// + /// The used to write into output content + /// The related + /// The collection of alternatives to process + /// The current + /// Asserts that the current is part of a multiple alternative process + private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection alternatives, RuleGenerationContext ruleGenerationContext, bool isPartOfMultipleAlternative = false) + { + ruleGenerationContext.DefinedIterators ??= []; + + if (alternatives.Count == 1) + { + var alternative = alternatives.ElementAt(0); + var elements = alternative.Elements; + DeclareAllRequiredIterators(writer, umlClass, alternative, ruleGenerationContext); + + if (ruleGenerationContext.CallerRule is { IsOptional: true, IsCollection: false }) + { + var targetPropertiesName = elements.OfType().Select(x => x.Property).Distinct().ToList(); + var allProperties = umlClass.QueryAllProperties(); + + if (targetPropertiesName.Count > 0) + { + writer.WriteSafeString(Environment.NewLine); + writer.WriteSafeString("if("); + + var ifStatementContent = new List(); + + foreach (var targetPropertyName in targetPropertiesName) + { + var property = allProperties.Single(x => string.Equals(x.Name, targetPropertyName, StringComparison.OrdinalIgnoreCase)); + + if (property.QueryIsEnumerable()) + { + var assigment = elements.OfType().First(x => x.Property == targetPropertyName); + var iterator = ruleGenerationContext.DefinedIterators.FirstOrDefault(x => x.ApplicableRuleElements.Contains(assigment)); + ifStatementContent.Add(iterator == null ? $"BuildGroupConditionFor{assigment.TextualNotationRule.RuleName}(poco)" : property.QueryIfStatementContentForNonEmpty(iterator.IteratorVariableName)); + } + else + { + ifStatementContent.Add(property.QueryIfStatementContentForNonEmpty("poco")); + } + } + + writer.WriteSafeString(string.Join(" && ", ifStatementContent)); + writer.WriteSafeString($"){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + + foreach (var textualRuleElement in elements) + { + var previousCaller = ruleGenerationContext.CallerRule; + ProcessRuleElement(writer, umlClass, textualRuleElement, ruleGenerationContext); + ruleGenerationContext.CallerRule = previousCaller; + } + } + else + { + writer.WriteSafeString($"{Environment.NewLine}if(BuildGroupConditionFor{alternative.TextualNotationRule.RuleName}(poco))"); + writer.WriteSafeString($"{Environment.NewLine}{{{Environment.NewLine}"); + + foreach (var textualRuleElement in elements) + { + ProcessRuleElement(writer, umlClass, textualRuleElement, ruleGenerationContext); + } + } + + writer.WriteSafeString($"stringBuilder.Append(' ');{Environment.NewLine}"); + writer.WriteSafeString($"}}{Environment.NewLine}"); + } + else + { + foreach (var textualRuleElement in elements) + { + var previousCaller = ruleGenerationContext.CallerRule; + ProcessRuleElement(writer, umlClass, textualRuleElement, ruleGenerationContext, isPartOfMultipleAlternative); + ruleGenerationContext.CallerRule = previousCaller; + } + } + } + else + { + if (alternatives.All(x => x.Elements.Count == 1)) + { + if (alternatives.ElementAt(0).Elements[0].TextualNotationRule.IsMultiCollectionAssignment) + { + ProcessMultiCollectionAssignment(writer, umlClass, alternatives, ruleGenerationContext); + return; + } + + var types = alternatives.SelectMany(x => x.Elements).Select(x => x.GetType()).Distinct().ToList(); + + if(types.Count == 1) + { + ProcessUnitypedAlternativesWithOneElement(writer, umlClass, alternatives, ruleGenerationContext); + } + else + { + if (types.SequenceEqual([typeof(AssignmentElement), typeof(NonTerminalElement)])) + { + foreach (var alternative in alternatives) + { + DeclareAllRequiredIterators(writer, umlClass, alternative, ruleGenerationContext); + } + + for (var alternativeIndex = 0; alternativeIndex < alternatives.Count; alternativeIndex++) + { + var ruleElement = alternatives.ElementAt(alternativeIndex).Elements[0]; + + if (alternativeIndex != 0) + { + writer.WriteSafeString("else"); + } + + switch (ruleElement) + { + case AssignmentElement assignmentElement: + var targetProperty = umlClass.QueryAllProperties().Single(x => string.Equals(x.Name, assignmentElement.Property)); + + if (alternativeIndex != 0) + { + writer.WriteSafeString(" "); + } + + if (targetProperty.QueryIsEnumerable()) + { + DeclareAllRequiredIterators(writer, umlClass, alternatives.ElementAt(0), ruleGenerationContext); + + var iterator = ruleGenerationContext.DefinedIterators.Single(x => x.ApplicableRuleElements.Contains(assignmentElement)); + + writer.WriteSafeString($"if({targetProperty.QueryIfStatementContentForNonEmpty(iterator.IteratorVariableName)}){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + } + else + { + writer.WriteSafeString($"{Environment.NewLine}if({targetProperty.QueryIfStatementContentForNonEmpty("poco")}){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + } + + ProcessAssignmentElement(writer, umlClass, ruleGenerationContext, assignmentElement, true); + + writer.WriteSafeString($"{Environment.NewLine}}}"); + break; + + case NonTerminalElement nonTerminalElement: + writer.WriteSafeString($"{{{Environment.NewLine}"); + ProcessNonTerminalElement(writer, umlClass, nonTerminalElement, ruleGenerationContext); + writer.WriteSafeString($"{Environment.NewLine}}}"); + break; + } + } + } + else if (types.SequenceEqual([typeof(NonTerminalElement), typeof(AssignmentElement)])) + { + var nonTerminalElement = (NonTerminalElement)alternatives.ElementAt(0).Elements[0]; + var assignmentElements = alternatives.SelectMany(x => x.Elements).OfType().ToList(); + + var referencedTerminalElement = assignmentElements.Select(x => x.Value).OfType().ToList(); + + if (referencedTerminalElement.Count != assignmentElements.Count) + { + writer.WriteSafeString("throw new System.NotSupportedException(\"Assignment Element with something else than NonTerminalElement not supported\");"); + return; + } + + referencedTerminalElement.Add(nonTerminalElement); + + var targetProperty = umlClass.QueryAllProperties().Single(x => string.Equals(x.Name, assignmentElements[0].Property)); + + const string indexName = "elementIndex"; + const string variableName = "elements"; + const string elementName = $"{variableName}Element"; + + writer.WriteSafeString($"var {elementName} = poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}[{indexName}];{Environment.NewLine}"); + writer.WriteSafeString($"{Environment.NewLine}switch({elementName}){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + + var mappedElements = OrderElementsByInheritance(referencedTerminalElement, umlClass.Cache, ruleGenerationContext); + + foreach (var assignmentElement in assignmentElements) + { + var mappedElement = mappedElements.Single(x => x.RuleElement == assignmentElement.Value); + + writer.WriteSafeString($"case {mappedElement.UmlClass.QueryFullyQualifiedTypeName(targetInterface:mappedElement.UmlClass.IsAbstract)} {mappedElement.UmlClass.Name.LowerCaseFirstLetter()}:{Environment.NewLine}"); + ruleGenerationContext.CurrentVariableName = mappedElement.UmlClass.Name.LowerCaseFirstLetter(); + ProcessNonTerminalElement(writer, mappedElement.UmlClass, mappedElement.RuleElement, ruleGenerationContext); + writer.WriteSafeString($"break;{Environment.NewLine}"); + } + + var mappedElementForNonTerminal = mappedElements.Single(x => x.RuleElement == nonTerminalElement); + writer.WriteSafeString($"case {mappedElementForNonTerminal.UmlClass.QueryFullyQualifiedTypeName()} {mappedElementForNonTerminal.UmlClass.Name.LowerCaseFirstLetter()}:{Environment.NewLine}"); + + if (mappedElementForNonTerminal.UmlClass == umlClass) + { + writer.WriteSafeString($"{indexName} = Build{nonTerminalElement.Name}({mappedElementForNonTerminal.UmlClass.Name.LowerCaseFirstLetter()}, {indexName}, stringBuilder);"); + } + else + { + writer.WriteSafeString($"{indexName} = {mappedElementForNonTerminal.UmlClass.Name}TextualNotationBuilder.Build{nonTerminalElement.Name}({mappedElementForNonTerminal.UmlClass.Name.LowerCaseFirstLetter()}, {indexName}, stringBuilder);"); + } + + writer.WriteSafeString($"{Environment.NewLine}break;{Environment.NewLine}"); + writer.WriteSafeString($"{Environment.NewLine}}}"); + } + else if (alternatives.ElementAt(0).Elements[0] is TerminalElement terminalElement && alternatives.ElementAt(1).Elements[0] is AssignmentElement assignmentElement) + { + var targetProperty = umlClass.QueryAllProperties().Single(x => string.Equals(x.Name, assignmentElement.Property)); + + writer.WriteSafeString($"if(!{targetProperty.QueryIfStatementContentForNonEmpty("poco")}){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + ProcessRuleElement(writer, umlClass, terminalElement, ruleGenerationContext); + writer.WriteSafeString($"{Environment.NewLine}}}"); + writer.WriteSafeString("else"); + writer.WriteSafeString($"{Environment.NewLine}{{{Environment.NewLine}"); + ProcessAssignmentElement(writer, umlClass, ruleGenerationContext, assignmentElement, true); + writer.WriteSafeString($"{Environment.NewLine}}}"); + } + else + { + writer.WriteSafeString($"throw new System.NotSupportedException(\"Multiple alternatives processing {string.Join(',', types.Select(x => x.Name))} not implemented yet\");"); + } + } + } + else + { + writer.WriteSafeString("throw new System.NotSupportedException(\"Multiple alternatives not implemented yet\");"); + } + } + } + + /// + /// Processes for a that is a multicollection assignment + /// + /// The used to write into output content + /// The related + /// The collection of alternatives to process + /// The current + private static void ProcessMultiCollectionAssignment(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection alternatives, RuleGenerationContext ruleGenerationContext) + { + + } + + /// + /// Process multiple when all of them only have one + /// + /// The used to write into output content + /// The related + /// The collection of alternatives to process + /// The current + private static void ProcessUnitypedAlternativesWithOneElement(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection alternatives, RuleGenerationContext ruleGenerationContext) + { + var firstRuleElement = alternatives.ElementAt(0).Elements[0]; + + switch (firstRuleElement) + { + case TerminalElement terminalElement: + writer.WriteSafeString($"stringBuilder.Append(\" {terminalElement.Value} \");"); + break; + case NonTerminalElement: + { + var nonTerminalElements = alternatives.SelectMany(x => x.Elements).OfType().ToList(); + var mappedNonTerminalElements = OrderElementsByInheritance(nonTerminalElements, umlClass.Cache, ruleGenerationContext); + + if (mappedNonTerminalElements.Select(x => x.UmlClass).Distinct().Count() != mappedNonTerminalElements.Count) + { + writer.WriteSafeString("throw new System.NotSupportedException(\"Multiple alternatives with same referenced rule type not implemented yet\");"); + break; + } + + var variableName = "poco"; + + if (ruleGenerationContext.CallerRule is AssignmentElement assignmentElement) + { + if (assignmentElement.TextualNotationRule.IsDispatcherRule) + { + variableName = $"elementFor{assignmentElement.Property.CapitalizeFirstLetter()}"; + writer.WriteSafeString($"var elementFor{assignmentElement.Property.CapitalizeFirstLetter()} = {ruleGenerationContext.CurrentVariableName}.{assignmentElement.Property.CapitalizeFirstLetter()}[elementIndex];{Environment.NewLine}"); + } + else + { + var iteratorToUse = ruleGenerationContext.DefinedIterators.Single(x => x.ApplicableRuleElements.Contains(assignmentElement)); + variableName = $"{iteratorToUse.IteratorVariableName}.Current"; + writer.WriteSafeString($"{iteratorToUse.IteratorVariableName}.MoveNext();{Environment.NewLine}{Environment.NewLine}"); + } + } + + writer.WriteSafeString($"switch({variableName}){Environment.NewLine}"); + writer.WriteSafeString("{"); + + foreach (var orderedNonTerminalElement in mappedNonTerminalElements) + { + var previousVariableName = ruleGenerationContext.CurrentVariableName; + + if (orderedNonTerminalElement.UmlClass == ruleGenerationContext.NamedElementToGenerate) + { + writer.WriteSafeString($"default:{Environment.NewLine}"); + ruleGenerationContext.CurrentVariableName = variableName; + } + else + { + writer.WriteSafeString($"case {orderedNonTerminalElement.UmlClass.QueryFullyQualifiedTypeName(targetInterface: orderedNonTerminalElement.UmlClass.IsAbstract)} poco{orderedNonTerminalElement.UmlClass.Name}:{Environment.NewLine}"); + ruleGenerationContext.CurrentVariableName = $"poco{orderedNonTerminalElement.UmlClass.Name}"; + } + + ProcessNonTerminalElement(writer, orderedNonTerminalElement.UmlClass, orderedNonTerminalElement.RuleElement, ruleGenerationContext); + + ruleGenerationContext.CurrentVariableName = previousVariableName; + writer.WriteSafeString($"{Environment.NewLine}break;{Environment.NewLine}"); + } + + writer.WriteSafeString($"}}{Environment.NewLine}"); + + break; + } + case AssignmentElement: + var assignmentElements = alternatives.SelectMany(x => x.Elements).OfType().ToList(); + var propertiesTarget = assignmentElements.Select(x => x.Property).Distinct().ToList(); + + if (propertiesTarget.Count == 1) + { + var targetProperty = umlClass.QueryAllProperties().Single(x => string.Equals(x.Name, propertiesTarget[0])); + + var orderElementsByInheritance = OrderElementsByInheritance(assignmentElements.Select(x => x.Value).OfType().ToList(), umlClass.Cache, ruleGenerationContext); + + if (assignmentElements.All(x => x.Operator == "+=") && assignmentElements.All(x => x.Value is NonTerminalElement)) + { + writer.WriteSafeString($"switch(elementIn{targetProperty.Name.CapitalizeFirstLetter()}){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + + foreach (var orderedElement in orderElementsByInheritance) + { + var numberOfElementOfSameType = orderElementsByInheritance.Count(x => x.UmlClass == orderedElement.UmlClass); + + if (numberOfElementOfSameType == 1) + { + writer.WriteSafeString($"case {orderedElement.UmlClass.QueryFullyQualifiedTypeName(targetInterface:orderedElement.UmlClass.IsAbstract)} {orderedElement.UmlClass.Name.LowerCaseFirstLetter()}:{Environment.NewLine}"); + } + else + { + writer.WriteSafeString($"case {orderedElement.UmlClass.QueryFullyQualifiedTypeName(targetInterface:orderedElement.UmlClass.IsAbstract)} {orderedElement.UmlClass.Name.LowerCaseFirstLetter()} when {orderedElement.UmlClass.Name.LowerCaseFirstLetter()}.IsValidFor{orderedElement.RuleElement.Name}():{Environment.NewLine}"); + } + + var previousVariableName = ruleGenerationContext.CurrentVariableName; + ruleGenerationContext.CurrentVariableName = orderedElement.UmlClass.Name.LowerCaseFirstLetter(); + ProcessNonTerminalElement(writer, orderedElement.UmlClass, orderedElement.RuleElement, ruleGenerationContext); + ruleGenerationContext.CurrentVariableName = previousVariableName; + writer.WriteSafeString($"{Environment.NewLine}break;{Environment.NewLine}"); + } + + writer.WriteSafeString($"}}{Environment.NewLine}"); + } + else + { + var typeFiltering = string.Join(", ", orderElementsByInheritance.Select(x => $"typeof({x.UmlClass.QueryFullyQualifiedTypeName(targetInterface: x.UmlClass.IsAbstract)})")); + writer.WriteSafeString($"using var iterator = SysML2.NET.Extensions.EnumerableExtensions.GetElementsOfType(poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}, {typeFiltering}).GetEnumerator();{Environment.NewLine}"); + writer.WriteSafeString($"iterator.MoveNext();{Environment.NewLine}{Environment.NewLine}"); + writer.WriteSafeString("if(iterator.Current != null)"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + + writer.WriteSafeString($"switch(iterator.Current){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + + foreach (var orderedElement in orderElementsByInheritance) + { + if (orderedElement.UmlClass.Name == "Element") + { + writer.WriteSafeString($"case {{ }} {orderedElement.UmlClass.Name.LowerCaseFirstLetter()}:{Environment.NewLine}"); + } + else + { + writer.WriteSafeString($"case {orderedElement.UmlClass.QueryFullyQualifiedTypeName(targetInterface:orderedElement.UmlClass.IsAbstract)} {orderedElement.UmlClass.Name.LowerCaseFirstLetter()}:{Environment.NewLine}"); + } + + var previousVariableName = ruleGenerationContext.CurrentVariableName; + ruleGenerationContext.CurrentVariableName = orderedElement.UmlClass.Name.LowerCaseFirstLetter(); + ProcessNonTerminalElement(writer, orderedElement.UmlClass, orderedElement.RuleElement, ruleGenerationContext); + ruleGenerationContext.CurrentVariableName = previousVariableName; + writer.WriteSafeString($"{Environment.NewLine}break;{Environment.NewLine}"); + } + + writer.WriteSafeString($"}}{Environment.NewLine}"); + writer.WriteSafeString($"}}{Environment.NewLine}"); + } + } + else + { + foreach (var alternative in alternatives) + { + DeclareAllRequiredIterators(writer, umlClass, alternative, ruleGenerationContext); + } + + var properties = umlClass.QueryAllProperties(); + + for (var alternativeIndex = 0; alternativeIndex < alternatives.Count; alternativeIndex++) + { + if (alternativeIndex != 0) + { + writer.WriteSafeString("else "); + } + + var assignment = assignmentElements[alternativeIndex]; + var targetProperty = properties.Single(x => string.Equals(x.Name, assignment.Property)); + + var iterator = ruleGenerationContext.DefinedIterators.SingleOrDefault(x => x.ApplicableRuleElements.Contains(assignment)); + + if (assignment.Operator != "+=") + { + writer.WriteSafeString($"if({targetProperty.QueryIfStatementContentForNonEmpty(iterator?.IteratorVariableName ?? "poco")}){Environment.NewLine}"); + } + + writer.WriteSafeString($"{{{Environment.NewLine}"); + ProcessAssignmentElement(writer, umlClass, ruleGenerationContext, assignment, true); + writer.WriteSafeString($"{Environment.NewLine}}}{Environment.NewLine}"); + } + } + + break; + default: + writer.WriteSafeString($"throw new System.NotSupportedException(\"Multiple alternatives with only {firstRuleElement.GetType().Name} not implemented yet\");"); + break; + } + } + + /// + /// Orders a collection of based on the inheritance ordering, to build switch expression + /// + /// The collection of to order + /// The + /// The current + /// The collection of ordered with the associated + private static List<(NonTerminalElement RuleElement, IClass UmlClass)> OrderElementsByInheritance(List nonTerminalElements, IXmiElementCache cache, RuleGenerationContext ruleGenerationContext) + { + var mapping = new List<(NonTerminalElement RuleElement, IClass UmlClass)>(); + var elementClass = cache.Values.Single(x => x is IClass { Name: "Element" }); + + foreach (var nonTerminalElement in nonTerminalElements) + { + var referencedRule = ruleGenerationContext.AllRules.Single(x => x.RuleName == nonTerminalElement.Name); + var referencedClassName = referencedRule.TargetElementName ?? referencedRule.RuleName; + var referencedClass =(IClass)(cache.Values.SingleOrDefault(x => x is IClass umlClass && umlClass.Name == referencedClassName)?? elementClass); + mapping.Add((nonTerminalElement, referencedClass)); + } + + mapping.Sort((a, b) => + { + if (a.UmlClass == ruleGenerationContext.NamedElementToGenerate) + { + return 1; + } + + if (a.UmlClass == b.UmlClass) + { + return 0; + } + + if (a.UmlClass.QueryIsSubclassOf(b.UmlClass)) + { + return -1; + } + + return b.UmlClass.QueryIsSubclassOf(a.UmlClass) ? 1 : 0; + }); + + return mapping; + } + + /// + /// Declares all required iterator for all present inside an + /// + /// The used to write into output content + /// The related + /// The to process + /// The current + private static void DeclareAllRequiredIterators(EncodedTextWriter writer, IClass umlClass, Alternatives alternatives, RuleGenerationContext ruleGenerationContext) + { + foreach (var ruleElement in alternatives.Elements) + { + switch (ruleElement) + { + case AssignmentElement assignmentElement: + DeclareIteratorIfRequired(writer, umlClass, assignmentElement, ruleGenerationContext); + break; + case GroupElement groupElement: + foreach (var groupElementAlternative in groupElement.Alternatives) + { + DeclareAllRequiredIterators(writer, umlClass, groupElementAlternative, ruleGenerationContext); + } + + break; + } + } + } + + /// + /// Processes a + /// + /// The used to write into output content + /// The related + /// The to process + /// The current + /// + /// If the type of the is not supported + private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass, RuleElement textualRuleElement, RuleGenerationContext ruleGenerationContext, bool isPartOfMultipleAlternative = false) + { + switch (textualRuleElement) + { + case TerminalElement terminalElement: + var valueToAdd = terminalElement.Value; + + if (valueToAdd.Length > 1) + { + valueToAdd += ' '; + } + + writer.WriteSafeString($"stringBuilder.Append(\"{valueToAdd}\");"); + break; + case NonTerminalElement nonTerminalElement: + if (ruleGenerationContext.CallerRule is NonTerminalElement { Container: AssignmentElement assignmentElementContainer }) + { + var textualBuilderClass = ruleGenerationContext.NamedElementToGenerate as IClass; + var assignedProperty = textualBuilderClass.QueryAllProperties().SingleOrDefault(x => x.Name == assignmentElementContainer.Property); + ruleGenerationContext.CurrentVariableName = assignedProperty == null ? "poco" : $"poco.{assignedProperty.QueryPropertyNameBasedOnUmlProperties()}"; + } + else + { + ruleGenerationContext.CurrentVariableName = "poco"; + } + + ProcessNonTerminalElement(writer, umlClass, nonTerminalElement,ruleGenerationContext, isPartOfMultipleAlternative); + + break; + case GroupElement groupElement: + ruleGenerationContext.CallerRule = groupElement ; + + if (groupElement.IsCollection && groupElement.Alternatives.Count == 1) + { + var assignmentRule = groupElement.Alternatives.SelectMany(x => x.Elements).FirstOrDefault(x => x is AssignmentElement { Value: NonTerminalElement } || x is AssignmentElement {Value: ValueLiteralElement}); + + if (assignmentRule is AssignmentElement assignmentElement) + { + var iteratorToUse = ruleGenerationContext.DefinedIterators.Single(x => x.ApplicableRuleElements.Contains(assignmentElement)); + writer.WriteSafeString($"{Environment.NewLine}while({iteratorToUse.IteratorVariableName}.MoveNext()){Environment.NewLine}"); + } + + writer.WriteSafeString($"{{{Environment.NewLine}"); + ProcessAlternatives(writer, umlClass, groupElement.Alternatives, ruleGenerationContext); + writer.WriteSafeString($"{Environment.NewLine}}}"); + } + else if (groupElement.IsCollection) + { + writer.WriteSafeString("// Have to handle group collection"); // => hand code ! + } + else + { + ProcessAlternatives(writer, umlClass, groupElement.Alternatives, ruleGenerationContext); + } + + if (!groupElement.IsOptional) + { + writer.WriteSafeString($"{Environment.NewLine}stringBuilder.Append(' ');"); + } + + break; + case AssignmentElement assignmentElement: + ProcessAssignmentElement(writer, umlClass, ruleGenerationContext, assignmentElement, isPartOfMultipleAlternative); + break; + case NonParsingAssignmentElement nonParsingAssignmentElement: + writer.WriteSafeString($"// NonParsing Assignment Element : {nonParsingAssignmentElement.PropertyName} {nonParsingAssignmentElement.Operator} {nonParsingAssignmentElement.Value} => Does not have to be process"); + break; + case ValueLiteralElement valueLiteralElement: + if (valueLiteralElement.QueryIsQualifiedName()) + { + writer.WriteSafeString($"stringBuilder.Append({ruleGenerationContext.CurrentVariableName}.qualifiedName);{Environment.NewLine}"); + writer.WriteSafeString("stringBuilder.Append(' ');"); + } + else + { + writer.WriteSafeString("throw new System.NotSupportedException(\"Value Literal different than QualifiedName not supported\");"); + } + + break; + default: + throw new ArgumentException("Unknown element type"); + } + + writer.WriteSafeString(Environment.NewLine); + } + + /// + /// Processes an + /// + /// The used to write into output content + /// The related + /// The to process + /// The current + /// Asserts that the current is part of a multiple alternative process + private static void ProcessAssignmentElement(EncodedTextWriter writer, IClass umlClass, RuleGenerationContext ruleGenerationContext, AssignmentElement assignmentElement, bool isPartOfMultipleAlternative = false) + { + var properties = umlClass.QueryAllProperties(); + var targetProperty = properties.SingleOrDefault(x => string.Equals(x.Name, assignmentElement.Property, StringComparison.OrdinalIgnoreCase)); + + if (targetProperty != null) + { + if (targetProperty.QueryIsEnumerable()) + { + if (assignmentElement.Value is NonTerminalElement nonTerminalElement) + { + string usedVariable; + + if (assignmentElement.TextualNotationRule.IsDispatcherRule) + { + usedVariable = $"elementFor{assignmentElement.Property.CapitalizeFirstLetter()}"; + + var collectionName = ruleGenerationContext.CurrentVariableName.EndsWith(assignmentElement.Property, StringComparison.InvariantCultureIgnoreCase) + ? ruleGenerationContext.CurrentVariableName + : $"{ruleGenerationContext.CurrentVariableName}.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}"; + + if (ruleGenerationContext.CallerRule is not NonTerminalElement { IsCollection: false }) + { + writer.WriteSafeString($"if(elementIndex < {collectionName}.Count){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + writer.WriteSafeString($"var {usedVariable} = {collectionName}[elementIndex];{Environment.NewLine}"); + } + else + { + writer.WriteSafeString($"var {usedVariable} = {collectionName}[0];{Environment.NewLine}"); + } + } + else + { + var iteratorToUse = ruleGenerationContext.DefinedIterators.Single(x => x.ApplicableRuleElements.Contains(assignmentElement)); + + if (!isPartOfMultipleAlternative && assignmentElement.Container is not GroupElement { IsCollection: true } && assignmentElement.Container is not GroupElement { IsOptional: true }) + { + writer.WriteSafeString($"{iteratorToUse.IteratorVariableName}.MoveNext();{Environment.NewLine}"); + } + + usedVariable = $"{iteratorToUse.IteratorVariableName}.Current"; + } + + var previousVariableName = ruleGenerationContext.CurrentVariableName; + ruleGenerationContext.CurrentVariableName = usedVariable; + var previousCaller = ruleGenerationContext.CallerRule; + ruleGenerationContext.CallerRule = assignmentElement; + ProcessNonTerminalElement(writer, umlClass, nonTerminalElement, ruleGenerationContext); + ruleGenerationContext.CurrentVariableName = previousVariableName; + ruleGenerationContext.CallerRule = previousCaller; + + if (assignmentElement.TextualNotationRule.IsDispatcherRule && ruleGenerationContext.CallerRule is not NonTerminalElement { IsCollection: false }) + { + writer.WriteSafeString("}"); + } + } + else if(assignmentElement.Value is GroupElement groupElement) + { + var previousCaller = ruleGenerationContext.CallerRule; + ruleGenerationContext.CallerRule = assignmentElement; + ProcessAlternatives(writer, umlClass, groupElement.Alternatives, ruleGenerationContext); + ruleGenerationContext.CallerRule = previousCaller; + } + else if(assignmentElement.Value is ValueLiteralElement valueLiteralElement && valueLiteralElement.QueryIsQualifiedName()) + { + var iteratorToUse = ruleGenerationContext.DefinedIterators.Single(x => x.ApplicableRuleElements.Contains(assignmentElement)); + + if (assignmentElement.Container is not GroupElement { IsCollection: true } && assignmentElement.Container is not GroupElement { IsOptional: true }) + { + writer.WriteSafeString($"{iteratorToUse.IteratorVariableName}.MoveNext();{Environment.NewLine}"); + } + + writer.WriteSafeString($"{Environment.NewLine}if({iteratorToUse.IteratorVariableName}.Current != null){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + writer.WriteSafeString($"stringBuilder.Append({iteratorToUse.IteratorVariableName}.Current.qualifiedName);{Environment.NewLine}"); + writer.WriteSafeString("}"); + } + else + { + writer.WriteSafeString("throw new System.NotSupportedException(\"Assigment of enumerable with non NonTerminalElement not supported yet\");"); + } + } + else + { + if (assignmentElement.IsOptional) + { + writer.WriteSafeString($"{Environment.NewLine}if({targetProperty.QueryIfStatementContentForNonEmpty("poco")}){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + writer.WriteSafeString($"stringBuilder.Append(poco.{targetProperty.Name.CapitalizeFirstLetter()});{Environment.NewLine}"); + writer.WriteSafeString("}"); + } + else + { + var targetPropertyName = targetProperty.QueryPropertyNameBasedOnUmlProperties(); + + if (targetProperty.QueryIsString()) + { + writer.WriteSafeString($"stringBuilder.Append(poco.{targetPropertyName});"); + } + else if (targetProperty.QueryIsBool()) + { + if (assignmentElement.Value is TerminalElement terminalElement) + { + if (!isPartOfMultipleAlternative && assignmentElement.Container is not GroupElement) + { + writer.WriteSafeString($"if({targetProperty.QueryIfStatementContentForNonEmpty("poco")}){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + writer.WriteSafeString($"stringBuilder.Append(\" {terminalElement.Value} \");{Environment.NewLine}"); + writer.WriteSafeString('}'); + } + else + { + writer.WriteSafeString($"stringBuilder.Append(\" {terminalElement.Value} \");"); + } + } + else + { + writer.WriteSafeString($"stringBuilder.Append(poco.{targetPropertyName}.ToString().ToLower());"); + } + } + else if (targetProperty.QueryIsEnum()) + { + writer.WriteSafeString($"stringBuilder.Append(poco.{targetPropertyName}.ToString().ToLower());"); + } + else if(targetProperty.QueryIsReferenceProperty()) + { + switch (assignmentElement.Value) + { + case NonTerminalElement nonTerminalElement: + { + var previousCaller = ruleGenerationContext.CallerRule; + ruleGenerationContext.CallerRule = nonTerminalElement; + ruleGenerationContext.CurrentVariableName = $"poco.{targetPropertyName}"; + ProcessNonTerminalElement(writer, targetProperty.Type as IClass, nonTerminalElement, ruleGenerationContext, isPartOfMultipleAlternative); + ruleGenerationContext.CurrentVariableName = "poco"; + ruleGenerationContext.CallerRule = previousCaller; + break; + } + case ValueLiteralElement valueLiteralElement when valueLiteralElement.QueryIsQualifiedName(): + if (isPartOfMultipleAlternative) + { + writer.WriteSafeString($"stringBuilder.Append(poco.{targetPropertyName}.qualifiedName);{Environment.NewLine}"); + writer.WriteSafeString("stringBuilder.Append(' ');"); + } + else + { + writer.WriteSafeString($"{Environment.NewLine}if (poco.{targetPropertyName} != null){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + writer.WriteSafeString($"stringBuilder.Append(poco.{targetPropertyName}.qualifiedName);{Environment.NewLine}"); + writer.WriteSafeString("stringBuilder.Append(' ');"); + writer.WriteSafeString($"{Environment.NewLine}}}"); + } + + break; + default: + writer.WriteSafeString("throw new System.NotSupportedException(\"Assigment of reference element not supported yet for this case\");"); + break; + } + } + else + { + writer.WriteSafeString($"stringBuilder.Append(poco.{targetPropertyName}.ToString());"); + } + } + } + } + else + { + writer.WriteSafeString($"Build{assignmentElement.Property.CapitalizeFirstLetter()}(poco, stringBuilder);"); + } + } + + /// + /// Process a + /// + /// The used to write into output content + /// The related + /// The to process + /// The current + /// Asserts that the current is part of a multiple alternative process + private static void ProcessNonTerminalElement(EncodedTextWriter writer, IClass umlClass, NonTerminalElement nonTerminalElement, RuleGenerationContext ruleGenerationContext, bool isPartOfMultipleAlternative = false) + { + var referencedRule = ruleGenerationContext.AllRules.SingleOrDefault(x => x.RuleName == nonTerminalElement.Name); + + string typeTarget; + + if (referencedRule == null) + { + typeTarget = umlClass.Name; + } + else + { + typeTarget = referencedRule.TargetElementName ?? referencedRule.RuleName; + } + + var isForProperty = ruleGenerationContext.CurrentVariableName.Contains('.'); + + if (isForProperty && !isPartOfMultipleAlternative) + { + writer.WriteSafeString($"{Environment.NewLine}if ({ruleGenerationContext.CurrentVariableName} != null){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + } + + if (nonTerminalElement.IsCollection) + { + writer.WriteSafeString($"// Handle collection Non Terminal {Environment.NewLine}"); + + if (referencedRule is not { IsDispatcherRule: true }) + { + if (nonTerminalElement.TextualNotationRule.IsDispatcherRule) + { + writer.WriteSafeString($"Build{ nonTerminalElement.Name}Internal({ruleGenerationContext.CurrentVariableName}, elementIndex, stringBuilder);"); + } + else + { + writer.WriteSafeString($"Build{ nonTerminalElement.Name}Internal({ruleGenerationContext.CurrentVariableName}, stringBuilder);"); + } + } + else + { + var assignmentProperty = referencedRule.GetAssignmentElementNeedingDispatcher().Property; + + writer.WriteSafeString($"for(var {assignmentProperty}Index = 0; {assignmentProperty}Index < {ruleGenerationContext.CurrentVariableName}.{assignmentProperty.CapitalizeFirstLetter()}.Count; {assignmentProperty}Index++){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + } + } + + if (typeTarget != ruleGenerationContext.NamedElementToGenerate.Name) + { + var targetType = umlClass.Cache.Values.OfType().SingleOrDefault(x => x.Name == typeTarget); + + if (targetType != null) + { + if (targetType is IClass targetClass && (umlClass.QueryAllGeneralClassifiers().Contains(targetClass) || !ruleGenerationContext.CurrentVariableName.Contains("poco"))) + { + if (ruleGenerationContext.CallerRule is AssignmentElement assignmentElement && assignmentElement.TextualNotationRule.IsDispatcherRule) + { + var castedVariableName = $"elementAs{targetClass.Name}"; + writer.WriteSafeString($"{Environment.NewLine}if ({ruleGenerationContext.CurrentVariableName} is {targetClass.QueryFullyQualifiedTypeName()} {castedVariableName}){Environment.NewLine}"); + ruleGenerationContext.CurrentVariableName = castedVariableName; + writer.WriteSafeString($"{{{Environment.NewLine}"); + } + + if (referencedRule?.IsDispatcherRule == true) + { + if (nonTerminalElement.IsCollection) + { + var indexName = $"{referencedRule.GetAssignmentElementNeedingDispatcher().Property}Index"; + writer.WriteSafeString($"{indexName} = {targetType.Name}TextualNotationBuilder.Build{nonTerminalElement.Name}({ruleGenerationContext.CurrentVariableName}, {indexName}, stringBuilder);"); + } + else + { + writer.WriteSafeString($"{targetType.Name}TextualNotationBuilder.Build{nonTerminalElement.Name}({ruleGenerationContext.CurrentVariableName}, 0, stringBuilder);"); + } + } + else + { + writer.WriteSafeString($"{targetType.Name}TextualNotationBuilder.Build{nonTerminalElement.Name}({ruleGenerationContext.CurrentVariableName}, stringBuilder);"); + } + + if (ruleGenerationContext.CallerRule is AssignmentElement { TextualNotationRule: {IsDispatcherRule: true} }) + { + writer.WriteSafeString($"{Environment.NewLine}}}"); + } + } + else + { + var previousCaller = ruleGenerationContext.CallerRule; + ruleGenerationContext.CallerRule = nonTerminalElement; + var previousName = ruleGenerationContext.CurrentVariableName; + + if (referencedRule?.IsDispatcherRule == true) + { + ruleGenerationContext.CurrentVariableName = $"{previousName}.{referencedRule.GetAssignmentElementNeedingDispatcher().Property.CapitalizeFirstLetter()}"; + } + + ProcessAlternatives(writer, umlClass, referencedRule?.Alternatives, ruleGenerationContext, isPartOfMultipleAlternative); + ruleGenerationContext.CallerRule = previousCaller; + ruleGenerationContext.CurrentVariableName = previousName; + } + } + else + { + var previousCaller = ruleGenerationContext.CallerRule; + ruleGenerationContext.CallerRule = nonTerminalElement; + var previousName = ruleGenerationContext.CurrentVariableName; + + if (referencedRule?.IsDispatcherRule == true) + { + ruleGenerationContext.CurrentVariableName = $"{previousName}.{referencedRule.GetAssignmentElementNeedingDispatcher().Property.CapitalizeFirstLetter()}"; + } + + ProcessAlternatives(writer, umlClass, referencedRule?.Alternatives, ruleGenerationContext, isPartOfMultipleAlternative); + ruleGenerationContext.CallerRule = previousCaller; + ruleGenerationContext.CurrentVariableName = previousName; + } + } + else + { + if (referencedRule?.IsDispatcherRule == true) + { + if (nonTerminalElement.IsCollection) + { + var indexName = $"{referencedRule.GetAssignmentElementNeedingDispatcher().Property}Index"; + writer.WriteSafeString($"{indexName} = Build{nonTerminalElement.Name}({ruleGenerationContext.CurrentVariableName}, {indexName}, stringBuilder);"); + } + else + { + writer.WriteSafeString($"Build{nonTerminalElement.Name}({ruleGenerationContext.CurrentVariableName}, 0, stringBuilder);"); + } + } + else + { + writer.WriteSafeString($"Build{ nonTerminalElement.Name}({ruleGenerationContext.CurrentVariableName}, stringBuilder);"); + } + } + + if (nonTerminalElement.IsCollection && referencedRule?.IsDispatcherRule == true) + { + writer.WriteSafeString($"{Environment.NewLine}}}"); + } + + if (isForProperty && !isPartOfMultipleAlternative) + { + writer.WriteSafeString($"{Environment.NewLine}}}"); + } + } + + /// + /// Declares an iterator to perform iteration over a collection, if required to declare it + /// + /// The used to write into output content + /// The related + /// The to process + /// + private static void DeclareIteratorIfRequired(EncodedTextWriter writer, IClass umlClass, AssignmentElement assignmentElement, RuleGenerationContext ruleGenerationContext) + { + var allProperties = umlClass.QueryAllProperties(); + var targetProperty = allProperties.SingleOrDefault(x => string.Equals(x.Name, assignmentElement.Property, StringComparison.OrdinalIgnoreCase)); + + if (targetProperty == null || !targetProperty.QueryIsEnumerable() || assignmentElement.TextualNotationRule.IsDispatcherRule) + { + return; + } + + switch (assignmentElement.Value) + { + case NonTerminalElement nonTerminalElement: + { + var referencedRule = ruleGenerationContext.AllRules.SingleOrDefault(x => x.RuleName == nonTerminalElement.Name); + + if (ruleGenerationContext.DefinedIterators.SingleOrDefault(x => x.IsIteratorValidForProperty(targetProperty, referencedRule) || x.ApplicableRuleElements.Contains(assignmentElement)) is { } alreadyDefinedIterator) + { + alreadyDefinedIterator.ApplicableRuleElements.Add(assignmentElement); + return; + } + + var iteratorToUse = new IteratorDefinition + { + DefinedForProperty = targetProperty + }; + + iteratorToUse.ApplicableRuleElements.Add(assignmentElement); + + string typeTarget; + + if (referencedRule == null) + { + typeTarget = umlClass.Name; + } + else + { + typeTarget = referencedRule.TargetElementName ?? referencedRule.RuleName; + } + + if (typeTarget != targetProperty.Type.Name) + { + var targetType = umlClass.Cache.Values.OfType().SingleOrDefault(x => x.Name == typeTarget); + iteratorToUse.ConstrainedType = targetType; + + writer.WriteSafeString(targetType != null + ? $"using var {iteratorToUse.IteratorVariableName} = poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}.OfType<{targetType.QueryFullyQualifiedTypeName(targetInterface: false)}>().GetEnumerator();" + : $"using var {iteratorToUse.IteratorVariableName} = poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}.GetEnumerator();"); + } + else + { + writer.WriteSafeString($"using var {iteratorToUse.IteratorVariableName} = poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}.GetEnumerator();"); + } + + writer.WriteSafeString(Environment.NewLine); + ruleGenerationContext.DefinedIterators.Add(iteratorToUse); + break; + } + case ValueLiteralElement: + if (ruleGenerationContext.DefinedIterators.SingleOrDefault(x => x.IsIteratorValidForProperty(targetProperty, null) || x.ApplicableRuleElements.Contains(assignmentElement)) is { } existingValueLiteralIterator) + { + existingValueLiteralIterator.ApplicableRuleElements.Add(assignmentElement); + return; + } + + var valueLiteralIterator = new IteratorDefinition + { + DefinedForProperty = targetProperty + }; + + valueLiteralIterator.ApplicableRuleElements.Add(assignmentElement); + writer.WriteSafeString($"using var {valueLiteralIterator.IteratorVariableName} = poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}.GetEnumerator();"); + writer.WriteSafeString(Environment.NewLine); + ruleGenerationContext.DefinedIterators.Add(valueLiteralIterator); + + break; + case AssignmentElement containedAssignment: + DeclareIteratorIfRequired(writer, umlClass, containedAssignment, ruleGenerationContext); + break; + case GroupElement groupElement: + var nonTerminalRules = groupElement.Alternatives.SelectMany(x => x.Elements).OfType().ToList(); + + if (ruleGenerationContext.DefinedIterators.Any(x => x.ApplicableRuleElements.Contains(assignmentElement))) + { + return; + } + + var referencedTypes = new HashSet(); + + foreach (var nonTerminalElement in nonTerminalRules) + { + var referencedRule = ruleGenerationContext.AllRules.SingleOrDefault(x => x.RuleName == nonTerminalElement.Name); + + if (ruleGenerationContext.DefinedIterators.SingleOrDefault(x => x.IsIteratorValidForProperty(targetProperty, referencedRule)) is { } alreadyDefined) + { + alreadyDefined.ApplicableRuleElements.Add(assignmentElement); + return; + } + + string typeTarget; + + if (referencedRule == null) + { + typeTarget = umlClass.Name; + } + else + { + typeTarget = referencedRule.TargetElementName ?? referencedRule.RuleName; + } + + referencedTypes.Add(umlClass.Cache.Values.OfType().Single(x => x.Name == typeTarget)); + } + + var iteratorToUseForGroup = new IteratorDefinition + { + DefinedForProperty = targetProperty + }; + + var typesFilter = string.Join(", ", referencedTypes.Select(x => $"typeof({x.QueryFullyQualifiedTypeName(targetInterface: false)})")); + writer.WriteSafeString($"using var {iteratorToUseForGroup.IteratorVariableName} = SysML2.NET.Extensions.EnumerableExtensions.GetElementsOfType(poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}, {typesFilter}).GetEnumerator();{Environment.NewLine}"); + + iteratorToUseForGroup.ApplicableRuleElements.Add(assignmentElement); + ruleGenerationContext.DefinedIterators.Add(iteratorToUseForGroup); + break; + } + } + + /// + /// Keeps tracks of defined iterator for enumerable + /// + private class IteratorDefinition + { + /// + /// Gets or sets the that have to have an iterator defined + /// + public IProperty DefinedForProperty { get; init; } + + /// + /// Gets or sets the that should be + /// + public INamedElement ConstrainedType { get; set; } + + /// + /// Gets the name of the variable defined for the iterator + /// + public string IteratorVariableName => this.ComputeIteratorName(); + + /// + /// Provides a collection of that will use the defined iterator + /// + public HashSet ApplicableRuleElements { get; } = []; + + /// + /// Compute the name of the iterator variable + /// + /// The computed name + private string ComputeIteratorName() + { + var name = this.DefinedForProperty.Name.LowerCaseFirstLetter(); + + if (this.ConstrainedType != null) + { + name += $"Of{this.ConstrainedType.Name.CapitalizeFirstLetter()}"; + } + + name += "Iterator"; + return name; + } + + /// + /// Asserts that the current is valid for an for a specific + /// + /// The specific + /// The specific that should constraint a collection type + /// True if the is valid for the provided parameters + public bool IsIteratorValidForProperty(IProperty property, TextualNotationRule targetRule) + { + if (property != this.DefinedForProperty) + { + return false; + } + + if (targetRule == null) + { + return this.ConstrainedType == null; + } + + var typeTarget = targetRule.TargetElementName ?? targetRule.RuleName; + + return string.Equals(this.ConstrainedType?.Name, typeTarget, StringComparison.InvariantCultureIgnoreCase); + } + } + + /// + /// Provides context over the rule generation history + /// + private class RuleGenerationContext + { + /// + /// Gets or sets the collection of + /// + public List DefinedIterators { get; set; } + + /// + /// Gets the collection of all available + /// + public List AllRules { get; } = []; + + /// + /// Gets or sets the that called other rule + /// + public RuleElement CallerRule { get; set; } + + /// Initializes a new instance of the class. + public RuleGenerationContext(INamedElement namedElementToGenerate) + { + this.NamedElementToGenerate = namedElementToGenerate; + } + + /// + /// Gets the that is used in the current generation + /// + public INamedElement NamedElementToGenerate { get; } + + /// + /// Gets or sets the current name of the variable to process + /// + public string CurrentVariableName { get; set; } + } + } +} diff --git a/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj b/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj index eb2f99cc2..57428a5f0 100644 --- a/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj +++ b/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj @@ -19,6 +19,7 @@ en-US + @@ -211,6 +212,12 @@ Always + + Always + + + Always + @@ -229,4 +236,17 @@ Always + + + datamodel\kebnf.g4 + + + datamodel\KerML-textual-bnf.kebnf + Always + + + datamodel\SysML-textual-bnf.kebnf + Always + + \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-facade-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-facade-template.hbs new file mode 100644 index 000000000..e41972e02 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-facade-template.hbs @@ -0,0 +1,60 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides access to built textual notation for via + /// + public class TextualNotationBuilderFacade: ITextualNotationBuilderFacade + { + /// + /// Queries the Textual Notation of an + /// + /// The to built textual notation from + /// The built textual notation string + public string QueryTextualNotationOfElement(IElement element) + { + switch (element) + { + {{#each this as | class |}} + case SysML2.NET.Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace this }}.{{ this.Name }} poco{{ this.Name }}: + var {{String.LowerCaseFirstLetter this.Name }}TextualNotationBuilder = new {{ this.Name }}TextualNotationBuilder(this); + return {{String.LowerCaseFirstLetter this.Name }}TextualNotationBuilder.BuildTextualNotation(poco{{ this.Name }}); + + {{/each}} + default: + throw new ArgumentOutOfRangeException(nameof(element), "Provided element is not supported"); + } + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs new file mode 100644 index 000000000..130efcaa4 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs @@ -0,0 +1,93 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ +{{#if (RulesHelper.ContainsAnyDispatcherRules this.Rules)}} + using System.Collections.Generic; +{{~/if}} + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class {{this.Context.Name}}TextualNotationBuilder + { + {{#each this.Rules as | rule | }} + {{#if rule.IsDispatcherRule}} + {{#unless rule.IsMultiCollectionAssignment}} + /// + /// Builds the Textual Notation string for the rule {{Rule.RuleName}} + /// {{Rule.RawRule}} + /// + /// The from which the rule should be build + /// The index of the to process inside a specific collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int Build{{rule.RuleName}}({{ #NamedElement.WriteFullyQualifiedTypeName ../this.Context }} poco, int elementIndex, StringBuilder stringBuilder) + { + {{RulesHelper.WriteRule rule ../this.Context ../this.AllRules}} + return elementIndex; + } + {{else}} + /// + /// Builds the Textual Notation string for the rule {{Rule.RuleName}} + /// {{Rule.RawRule}} + /// + /// The from which the rule should be build + /// The collection of to process + /// The index of the to process inside the collection defined + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int Build{{rule.RuleName}}({{ #NamedElement.WriteFullyQualifiedTypeName ../this.Context }} poco, string propertyName, int elementIndex, StringBuilder stringBuilder) + { + {{RulesHelper.WriteRule rule ../this.Context ../this.AllRules}} + return elementIndex; + } + {{/unless}} + {{else}} + /// + /// Builds the Textual Notation string for the rule {{Rule.RuleName}} + /// {{Rule.RawRule}} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void Build{{rule.RuleName}}({{ #NamedElement.WriteFullyQualifiedTypeName ../this.Context }} poco, StringBuilder stringBuilder) + {{/if}} + { + {{RulesHelper.WriteRule rule ../this.Context ../this.AllRules}} + } + {{#unless @last}} + + {{/unless}} + {{/each}} + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/Core/AutoGenPoco/AcceptActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/AcceptActionUsage.cs index 54103f3a7..d6a523e53 100644 --- a/SysML2.NET/Core/AutoGenPoco/AcceptActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AcceptActionUsage.cs @@ -922,7 +922,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ActionDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ActionDefinition.cs index d18d2faf0..ad96965a7 100644 --- a/SysML2.NET/Core/AutoGenPoco/ActionDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ActionDefinition.cs @@ -606,7 +606,7 @@ public ActionDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/ActionUsage.cs index 05a4c5c7d..ed0f9b66a 100644 --- a/SysML2.NET/Core/AutoGenPoco/ActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ActionUsage.cs @@ -920,7 +920,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ActorMembership.cs b/SysML2.NET/Core/AutoGenPoco/ActorMembership.cs index b18d6949c..3daa8b556 100644 --- a/SysML2.NET/Core/AutoGenPoco/ActorMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ActorMembership.cs @@ -290,7 +290,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -301,7 +301,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/AllocationDefinition.cs b/SysML2.NET/Core/AutoGenPoco/AllocationDefinition.cs index b56818339..95b049dd6 100644 --- a/SysML2.NET/Core/AutoGenPoco/AllocationDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/AllocationDefinition.cs @@ -656,7 +656,7 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -667,7 +667,7 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/AllocationUsage.cs b/SysML2.NET/Core/AutoGenPoco/AllocationUsage.cs index aa2d52b6f..386d12504 100644 --- a/SysML2.NET/Core/AutoGenPoco/AllocationUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AllocationUsage.cs @@ -971,7 +971,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -982,7 +982,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/AnalysisCaseDefinition.cs b/SysML2.NET/Core/AutoGenPoco/AnalysisCaseDefinition.cs index a149ba17c..51a00ed82 100644 --- a/SysML2.NET/Core/AutoGenPoco/AnalysisCaseDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/AnalysisCaseDefinition.cs @@ -649,7 +649,7 @@ public AnalysisCaseDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/AnalysisCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/AnalysisCaseUsage.cs index fb3a99392..f6b87adfa 100644 --- a/SysML2.NET/Core/AutoGenPoco/AnalysisCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AnalysisCaseUsage.cs @@ -979,7 +979,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/AnnotatingElement.cs b/SysML2.NET/Core/AutoGenPoco/AnnotatingElement.cs index a126d2b2e..d664fd698 100644 --- a/SysML2.NET/Core/AutoGenPoco/AnnotatingElement.cs +++ b/SysML2.NET/Core/AutoGenPoco/AnnotatingElement.cs @@ -182,7 +182,7 @@ public AnnotatingElement() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Annotation.cs b/SysML2.NET/Core/AutoGenPoco/Annotation.cs index f3537257f..d09ee6382 100644 --- a/SysML2.NET/Core/AutoGenPoco/Annotation.cs +++ b/SysML2.NET/Core/AutoGenPoco/Annotation.cs @@ -191,7 +191,7 @@ public Annotation() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -202,7 +202,7 @@ public Annotation() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/AssertConstraintUsage.cs b/SysML2.NET/Core/AutoGenPoco/AssertConstraintUsage.cs index c02f425ef..7544b9389 100644 --- a/SysML2.NET/Core/AutoGenPoco/AssertConstraintUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AssertConstraintUsage.cs @@ -953,7 +953,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/AssignmentActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/AssignmentActionUsage.cs index f8df89a27..c136253bd 100644 --- a/SysML2.NET/Core/AutoGenPoco/AssignmentActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AssignmentActionUsage.cs @@ -921,7 +921,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Association.cs b/SysML2.NET/Core/AutoGenPoco/Association.cs index 0e661aa72..6f98b8bfd 100644 --- a/SysML2.NET/Core/AutoGenPoco/Association.cs +++ b/SysML2.NET/Core/AutoGenPoco/Association.cs @@ -429,7 +429,7 @@ public Association() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -440,7 +440,7 @@ public Association() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/AssociationStructure.cs b/SysML2.NET/Core/AutoGenPoco/AssociationStructure.cs index 32b269e07..caaa99a90 100644 --- a/SysML2.NET/Core/AutoGenPoco/AssociationStructure.cs +++ b/SysML2.NET/Core/AutoGenPoco/AssociationStructure.cs @@ -431,7 +431,7 @@ public AssociationStructure() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -442,7 +442,7 @@ public AssociationStructure() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/AttributeDefinition.cs b/SysML2.NET/Core/AutoGenPoco/AttributeDefinition.cs index b902e3f53..ee2318b72 100644 --- a/SysML2.NET/Core/AutoGenPoco/AttributeDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/AttributeDefinition.cs @@ -592,7 +592,7 @@ public AttributeDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs b/SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs index 66c520e38..3eaad33cb 100644 --- a/SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs @@ -894,7 +894,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Behavior.cs b/SysML2.NET/Core/AutoGenPoco/Behavior.cs index 1246e9b1b..aea7b579f 100644 --- a/SysML2.NET/Core/AutoGenPoco/Behavior.cs +++ b/SysML2.NET/Core/AutoGenPoco/Behavior.cs @@ -407,7 +407,7 @@ public Behavior() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/BindingConnector.cs b/SysML2.NET/Core/AutoGenPoco/BindingConnector.cs index 42fdd1558..1211d294c 100644 --- a/SysML2.NET/Core/AutoGenPoco/BindingConnector.cs +++ b/SysML2.NET/Core/AutoGenPoco/BindingConnector.cs @@ -618,7 +618,7 @@ public BindingConnector() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -629,7 +629,7 @@ public BindingConnector() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/BindingConnectorAsUsage.cs b/SysML2.NET/Core/AutoGenPoco/BindingConnectorAsUsage.cs index d3ba72453..0bc3b6384 100644 --- a/SysML2.NET/Core/AutoGenPoco/BindingConnectorAsUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/BindingConnectorAsUsage.cs @@ -909,7 +909,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -920,7 +920,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/BooleanExpression.cs b/SysML2.NET/Core/AutoGenPoco/BooleanExpression.cs index 3a6012d5d..9760ce726 100644 --- a/SysML2.NET/Core/AutoGenPoco/BooleanExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/BooleanExpression.cs @@ -605,7 +605,7 @@ public BooleanExpression() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/CalculationDefinition.cs b/SysML2.NET/Core/AutoGenPoco/CalculationDefinition.cs index 17f8c2ea8..e5507f34b 100644 --- a/SysML2.NET/Core/AutoGenPoco/CalculationDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/CalculationDefinition.cs @@ -634,7 +634,7 @@ public CalculationDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/CalculationUsage.cs b/SysML2.NET/Core/AutoGenPoco/CalculationUsage.cs index c6f27188c..9aca6dcdc 100644 --- a/SysML2.NET/Core/AutoGenPoco/CalculationUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/CalculationUsage.cs @@ -948,7 +948,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/CaseDefinition.cs b/SysML2.NET/Core/AutoGenPoco/CaseDefinition.cs index 151a0fc4a..9c67cd9d8 100644 --- a/SysML2.NET/Core/AutoGenPoco/CaseDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/CaseDefinition.cs @@ -651,7 +651,7 @@ public CaseDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/CaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/CaseUsage.cs index 289c1fd7a..7944c922f 100644 --- a/SysML2.NET/Core/AutoGenPoco/CaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/CaseUsage.cs @@ -970,7 +970,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Class.cs b/SysML2.NET/Core/AutoGenPoco/Class.cs index 4ddac7708..f577aba50 100644 --- a/SysML2.NET/Core/AutoGenPoco/Class.cs +++ b/SysML2.NET/Core/AutoGenPoco/Class.cs @@ -406,7 +406,7 @@ public Class() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Classifier.cs b/SysML2.NET/Core/AutoGenPoco/Classifier.cs index a2366a607..f5ac18d6a 100644 --- a/SysML2.NET/Core/AutoGenPoco/Classifier.cs +++ b/SysML2.NET/Core/AutoGenPoco/Classifier.cs @@ -409,7 +409,7 @@ public Classifier() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/CollectExpression.cs b/SysML2.NET/Core/AutoGenPoco/CollectExpression.cs index ec539d5fb..551256880 100644 --- a/SysML2.NET/Core/AutoGenPoco/CollectExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/CollectExpression.cs @@ -646,7 +646,7 @@ string IOperatorExpression.Operator [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Comment.cs b/SysML2.NET/Core/AutoGenPoco/Comment.cs index fbb7d6dd1..d7fcd96b7 100644 --- a/SysML2.NET/Core/AutoGenPoco/Comment.cs +++ b/SysML2.NET/Core/AutoGenPoco/Comment.cs @@ -196,7 +196,7 @@ public Comment() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ConcernDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ConcernDefinition.cs index d17294686..1fa722a87 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConcernDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConcernDefinition.cs @@ -653,7 +653,7 @@ string Root.Elements.IElement.DeclaredShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs b/SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs index 9d9eb3a89..5423bab6b 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs @@ -982,7 +982,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ConjugatedPortDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ConjugatedPortDefinition.cs index c4d057a27..1847a53e7 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConjugatedPortDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConjugatedPortDefinition.cs @@ -627,7 +627,7 @@ public ConjugatedPortDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ConjugatedPortTyping.cs b/SysML2.NET/Core/AutoGenPoco/ConjugatedPortTyping.cs index a18654cbe..d3f86460d 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConjugatedPortTyping.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConjugatedPortTyping.cs @@ -194,7 +194,7 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -205,7 +205,7 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Conjugation.cs b/SysML2.NET/Core/AutoGenPoco/Conjugation.cs index c5e58266f..9256126e5 100644 --- a/SysML2.NET/Core/AutoGenPoco/Conjugation.cs +++ b/SysML2.NET/Core/AutoGenPoco/Conjugation.cs @@ -188,7 +188,7 @@ public Conjugation() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -199,7 +199,7 @@ public Conjugation() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ConnectionDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ConnectionDefinition.cs index 628ccf8c4..b99c5ee6e 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConnectionDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConnectionDefinition.cs @@ -644,7 +644,7 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -655,7 +655,7 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ConnectionUsage.cs b/SysML2.NET/Core/AutoGenPoco/ConnectionUsage.cs index c34e424a4..c43f815e4 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConnectionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConnectionUsage.cs @@ -964,7 +964,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -975,7 +975,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Connector.cs b/SysML2.NET/Core/AutoGenPoco/Connector.cs index ee1b48451..c377ccf24 100644 --- a/SysML2.NET/Core/AutoGenPoco/Connector.cs +++ b/SysML2.NET/Core/AutoGenPoco/Connector.cs @@ -620,7 +620,7 @@ public Connector() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -631,7 +631,7 @@ public Connector() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ConstraintDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ConstraintDefinition.cs index ab1b40c43..a174b9950 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConstraintDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConstraintDefinition.cs @@ -617,7 +617,7 @@ public ConstraintDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ConstraintUsage.cs b/SysML2.NET/Core/AutoGenPoco/ConstraintUsage.cs index 97f9425e3..5fa605f3a 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConstraintUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConstraintUsage.cs @@ -938,7 +938,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ConstructorExpression.cs b/SysML2.NET/Core/AutoGenPoco/ConstructorExpression.cs index b80191eb0..3dee94d36 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConstructorExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConstructorExpression.cs @@ -624,7 +624,7 @@ public ConstructorExpression() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/CrossSubsetting.cs b/SysML2.NET/Core/AutoGenPoco/CrossSubsetting.cs index fa96f946a..3d8258228 100644 --- a/SysML2.NET/Core/AutoGenPoco/CrossSubsetting.cs +++ b/SysML2.NET/Core/AutoGenPoco/CrossSubsetting.cs @@ -216,7 +216,7 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -227,7 +227,7 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/DataType.cs b/SysML2.NET/Core/AutoGenPoco/DataType.cs index 02e811867..5db59bdec 100644 --- a/SysML2.NET/Core/AutoGenPoco/DataType.cs +++ b/SysML2.NET/Core/AutoGenPoco/DataType.cs @@ -410,7 +410,7 @@ public DataType() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/DecisionNode.cs b/SysML2.NET/Core/AutoGenPoco/DecisionNode.cs index 0f00bc34e..14b24ba63 100644 --- a/SysML2.NET/Core/AutoGenPoco/DecisionNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/DecisionNode.cs @@ -917,7 +917,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Definition.cs b/SysML2.NET/Core/AutoGenPoco/Definition.cs index a772f7733..6d82220eb 100644 --- a/SysML2.NET/Core/AutoGenPoco/Definition.cs +++ b/SysML2.NET/Core/AutoGenPoco/Definition.cs @@ -596,7 +596,7 @@ public Definition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Dependency.cs b/SysML2.NET/Core/AutoGenPoco/Dependency.cs index c9b563489..9f2a17b26 100644 --- a/SysML2.NET/Core/AutoGenPoco/Dependency.cs +++ b/SysML2.NET/Core/AutoGenPoco/Dependency.cs @@ -177,7 +177,7 @@ public Dependency() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -188,7 +188,7 @@ public Dependency() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Differencing.cs b/SysML2.NET/Core/AutoGenPoco/Differencing.cs index 1eea0723c..7f3d8af35 100644 --- a/SysML2.NET/Core/AutoGenPoco/Differencing.cs +++ b/SysML2.NET/Core/AutoGenPoco/Differencing.cs @@ -175,7 +175,7 @@ public Differencing() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -186,7 +186,7 @@ public Differencing() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Disjoining.cs b/SysML2.NET/Core/AutoGenPoco/Disjoining.cs index 301e64af2..792a797d3 100644 --- a/SysML2.NET/Core/AutoGenPoco/Disjoining.cs +++ b/SysML2.NET/Core/AutoGenPoco/Disjoining.cs @@ -176,7 +176,7 @@ public Disjoining() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -187,7 +187,7 @@ public Disjoining() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Documentation.cs b/SysML2.NET/Core/AutoGenPoco/Documentation.cs index df4d3e5dc..40a7cc787 100644 --- a/SysML2.NET/Core/AutoGenPoco/Documentation.cs +++ b/SysML2.NET/Core/AutoGenPoco/Documentation.cs @@ -206,7 +206,7 @@ public Documentation() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ElementFilterMembership.cs b/SysML2.NET/Core/AutoGenPoco/ElementFilterMembership.cs index 53025afa1..30642113f 100644 --- a/SysML2.NET/Core/AutoGenPoco/ElementFilterMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ElementFilterMembership.cs @@ -269,7 +269,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -280,7 +280,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/EndFeatureMembership.cs b/SysML2.NET/Core/AutoGenPoco/EndFeatureMembership.cs index 69bd0394b..50f4e8bad 100644 --- a/SysML2.NET/Core/AutoGenPoco/EndFeatureMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/EndFeatureMembership.cs @@ -276,7 +276,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -287,7 +287,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/EnumerationDefinition.cs b/SysML2.NET/Core/AutoGenPoco/EnumerationDefinition.cs index 651bcfff8..280716ee1 100644 --- a/SysML2.NET/Core/AutoGenPoco/EnumerationDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/EnumerationDefinition.cs @@ -615,7 +615,7 @@ bool Systems.DefinitionAndUsage.IDefinition.IsVariation [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/EnumerationUsage.cs b/SysML2.NET/Core/AutoGenPoco/EnumerationUsage.cs index 939615770..432035f5f 100644 --- a/SysML2.NET/Core/AutoGenPoco/EnumerationUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/EnumerationUsage.cs @@ -897,7 +897,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/EventOccurrenceUsage.cs b/SysML2.NET/Core/AutoGenPoco/EventOccurrenceUsage.cs index 24cfc6398..3813bd42b 100644 --- a/SysML2.NET/Core/AutoGenPoco/EventOccurrenceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/EventOccurrenceUsage.cs @@ -919,7 +919,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ExhibitStateUsage.cs b/SysML2.NET/Core/AutoGenPoco/ExhibitStateUsage.cs index 5445368fc..7644095b9 100644 --- a/SysML2.NET/Core/AutoGenPoco/ExhibitStateUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ExhibitStateUsage.cs @@ -985,7 +985,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Expression.cs b/SysML2.NET/Core/AutoGenPoco/Expression.cs index c3ce9a63e..4f74d7901 100644 --- a/SysML2.NET/Core/AutoGenPoco/Expression.cs +++ b/SysML2.NET/Core/AutoGenPoco/Expression.cs @@ -607,7 +607,7 @@ public Expression() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Feature.cs b/SysML2.NET/Core/AutoGenPoco/Feature.cs index 3605254ce..1bc856e10 100644 --- a/SysML2.NET/Core/AutoGenPoco/Feature.cs +++ b/SysML2.NET/Core/AutoGenPoco/Feature.cs @@ -590,7 +590,7 @@ public Feature() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureChainExpression.cs b/SysML2.NET/Core/AutoGenPoco/FeatureChainExpression.cs index d425cc618..703637a14 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureChainExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureChainExpression.cs @@ -647,7 +647,7 @@ string IOperatorExpression.Operator [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureChaining.cs b/SysML2.NET/Core/AutoGenPoco/FeatureChaining.cs index 9d636eb61..d2ada4c8e 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureChaining.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureChaining.cs @@ -185,7 +185,7 @@ public FeatureChaining() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -196,7 +196,7 @@ public FeatureChaining() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureInverting.cs b/SysML2.NET/Core/AutoGenPoco/FeatureInverting.cs index 523fc0c28..46b73511e 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureInverting.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureInverting.cs @@ -185,7 +185,7 @@ public FeatureInverting() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -196,7 +196,7 @@ public FeatureInverting() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureMembership.cs b/SysML2.NET/Core/AutoGenPoco/FeatureMembership.cs index b63ebd661..2d1d971ff 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureMembership.cs @@ -271,7 +271,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -282,7 +282,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureReferenceExpression.cs b/SysML2.NET/Core/AutoGenPoco/FeatureReferenceExpression.cs index 15decb3dd..5b9707603 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureReferenceExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureReferenceExpression.cs @@ -604,7 +604,7 @@ public FeatureReferenceExpression() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureTyping.cs b/SysML2.NET/Core/AutoGenPoco/FeatureTyping.cs index 7025fb39c..6e70454b2 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureTyping.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureTyping.cs @@ -185,7 +185,7 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -196,7 +196,7 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureValue.cs b/SysML2.NET/Core/AutoGenPoco/FeatureValue.cs index 9b8ebde85..9cb094a4a 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureValue.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureValue.cs @@ -291,7 +291,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -302,7 +302,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Flow.cs b/SysML2.NET/Core/AutoGenPoco/Flow.cs index a14f3624d..df70f3314 100644 --- a/SysML2.NET/Core/AutoGenPoco/Flow.cs +++ b/SysML2.NET/Core/AutoGenPoco/Flow.cs @@ -650,7 +650,7 @@ public Flow() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -661,7 +661,7 @@ public Flow() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/FlowDefinition.cs b/SysML2.NET/Core/AutoGenPoco/FlowDefinition.cs index 461359264..e5bcd4540 100644 --- a/SysML2.NET/Core/AutoGenPoco/FlowDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/FlowDefinition.cs @@ -640,7 +640,7 @@ public FlowDefinition() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -651,7 +651,7 @@ public FlowDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/FlowEnd.cs b/SysML2.NET/Core/AutoGenPoco/FlowEnd.cs index 77c4f9d78..22caf16da 100644 --- a/SysML2.NET/Core/AutoGenPoco/FlowEnd.cs +++ b/SysML2.NET/Core/AutoGenPoco/FlowEnd.cs @@ -579,7 +579,7 @@ public FlowEnd() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/FlowUsage.cs b/SysML2.NET/Core/AutoGenPoco/FlowUsage.cs index e4a321281..12152df08 100644 --- a/SysML2.NET/Core/AutoGenPoco/FlowUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/FlowUsage.cs @@ -990,7 +990,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -1001,7 +1001,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ForLoopActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/ForLoopActionUsage.cs index 8a9d04287..25550521b 100644 --- a/SysML2.NET/Core/AutoGenPoco/ForLoopActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ForLoopActionUsage.cs @@ -937,7 +937,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ForkNode.cs b/SysML2.NET/Core/AutoGenPoco/ForkNode.cs index ffcc27bb0..4e3ac23d8 100644 --- a/SysML2.NET/Core/AutoGenPoco/ForkNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/ForkNode.cs @@ -918,7 +918,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/FramedConcernMembership.cs b/SysML2.NET/Core/AutoGenPoco/FramedConcernMembership.cs index d1837bef6..cb68e8c3f 100644 --- a/SysML2.NET/Core/AutoGenPoco/FramedConcernMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/FramedConcernMembership.cs @@ -312,7 +312,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -323,7 +323,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Function.cs b/SysML2.NET/Core/AutoGenPoco/Function.cs index 964451c62..e97ea5831 100644 --- a/SysML2.NET/Core/AutoGenPoco/Function.cs +++ b/SysML2.NET/Core/AutoGenPoco/Function.cs @@ -427,7 +427,7 @@ public Function() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/IElement.cs b/SysML2.NET/Core/AutoGenPoco/IElement.cs index fb71530fd..1aaa1b223 100644 --- a/SysML2.NET/Core/AutoGenPoco/IElement.cs +++ b/SysML2.NET/Core/AutoGenPoco/IElement.cs @@ -124,7 +124,7 @@ public partial interface IElement /// [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] - IReadOnlyCollection OwnedRelationship { get; } + IReadOnlyList OwnedRelationship { get; } /// /// The owner of this Element, derived as the owningRelatedElement of the owningRelationship of this diff --git a/SysML2.NET/Core/AutoGenPoco/IRelationship.cs b/SysML2.NET/Core/AutoGenPoco/IRelationship.cs index 720b0d4a1..0fe2d40b5 100644 --- a/SysML2.NET/Core/AutoGenPoco/IRelationship.cs +++ b/SysML2.NET/Core/AutoGenPoco/IRelationship.cs @@ -62,7 +62,7 @@ public partial interface IRelationship : IElement /// [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] - IReadOnlyCollection OwnedRelatedElement { get; } + IReadOnlyList OwnedRelatedElement { get; } /// /// The relatedElement of this Relationship that owns the Relationship, if any. diff --git a/SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs index 4a93b3da5..870c6150d 100644 --- a/SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs @@ -936,7 +936,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/IncludeUseCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/IncludeUseCaseUsage.cs index 04baef2a2..cd6d60330 100644 --- a/SysML2.NET/Core/AutoGenPoco/IncludeUseCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IncludeUseCaseUsage.cs @@ -1001,7 +1001,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/IndexExpression.cs b/SysML2.NET/Core/AutoGenPoco/IndexExpression.cs index ee4c1480f..ed02aa7ec 100644 --- a/SysML2.NET/Core/AutoGenPoco/IndexExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/IndexExpression.cs @@ -646,7 +646,7 @@ string IOperatorExpression.Operator [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Interaction.cs b/SysML2.NET/Core/AutoGenPoco/Interaction.cs index e324cfcbb..8d424b70a 100644 --- a/SysML2.NET/Core/AutoGenPoco/Interaction.cs +++ b/SysML2.NET/Core/AutoGenPoco/Interaction.cs @@ -431,7 +431,7 @@ public Interaction() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -442,7 +442,7 @@ public Interaction() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/InterfaceDefinition.cs b/SysML2.NET/Core/AutoGenPoco/InterfaceDefinition.cs index 3c1be3fb6..50f69cfd5 100644 --- a/SysML2.NET/Core/AutoGenPoco/InterfaceDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/InterfaceDefinition.cs @@ -653,7 +653,7 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -664,7 +664,7 @@ bool Core.Types.IType.IsSufficient [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs b/SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs index 93261304c..59e2f64b9 100644 --- a/SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs @@ -971,7 +971,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -982,7 +982,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Intersecting.cs b/SysML2.NET/Core/AutoGenPoco/Intersecting.cs index 1fa421e52..a3fd9ca1b 100644 --- a/SysML2.NET/Core/AutoGenPoco/Intersecting.cs +++ b/SysML2.NET/Core/AutoGenPoco/Intersecting.cs @@ -175,7 +175,7 @@ public Intersecting() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -186,7 +186,7 @@ public Intersecting() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Invariant.cs b/SysML2.NET/Core/AutoGenPoco/Invariant.cs index df73b3ae2..78256410e 100644 --- a/SysML2.NET/Core/AutoGenPoco/Invariant.cs +++ b/SysML2.NET/Core/AutoGenPoco/Invariant.cs @@ -613,7 +613,7 @@ public Invariant() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/InvocationExpression.cs b/SysML2.NET/Core/AutoGenPoco/InvocationExpression.cs index 5863507eb..2db5b8ccd 100644 --- a/SysML2.NET/Core/AutoGenPoco/InvocationExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/InvocationExpression.cs @@ -627,7 +627,7 @@ public InvocationExpression() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ItemDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ItemDefinition.cs index 6ba92cd0e..253e0d98d 100644 --- a/SysML2.NET/Core/AutoGenPoco/ItemDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ItemDefinition.cs @@ -598,7 +598,7 @@ public ItemDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ItemUsage.cs b/SysML2.NET/Core/AutoGenPoco/ItemUsage.cs index 93e7ea590..73fbed5f0 100644 --- a/SysML2.NET/Core/AutoGenPoco/ItemUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ItemUsage.cs @@ -910,7 +910,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/JoinNode.cs b/SysML2.NET/Core/AutoGenPoco/JoinNode.cs index e190d751f..bfbcfe519 100644 --- a/SysML2.NET/Core/AutoGenPoco/JoinNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/JoinNode.cs @@ -918,7 +918,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/LibraryPackage.cs b/SysML2.NET/Core/AutoGenPoco/LibraryPackage.cs index e78caedc0..ef2f10548 100644 --- a/SysML2.NET/Core/AutoGenPoco/LibraryPackage.cs +++ b/SysML2.NET/Core/AutoGenPoco/LibraryPackage.cs @@ -227,7 +227,7 @@ public LibraryPackage() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs b/SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs index 75c438ba6..ea27e1d9d 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs @@ -605,7 +605,7 @@ public LiteralBoolean() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralExpression.cs b/SysML2.NET/Core/AutoGenPoco/LiteralExpression.cs index e19664943..7f5cf9715 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralExpression.cs @@ -604,7 +604,7 @@ public LiteralExpression() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralInfinity.cs b/SysML2.NET/Core/AutoGenPoco/LiteralInfinity.cs index 98a38dfd4..30decad88 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralInfinity.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralInfinity.cs @@ -605,7 +605,7 @@ public LiteralInfinity() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs b/SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs index 33c8de5ef..20a075301 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs @@ -605,7 +605,7 @@ public LiteralInteger() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralRational.cs b/SysML2.NET/Core/AutoGenPoco/LiteralRational.cs index 07e5d233f..a12ba5cb6 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralRational.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralRational.cs @@ -605,7 +605,7 @@ public LiteralRational() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralString.cs b/SysML2.NET/Core/AutoGenPoco/LiteralString.cs index 5b32f3887..9d45fe1aa 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralString.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralString.cs @@ -605,7 +605,7 @@ public LiteralString() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Membership.cs b/SysML2.NET/Core/AutoGenPoco/Membership.cs index b8ca83fef..f2f50b872 100644 --- a/SysML2.NET/Core/AutoGenPoco/Membership.cs +++ b/SysML2.NET/Core/AutoGenPoco/Membership.cs @@ -211,7 +211,7 @@ public Membership() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -222,7 +222,7 @@ public Membership() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/MembershipExpose.cs b/SysML2.NET/Core/AutoGenPoco/MembershipExpose.cs index f8ffc2f7c..5ba535474 100644 --- a/SysML2.NET/Core/AutoGenPoco/MembershipExpose.cs +++ b/SysML2.NET/Core/AutoGenPoco/MembershipExpose.cs @@ -223,7 +223,7 @@ bool Root.Namespaces.IImport.IsImportAll [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -234,7 +234,7 @@ bool Root.Namespaces.IImport.IsImportAll [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/MembershipImport.cs b/SysML2.NET/Core/AutoGenPoco/MembershipImport.cs index 965dde49f..87941a177 100644 --- a/SysML2.NET/Core/AutoGenPoco/MembershipImport.cs +++ b/SysML2.NET/Core/AutoGenPoco/MembershipImport.cs @@ -207,7 +207,7 @@ public MembershipImport() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -218,7 +218,7 @@ public MembershipImport() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/MergeNode.cs b/SysML2.NET/Core/AutoGenPoco/MergeNode.cs index 0b1ec15c5..aad62efc9 100644 --- a/SysML2.NET/Core/AutoGenPoco/MergeNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/MergeNode.cs @@ -918,7 +918,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Metaclass.cs b/SysML2.NET/Core/AutoGenPoco/Metaclass.cs index 5f9ff69ea..88622a07b 100644 --- a/SysML2.NET/Core/AutoGenPoco/Metaclass.cs +++ b/SysML2.NET/Core/AutoGenPoco/Metaclass.cs @@ -405,7 +405,7 @@ public Metaclass() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/MetadataAccessExpression.cs b/SysML2.NET/Core/AutoGenPoco/MetadataAccessExpression.cs index eb2551c1d..86d977b0f 100644 --- a/SysML2.NET/Core/AutoGenPoco/MetadataAccessExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/MetadataAccessExpression.cs @@ -607,7 +607,7 @@ public MetadataAccessExpression() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/MetadataDefinition.cs b/SysML2.NET/Core/AutoGenPoco/MetadataDefinition.cs index faf9afbb4..f35a4751d 100644 --- a/SysML2.NET/Core/AutoGenPoco/MetadataDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/MetadataDefinition.cs @@ -595,7 +595,7 @@ public MetadataDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/MetadataFeature.cs b/SysML2.NET/Core/AutoGenPoco/MetadataFeature.cs index 452c47df6..56ce0e497 100644 --- a/SysML2.NET/Core/AutoGenPoco/MetadataFeature.cs +++ b/SysML2.NET/Core/AutoGenPoco/MetadataFeature.cs @@ -614,7 +614,7 @@ public MetadataFeature() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs b/SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs index c31458ae0..cf3b4be16 100644 --- a/SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs @@ -956,7 +956,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Multiplicity.cs b/SysML2.NET/Core/AutoGenPoco/Multiplicity.cs index 12d888734..d86ecccb9 100644 --- a/SysML2.NET/Core/AutoGenPoco/Multiplicity.cs +++ b/SysML2.NET/Core/AutoGenPoco/Multiplicity.cs @@ -587,7 +587,7 @@ public Multiplicity() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/MultiplicityRange.cs b/SysML2.NET/Core/AutoGenPoco/MultiplicityRange.cs index 0aca305fc..797843e7d 100644 --- a/SysML2.NET/Core/AutoGenPoco/MultiplicityRange.cs +++ b/SysML2.NET/Core/AutoGenPoco/MultiplicityRange.cs @@ -602,7 +602,7 @@ public MultiplicityRange() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Namespace.cs b/SysML2.NET/Core/AutoGenPoco/Namespace.cs index 3ae60fc6d..12a60506c 100644 --- a/SysML2.NET/Core/AutoGenPoco/Namespace.cs +++ b/SysML2.NET/Core/AutoGenPoco/Namespace.cs @@ -215,7 +215,7 @@ public Namespace() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/NamespaceExpose.cs b/SysML2.NET/Core/AutoGenPoco/NamespaceExpose.cs index 16e109dac..ccc0c9e88 100644 --- a/SysML2.NET/Core/AutoGenPoco/NamespaceExpose.cs +++ b/SysML2.NET/Core/AutoGenPoco/NamespaceExpose.cs @@ -223,7 +223,7 @@ bool Root.Namespaces.IImport.IsImportAll [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -234,7 +234,7 @@ bool Root.Namespaces.IImport.IsImportAll [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/NamespaceImport.cs b/SysML2.NET/Core/AutoGenPoco/NamespaceImport.cs index f23beda6e..1b0612f71 100644 --- a/SysML2.NET/Core/AutoGenPoco/NamespaceImport.cs +++ b/SysML2.NET/Core/AutoGenPoco/NamespaceImport.cs @@ -208,7 +208,7 @@ public NamespaceImport() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -219,7 +219,7 @@ public NamespaceImport() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/NullExpression.cs b/SysML2.NET/Core/AutoGenPoco/NullExpression.cs index a45574aa7..bb6fd4cc9 100644 --- a/SysML2.NET/Core/AutoGenPoco/NullExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/NullExpression.cs @@ -604,7 +604,7 @@ public NullExpression() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ObjectiveMembership.cs b/SysML2.NET/Core/AutoGenPoco/ObjectiveMembership.cs index 42385f5c0..46a166342 100644 --- a/SysML2.NET/Core/AutoGenPoco/ObjectiveMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ObjectiveMembership.cs @@ -279,7 +279,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -290,7 +290,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/OccurrenceDefinition.cs b/SysML2.NET/Core/AutoGenPoco/OccurrenceDefinition.cs index 55c33537c..210974ef6 100644 --- a/SysML2.NET/Core/AutoGenPoco/OccurrenceDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/OccurrenceDefinition.cs @@ -598,7 +598,7 @@ public OccurrenceDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/OccurrenceUsage.cs b/SysML2.NET/Core/AutoGenPoco/OccurrenceUsage.cs index e7a9e46ea..6a49ad6b2 100644 --- a/SysML2.NET/Core/AutoGenPoco/OccurrenceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/OccurrenceUsage.cs @@ -899,7 +899,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/OperatorExpression.cs b/SysML2.NET/Core/AutoGenPoco/OperatorExpression.cs index 19cdb86d2..9a95a713f 100644 --- a/SysML2.NET/Core/AutoGenPoco/OperatorExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/OperatorExpression.cs @@ -631,7 +631,7 @@ public OperatorExpression() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/OwningMembership.cs b/SysML2.NET/Core/AutoGenPoco/OwningMembership.cs index c13c594b3..5f6f3dc99 100644 --- a/SysML2.NET/Core/AutoGenPoco/OwningMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/OwningMembership.cs @@ -255,7 +255,7 @@ string IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -266,7 +266,7 @@ string IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Package.cs b/SysML2.NET/Core/AutoGenPoco/Package.cs index b1f61d913..df3b6c792 100644 --- a/SysML2.NET/Core/AutoGenPoco/Package.cs +++ b/SysML2.NET/Core/AutoGenPoco/Package.cs @@ -219,7 +219,7 @@ public Package() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ParameterMembership.cs b/SysML2.NET/Core/AutoGenPoco/ParameterMembership.cs index f7d3bb601..9098c56da 100644 --- a/SysML2.NET/Core/AutoGenPoco/ParameterMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ParameterMembership.cs @@ -279,7 +279,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -290,7 +290,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/PartDefinition.cs b/SysML2.NET/Core/AutoGenPoco/PartDefinition.cs index 83f1fdf65..dc7e87c0b 100644 --- a/SysML2.NET/Core/AutoGenPoco/PartDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/PartDefinition.cs @@ -596,7 +596,7 @@ public PartDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/PartUsage.cs b/SysML2.NET/Core/AutoGenPoco/PartUsage.cs index f98f51b22..469374421 100644 --- a/SysML2.NET/Core/AutoGenPoco/PartUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/PartUsage.cs @@ -909,7 +909,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs b/SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs index f2744957e..995ba314b 100644 --- a/SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs +++ b/SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs @@ -577,7 +577,7 @@ public PayloadFeature() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/PerformActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/PerformActionUsage.cs index 6af64ab65..21d12855d 100644 --- a/SysML2.NET/Core/AutoGenPoco/PerformActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/PerformActionUsage.cs @@ -939,7 +939,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/PortConjugation.cs b/SysML2.NET/Core/AutoGenPoco/PortConjugation.cs index 7a7281bc8..34dccc974 100644 --- a/SysML2.NET/Core/AutoGenPoco/PortConjugation.cs +++ b/SysML2.NET/Core/AutoGenPoco/PortConjugation.cs @@ -213,7 +213,7 @@ IType Core.Types.IConjugation.OriginalType [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -224,7 +224,7 @@ IType Core.Types.IConjugation.OriginalType [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/PortDefinition.cs b/SysML2.NET/Core/AutoGenPoco/PortDefinition.cs index e740be4bb..7afff4bc8 100644 --- a/SysML2.NET/Core/AutoGenPoco/PortDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/PortDefinition.cs @@ -605,7 +605,7 @@ public PortDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/PortUsage.cs b/SysML2.NET/Core/AutoGenPoco/PortUsage.cs index 592591195..50a4ed426 100644 --- a/SysML2.NET/Core/AutoGenPoco/PortUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/PortUsage.cs @@ -898,7 +898,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Predicate.cs b/SysML2.NET/Core/AutoGenPoco/Predicate.cs index 0caeeb493..818529e65 100644 --- a/SysML2.NET/Core/AutoGenPoco/Predicate.cs +++ b/SysML2.NET/Core/AutoGenPoco/Predicate.cs @@ -425,7 +425,7 @@ public Predicate() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Redefinition.cs b/SysML2.NET/Core/AutoGenPoco/Redefinition.cs index b2016fb62..f28c73c59 100644 --- a/SysML2.NET/Core/AutoGenPoco/Redefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/Redefinition.cs @@ -196,7 +196,7 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -207,7 +207,7 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ReferenceSubsetting.cs b/SysML2.NET/Core/AutoGenPoco/ReferenceSubsetting.cs index 540e900a8..8bc5fafac 100644 --- a/SysML2.NET/Core/AutoGenPoco/ReferenceSubsetting.cs +++ b/SysML2.NET/Core/AutoGenPoco/ReferenceSubsetting.cs @@ -190,7 +190,7 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -201,7 +201,7 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs b/SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs index 0cfddbfc1..675086d04 100644 --- a/SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs @@ -880,7 +880,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/RenderingDefinition.cs b/SysML2.NET/Core/AutoGenPoco/RenderingDefinition.cs index b3044b92e..5b2edf2c1 100644 --- a/SysML2.NET/Core/AutoGenPoco/RenderingDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/RenderingDefinition.cs @@ -595,7 +595,7 @@ public RenderingDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs b/SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs index 11f41b942..6be12ea2f 100644 --- a/SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs @@ -908,7 +908,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/RequirementConstraintMembership.cs b/SysML2.NET/Core/AutoGenPoco/RequirementConstraintMembership.cs index 444355ca4..8166a4466 100644 --- a/SysML2.NET/Core/AutoGenPoco/RequirementConstraintMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/RequirementConstraintMembership.cs @@ -287,7 +287,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -298,7 +298,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/RequirementDefinition.cs b/SysML2.NET/Core/AutoGenPoco/RequirementDefinition.cs index 40de60a31..e44e9f8c3 100644 --- a/SysML2.NET/Core/AutoGenPoco/RequirementDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/RequirementDefinition.cs @@ -653,7 +653,7 @@ string Root.Elements.IElement.DeclaredShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/RequirementUsage.cs b/SysML2.NET/Core/AutoGenPoco/RequirementUsage.cs index 35f773287..b6c2d1ebb 100644 --- a/SysML2.NET/Core/AutoGenPoco/RequirementUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/RequirementUsage.cs @@ -971,7 +971,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/RequirementVerificationMembership.cs b/SysML2.NET/Core/AutoGenPoco/RequirementVerificationMembership.cs index e1d0da3e5..505c284be 100644 --- a/SysML2.NET/Core/AutoGenPoco/RequirementVerificationMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/RequirementVerificationMembership.cs @@ -305,7 +305,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -316,7 +316,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ResultExpressionMembership.cs b/SysML2.NET/Core/AutoGenPoco/ResultExpressionMembership.cs index 00d8e63a3..292faf776 100644 --- a/SysML2.NET/Core/AutoGenPoco/ResultExpressionMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ResultExpressionMembership.cs @@ -272,7 +272,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -283,7 +283,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ReturnParameterMembership.cs b/SysML2.NET/Core/AutoGenPoco/ReturnParameterMembership.cs index 3047490b5..78e1dc2fa 100644 --- a/SysML2.NET/Core/AutoGenPoco/ReturnParameterMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ReturnParameterMembership.cs @@ -280,7 +280,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -291,7 +291,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/SatisfyRequirementUsage.cs b/SysML2.NET/Core/AutoGenPoco/SatisfyRequirementUsage.cs index 7028806aa..1b80fdd22 100644 --- a/SysML2.NET/Core/AutoGenPoco/SatisfyRequirementUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/SatisfyRequirementUsage.cs @@ -991,7 +991,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/SelectExpression.cs b/SysML2.NET/Core/AutoGenPoco/SelectExpression.cs index 371194548..cf16784cd 100644 --- a/SysML2.NET/Core/AutoGenPoco/SelectExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/SelectExpression.cs @@ -646,7 +646,7 @@ string IOperatorExpression.Operator [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/SendActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/SendActionUsage.cs index 5da7f9aa3..38ae245c0 100644 --- a/SysML2.NET/Core/AutoGenPoco/SendActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/SendActionUsage.cs @@ -923,7 +923,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Specialization.cs b/SysML2.NET/Core/AutoGenPoco/Specialization.cs index 7a5cbb0ab..2f094cd26 100644 --- a/SysML2.NET/Core/AutoGenPoco/Specialization.cs +++ b/SysML2.NET/Core/AutoGenPoco/Specialization.cs @@ -175,7 +175,7 @@ public Specialization() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -186,7 +186,7 @@ public Specialization() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/StakeholderMembership.cs b/SysML2.NET/Core/AutoGenPoco/StakeholderMembership.cs index d93d823dd..a79580b3a 100644 --- a/SysML2.NET/Core/AutoGenPoco/StakeholderMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/StakeholderMembership.cs @@ -282,7 +282,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -293,7 +293,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/StateDefinition.cs b/SysML2.NET/Core/AutoGenPoco/StateDefinition.cs index 6e5589b03..f78dcc343 100644 --- a/SysML2.NET/Core/AutoGenPoco/StateDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/StateDefinition.cs @@ -644,7 +644,7 @@ public StateDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/StateSubactionMembership.cs b/SysML2.NET/Core/AutoGenPoco/StateSubactionMembership.cs index 414f84181..af61b5f3d 100644 --- a/SysML2.NET/Core/AutoGenPoco/StateSubactionMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/StateSubactionMembership.cs @@ -287,7 +287,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -298,7 +298,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/StateUsage.cs b/SysML2.NET/Core/AutoGenPoco/StateUsage.cs index 81f8868b9..34af2b920 100644 --- a/SysML2.NET/Core/AutoGenPoco/StateUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/StateUsage.cs @@ -958,7 +958,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Step.cs b/SysML2.NET/Core/AutoGenPoco/Step.cs index 86cc54214..8bb890086 100644 --- a/SysML2.NET/Core/AutoGenPoco/Step.cs +++ b/SysML2.NET/Core/AutoGenPoco/Step.cs @@ -588,7 +588,7 @@ public Step() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Structure.cs b/SysML2.NET/Core/AutoGenPoco/Structure.cs index c4c97041c..cebc67eeb 100644 --- a/SysML2.NET/Core/AutoGenPoco/Structure.cs +++ b/SysML2.NET/Core/AutoGenPoco/Structure.cs @@ -407,7 +407,7 @@ public Structure() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Subclassification.cs b/SysML2.NET/Core/AutoGenPoco/Subclassification.cs index 504c1591d..0f8f018d7 100644 --- a/SysML2.NET/Core/AutoGenPoco/Subclassification.cs +++ b/SysML2.NET/Core/AutoGenPoco/Subclassification.cs @@ -186,7 +186,7 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -197,7 +197,7 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/SubjectMembership.cs b/SysML2.NET/Core/AutoGenPoco/SubjectMembership.cs index 360e5aedd..79756fd19 100644 --- a/SysML2.NET/Core/AutoGenPoco/SubjectMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/SubjectMembership.cs @@ -282,7 +282,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -293,7 +293,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Subsetting.cs b/SysML2.NET/Core/AutoGenPoco/Subsetting.cs index 274336680..aed07db0b 100644 --- a/SysML2.NET/Core/AutoGenPoco/Subsetting.cs +++ b/SysML2.NET/Core/AutoGenPoco/Subsetting.cs @@ -190,7 +190,7 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -201,7 +201,7 @@ IType Core.Types.ISpecialization.General [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Succession.cs b/SysML2.NET/Core/AutoGenPoco/Succession.cs index bbff7bd0c..3b470e250 100644 --- a/SysML2.NET/Core/AutoGenPoco/Succession.cs +++ b/SysML2.NET/Core/AutoGenPoco/Succession.cs @@ -617,7 +617,7 @@ public Succession() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -628,7 +628,7 @@ public Succession() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/SuccessionAsUsage.cs b/SysML2.NET/Core/AutoGenPoco/SuccessionAsUsage.cs index 3651afdc3..e4e651f86 100644 --- a/SysML2.NET/Core/AutoGenPoco/SuccessionAsUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/SuccessionAsUsage.cs @@ -909,7 +909,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -920,7 +920,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs b/SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs index bde47a6a5..72195d8cc 100644 --- a/SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs +++ b/SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs @@ -651,7 +651,7 @@ public SuccessionFlow() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -662,7 +662,7 @@ public SuccessionFlow() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/SuccessionFlowUsage.cs b/SysML2.NET/Core/AutoGenPoco/SuccessionFlowUsage.cs index 26773c049..8a08b3ef1 100644 --- a/SysML2.NET/Core/AutoGenPoco/SuccessionFlowUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/SuccessionFlowUsage.cs @@ -990,7 +990,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -1001,7 +1001,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/TerminateActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/TerminateActionUsage.cs index 3442e0f89..4fe5ac967 100644 --- a/SysML2.NET/Core/AutoGenPoco/TerminateActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/TerminateActionUsage.cs @@ -922,7 +922,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/TextualRepresentation.cs b/SysML2.NET/Core/AutoGenPoco/TextualRepresentation.cs index f662375c8..4232104bf 100644 --- a/SysML2.NET/Core/AutoGenPoco/TextualRepresentation.cs +++ b/SysML2.NET/Core/AutoGenPoco/TextualRepresentation.cs @@ -222,7 +222,7 @@ public TextualRepresentation() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/TransitionFeatureMembership.cs b/SysML2.NET/Core/AutoGenPoco/TransitionFeatureMembership.cs index ef0319a57..ba6cd3da4 100644 --- a/SysML2.NET/Core/AutoGenPoco/TransitionFeatureMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/TransitionFeatureMembership.cs @@ -280,7 +280,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -291,7 +291,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/TransitionUsage.cs b/SysML2.NET/Core/AutoGenPoco/TransitionUsage.cs index 17ca399eb..a32ccc77b 100644 --- a/SysML2.NET/Core/AutoGenPoco/TransitionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/TransitionUsage.cs @@ -944,7 +944,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/TriggerInvocationExpression.cs b/SysML2.NET/Core/AutoGenPoco/TriggerInvocationExpression.cs index cdc9c2a5c..7f6ec857d 100644 --- a/SysML2.NET/Core/AutoGenPoco/TriggerInvocationExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/TriggerInvocationExpression.cs @@ -633,7 +633,7 @@ public TriggerInvocationExpression() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Type.cs b/SysML2.NET/Core/AutoGenPoco/Type.cs index 71adf21c6..ea6534e60 100644 --- a/SysML2.NET/Core/AutoGenPoco/Type.cs +++ b/SysML2.NET/Core/AutoGenPoco/Type.cs @@ -404,7 +404,7 @@ public Type() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/TypeFeaturing.cs b/SysML2.NET/Core/AutoGenPoco/TypeFeaturing.cs index 3e0d73e86..9393ecdc2 100644 --- a/SysML2.NET/Core/AutoGenPoco/TypeFeaturing.cs +++ b/SysML2.NET/Core/AutoGenPoco/TypeFeaturing.cs @@ -183,7 +183,7 @@ public TypeFeaturing() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -194,7 +194,7 @@ public TypeFeaturing() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Unioning.cs b/SysML2.NET/Core/AutoGenPoco/Unioning.cs index eda71ca5b..26ed48c0d 100644 --- a/SysML2.NET/Core/AutoGenPoco/Unioning.cs +++ b/SysML2.NET/Core/AutoGenPoco/Unioning.cs @@ -165,7 +165,7 @@ public Unioning() [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -176,7 +176,7 @@ public Unioning() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/Usage.cs b/SysML2.NET/Core/AutoGenPoco/Usage.cs index f21a7d6a5..60686f0c8 100644 --- a/SysML2.NET/Core/AutoGenPoco/Usage.cs +++ b/SysML2.NET/Core/AutoGenPoco/Usage.cs @@ -874,7 +874,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/UseCaseDefinition.cs b/SysML2.NET/Core/AutoGenPoco/UseCaseDefinition.cs index 1a4b79ecd..05069e833 100644 --- a/SysML2.NET/Core/AutoGenPoco/UseCaseDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/UseCaseDefinition.cs @@ -659,7 +659,7 @@ public UseCaseDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs index 01976e1d8..214466648 100644 --- a/SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs @@ -979,7 +979,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/VariantMembership.cs b/SysML2.NET/Core/AutoGenPoco/VariantMembership.cs index 9e166c350..12cd01e95 100644 --- a/SysML2.NET/Core/AutoGenPoco/VariantMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/VariantMembership.cs @@ -258,7 +258,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -269,7 +269,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/VerificationCaseDefinition.cs b/SysML2.NET/Core/AutoGenPoco/VerificationCaseDefinition.cs index 9a0fd5072..05c8eacaa 100644 --- a/SysML2.NET/Core/AutoGenPoco/VerificationCaseDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/VerificationCaseDefinition.cs @@ -650,7 +650,7 @@ public VerificationCaseDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/VerificationCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/VerificationCaseUsage.cs index 43d311bfa..3654ac767 100644 --- a/SysML2.NET/Core/AutoGenPoco/VerificationCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/VerificationCaseUsage.cs @@ -970,7 +970,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ViewDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ViewDefinition.cs index ba9d7ba66..41f97f055 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewDefinition.cs @@ -597,7 +597,7 @@ public ViewDefinition() [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ViewRenderingMembership.cs b/SysML2.NET/Core/AutoGenPoco/ViewRenderingMembership.cs index 99d6e523d..d907151eb 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewRenderingMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewRenderingMembership.cs @@ -270,7 +270,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1533160674986_59873_43302", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_132339_43177")] [Implements(implementation: "IRelationship.OwnedRelatedElement")] - public IReadOnlyCollection OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; + public IReadOnlyList OwnedRelatedElement => ((IContainedRelationship)this).OwnedRelatedElement; /// Backing field for IRelationship.OwnedRelatedElement ContainerList IContainedRelationship.OwnedRelatedElement { get; set; } @@ -281,7 +281,7 @@ string Root.Namespaces.IMembership.MemberShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ViewUsage.cs b/SysML2.NET/Core/AutoGenPoco/ViewUsage.cs index 4cc717602..5233284bf 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewUsage.cs @@ -919,7 +919,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ViewpointDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ViewpointDefinition.cs index 355c9c895..6576a8de1 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewpointDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewpointDefinition.cs @@ -652,7 +652,7 @@ string Root.Elements.IElement.DeclaredShortName [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs b/SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs index e2ff68301..e85fd9ebb 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs @@ -971,7 +971,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/AutoGenPoco/WhileLoopActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/WhileLoopActionUsage.cs index 329ebcbaf..3a360d789 100644 --- a/SysML2.NET/Core/AutoGenPoco/WhileLoopActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/WhileLoopActionUsage.cs @@ -930,7 +930,7 @@ bool Core.Features.IFeature.IsVariable [Property(xmiId: "_18_5_3_12e503d9_1543092026091_217766_16748", aggregation: AggregationKind.Composite, lowerValue: 0, upperValue: int.MaxValue, isOrdered: true, isReadOnly: false, isDerived: false, isDerivedUnion: false, isUnique: true, defaultValue: null)] [SubsettedProperty(propertyName: "_18_5_3_12e503d9_1533160674961_585972_43176")] [Implements(implementation: "IElement.OwnedRelationship")] - public IReadOnlyCollection OwnedRelationship => ((IContainedElement)this).OwnedRelationship; + public IReadOnlyList OwnedRelationship => ((IContainedElement)this).OwnedRelationship; /// Backing field for IElement.OwnedRelationship ContainerList IContainedElement.OwnedRelationship { get; set; } diff --git a/SysML2.NET/Core/Poco/FeatureMembership.cs b/SysML2.NET/Core/Poco/FeatureMembership.cs new file mode 100644 index 000000000..c2183e633 --- /dev/null +++ b/SysML2.NET/Core/Poco/FeatureMembership.cs @@ -0,0 +1,107 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Core.POCO.Core.Types +{ + using System.Linq; + + using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Core.POCO.Systems.Allocations; + using SysML2.NET.Core.POCO.Systems.Connections; + using SysML2.NET.Core.POCO.Systems.DefinitionAndUsage; + using SysML2.NET.Core.POCO.Systems.Flows; + using SysML2.NET.Core.POCO.Systems.Interfaces; + using SysML2.NET.Core.POCO.Systems.Items; + using SysML2.NET.Core.POCO.Systems.Occurrences; + using SysML2.NET.Core.POCO.Systems.Parts; + using SysML2.NET.Core.POCO.Systems.Ports; + using SysML2.NET.Core.POCO.Systems.Views; + + /// + /// A FeatureMembership is an OwningMembership between an ownedMemberFeature and an owningType. If the + /// ownedMemberFeature has isVariable = false, then the FeatureMembership implies that the owningType is + /// also a featuringType of the ownedMemberFeature. If the ownedMemberFeature has isVariable = true, + /// then the FeatureMembership implies that the ownedMemberFeature is featured by the snapshots of the + /// owningType, which must specialize the Kernel Semantic Library base class Occurrence. + /// + public partial class FeatureMembership + { + /// + /// Asserts that this contais at least element into the + /// collection + /// + /// True if it contains one + internal bool IsValidForSourceSuccessionMember() + { + return this.HasRelatedElementOfType(); + } + + /// + /// Asserts that this contais at least element into the + /// collection but none of them are + /// + /// True if it contains one but no + internal bool IsValidForNonOccurrenceUsageMember() + { + return !this.IsValidForOccurrenceUsageMember() && this.HasRelatedElementOfType(); + } + + /// + /// Asserts that this contais at least element into the + /// collection + /// + /// True if it contains one + internal bool IsValidForOccurrenceUsageMember() + { + return this.HasRelatedElementOfType(); + } + + /// + /// Asserts that the contains at least one element + /// + /// Any + /// True if the contains one element + private bool HasRelatedElementOfType() where T : IElement + { + return this.OwnedRelatedElement.OfType().Any(); + } + + /// + /// Asserts that the current have valid typeinto the + /// collection for the StructureUsageMember + /// + /// True if contains any of the required element type + internal bool IsValidForStructureUsageMember() + { + return this.HasRelatedElementOfType() + || this.HasRelatedElementOfType() + || this.HasRelatedElementOfType() + || this.HasRelatedElementOfType() + || this.HasRelatedElementOfType() + || this.HasRelatedElementOfType() + || this.HasRelatedElementOfType() + || this.HasRelatedElementOfType() + || this.HasRelatedElementOfType() + || this.HasRelatedElementOfType() + || this.HasRelatedElementOfType() + || this.HasRelatedElementOfType(); + } + } +} diff --git a/SysML2.NET/Core/Poco/OwningMembership.cs b/SysML2.NET/Core/Poco/OwningMembership.cs new file mode 100644 index 000000000..e41b2fc4a --- /dev/null +++ b/SysML2.NET/Core/Poco/OwningMembership.cs @@ -0,0 +1,51 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Core.POCO.Root.Namespaces +{ + using System.Linq; + + using SysML2.NET.Core.POCO.Core.Features; + + /// + /// An OwningMembership is a Membership that owns its memberElement as a ownedRelatedElement. The + /// ownedMemberElement becomes an ownedMember of the membershipOwningNamespace. + /// + public partial class OwningMembership + { + /// + /// Asserts that the current contains at least one inside the collection + /// + /// True if one is contained into the + internal bool IsValidForNonFeatureMember() + { + return this.OwnedRelatedElement.OfType().Any(); + } + + /// + /// Asserts that the current does not contains any inside the collection + /// + /// True if none is contained into the + internal bool IsValidForFeatureMember() + { + return !this.IsValidForNonFeatureMember(); + } + } +} diff --git a/SysML2.NET/Extensions/EnumerableExtensions.cs b/SysML2.NET/Extensions/EnumerableExtensions.cs new file mode 100644 index 000000000..57bd6961f --- /dev/null +++ b/SysML2.NET/Extensions/EnumerableExtensions.cs @@ -0,0 +1,46 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Extensions +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// Extension methods for the interface + /// + internal static class EnumerableExtensions + { + /// + /// Filters out all where the type matches one of the requested + /// + /// The collection to filters + /// A collection of that should be used for filtering + /// A collection of + internal static IEnumerable GetElementsOfType(this IEnumerable collection, params Type[] elementTypes) + { + return from object element in collection where elementTypes.Contains(element.GetType()) select element as IElement; + } + } +} diff --git a/SysML2.NET/TextualNotation/AcceptActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AcceptActionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..4a228022a --- /dev/null +++ b/SysML2.NET/TextualNotation/AcceptActionUsageTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.Actions; + + /// + /// Hand-coded part of the + /// + public static partial class AcceptActionUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the TransitionAcceptActionUsage rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForTransitionAcceptActionUsage(IAcceptActionUsage poco) + { + return poco.OwnedRelationship.Count != 0; + } + } +} diff --git a/SysML2.NET/TextualNotation/ActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/ActionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..2345afd79 --- /dev/null +++ b/SysML2.NET/TextualNotation/ActionUsageTextualNotationBuilder.cs @@ -0,0 +1,50 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.Actions; + + /// + /// Hand-coded part of + /// + public static partial class ActionUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the ActionBodyParameter rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForActionBodyParameter(IActionUsage poco) + { + return CommonTextualNotationBuilder.DoesDefinesUsageDeclaration(poco); + } + + /// + /// Builds the conditional part for the AssignmentNodeDeclaration rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForAssignmentNodeDeclaration(IActionUsage poco) + { + return CommonTextualNotationBuilder.DoesDefinesUsageDeclaration(poco); + } + } +} diff --git a/SysML2.NET/TextualNotation/AssignmentActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AssignmentActionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..a6aa6abc1 --- /dev/null +++ b/SysML2.NET/TextualNotation/AssignmentActionUsageTextualNotationBuilder.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + + using SysML2.NET.Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Systems.Actions; + + /// + /// Hand-coded part of + /// + public static partial class AssignmentActionUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the TransitionAssignmentActionUsage rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForTransitionAssignmentActionUsage(IAssignmentActionUsage poco) + { + return poco.OwnedRelationship.OfType().Any(); + } + } +} diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..b2b2cd5d6 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs @@ -0,0 +1,149 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class AcceptActionUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule AcceptNode + /// AcceptNode:AcceptActionUsage=OccurrenceUsagePrefixAcceptNodeDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAcceptNode(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + BuildAcceptNodeDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule AcceptNodeDeclaration + /// AcceptNodeDeclaration:AcceptActionUsage=ActionNodeUsageDeclaration?'accept'AcceptParameterPart + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAcceptNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) + { + ActionUsageTextualNotationBuilder.BuildActionNodeUsageDeclaration(poco, stringBuilder); + stringBuilder.Append("accept "); + BuildAcceptParameterPart(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule AcceptParameterPart + /// AcceptParameterPart:AcceptActionUsage=ownedRelationship+=PayloadParameterMember('via'ownedRelationship+=NodeParameterMember)? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAcceptParameterPart(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildPayloadParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + + if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) + { + stringBuilder.Append("via "); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append(' '); + } + + + } + + /// + /// Builds the Textual Notation string for the rule StateAcceptActionUsage + /// StateAcceptActionUsage:AcceptActionUsage=AcceptNodeDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateAcceptActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) + { + BuildAcceptNodeDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule TriggerAction + /// TriggerAction:AcceptActionUsage=AcceptParameterPart + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTriggerAction(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) + { + BuildAcceptParameterPart(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule TransitionAcceptActionUsage + /// TransitionAcceptActionUsage:AcceptActionUsage=AcceptNodeDeclaration('{'ActionBodyItem*'}')? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTransitionAcceptActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) + { + BuildAcceptNodeDeclaration(poco, stringBuilder); + + if (BuildGroupConditionForTransitionAcceptActionUsage(poco)) + { + stringBuilder.Append("{"); + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = TypeTextualNotationBuilder.BuildActionBodyItem(poco, ownedRelationshipIndex, stringBuilder); + } + stringBuilder.Append("}"); + stringBuilder.Append(' '); + } + + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..c92602c55 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ActionDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ActionDefinition + /// ActionDefinition=OccurrenceDefinitionPrefix'action''def'DefinitionDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionDefinition(SysML2.NET.Core.POCO.Systems.Actions.IActionDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("action "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..a8681f464 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs @@ -0,0 +1,250 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ActionUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ActionUsageDeclaration + /// ActionUsageDeclaration:ActionUsage=UsageDeclarationValuePart? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionUsageDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule ActionNode + /// ActionNode:ActionUsage=ControlNode|SendNode|AcceptNode|AssignmentNode|TerminateNode|IfNode|WhileLoopNode|ForLoopNode + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionNode(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Systems.Actions.IControlNode pocoControlNode: + ControlNodeTextualNotationBuilder.BuildControlNode(pocoControlNode, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Actions.SendActionUsage pocoSendActionUsage: + SendActionUsageTextualNotationBuilder.BuildSendNode(pocoSendActionUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Actions.AcceptActionUsage pocoAcceptActionUsage: + AcceptActionUsageTextualNotationBuilder.BuildAcceptNode(pocoAcceptActionUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Actions.AssignmentActionUsage pocoAssignmentActionUsage: + AssignmentActionUsageTextualNotationBuilder.BuildAssignmentNode(pocoAssignmentActionUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Actions.TerminateActionUsage pocoTerminateActionUsage: + TerminateActionUsageTextualNotationBuilder.BuildTerminateNode(pocoTerminateActionUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Actions.IfActionUsage pocoIfActionUsage: + IfActionUsageTextualNotationBuilder.BuildIfNode(pocoIfActionUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Actions.WhileLoopActionUsage pocoWhileLoopActionUsage: + WhileLoopActionUsageTextualNotationBuilder.BuildWhileLoopNode(pocoWhileLoopActionUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Actions.ForLoopActionUsage pocoForLoopActionUsage: + ForLoopActionUsageTextualNotationBuilder.BuildForLoopNode(pocoForLoopActionUsage, stringBuilder); + break; + } + + } + + /// + /// Builds the Textual Notation string for the rule ActionNodeUsageDeclaration + /// ActionNodeUsageDeclaration:ActionUsage='action'UsageDeclaration? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionNodeUsageDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + stringBuilder.Append("action "); + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule ActionNodePrefix + /// ActionNodePrefix:ActionUsage=OccurrenceUsagePrefixActionNodeUsageDeclaration? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionNodePrefix(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + BuildActionNodeUsageDeclaration(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule AssignmentNodeDeclaration + /// AssignmentNodeDeclaration:ActionUsage=(ActionNodeUsageDeclaration)?'assign'ownedRelationship+=AssignmentTargetMemberownedRelationship+=FeatureChainMember':='ownedRelationship+=NodeParameterMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAssignmentNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (BuildGroupConditionForAssignmentNodeDeclaration(poco)) + { + BuildActionNodeUsageDeclaration(poco, stringBuilder); + stringBuilder.Append(' '); + } + + stringBuilder.Append("assign "); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildAssignmentTargetMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + ownedRelationshipOfMembershipIterator.MoveNext(); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append(":= "); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule ActionBodyParameter + /// ActionBodyParameter:ActionUsage=('action'UsageDeclaration?)?'{'ActionBodyItem*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionBodyParameter(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + + if (BuildGroupConditionForActionBodyParameter(poco)) + { + stringBuilder.Append("action "); + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + stringBuilder.Append(' '); + } + + stringBuilder.Append("{"); + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = TypeTextualNotationBuilder.BuildActionBodyItem(poco, ownedRelationshipIndex, stringBuilder); + } + stringBuilder.Append("}"); + + } + + /// + /// Builds the Textual Notation string for the rule StateActionUsage + /// StateActionUsage:ActionUsage=EmptyActionUsage';'|StatePerformActionUsage|StateAcceptActionUsage|StateSendActionUsage|StateAssignmentActionUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule EmptyActionUsage + /// EmptyActionUsage:ActionUsage={} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEmptyActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + + } + + /// + /// Builds the Textual Notation string for the rule EffectBehaviorUsage + /// EffectBehaviorUsage:ActionUsage=EmptyActionUsage|TransitionPerformActionUsage|TransitionAcceptActionUsage|TransitionSendActionUsage|TransitionAssignmentActionUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEffectBehaviorUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Systems.Actions.PerformActionUsage pocoPerformActionUsage: + PerformActionUsageTextualNotationBuilder.BuildTransitionPerformActionUsage(pocoPerformActionUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Actions.AcceptActionUsage pocoAcceptActionUsage: + AcceptActionUsageTextualNotationBuilder.BuildTransitionAcceptActionUsage(pocoAcceptActionUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Actions.SendActionUsage pocoSendActionUsage: + SendActionUsageTextualNotationBuilder.BuildTransitionSendActionUsage(pocoSendActionUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Actions.AssignmentActionUsage pocoAssignmentActionUsage: + AssignmentActionUsageTextualNotationBuilder.BuildTransitionAssignmentActionUsage(pocoAssignmentActionUsage, stringBuilder); + break; + default: + BuildEmptyActionUsage(poco, stringBuilder); + break; + } + + } + + /// + /// Builds the Textual Notation string for the rule ActionUsage + /// ActionUsage=OccurrenceUsagePrefix'action'ActionUsageDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("action "); + BuildActionUsageDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..df86fc377 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs @@ -0,0 +1,60 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ActorMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ActorMember + /// ActorMember:ActorMembership=MemberPrefixownedRelatedElement+=ActorUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActorMember(SysML2.NET.Core.POCO.Systems.Requirements.IActorMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfPartUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfPartUsageIterator.MoveNext(); + + if (ownedRelatedElementOfPartUsageIterator.Current != null) + { + PartUsageTextualNotationBuilder.BuildActorUsage(ownedRelatedElementOfPartUsageIterator.Current, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..ff58ecec2 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class AllocationDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule AllocationDefinition + /// AllocationDefinition=OccurrenceDefinitionPrefix'allocation''def'Definition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAllocationDefinition(SysML2.NET.Core.POCO.Systems.Allocations.IAllocationDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("allocation "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..650f7ef7e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs @@ -0,0 +1,66 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class AllocationUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule AllocationUsageDeclaration + /// AllocationUsageDeclaration:AllocationUsage='allocation'UsageDeclaration('allocate'ConnectorPart)?|'allocate'ConnectorPart + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAllocationUsageDeclaration(SysML2.NET.Core.POCO.Systems.Allocations.IAllocationUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule AllocationUsage + /// AllocationUsage=OccurrenceUsagePrefixAllocationUsageDeclarationUsageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAllocationUsage(SysML2.NET.Core.POCO.Systems.Allocations.IAllocationUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + BuildAllocationUsageDeclaration(poco, stringBuilder); + UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..cfca3f931 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class AnalysisCaseDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule AnalysisCaseDefinition + /// AnalysisCaseDefinition=OccurrenceDefinitionPrefix'analysis''def'DefinitionDeclarationCaseBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAnalysisCaseDefinition(SysML2.NET.Core.POCO.Systems.AnalysisCases.IAnalysisCaseDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("analysis "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..ee7d80776 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs @@ -0,0 +1,58 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class AnalysisCaseUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule AnalysisCaseUsage + /// AnalysisCaseUsage=OccurrenceUsagePrefix'analysis'ConstraintUsageDeclarationCaseBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAnalysisCaseUsage(SysML2.NET.Core.POCO.Systems.AnalysisCases.IAnalysisCaseUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("analysis "); + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs new file mode 100644 index 000000000..59aebfaa0 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs @@ -0,0 +1,67 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class AnnotatingElementTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule AnnotatingElement + /// AnnotatingElement=Comment|Documentation|TextualRepresentation|MetadataFeature + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAnnotatingElement(SysML2.NET.Core.POCO.Root.Annotations.IAnnotatingElement poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Root.Annotations.Documentation pocoDocumentation: + DocumentationTextualNotationBuilder.BuildDocumentation(pocoDocumentation, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Annotations.Comment pocoComment: + CommentTextualNotationBuilder.BuildComment(pocoComment, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Annotations.TextualRepresentation pocoTextualRepresentation: + TextualRepresentationTextualNotationBuilder.BuildTextualRepresentation(pocoTextualRepresentation, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Metadata.MetadataFeature pocoMetadataFeature: + MetadataFeatureTextualNotationBuilder.BuildMetadataFeature(pocoMetadataFeature, stringBuilder); + break; + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs new file mode 100644 index 000000000..7b70bec2f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs @@ -0,0 +1,106 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class AnnotationTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OwnedAnnotation + /// OwnedAnnotation:Annotation=ownedRelatedElement+=AnnotatingElement + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildOwnedAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Root.Annotations.IAnnotatingElement elementAsAnnotatingElement) + { + AnnotatingElementTextualNotationBuilder.BuildAnnotatingElement(elementAsAnnotatingElement, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule PrefixMetadataAnnotation + /// PrefixMetadataAnnotation:Annotation='#'annotatingElement=PrefixMetadataUsage{ownedRelatedElement+=annotatingElement} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPrefixMetadataAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, StringBuilder stringBuilder) + { + stringBuilder.Append("#"); + + if (poco.annotatingElement != null) + { + var elementForOwnedRelationship = poco.annotatingElement.OwnedRelationship[0]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Core.Features.IFeatureTyping elementAsFeatureTyping) + { + FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(elementAsFeatureTyping, stringBuilder); + } + + } + // NonParsing Assignment Element : ownedRelatedElement += annotatingElement => Does not have to be process + + } + + /// + /// Builds the Textual Notation string for the rule Annotation + /// Annotation=annotatedElement=[QualifiedName] + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, StringBuilder stringBuilder) + { + + if (poco.AnnotatedElement != null) + { + stringBuilder.Append(poco.AnnotatedElement.qualifiedName); + stringBuilder.Append(' '); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..b970704c6 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs @@ -0,0 +1,65 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class AssertConstraintUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule AssertConstraintUsage + /// AssertConstraintUsage=OccurrenceUsagePrefix'assert'(isNegated?='not')?(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'constraint'ConstraintUsageDeclaration)CalculationBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAssertConstraintUsage(SysML2.NET.Core.POCO.Systems.Constraints.IAssertConstraintUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("assert "); + + if (poco.IsNegated) + { + stringBuilder.Append(" not "); + stringBuilder.Append(' '); + } + + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + TypeTextualNotationBuilder.BuildCalculationBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..b592c9e3c --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs @@ -0,0 +1,93 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class AssignmentActionUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule AssignmentNode + /// AssignmentNode:AssignmentActionUsage=OccurrenceUsagePrefixAssignmentNodeDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAssignmentNode(SysML2.NET.Core.POCO.Systems.Actions.IAssignmentActionUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + ActionUsageTextualNotationBuilder.BuildAssignmentNodeDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule StateAssignmentActionUsage + /// StateAssignmentActionUsage:AssignmentActionUsage=AssignmentNodeDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateAssignmentActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAssignmentActionUsage poco, StringBuilder stringBuilder) + { + ActionUsageTextualNotationBuilder.BuildAssignmentNodeDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule TransitionAssignmentActionUsage + /// TransitionAssignmentActionUsage:AssignmentActionUsage=AssignmentNodeDeclaration('{'ActionBodyItem*'}')? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTransitionAssignmentActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAssignmentActionUsage poco, StringBuilder stringBuilder) + { + ActionUsageTextualNotationBuilder.BuildAssignmentNodeDeclaration(poco, stringBuilder); + + if (BuildGroupConditionForTransitionAssignmentActionUsage(poco)) + { + stringBuilder.Append("{"); + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = TypeTextualNotationBuilder.BuildActionBodyItem(poco, ownedRelationshipIndex, stringBuilder); + } + stringBuilder.Append("}"); + stringBuilder.Append(' '); + } + + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs new file mode 100644 index 000000000..ff949da0c --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class AssociationStructureTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule AssociationStructure + /// AssociationStructure=TypePrefix'assoc''struct'ClassifierDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAssociationStructure(SysML2.NET.Core.POCO.Kernel.Associations.IAssociationStructure poco, StringBuilder stringBuilder) + { + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); + stringBuilder.Append("assoc "); + stringBuilder.Append("struct "); + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs new file mode 100644 index 000000000..c9c173a37 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class AssociationTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Association + /// Association=TypePrefix'assoc'ClassifierDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAssociation(SysML2.NET.Core.POCO.Kernel.Associations.IAssociation poco, StringBuilder stringBuilder) + { + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); + stringBuilder.Append("assoc "); + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..5f2260a7b --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class AttributeDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule AttributeDefinition + /// AttributeDefinition:AttributeDefinition=DefinitionPrefix'attribute''def'Definition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAttributeDefinition(SysML2.NET.Core.POCO.Systems.Attributes.IAttributeDefinition poco, StringBuilder stringBuilder) + { + DefinitionTextualNotationBuilder.BuildDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("attribute "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..1be2d1f56 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs @@ -0,0 +1,55 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class AttributeUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule AttributeUsage + /// AttributeUsage:AttributeUsage=UsagePrefix'attribute'Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAttributeUsage(SysML2.NET.Core.POCO.Systems.Attributes.IAttributeUsage poco, StringBuilder stringBuilder) + { + UsageTextualNotationBuilder.BuildUsagePrefix(poco, stringBuilder); + stringBuilder.Append("attribute "); + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs new file mode 100644 index 000000000..11522991d --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class BehaviorTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Behavior + /// Behavior=TypePrefix'behavior'ClassifierDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBehavior(SysML2.NET.Core.POCO.Kernel.Behaviors.IBehavior poco, StringBuilder stringBuilder) + { + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); + stringBuilder.Append("behavior "); + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..58e83d545 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs @@ -0,0 +1,77 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class BindingConnectorAsUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule BindingConnectorAsUsage + /// BindingConnectorAsUsage=UsagePrefix('binding'UsageDeclaration)?'bind'ownedRelationship+=ConnectorEndMember'='ownedRelationship+=ConnectorEndMemberUsageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBindingConnectorAsUsage(SysML2.NET.Core.POCO.Systems.Connections.IBindingConnectorAsUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + UsageTextualNotationBuilder.BuildUsagePrefix(poco, stringBuilder); + + if (BuildGroupConditionForBindingConnectorAsUsage(poco)) + { + stringBuilder.Append("binding "); + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + stringBuilder.Append(' '); + } + + stringBuilder.Append("bind "); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append("="); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs new file mode 100644 index 000000000..c67e96b15 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs @@ -0,0 +1,80 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class BindingConnectorTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule BindingConnectorDeclaration + /// BindingConnectorDeclaration:BindingConnector=FeatureDeclaration('of'ownedRelationship+=ConnectorEndMember'='ownedRelationship+=ConnectorEndMember)?|(isSufficient?='all')?('of'?ownedRelationship+=ConnectorEndMember'='ownedRelationship+=ConnectorEndMember)? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBindingConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IBindingConnector poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule BindingConnector + /// BindingConnector=FeaturePrefix'binding'BindingConnectorDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBindingConnector(SysML2.NET.Core.POCO.Kernel.Connectors.IBindingConnector poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } + + } + + stringBuilder.Append("binding "); + BuildBindingConnectorDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs new file mode 100644 index 000000000..3bff40401 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs @@ -0,0 +1,70 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class BooleanExpressionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule BooleanExpression + /// BooleanExpression=FeaturePrefix'bool'FeatureDeclarationValuePart?FunctionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBooleanExpression(SysML2.NET.Core.POCO.Kernel.Functions.IBooleanExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } + + } + + stringBuilder.Append("bool "); + FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + TypeTextualNotationBuilder.BuildFunctionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..8195eecc5 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class CalculationDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule CalculationDefinition + /// CalculationDefinition=OccurrenceDefinitionPrefix'calc''def'DefinitionDeclarationCalculationBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCalculationDefinition(SysML2.NET.Core.POCO.Systems.Calculations.ICalculationDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("calc "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildCalculationBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..72a021ce3 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class CalculationUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule CalculationUsage + /// CalculationUsage:CalculationUsage=OccurrenceUsagePrefix'calc'ActionUsageDeclarationCalculationBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCalculationUsage(SysML2.NET.Core.POCO.Systems.Calculations.ICalculationUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("calc "); + ActionUsageTextualNotationBuilder.BuildActionUsageDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildCalculationBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..4a6f29714 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class CaseDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule CaseDefinition + /// CaseDefinition=OccurrenceDefinitionPrefix'case''def'DefinitionDeclarationCaseBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCaseDefinition(SysML2.NET.Core.POCO.Systems.Cases.ICaseDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("case "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..c67d2877d --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs @@ -0,0 +1,58 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class CaseUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule CaseUsage + /// CaseUsage=OccurrenceUsagePrefix'case'ConstraintUsageDeclarationCaseBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCaseUsage(SysML2.NET.Core.POCO.Systems.Cases.ICaseUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("case "); + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs new file mode 100644 index 000000000..4abead850 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ClassTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Class + /// Class=TypePrefix'class'ClassifierDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildClass(SysML2.NET.Core.POCO.Kernel.Classes.IClass poco, StringBuilder stringBuilder) + { + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); + stringBuilder.Append("class "); + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs new file mode 100644 index 000000000..7ed17253a --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs @@ -0,0 +1,159 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ClassifierTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule SubclassificationPart + /// SubclassificationPart:Classifier=SPECIALIZESownedRelationship+=OwnedSubclassification(','ownedRelationship+=OwnedSubclassification)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSubclassificationPart(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfSubclassificationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append(" :> "); + ownedRelationshipOfSubclassificationIterator.MoveNext(); + + if (ownedRelationshipOfSubclassificationIterator.Current != null) + { + SubclassificationTextualNotationBuilder.BuildOwnedSubclassification(ownedRelationshipOfSubclassificationIterator.Current, stringBuilder); + } + + while (ownedRelationshipOfSubclassificationIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfSubclassificationIterator.Current != null) + { + SubclassificationTextualNotationBuilder.BuildOwnedSubclassification(ownedRelationshipOfSubclassificationIterator.Current, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule ClassifierDeclaration + /// ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildClassifierDeclaration(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (poco.IsSufficient) + { + stringBuilder.Append(" all "); + stringBuilder.Append(' '); + } + + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildOwnedMultiplicity(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append(' '); + } + + switch (poco) + { + case SysML2.NET.Core.POCO.Core.Types.Type pocoType: + TypeTextualNotationBuilder.BuildConjugationPart(pocoType, stringBuilder); + break; + default: + BuildSuperclassingPart(poco, stringBuilder); + break; + } + + // Handle collection Non Terminal + BuildTypeRelationshipPartInternal(poco, stringBuilder); TypeTextualNotationBuilder.BuildTypeRelationshipPart(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule SuperclassingPart + /// SuperclassingPart:Classifier=SPECIALIZESownedRelationship+=OwnedSubclassification(','ownedRelationship+=OwnedSubclassification)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSuperclassingPart(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfSubclassificationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append(" :> "); + ownedRelationshipOfSubclassificationIterator.MoveNext(); + + if (ownedRelationshipOfSubclassificationIterator.Current != null) + { + SubclassificationTextualNotationBuilder.BuildOwnedSubclassification(ownedRelationshipOfSubclassificationIterator.Current, stringBuilder); + } + + while (ownedRelationshipOfSubclassificationIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfSubclassificationIterator.Current != null) + { + SubclassificationTextualNotationBuilder.BuildOwnedSubclassification(ownedRelationshipOfSubclassificationIterator.Current, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule Classifier + /// Classifier=TypePrefix'classifier'ClassifierDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildClassifier(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, StringBuilder stringBuilder) + { + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); + stringBuilder.Append("classifier "); + BuildClassifierDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs new file mode 100644 index 000000000..0279240e7 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs @@ -0,0 +1,66 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class CollectExpressionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule CollectExpression + /// CollectExpression=ownedRelationship+=PrimaryArgumentMember'.'ownedRelationship+=BodyArgumentMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCollectExpression(SysML2.NET.Core.POCO.Kernel.Expressions.ICollectExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append("."); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildBodyArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs new file mode 100644 index 000000000..824751548 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs @@ -0,0 +1,93 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class CommentTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Comment + /// Comment=('comment'Identification('about'ownedRelationship+=Annotation(','ownedRelationship+=Annotation)*)?)?('locale'locale=STRING_VALUE)?body=REGULAR_COMMENT + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildComment(SysML2.NET.Core.POCO.Root.Annotations.IComment poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfAnnotationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (BuildGroupConditionForComment(poco)) + { + stringBuilder.Append("comment "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + + if (ownedRelationshipOfAnnotationIterator.MoveNext()) + { + stringBuilder.Append("about "); + + if (ownedRelationshipOfAnnotationIterator.Current != null) + { + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } + + while (ownedRelationshipOfAnnotationIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfAnnotationIterator.Current != null) + { + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } + + } + stringBuilder.Append(' '); + } + + stringBuilder.Append(' '); + } + + + if (!string.IsNullOrWhiteSpace(poco.Locale)) + { + stringBuilder.Append("locale "); + stringBuilder.Append(poco.Locale); + stringBuilder.Append(' '); + } + + stringBuilder.Append(poco.Body); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..3fefd30c2 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ConcernDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ConcernDefinition + /// ConcernDefinition=OccurrenceDefinitionPrefix'concern''def'DefinitionDeclarationRequirementBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConcernDefinition(SysML2.NET.Core.POCO.Systems.Requirements.IConcernDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("concern "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..1a59e35d4 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs @@ -0,0 +1,71 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ConcernUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule FramedConcernUsage + /// FramedConcernUsage:ConcernUsage=ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?CalculationBody|(UsageExtensionKeyword*'concern'|UsageExtensionKeyword+)CalculationUsageDeclarationCalculationBody + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildFramedConcernUsage(SysML2.NET.Core.POCO.Systems.Requirements.IConcernUsage poco, int elementIndex, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule ConcernUsage + /// ConcernUsage=OccurrenceUsagePrefix'concern'ConstraintUsageDeclarationRequirementBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConcernUsage(SysML2.NET.Core.POCO.Systems.Requirements.IConcernUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("concern "); + ConstraintUsageTextualNotationBuilder.BuildConstraintUsageDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..154d73f65 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs @@ -0,0 +1,65 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ConjugatedPortDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ConjugatedPortDefinition + /// ConjugatedPortDefinition=ownedRelationship+=PortConjugation + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildConjugatedPortDefinition(SysML2.NET.Core.POCO.Systems.Ports.IConjugatedPortDefinition poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Systems.Ports.IPortConjugation elementAsPortConjugation) + { + PortConjugationTextualNotationBuilder.BuildPortConjugation(elementAsPortConjugation, stringBuilder); + } + } + + return elementIndex; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs new file mode 100644 index 000000000..6ca6cc1f5 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs @@ -0,0 +1,54 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ConjugatedPortTypingTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ConjugatedPortTyping + /// ConjugatedPortTyping:ConjugatedPortTyping='~'originalPortDefinition=~[QualifiedName] + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConjugatedPortTyping(SysML2.NET.Core.POCO.Systems.Ports.IConjugatedPortTyping poco, StringBuilder stringBuilder) + { + stringBuilder.Append("~"); + BuildOriginalPortDefinition(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs new file mode 100644 index 000000000..bcb127339 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs @@ -0,0 +1,78 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ConjugationTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OwnedConjugation + /// OwnedConjugation:Conjugation=originalType=[QualifiedName]|originalType=FeatureChain{ownedRelatedElement+=originalType} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedConjugation(SysML2.NET.Core.POCO.Core.Types.IConjugation poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule Conjugation + /// Conjugation=('conjugation'Identification)?'conjugate'(conjugatedType=[QualifiedName]|conjugatedType=FeatureChain{ownedRelatedElement+=conjugatedType})CONJUGATES(originalType=[QualifiedName]|originalType=FeatureChain{ownedRelatedElement+=originalType})RelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConjugation(SysML2.NET.Core.POCO.Core.Types.IConjugation poco, StringBuilder stringBuilder) + { + + if (BuildGroupConditionForConjugation(poco)) + { + stringBuilder.Append("conjugation "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append(' '); + } + + stringBuilder.Append("conjugate "); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + stringBuilder.Append(" ~ "); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..5d1fcc6d4 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ConnectionDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ConnectionDefinition + /// ConnectionDefinition=OccurrenceDefinitionPrefix'connection''def'Definition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConnectionDefinition(SysML2.NET.Core.POCO.Systems.Connections.IConnectionDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("connection "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..76390744e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs @@ -0,0 +1,130 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ConnectionUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ConnectorPart + /// ConnectorPart:ConnectionUsage=BinaryConnectorPart|NaryConnectorPart + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule BinaryConnectorPart + /// BinaryConnectorPart:ConnectionUsage=ownedRelationship+=ConnectorEndMember'to'ownedRelationship+=ConnectorEndMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBinaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append("to "); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule NaryConnectorPart + /// NaryConnectorPart:ConnectionUsage='('ownedRelationship+=ConnectorEndMember','ownedRelationship+=ConnectorEndMember(','ownedRelationship+=ConnectorEndMember)*')' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("("); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append(","); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + + while (ownedRelationshipOfEndFeatureMembershipIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + + } + stringBuilder.Append(")"); + + } + + /// + /// Builds the Textual Notation string for the rule ConnectionUsage + /// ConnectionUsage=OccurrenceUsagePrefix('connection'UsageDeclarationValuePart?('connect'ConnectorPart)?|'connect'ConnectorPart)UsageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConnectionUsage(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs new file mode 100644 index 000000000..76f6be80a --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs @@ -0,0 +1,146 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ConnectorTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ConnectorDeclaration + /// ConnectorDeclaration:Connector=BinaryConnectorDeclaration|NaryConnectorDeclaration + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule BinaryConnectorDeclaration + /// BinaryConnectorDeclaration:Connector=(FeatureDeclaration?'from'|isSufficient?='all''from'?)?ownedRelationship+=ConnectorEndMember'to'ownedRelationship+=ConnectorEndMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBinaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append("to "); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule NaryConnectorDeclaration + /// NaryConnectorDeclaration:Connector=FeatureDeclaration?'('ownedRelationship+=ConnectorEndMember','ownedRelationship+=ConnectorEndMember(','ownedRelationship+=ConnectorEndMember)*')' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); + stringBuilder.Append("("); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append(","); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + + while (ownedRelationshipOfEndFeatureMembershipIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + + } + stringBuilder.Append(")"); + + } + + /// + /// Builds the Textual Notation string for the rule Connector + /// Connector=FeaturePrefix'connector'(FeatureDeclaration?ValuePart?|ConnectorDeclaration)TypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConnector(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } + + } + + stringBuilder.Append("connector "); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..e80cb7a22 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ConstraintDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ConstraintDefinition + /// ConstraintDefinition=OccurrenceDefinitionPrefix'constraint''def'DefinitionDeclarationCalculationBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConstraintDefinition(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("constraint "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildCalculationBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..54cfc6633 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs @@ -0,0 +1,84 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ConstraintUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ConstraintUsageDeclaration + /// ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConstraintUsageDeclaration(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintUsage poco, StringBuilder stringBuilder) + { + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule RequirementConstraintUsage + /// RequirementConstraintUsage:ConstraintUsage=ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?RequirementBody|(UsageExtensionKeyword*'constraint'|UsageExtensionKeyword+)ConstraintUsageDeclarationCalculationBody + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildRequirementConstraintUsage(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintUsage poco, int elementIndex, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule ConstraintUsage + /// ConstraintUsage=OccurrenceUsagePrefix'constraint'ConstraintUsageDeclarationCalculationBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConstraintUsage(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("constraint "); + BuildConstraintUsageDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildCalculationBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs new file mode 100644 index 000000000..800926617 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs @@ -0,0 +1,67 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ConstructorExpressionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ConstructorExpression + /// ConstructorExpression='new'ownedRelationship+=InstantiatedTypeMemberownedRelationship+=ConstructorResultMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConstructorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IConstructorExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("new "); + ownedRelationshipOfMembershipIterator.MoveNext(); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildInstantiatedTypeMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildConstructorResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, 0, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ControlNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ControlNodeTextualNotationBuilder.cs new file mode 100644 index 000000000..4250e67db --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ControlNodeTextualNotationBuilder.cs @@ -0,0 +1,67 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ControlNodeTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ControlNode + /// ControlNode=MergeNode|DecisionNode|JoinNode|ForkNode + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildControlNode(SysML2.NET.Core.POCO.Systems.Actions.IControlNode poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Systems.Actions.MergeNode pocoMergeNode: + MergeNodeTextualNotationBuilder.BuildMergeNode(pocoMergeNode, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Actions.DecisionNode pocoDecisionNode: + DecisionNodeTextualNotationBuilder.BuildDecisionNode(pocoDecisionNode, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Actions.JoinNode pocoJoinNode: + JoinNodeTextualNotationBuilder.BuildJoinNode(pocoJoinNode, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Actions.ForkNode pocoForkNode: + ForkNodeTextualNotationBuilder.BuildForkNode(pocoForkNode, stringBuilder); + break; + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs new file mode 100644 index 000000000..b64b8cadc --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs @@ -0,0 +1,52 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class CrossSubsettingTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OwnedCrossSubsetting + /// OwnedCrossSubsetting:CrossSubsetting=crossedFeature=[QualifiedName]|crossedFeature=OwnedFeatureChain{ownedRelatedElement+=crossedFeature} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedCrossSubsetting(SysML2.NET.Core.POCO.Core.Features.ICrossSubsetting poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs new file mode 100644 index 000000000..ea76f159d --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class DataTypeTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule DataType + /// DataType=TypePrefix'datatype'ClassifierDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDataType(SysML2.NET.Core.POCO.Kernel.DataTypes.IDataType poco, StringBuilder stringBuilder) + { + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); + stringBuilder.Append("datatype "); + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs new file mode 100644 index 000000000..303a7fce5 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs @@ -0,0 +1,59 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class DecisionNodeTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule DecisionNode + /// DecisionNode=ControlNodePrefixisComposite?='decide'UsageDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDecisionNode(SysML2.NET.Core.POCO.Systems.Actions.IDecisionNode poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildControlNodePrefix(poco, stringBuilder); + if (poco.IsComposite) + { + stringBuilder.Append(" decide "); + } + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..aec5ca1dd --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs @@ -0,0 +1,143 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class DefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule DefinitionExtensionKeyword + /// DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildDefinitionExtensionKeyword(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership elementAsOwningMembership) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(elementAsOwningMembership, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule DefinitionPrefix + /// DefinitionPrefix:Definition=BasicDefinitionPrefix?DefinitionExtensionKeyword* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefinitionPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, StringBuilder stringBuilder) + { + if (poco.IsAbstract) + { + stringBuilder.Append(" abstract "); + } + else if (poco.IsVariation) + { + stringBuilder.Append(" variation "); + } + + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = BuildDefinitionExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule DefinitionDeclaration + /// DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefinitionDeclaration(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, StringBuilder stringBuilder) + { + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + ClassifierTextualNotationBuilder.BuildSubclassificationPart(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule ExtendedDefinition + /// ExtendedDefinition:Definition=BasicDefinitionPrefix?DefinitionExtensionKeyword+'def'Definition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExtendedDefinition(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, StringBuilder stringBuilder) + { + if (poco.IsAbstract) + { + stringBuilder.Append(" abstract "); + } + else if (poco.IsVariation) + { + stringBuilder.Append(" variation "); + } + + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = BuildDefinitionExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + stringBuilder.Append("def "); + BuildDefinition(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule Definition + /// Definition=DefinitionDeclarationDefinitionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefinition(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, StringBuilder stringBuilder) + { + BuildDefinitionDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildDefinitionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs new file mode 100644 index 000000000..8babaf4d0 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs @@ -0,0 +1,111 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class DependencyTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Dependency + /// Dependency=(ownedRelationship+=PrefixMetadataAnnotation)*'dependency'DependencyDeclarationRelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDependency(SysML2.NET.Core.POCO.Root.Dependencies.IDependency poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfAnnotationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + while (ownedRelationshipOfAnnotationIterator.MoveNext()) + { + + if (ownedRelationshipOfAnnotationIterator.Current != null) + { + AnnotationTextualNotationBuilder.BuildPrefixMetadataAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } + + } + stringBuilder.Append("dependency "); + using var clientIterator = poco.Client.GetEnumerator(); + using var supplierIterator = poco.Supplier.GetEnumerator(); + + if (BuildGroupConditionForDependencyDeclaration(poco)) + { + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append("from "); + stringBuilder.Append(' '); + } + + clientIterator.MoveNext(); + + if (clientIterator.Current != null) + { + stringBuilder.Append(clientIterator.Current.qualifiedName); + } + + while (clientIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (clientIterator.Current != null) + { + stringBuilder.Append(clientIterator.Current.qualifiedName); + } + + } + stringBuilder.Append("to "); + supplierIterator.MoveNext(); + + if (supplierIterator.Current != null) + { + stringBuilder.Append(supplierIterator.Current.qualifiedName); + } + + while (supplierIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (supplierIterator.Current != null) + { + stringBuilder.Append(supplierIterator.Current.qualifiedName); + } + + } + + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs new file mode 100644 index 000000000..91ed23103 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs @@ -0,0 +1,73 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class DifferencingTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Differencing + /// Differencing=differencingType=[QualifiedName]|ownedRelatedElement+=OwnedFeatureChain + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildDifferencing(SysML2.NET.Core.POCO.Core.Types.IDifferencing poco, int elementIndex, StringBuilder stringBuilder) + { + if (poco.DifferencingType != null) + { + stringBuilder.Append(poco.DifferencingType.qualifiedName); + stringBuilder.Append(' '); + } + else + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Core.Features.IFeature elementAsFeature) + { + FeatureTextualNotationBuilder.BuildOwnedFeatureChain(elementAsFeature, stringBuilder); + } + } + } + + return elementIndex; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs new file mode 100644 index 000000000..0202d5b35 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs @@ -0,0 +1,78 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class DisjoiningTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OwnedDisjoining + /// OwnedDisjoining:Disjoining=disjoiningType=[QualifiedName]|disjoiningType=FeatureChain{ownedRelatedElement+=disjoiningType} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedDisjoining(SysML2.NET.Core.POCO.Core.Types.IDisjoining poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule Disjoining + /// Disjoining=('disjoining'Identification)?'disjoint'(typeDisjoined=[QualifiedName]|typeDisjoined=FeatureChain{ownedRelatedElement+=typeDisjoined})'from'(disjoiningType=[QualifiedName]|disjoiningType=FeatureChain{ownedRelatedElement+=disjoiningType})RelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDisjoining(SysML2.NET.Core.POCO.Core.Types.IDisjoining poco, StringBuilder stringBuilder) + { + + if (BuildGroupConditionForDisjoining(poco)) + { + stringBuilder.Append("disjoining "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append(' '); + } + + stringBuilder.Append("disjoint "); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + stringBuilder.Append("from "); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs new file mode 100644 index 000000000..faa8e2abf --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs @@ -0,0 +1,63 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class DocumentationTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Documentation + /// Documentation='doc'Identification('locale'locale=STRING_VALUE)?body=REGULAR_COMMENT + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDocumentation(SysML2.NET.Core.POCO.Root.Annotations.IDocumentation poco, StringBuilder stringBuilder) + { + stringBuilder.Append("doc "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + + if (!string.IsNullOrWhiteSpace(poco.Locale)) + { + stringBuilder.Append("locale "); + stringBuilder.Append(poco.Locale); + stringBuilder.Append(' '); + } + + stringBuilder.Append(poco.Body); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..6147bf64f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs @@ -0,0 +1,82 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ElementFilterMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ElementFilterMember + /// ElementFilterMember:ElementFilterMembership=MemberPrefix'filter'ownedRelatedElement+=OwnedExpression';' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildElementFilterMember(SysML2.NET.Core.POCO.Kernel.Packages.IElementFilterMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("filter "); + ownedRelatedElementOfExpressionIterator.MoveNext(); + + if (ownedRelatedElementOfExpressionIterator.Current != null) + { + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + } + stringBuilder.Append(";"); + + } + + /// + /// Builds the Textual Notation string for the rule FilterPackageMember + /// FilterPackageMember:ElementFilterMembership='['ownedRelatedElement+=OwnedExpression']' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFilterPackageMember(SysML2.NET.Core.POCO.Kernel.Packages.IElementFilterMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + stringBuilder.Append("["); + ownedRelatedElementOfExpressionIterator.MoveNext(); + + if (ownedRelatedElementOfExpressionIterator.Current != null) + { + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + } + stringBuilder.Append("]"); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs new file mode 100644 index 000000000..a1ccdc7a6 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs @@ -0,0 +1,211 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ElementTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Identification + /// Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildIdentification(SysML2.NET.Core.POCO.Root.Elements.IElement poco, StringBuilder stringBuilder) + { + + if (!string.IsNullOrWhiteSpace(poco.DeclaredShortName)) + { + stringBuilder.Append("<"); + stringBuilder.Append(poco.DeclaredShortName); + stringBuilder.Append(">"); + stringBuilder.Append(' '); + } + + + if (!string.IsNullOrWhiteSpace(poco.DeclaredName)) + { + stringBuilder.Append(poco.DeclaredName); + stringBuilder.Append(' '); + } + + + } + + /// + /// Builds the Textual Notation string for the rule DefinitionElement + /// DefinitionElement:Element=Package|LibraryPackage|AnnotatingElement|Dependency|AttributeDefinition|EnumerationDefinition|OccurrenceDefinition|IndividualDefinition|ItemDefinition|PartDefinition|ConnectionDefinition|FlowDefinition|InterfaceDefinition|PortDefinition|ActionDefinition|CalculationDefinition|StateDefinition|ConstraintDefinition|RequirementDefinition|ConcernDefinition|CaseDefinition|AnalysisCaseDefinition|VerificationCaseDefinition|UseCaseDefinition|ViewDefinition|ViewpointDefinition|RenderingDefinition|MetadataDefinition|ExtendedDefinition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefinitionElement(SysML2.NET.Core.POCO.Root.Elements.IElement poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule OwnedRelatedElement + /// OwnedRelatedElement:Element=NonFeatureElement|FeatureElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedRelatedElement(SysML2.NET.Core.POCO.Root.Elements.IElement poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Core.Features.Feature pocoFeature: + FeatureTextualNotationBuilder.BuildFeatureElement(pocoFeature, stringBuilder); + break; + default: + BuildNonFeatureElement(poco, stringBuilder); + break; + } + + } + + /// + /// Builds the Textual Notation string for the rule MemberElement + /// MemberElement:Element=AnnotatingElement|NonFeatureElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMemberElement(SysML2.NET.Core.POCO.Root.Elements.IElement poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Root.Annotations.AnnotatingElement pocoAnnotatingElement: + AnnotatingElementTextualNotationBuilder.BuildAnnotatingElement(pocoAnnotatingElement, stringBuilder); + break; + default: + BuildNonFeatureElement(poco, stringBuilder); + break; + } + + } + + /// + /// Builds the Textual Notation string for the rule NonFeatureElement + /// NonFeatureElement:Element=Dependency|Namespace|Type|Classifier|DataType|Class|Structure|Metaclass|Association|AssociationStructure|Interaction|Behavior|Function|Predicate|Multiplicity|Package|LibraryPackage|Specialization|Conjugation|Subclassification|Disjoining|FeatureInverting|FeatureTyping|Subsetting|Redefinition|TypeFeaturing + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNonFeatureElement(SysML2.NET.Core.POCO.Root.Elements.IElement poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Root.Dependencies.Dependency pocoDependency: + DependencyTextualNotationBuilder.BuildDependency(pocoDependency, stringBuilder); + break; + case SysML2.NET.Core.POCO.Core.Features.Subsetting pocoSubsetting: + SubsettingTextualNotationBuilder.BuildSubsetting(pocoSubsetting, stringBuilder); + break; + case SysML2.NET.Core.POCO.Core.Features.FeatureTyping pocoFeatureTyping: + FeatureTypingTextualNotationBuilder.BuildFeatureTyping(pocoFeatureTyping, stringBuilder); + break; + case SysML2.NET.Core.POCO.Core.Features.FeatureInverting pocoFeatureInverting: + FeatureInvertingTextualNotationBuilder.BuildFeatureInverting(pocoFeatureInverting, stringBuilder); + break; + case SysML2.NET.Core.POCO.Core.Types.Disjoining pocoDisjoining: + DisjoiningTextualNotationBuilder.BuildDisjoining(pocoDisjoining, stringBuilder); + break; + case SysML2.NET.Core.POCO.Core.Classifiers.Subclassification pocoSubclassification: + SubclassificationTextualNotationBuilder.BuildSubclassification(pocoSubclassification, stringBuilder); + break; + case SysML2.NET.Core.POCO.Core.Types.Conjugation pocoConjugation: + ConjugationTextualNotationBuilder.BuildConjugation(pocoConjugation, stringBuilder); + break; + case SysML2.NET.Core.POCO.Core.Types.Specialization pocoSpecialization: + SpecializationTextualNotationBuilder.BuildSpecialization(pocoSpecialization, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Packages.LibraryPackage pocoLibraryPackage: + LibraryPackageTextualNotationBuilder.BuildLibraryPackage(pocoLibraryPackage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Packages.Package pocoPackage: + PackageTextualNotationBuilder.BuildPackage(pocoPackage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Core.Types.Multiplicity pocoMultiplicity: + MultiplicityTextualNotationBuilder.BuildMultiplicity(pocoMultiplicity, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Functions.Predicate pocoPredicate: + PredicateTextualNotationBuilder.BuildPredicate(pocoPredicate, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Functions.Function pocoFunction: + FunctionTextualNotationBuilder.BuildFunction(pocoFunction, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Interactions.Interaction pocoInteraction: + InteractionTextualNotationBuilder.BuildInteraction(pocoInteraction, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Behaviors.Behavior pocoBehavior: + BehaviorTextualNotationBuilder.BuildBehavior(pocoBehavior, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Associations.AssociationStructure pocoAssociationStructure: + AssociationStructureTextualNotationBuilder.BuildAssociationStructure(pocoAssociationStructure, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Associations.Association pocoAssociation: + AssociationTextualNotationBuilder.BuildAssociation(pocoAssociation, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Metadata.Metaclass pocoMetaclass: + MetaclassTextualNotationBuilder.BuildMetaclass(pocoMetaclass, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Structures.Structure pocoStructure: + StructureTextualNotationBuilder.BuildStructure(pocoStructure, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Classes.Class pocoClass: + ClassTextualNotationBuilder.BuildClass(pocoClass, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.DataTypes.DataType pocoDataType: + DataTypeTextualNotationBuilder.BuildDataType(pocoDataType, stringBuilder); + break; + case SysML2.NET.Core.POCO.Core.Classifiers.Classifier pocoClassifier: + ClassifierTextualNotationBuilder.BuildClassifier(pocoClassifier, stringBuilder); + break; + case SysML2.NET.Core.POCO.Core.Types.Type pocoType: + TypeTextualNotationBuilder.BuildType(pocoType, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.Namespace pocoNamespace: + NamespaceTextualNotationBuilder.BuildNamespace(pocoNamespace, stringBuilder); + break; + case SysML2.NET.Core.POCO.Core.Features.Redefinition pocoRedefinition: + RedefinitionTextualNotationBuilder.BuildRedefinition(pocoRedefinition, stringBuilder); + break; + case SysML2.NET.Core.POCO.Core.Features.TypeFeaturing pocoTypeFeaturing: + TypeFeaturingTextualNotationBuilder.BuildTypeFeaturing(pocoTypeFeaturing, stringBuilder); + break; + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..45e0c3a9a --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs @@ -0,0 +1,157 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class EndFeatureMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule SourceEndMember + /// SourceEndMember:EndFeatureMembership=ownedRelatedElement+=SourceEnd + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildSourceEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage elementAsReferenceUsage) + { + ReferenceUsageTextualNotationBuilder.BuildSourceEnd(elementAsReferenceUsage, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule ConnectorEndMember + /// ConnectorEndMember:EndFeatureMembership=ownedRelatedElement+=ConnectorEnd + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildConnectorEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage elementAsReferenceUsage) + { + ReferenceUsageTextualNotationBuilder.BuildConnectorEnd(elementAsReferenceUsage, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule InterfaceEndMember + /// InterfaceEndMember:EndFeatureMembership=ownedRelatedElement+=InterfaceEnd + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildInterfaceEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.Ports.IPortUsage elementAsPortUsage) + { + PortUsageTextualNotationBuilder.BuildInterfaceEnd(elementAsPortUsage, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule FlowEndMember + /// FlowEndMember:EndFeatureMembership=ownedRelatedElement+=FlowEnd + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildFlowEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Kernel.Interactions.IFlowEnd elementAsFlowEnd) + { + FlowEndTextualNotationBuilder.BuildFlowEnd(elementAsFlowEnd, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule EmptyEndMember + /// EmptyEndMember:EndFeatureMembership=ownedRelatedElement+=EmptyFeature + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildEmptyEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage elementAsReferenceUsage) + { + ReferenceUsageTextualNotationBuilder.BuildEmptyFeature(elementAsReferenceUsage, stringBuilder); + } + } + + return elementIndex; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..de05297ac --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs @@ -0,0 +1,72 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class EnumerationDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule EnumerationBody + /// EnumerationBody:EnumerationDefinition=';'|'{'(ownedRelationship+=AnnotatingMember|ownedRelationship+=EnumerationUsageMember)*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEnumerationBody(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationDefinition poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule EnumerationDefinition + /// EnumerationDefinition=DefinitionExtensionKeyword*'enum''def'DefinitionDeclarationEnumerationBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEnumerationDefinition(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationDefinition poco, StringBuilder stringBuilder) + { + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = DefinitionTextualNotationBuilder.BuildDefinitionExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + stringBuilder.Append("enum "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + BuildEnumerationBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..9058751cd --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs @@ -0,0 +1,68 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class EnumerationUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule EnumeratedValue + /// EnumeratedValue:EnumerationUsage='enum'?Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEnumeratedValue(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationUsage poco, StringBuilder stringBuilder) + { + stringBuilder.Append("enum "); + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule EnumerationUsage + /// EnumerationUsage:EnumerationUsage=UsagePrefix'enum'Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEnumerationUsage(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationUsage poco, StringBuilder stringBuilder) + { + UsageTextualNotationBuilder.BuildUsagePrefix(poco, stringBuilder); + stringBuilder.Append("enum "); + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..317e99115 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs @@ -0,0 +1,82 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class EventOccurrenceUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule MessageEvent + /// MessageEvent:EventOccurrenceUsage=ownedRelationship+=OwnedReferenceSubsetting + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildMessageEvent(SysML2.NET.Core.POCO.Systems.Occurrences.IEventOccurrenceUsage poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Core.Features.IReferenceSubsetting elementAsReferenceSubsetting) + { + ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(elementAsReferenceSubsetting, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule EventOccurrenceUsage + /// EventOccurrenceUsage=OccurrenceUsagePrefix'event'(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'occurrence'UsageDeclaration?)UsageCompletion + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEventOccurrenceUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IEventOccurrenceUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("event "); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + UsageTextualNotationBuilder.BuildUsageCompletion(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..ac50e2486 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs @@ -0,0 +1,59 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ExhibitStateUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ExhibitStateUsage + /// ExhibitStateUsage=OccurrenceUsagePrefix'exhibit'(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'state'UsageDeclaration)ValuePart?StateUsageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExhibitStateUsage(SysML2.NET.Core.POCO.Systems.States.IExhibitStateUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("exhibit "); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + StateUsageTextualNotationBuilder.BuildStateUsageBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs new file mode 100644 index 000000000..cbae110f3 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs @@ -0,0 +1,65 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ExposeTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Expose + /// Expose='expose'(MembershipExpose|NamespaceExpose)RelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExpose(SysML2.NET.Core.POCO.Systems.Views.IExpose poco, StringBuilder stringBuilder) + { + stringBuilder.Append("expose "); + switch (poco) + { + case SysML2.NET.Core.POCO.Systems.Views.MembershipExpose pocoMembershipExpose: + MembershipExposeTextualNotationBuilder.BuildMembershipExpose(pocoMembershipExpose, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Views.NamespaceExpose pocoNamespaceExpose: + NamespaceExposeTextualNotationBuilder.BuildNamespaceExpose(pocoNamespaceExpose, stringBuilder); + break; + } + + stringBuilder.Append(' '); + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs new file mode 100644 index 000000000..2c89626f1 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs @@ -0,0 +1,186 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ExpressionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OwnedExpression + /// OwnedExpression:Expression=ConditionalExpression|ConditionalBinaryOperatorExpression|BinaryOperatorExpression|UnaryOperatorExpression|ClassificationExpression|MetaclassificationExpression|ExtentExpression|PrimaryExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule PrimaryExpression + /// PrimaryExpression:Expression=FeatureChainExpression|NonFeatureChainPrimaryExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPrimaryExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Kernel.Expressions.FeatureChainExpression pocoFeatureChainExpression: + FeatureChainExpressionTextualNotationBuilder.BuildFeatureChainExpression(pocoFeatureChainExpression, stringBuilder); + break; + default: + BuildNonFeatureChainPrimaryExpression(poco, stringBuilder); + break; + } + + } + + /// + /// Builds the Textual Notation string for the rule NonFeatureChainPrimaryExpression + /// NonFeatureChainPrimaryExpression:Expression=BracketExpression|IndexExpression|SequenceExpression|SelectExpression|CollectExpression|FunctionOperationExpression|BaseExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNonFeatureChainPrimaryExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule SequenceExpression + /// SequenceExpression:Expression='('SequenceExpressionList')' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSequenceExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) + { + stringBuilder.Append("("); + BuildSequenceExpressionList(poco, stringBuilder); + stringBuilder.Append(")"); + + } + + /// + /// Builds the Textual Notation string for the rule SequenceExpressionList + /// SequenceExpressionList:Expression=OwnedExpression','?|SequenceOperatorExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSequenceExpressionList(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule FunctionReference + /// FunctionReference:Expression=ownedRelationship+=ReferenceTyping + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildFunctionReference(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Core.Features.IFeatureTyping elementAsFeatureTyping) + { + FeatureTypingTextualNotationBuilder.BuildReferenceTyping(elementAsFeatureTyping, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule BaseExpression + /// BaseExpression:Expression=NullExpression|LiteralExpression|FeatureReferenceExpression|MetadataAccessExpression|InvocationExpression|ConstructorExpression|BodyExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBaseExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule ExpressionBody + /// ExpressionBody:Expression='{'FunctionBodyPart'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExpressionBody(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) + { + stringBuilder.Append("{"); + TypeTextualNotationBuilder.BuildFunctionBodyPart(poco, stringBuilder); + stringBuilder.Append("}"); + + } + + /// + /// Builds the Textual Notation string for the rule Expression + /// Expression=FeaturePrefix'expr'FeatureDeclarationValuePart?FunctionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } + + } + + stringBuilder.Append("expr "); + FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + TypeTextualNotationBuilder.BuildFunctionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs new file mode 100644 index 000000000..316ae3e6c --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs @@ -0,0 +1,67 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class FeatureChainExpressionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule FeatureChainExpression + /// FeatureChainExpression=ownedRelationship+=NonFeatureChainPrimaryArgumentMember'.'ownedRelationship+=FeatureChainMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureChainExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureChainExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildNonFeatureChainPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append("."); + ownedRelationshipOfMembershipIterator.MoveNext(); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs new file mode 100644 index 000000000..795d9f87d --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs @@ -0,0 +1,58 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class FeatureChainingTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OwnedFeatureChaining + /// OwnedFeatureChaining:FeatureChaining=chainingFeature=[QualifiedName] + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedFeatureChaining(SysML2.NET.Core.POCO.Core.Features.IFeatureChaining poco, StringBuilder stringBuilder) + { + + if (poco.ChainingFeature != null) + { + stringBuilder.Append(poco.ChainingFeature.qualifiedName); + stringBuilder.Append(' '); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureDirectionKindTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureDirectionKindTextualNotationBuilder.cs new file mode 100644 index 000000000..781003230 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureDirectionKindTextualNotationBuilder.cs @@ -0,0 +1,52 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class FeatureDirectionKindTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule FeatureDirection + /// FeatureDirection:FeatureDirectionKind='in'|'out'|'inout' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureDirection(SysML2.NET.Core.Core.Types.FeatureDirectionKind poco, StringBuilder stringBuilder) + { + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs new file mode 100644 index 000000000..2592aed09 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs @@ -0,0 +1,79 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class FeatureInvertingTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OwnedFeatureInverting + /// OwnedFeatureInverting:FeatureInverting=invertingFeature=[QualifiedName]|invertingFeature=OwnedFeatureChain{ownedRelatedElement+=invertingFeature} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedFeatureInverting(SysML2.NET.Core.POCO.Core.Features.IFeatureInverting poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule FeatureInverting + /// FeatureInverting=('inverting'Identification?)?'inverse'(featureInverted=[QualifiedName]|featureInverted=OwnedFeatureChain{ownedRelatedElement+=featureInverted})'of'(invertingFeature=[QualifiedName]|ownedRelatedElement+=OwnedFeatureChain{ownedRelatedElement+=invertingFeature})RelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureInverting(SysML2.NET.Core.POCO.Core.Features.IFeatureInverting poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + + if (BuildGroupConditionForFeatureInverting(poco)) + { + stringBuilder.Append("inverting "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append(' '); + } + + stringBuilder.Append("inverse "); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + stringBuilder.Append("of "); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..f91845e9f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs @@ -0,0 +1,587 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class FeatureMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule NonOccurrenceUsageMember + /// NonOccurrenceUsageMember:FeatureMembership=MemberPrefixownedRelatedElement+=NonOccurrenceUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNonOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfUsageIterator.MoveNext(); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildNonOccurrenceUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule OccurrenceUsageMember + /// OccurrenceUsageMember:FeatureMembership=MemberPrefixownedRelatedElement+=OccurrenceUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfUsageIterator.MoveNext(); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildOccurrenceUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule StructureUsageMember + /// StructureUsageMember:FeatureMembership=MemberPrefixownedRelatedElement+=StructureUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStructureUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfUsageIterator.MoveNext(); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildStructureUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule BehaviorUsageMember + /// BehaviorUsageMember:FeatureMembership=MemberPrefixownedRelatedElement+=BehaviorUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBehaviorUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfUsageIterator.MoveNext(); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildBehaviorUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule SourceSuccessionMember + /// SourceSuccessionMember:FeatureMembership='then'ownedRelatedElement+=SourceSuccession + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSourceSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfSuccessionAsUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + stringBuilder.Append("then "); + ownedRelatedElementOfSuccessionAsUsageIterator.MoveNext(); + + if (ownedRelatedElementOfSuccessionAsUsageIterator.Current != null) + { + SuccessionAsUsageTextualNotationBuilder.BuildSourceSuccession(ownedRelatedElementOfSuccessionAsUsageIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule InterfaceNonOccurrenceUsageMember + /// InterfaceNonOccurrenceUsageMember:FeatureMembership=MemberPrefixownedRelatedElement+=InterfaceNonOccurrenceUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceNonOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfUsageIterator.MoveNext(); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildInterfaceNonOccurrenceUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule InterfaceOccurrenceUsageMember + /// InterfaceOccurrenceUsageMember:FeatureMembership=MemberPrefixownedRelatedElement+=InterfaceOccurrenceUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfUsageIterator.MoveNext(); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildInterfaceOccurrenceUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule FlowPayloadFeatureMember + /// FlowPayloadFeatureMember:FeatureMembership=ownedRelatedElement+=FlowPayloadFeature + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildFlowPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Kernel.Interactions.IPayloadFeature elementAsPayloadFeature) + { + PayloadFeatureTextualNotationBuilder.BuildFlowPayloadFeature(elementAsPayloadFeature, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule FlowFeatureMember + /// FlowFeatureMember:FeatureMembership=ownedRelatedElement+=FlowFeature + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildFlowFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage elementAsReferenceUsage) + { + ReferenceUsageTextualNotationBuilder.BuildFlowFeature(elementAsReferenceUsage, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule ActionBehaviorMember + /// ActionBehaviorMember:FeatureMembership=BehaviorUsageMember|ActionNodeMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionBehaviorMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule InitialNodeMember + /// InitialNodeMember:FeatureMembership=MemberPrefix'first'memberFeature=[QualifiedName]RelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInitialNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("first "); + BuildMemberFeature(poco, stringBuilder); + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule ActionNodeMember + /// ActionNodeMember:FeatureMembership=MemberPrefixownedRelatedElement+=ActionNode + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfActionUsageIterator.MoveNext(); + + if (ownedRelatedElementOfActionUsageIterator.Current != null) + { + ActionUsageTextualNotationBuilder.BuildActionNode(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule ActionTargetSuccessionMember + /// ActionTargetSuccessionMember:FeatureMembership=MemberPrefixownedRelatedElement+=ActionTargetSuccession + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionTargetSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfUsageIterator.MoveNext(); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildActionTargetSuccession(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule GuardedSuccessionMember + /// GuardedSuccessionMember:FeatureMembership=MemberPrefixownedRelatedElement+=GuardedSuccession + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildGuardedSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfTransitionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfTransitionUsageIterator.MoveNext(); + + if (ownedRelatedElementOfTransitionUsageIterator.Current != null) + { + TransitionUsageTextualNotationBuilder.BuildGuardedSuccession(ownedRelatedElementOfTransitionUsageIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule ForVariableDeclarationMember + /// ForVariableDeclarationMember:FeatureMembership=ownedRelatedElement+=UsageDeclaration + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildForVariableDeclarationMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage elementAsUsage) + { + UsageTextualNotationBuilder.BuildUsageDeclaration(elementAsUsage, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule EntryTransitionMember + /// EntryTransitionMember:FeatureMembership=MemberPrefix(ownedRelatedElement+=GuardedTargetSuccession|'then'ownedRelatedElement+=TargetSuccession)';' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEntryTransitionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfTransitionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + using var ownedRelatedElementOfSuccessionAsUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + stringBuilder.Append(";"); + + } + + /// + /// Builds the Textual Notation string for the rule TransitionUsageMember + /// TransitionUsageMember:FeatureMembership=MemberPrefixownedRelatedElement+=TransitionUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTransitionUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfTransitionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfTransitionUsageIterator.MoveNext(); + + if (ownedRelatedElementOfTransitionUsageIterator.Current != null) + { + TransitionUsageTextualNotationBuilder.BuildTransitionUsage(ownedRelatedElementOfTransitionUsageIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule TargetTransitionUsageMember + /// TargetTransitionUsageMember:FeatureMembership=MemberPrefixownedRelatedElement+=TargetTransitionUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTargetTransitionUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfTransitionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfTransitionUsageIterator.MoveNext(); + + if (ownedRelatedElementOfTransitionUsageIterator.Current != null) + { + TransitionUsageTextualNotationBuilder.BuildTargetTransitionUsage(ownedRelatedElementOfTransitionUsageIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule MetadataBodyUsageMember + /// MetadataBodyUsageMember:FeatureMembership=ownedMemberFeature=MetadataBodyUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataBodyUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + + if (poco.ownedMemberFeature != null) + { + using var ownedRelationshipOfRedefinitionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("ref "); + stringBuilder.Append(" :>> "); + ownedRelationshipOfRedefinitionIterator.MoveNext(); + + if (ownedRelationshipOfRedefinitionIterator.Current != null) + { + RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + } + + if (poco.ownedMemberFeature != null) + { + FeatureTextualNotationBuilder.BuildFeatureSpecializationPart(poco.ownedMemberFeature, stringBuilder); + } + + if (poco.ownedMemberFeature != null) + { + FeatureTextualNotationBuilder.BuildValuePart(poco.ownedMemberFeature, 0, stringBuilder); + } + + if (poco.ownedMemberFeature != null) + { + TypeTextualNotationBuilder.BuildMetadataBody(poco.ownedMemberFeature, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule OwnedFeatureMember + /// OwnedFeatureMember:FeatureMembership=MemberPrefixownedRelatedElement+=FeatureElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfFeatureIterator.MoveNext(); + + if (ownedRelatedElementOfFeatureIterator.Current != null) + { + FeatureTextualNotationBuilder.BuildFeatureElement(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule OwnedExpressionReferenceMember + /// OwnedExpressionReferenceMember:FeatureMembership=ownedRelationship+=OwnedExpressionReference + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildOwnedExpressionReferenceMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression elementAsFeatureReferenceExpression) + { + FeatureReferenceExpressionTextualNotationBuilder.BuildOwnedExpressionReference(elementAsFeatureReferenceExpression, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule OwnedExpressionMember + /// OwnedExpressionMember:FeatureMembership=ownedFeatureMember=OwnedExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedExpressionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + BuildOwnedFeatureMember(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule SequenceExpressionListMember + /// SequenceExpressionListMember:FeatureMembership=ownedMemberFeature=SequenceExpressionList + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSequenceExpressionListMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + + if (poco.ownedMemberFeature != null) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + } + + /// + /// Builds the Textual Notation string for the rule FunctionReferenceMember + /// FunctionReferenceMember:FeatureMembership=ownedMemberFeature=FunctionReference + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunctionReferenceMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + + if (poco.ownedMemberFeature != null) + { + var elementForOwnedRelationship = poco.ownedMemberFeature.OwnedRelationship[0]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Core.Features.IFeatureTyping elementAsFeatureTyping) + { + FeatureTypingTextualNotationBuilder.BuildReferenceTyping(elementAsFeatureTyping, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule NamedArgumentMember + /// NamedArgumentMember:FeatureMembership=ownedMemberFeature=NamedArgument + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamedArgumentMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + + if (poco.ownedMemberFeature != null) + { + FeatureTextualNotationBuilder.BuildNamedArgument(poco.ownedMemberFeature, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule ExpressionBodyMember + /// ExpressionBodyMember:FeatureMembership=ownedMemberFeature=ExpressionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExpressionBodyMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + + if (poco.ownedMemberFeature != null) + { + stringBuilder.Append("{"); + + if (poco.ownedMemberFeature != null) + { + TypeTextualNotationBuilder.BuildFunctionBodyPart(poco.ownedMemberFeature, stringBuilder); + } + stringBuilder.Append("}"); + + } + + } + + /// + /// Builds the Textual Notation string for the rule PayloadFeatureMember + /// PayloadFeatureMember:FeatureMembership=ownedRelatedElement=PayloadFeature + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfFeatureIterator.MoveNext(); + + if (ownedRelatedElementOfFeatureIterator.Current != null) + { + FeatureTextualNotationBuilder.BuildPayloadFeature(ownedRelatedElementOfFeatureIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule MetadataBodyFeatureMember + /// MetadataBodyFeatureMember:FeatureMembership=ownedMemberFeature=MetadataBodyFeature + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataBodyFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + + if (poco.ownedMemberFeature != null) + { + FeatureTextualNotationBuilder.BuildMetadataBodyFeature(poco.ownedMemberFeature, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs new file mode 100644 index 000000000..c9e7d951b --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs @@ -0,0 +1,159 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class FeatureReferenceExpressionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule SatisfactionReferenceExpression + /// SatisfactionReferenceExpression:FeatureReferenceExpression=ownedRelationship+=FeatureChainMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildSatisfactionReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Root.Namespaces.IMembership elementAsMembership) + { + MembershipTextualNotationBuilder.BuildFeatureChainMember(elementAsMembership, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule OwnedExpressionReference + /// OwnedExpressionReference:FeatureReferenceExpression=ownedRelationship+=OwnedExpressionMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildOwnedExpressionReference(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Core.Types.IFeatureMembership elementAsFeatureMembership) + { + FeatureMembershipTextualNotationBuilder.BuildOwnedExpressionMember(elementAsFeatureMembership, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule FunctionReferenceExpression + /// FunctionReferenceExpression:FeatureReferenceExpression=ownedRelationship+=FunctionReferenceMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildFunctionReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Core.Types.IFeatureMembership elementAsFeatureMembership) + { + FeatureMembershipTextualNotationBuilder.BuildFunctionReferenceMember(elementAsFeatureMembership, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule FeatureReferenceExpression + /// FeatureReferenceExpression:FeatureReferenceExpression=ownedRelationship+=FeatureReferenceMemberownedRelationship+=EmptyResultMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfMembershipIterator.MoveNext(); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildFeatureReferenceMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule BodyExpression + /// BodyExpression:FeatureReferenceExpression=ownedRelationship+=ExpressionBodyMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildBodyExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Core.Types.IFeatureMembership elementAsFeatureMembership) + { + FeatureMembershipTextualNotationBuilder.BuildExpressionBodyMember(elementAsFeatureMembership, stringBuilder); + } + } + + return elementIndex; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs new file mode 100644 index 000000000..3718f27ec --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs @@ -0,0 +1,1007 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class FeatureTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ValuePart + /// ValuePart:Feature=ownedRelationship+=FeatureValue + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildValuePart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue elementAsFeatureValue) + { + FeatureValueTextualNotationBuilder.BuildFeatureValue(elementAsFeatureValue, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule FeatureSpecializationPart + /// FeatureSpecializationPart:Feature=FeatureSpecialization+MultiplicityPart?FeatureSpecialization*|MultiplicityPartFeatureSpecialization* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureSpecializationPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule FeatureSpecialization + /// FeatureSpecialization:Feature=Typings|Subsettings|References|Crosses|Redefinitions + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureSpecialization(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule Typings + /// Typings:Feature=TypedBy(','ownedRelationship+=FeatureTyping)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypings(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + BuildTypedBy(poco, stringBuilder); + + while (ownedRelationshipOfFeatureTypingIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfFeatureTypingIterator.Current != null) + { + FeatureTypingTextualNotationBuilder.BuildFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule TypedBy + /// TypedBy:Feature=DEFINED_BYownedRelationship+=FeatureTyping + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypedBy(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + ownedRelationshipOfFeatureTypingIterator.MoveNext(); + + if (ownedRelationshipOfFeatureTypingIterator.Current != null) + { + FeatureTypingTextualNotationBuilder.BuildFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule Subsettings + /// Subsettings:Feature=Subsets(','ownedRelationship+=OwnedSubsetting)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSubsettings(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + BuildSubsets(poco, stringBuilder); + + while (ownedRelationshipOfSubsettingIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfSubsettingIterator.Current != null) + { + SubsettingTextualNotationBuilder.BuildOwnedSubsetting(ownedRelationshipOfSubsettingIterator.Current, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule Subsets + /// Subsets:Feature=SUBSETSownedRelationship+=OwnedSubsetting + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSubsets(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append(" :> "); + ownedRelationshipOfSubsettingIterator.MoveNext(); + + if (ownedRelationshipOfSubsettingIterator.Current != null) + { + SubsettingTextualNotationBuilder.BuildOwnedSubsetting(ownedRelationshipOfSubsettingIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule References + /// References:Feature=REFERENCESownedRelationship+=OwnedReferenceSubsetting + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildReferences(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append(" ::> "); + ownedRelationshipOfReferenceSubsettingIterator.MoveNext(); + + if (ownedRelationshipOfReferenceSubsettingIterator.Current != null) + { + ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule Crosses + /// Crosses:Feature=CROSSESownedRelationship+=OwnedCrossSubsetting + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCrosses(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfCrossSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append(" => "); + ownedRelationshipOfCrossSubsettingIterator.MoveNext(); + + if (ownedRelationshipOfCrossSubsettingIterator.Current != null) + { + CrossSubsettingTextualNotationBuilder.BuildOwnedCrossSubsetting(ownedRelationshipOfCrossSubsettingIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule Redefinitions + /// Redefinitions:Feature=Redefines(','ownedRelationship+=OwnedRedefinition)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRedefinitions(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfRedefinitionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + BuildRedefines(poco, stringBuilder); + + while (ownedRelationshipOfRedefinitionIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfRedefinitionIterator.Current != null) + { + RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule Redefines + /// Redefines:Feature=REDEFINESownedRelationship+=OwnedRedefinition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRedefines(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfRedefinitionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append(" :>> "); + ownedRelationshipOfRedefinitionIterator.MoveNext(); + + if (ownedRelationshipOfRedefinitionIterator.Current != null) + { + RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule OwnedFeatureChain + /// OwnedFeatureChain:Feature=ownedRelationship+=OwnedFeatureChaining('.'ownedRelationship+=OwnedFeatureChaining)+ + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfFeatureChainingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureChainingIterator.MoveNext(); + + if (ownedRelationshipOfFeatureChainingIterator.Current != null) + { + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + } + + while (ownedRelationshipOfFeatureChainingIterator.MoveNext()) + { + stringBuilder.Append("."); + + if (ownedRelationshipOfFeatureChainingIterator.Current != null) + { + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + } + + } + stringBuilder.Append(' '); + + } + + /// + /// Builds the Textual Notation string for the rule MultiplicityPart + /// MultiplicityPart:Feature=ownedRelationship+=OwnedMultiplicity|(ownedRelationship+=OwnedMultiplicity)?(isOrdered?='ordered'({isUnique=false}'nonunique')?|{isUnique=false}'nonunique'(isOrdered?='ordered')?) + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildMultiplicityPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, int elementIndex, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule OwnedCrossMultiplicity + /// OwnedCrossMultiplicity:Feature=ownedRelationship+=OwnedMultiplicity + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildOwnedCrossMultiplicity(SysML2.NET.Core.POCO.Core.Features.IFeature poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership elementAsOwningMembership) + { + OwningMembershipTextualNotationBuilder.BuildOwnedMultiplicity(elementAsOwningMembership, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule PayloadFeature + /// PayloadFeature:Feature=Identification?PayloadFeatureSpecializationPartValuePart?|ownedRelationship+=OwnedFeatureTyping(ownedRelationship+=OwnedMultiplicity)?|ownedRelationship+=OwnedMultiplicityownedRelationship+=OwnedFeatureTyping + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildPayloadFeature(SysML2.NET.Core.POCO.Core.Features.IFeature poco, int elementIndex, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule PayloadFeatureSpecializationPart + /// PayloadFeatureSpecializationPart:Feature=(FeatureSpecialization)+MultiplicityPart?FeatureSpecialization*|MultiplicityPartFeatureSpecialization+ + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPayloadFeatureSpecializationPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule FeatureChainPrefix + /// FeatureChainPrefix:Feature=(ownedRelationship+=OwnedFeatureChaining'.')+ownedRelationship+=OwnedFeatureChaining'.' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureChainPrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfFeatureChainingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + while (ownedRelationshipOfFeatureChainingIterator.MoveNext()) + { + + if (ownedRelationshipOfFeatureChainingIterator.Current != null) + { + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + } + stringBuilder.Append("."); + + } + stringBuilder.Append(' '); + ownedRelationshipOfFeatureChainingIterator.MoveNext(); + + if (ownedRelationshipOfFeatureChainingIterator.Current != null) + { + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + } + stringBuilder.Append("."); + + } + + /// + /// Builds the Textual Notation string for the rule TriggerValuePart + /// TriggerValuePart:Feature=ownedRelationship+=TriggerFeatureValue + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildTriggerValuePart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue elementAsFeatureValue) + { + FeatureValueTextualNotationBuilder.BuildTriggerFeatureValue(elementAsFeatureValue, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule Argument + /// Argument:Feature=ownedRelationship+=ArgumentValue + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue elementAsFeatureValue) + { + FeatureValueTextualNotationBuilder.BuildArgumentValue(elementAsFeatureValue, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule ArgumentExpression + /// ArgumentExpression:Feature=ownedRelationship+=ArgumentExpressionValue + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildArgumentExpression(SysML2.NET.Core.POCO.Core.Features.IFeature poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue elementAsFeatureValue) + { + FeatureValueTextualNotationBuilder.BuildArgumentExpressionValue(elementAsFeatureValue, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule FeatureElement + /// FeatureElement:Feature=Feature|Step|Expression|BooleanExpression|Invariant|Connector|BindingConnector|Succession|Flow|SuccessionFlow + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureElement(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Kernel.Functions.Invariant pocoInvariant: + InvariantTextualNotationBuilder.BuildInvariant(pocoInvariant, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Functions.BooleanExpression pocoBooleanExpression: + BooleanExpressionTextualNotationBuilder.BuildBooleanExpression(pocoBooleanExpression, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Functions.Expression pocoExpression: + ExpressionTextualNotationBuilder.BuildExpression(pocoExpression, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Behaviors.Step pocoStep: + StepTextualNotationBuilder.BuildStep(pocoStep, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Connectors.BindingConnector pocoBindingConnector: + BindingConnectorTextualNotationBuilder.BuildBindingConnector(pocoBindingConnector, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Interactions.SuccessionFlow pocoSuccessionFlow: + SuccessionFlowTextualNotationBuilder.BuildSuccessionFlow(pocoSuccessionFlow, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Connectors.Succession pocoSuccession: + SuccessionTextualNotationBuilder.BuildSuccession(pocoSuccession, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Interactions.Flow pocoFlow: + FlowTextualNotationBuilder.BuildFlow(pocoFlow, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Connectors.Connector pocoConnector: + ConnectorTextualNotationBuilder.BuildConnector(pocoConnector, stringBuilder); + break; + default: + BuildFeature(poco, stringBuilder); + break; + } + + } + + /// + /// Builds the Textual Notation string for the rule EndFeaturePrefix + /// EndFeaturePrefix:Feature=(isConstant?='const'{isVariable=true})?isEnd?='end' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEndFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + + if (poco.IsConstant) + { + stringBuilder.Append(" const "); + // NonParsing Assignment Element : isVariable = true => Does not have to be process + stringBuilder.Append(' '); + } + + if (poco.IsEnd) + { + stringBuilder.Append(" end "); + } + + } + + /// + /// Builds the Textual Notation string for the rule BasicFeaturePrefix + /// BasicFeaturePrefix:Feature=(direction=FeatureDirection)?(isDerived?='derived')?(isAbstract?='abstract')?(isComposite?='composite'|isPortion?='portion')?(isVariable?='var'|isConstant?='const'{isVariable=true})? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBasicFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + + if (poco.Direction.HasValue) + { + stringBuilder.Append(poco.Direction.ToString().ToLower()); + stringBuilder.Append(' '); + } + + + if (poco.IsDerived) + { + stringBuilder.Append(" derived "); + stringBuilder.Append(' '); + } + + + if (poco.IsAbstract) + { + stringBuilder.Append(" abstract "); + stringBuilder.Append(' '); + } + + if (poco.IsComposite) + { + stringBuilder.Append(" composite "); + } + else if (poco.IsPortion) + { + stringBuilder.Append(" portion "); + } + + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + + } + + /// + /// Builds the Textual Notation string for the rule FeatureDeclaration + /// FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureDeclaration(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + + if (poco.IsSufficient) + { + stringBuilder.Append(" all "); + stringBuilder.Append(' '); + } + + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + // Handle collection Non Terminal + BuildFeatureRelationshipPartInternal(poco, stringBuilder); BuildFeatureRelationshipPart(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule FeatureIdentification + /// FeatureIdentification:Feature='<'declaredShortName=NAME'>'(declaredName=NAME)?|declaredName=NAME + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureIdentification(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule FeatureRelationshipPart + /// FeatureRelationshipPart:Feature=TypeRelationshipPart|ChainingPart|InvertingPart|TypeFeaturingPart + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureRelationshipPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule ChainingPart + /// ChainingPart:Feature='chains'(ownedRelationship+=OwnedFeatureChaining|FeatureChain) + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildChainingPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfFeatureChainingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("chains "); + if (ownedRelationshipOfFeatureChainingIterator.MoveNext()) + { + + if (ownedRelationshipOfFeatureChainingIterator.Current != null) + { + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + } + } + else + { + BuildFeatureChain(poco, stringBuilder); + } + stringBuilder.Append(' '); + + } + + /// + /// Builds the Textual Notation string for the rule InvertingPart + /// InvertingPart:Feature='inverse''of'ownedRelationship+=OwnedFeatureInverting + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInvertingPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfFeatureInvertingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("inverse "); + stringBuilder.Append("of "); + ownedRelationshipOfFeatureInvertingIterator.MoveNext(); + + if (ownedRelationshipOfFeatureInvertingIterator.Current != null) + { + FeatureInvertingTextualNotationBuilder.BuildOwnedFeatureInverting(ownedRelationshipOfFeatureInvertingIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule TypeFeaturingPart + /// TypeFeaturingPart:Feature='featured''by'ownedRelationship+=OwnedTypeFeaturing(','ownedTypeFeaturing+=OwnedTypeFeaturing)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypeFeaturingPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfTypeFeaturingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedTypeFeaturingIterator = poco.ownedTypeFeaturing.GetEnumerator(); + stringBuilder.Append("featured "); + stringBuilder.Append("by "); + ownedRelationshipOfTypeFeaturingIterator.MoveNext(); + + if (ownedRelationshipOfTypeFeaturingIterator.Current != null) + { + TypeFeaturingTextualNotationBuilder.BuildOwnedTypeFeaturing(ownedRelationshipOfTypeFeaturingIterator.Current, stringBuilder); + } + + while (ownedTypeFeaturingIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedTypeFeaturingIterator.Current != null) + { + TypeFeaturingTextualNotationBuilder.BuildOwnedTypeFeaturing(ownedTypeFeaturingIterator.Current, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule FeatureChain + /// FeatureChain:Feature=ownedRelationship+=OwnedFeatureChaining('.'ownedRelationship+=OwnedFeatureChaining)+ + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfFeatureChainingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureChainingIterator.MoveNext(); + + if (ownedRelationshipOfFeatureChainingIterator.Current != null) + { + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + } + + while (ownedRelationshipOfFeatureChainingIterator.MoveNext()) + { + stringBuilder.Append("."); + + if (ownedRelationshipOfFeatureChainingIterator.Current != null) + { + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + } + + } + stringBuilder.Append(' '); + + } + + /// + /// Builds the Textual Notation string for the rule MetadataArgument + /// MetadataArgument:Feature=ownedRelationship+=MetadataValue + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildMetadataArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue elementAsFeatureValue) + { + FeatureValueTextualNotationBuilder.BuildMetadataValue(elementAsFeatureValue, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule TypeReference + /// TypeReference:Feature=ownedRelationship+=ReferenceTyping + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildTypeReference(SysML2.NET.Core.POCO.Core.Features.IFeature poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Core.Features.IFeatureTyping elementAsFeatureTyping) + { + FeatureTypingTextualNotationBuilder.BuildReferenceTyping(elementAsFeatureTyping, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule PrimaryArgument + /// PrimaryArgument:Feature=ownedRelationship+=PrimaryArgumentValue + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildPrimaryArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue elementAsFeatureValue) + { + FeatureValueTextualNotationBuilder.BuildPrimaryArgumentValue(elementAsFeatureValue, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule NonFeatureChainPrimaryArgument + /// NonFeatureChainPrimaryArgument:Feature=ownedRelationship+=NonFeatureChainPrimaryArgumentValue + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildNonFeatureChainPrimaryArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue elementAsFeatureValue) + { + FeatureValueTextualNotationBuilder.BuildNonFeatureChainPrimaryArgumentValue(elementAsFeatureValue, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule BodyArgument + /// BodyArgument:Feature=ownedRelationship+=BodyArgumentValue + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildBodyArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue elementAsFeatureValue) + { + FeatureValueTextualNotationBuilder.BuildBodyArgumentValue(elementAsFeatureValue, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule FunctionReferenceArgument + /// FunctionReferenceArgument:Feature=ownedRelationship+=FunctionReferenceArgumentValue + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildFunctionReferenceArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue elementAsFeatureValue) + { + FeatureValueTextualNotationBuilder.BuildFunctionReferenceArgumentValue(elementAsFeatureValue, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule FeatureReference + /// FeatureReference:Feature=[QualifiedName] + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureReference(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + stringBuilder.Append(poco.qualifiedName); + stringBuilder.Append(' '); + + } + + /// + /// Builds the Textual Notation string for the rule ConstructorResult + /// ConstructorResult:Feature=ArgumentList + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConstructorResult(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + BuildArgumentList(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule ArgumentList + /// ArgumentList:Feature='('(PositionalArgumentList|NamedArgumentList)?')' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + stringBuilder.Append("("); + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + stringBuilder.Append(")"); + + } + + /// + /// Builds the Textual Notation string for the rule PositionalArgumentList + /// PositionalArgumentList:Feature=e.ownedRelationship+=ArgumentMember(','e.ownedRelationship+=ArgumentMember)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPositionalArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + + while (ownedRelationshipOfParameterMembershipIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule NamedArgumentList + /// NamedArgumentList:Feature=ownedRelationship+=NamedArgumentMember(','ownedRelationship+=NamedArgumentMember)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamedArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildNamedArgumentMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } + + while (ownedRelationshipOfFeatureMembershipIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildNamedArgumentMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule NamedArgument + /// NamedArgument:Feature=ownedRelationship+=ParameterRedefinition'='ownedRelationship+=ArgumentValue + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamedArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfRedefinitionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfRedefinitionIterator.MoveNext(); + + if (ownedRelationshipOfRedefinitionIterator.Current != null) + { + RedefinitionTextualNotationBuilder.BuildParameterRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + } + stringBuilder.Append("="); + ownedRelationshipOfFeatureValueIterator.MoveNext(); + + if (ownedRelationshipOfFeatureValueIterator.Current != null) + { + FeatureValueTextualNotationBuilder.BuildArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule MetadataBodyFeature + /// MetadataBodyFeature:Feature='feature'?(':>>'|'redefines')?ownedRelationship+=OwnedRedefinitionFeatureSpecializationPart?ValuePart?MetadataBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataBodyFeature(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfRedefinitionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("feature "); + stringBuilder.Append(" :>> "); + ownedRelationshipOfRedefinitionIterator.MoveNext(); + + if (ownedRelationshipOfRedefinitionIterator.Current != null) + { + RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + } + BuildFeatureSpecializationPart(poco, stringBuilder); + BuildValuePart(poco, 0, stringBuilder); + TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule Feature + /// Feature=(FeaturePrefix('feature'|ownedRelationship+=PrefixMetadataMember)FeatureDeclaration?|(EndFeaturePrefix|BasicFeaturePrefix)FeatureDeclaration)ValuePart?TypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeature(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + BuildValuePart(poco, 0, stringBuilder); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs new file mode 100644 index 000000000..308c9c100 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs @@ -0,0 +1,89 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class FeatureTypingTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OwnedFeatureTyping + /// OwnedFeatureTyping:FeatureTyping=type=[QualifiedName]|type=OwnedFeatureChain{ownedRelatedElement+=type} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedFeatureTyping(SysML2.NET.Core.POCO.Core.Features.IFeatureTyping poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule ReferenceTyping + /// ReferenceTyping:FeatureTyping=type=[QualifiedName] + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildReferenceTyping(SysML2.NET.Core.POCO.Core.Features.IFeatureTyping poco, StringBuilder stringBuilder) + { + + if (poco.Type != null) + { + stringBuilder.Append(poco.Type.qualifiedName); + stringBuilder.Append(' '); + } + + } + + /// + /// Builds the Textual Notation string for the rule FeatureTyping + /// FeatureTyping=OwnedFeatureTyping|ConjugatedPortTyping + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureTyping(SysML2.NET.Core.POCO.Core.Features.IFeatureTyping poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Systems.Ports.ConjugatedPortTyping pocoConjugatedPortTyping: + ConjugatedPortTypingTextualNotationBuilder.BuildConjugatedPortTyping(pocoConjugatedPortTyping, stringBuilder); + break; + default: + BuildOwnedFeatureTyping(poco, stringBuilder); + break; + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs new file mode 100644 index 000000000..7711e5701 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs @@ -0,0 +1,291 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class FeatureValueTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule TriggerFeatureValue + /// TriggerFeatureValue:FeatureValue=ownedRelatedElement+=TriggerExpression + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildTriggerFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.Actions.ITriggerInvocationExpression elementAsTriggerInvocationExpression) + { + TriggerInvocationExpressionTextualNotationBuilder.BuildTriggerExpression(elementAsTriggerInvocationExpression, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule ArgumentValue + /// ArgumentValue:FeatureValue=value=OwnedExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + + if (poco.value != null) + { + ExpressionTextualNotationBuilder.BuildOwnedExpression(poco.value, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule ArgumentExpressionValue + /// ArgumentExpressionValue:FeatureValue=ownedRelatedElement+=OwnedExpressionReference + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildArgumentExpressionValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression elementAsFeatureReferenceExpression) + { + FeatureReferenceExpressionTextualNotationBuilder.BuildOwnedExpressionReference(elementAsFeatureReferenceExpression, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule FeatureBinding + /// FeatureBinding:FeatureValue=ownedRelatedElement+=OwnedExpression + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildFeatureBinding(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Kernel.Functions.IExpression elementAsExpression) + { + ExpressionTextualNotationBuilder.BuildOwnedExpression(elementAsExpression, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule AssignmentTargetBinding + /// AssignmentTargetBinding:FeatureValue=ownedRelatedElement+=NonFeatureChainPrimaryExpression + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildAssignmentTargetBinding(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Kernel.Functions.IExpression elementAsExpression) + { + ExpressionTextualNotationBuilder.BuildNonFeatureChainPrimaryExpression(elementAsExpression, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule SatisfactionFeatureValue + /// SatisfactionFeatureValue:FeatureValue=ownedRelatedElement+=SatisfactionReferenceExpression + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildSatisfactionFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression elementAsFeatureReferenceExpression) + { + FeatureReferenceExpressionTextualNotationBuilder.BuildSatisfactionReferenceExpression(elementAsFeatureReferenceExpression, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule MetadataValue + /// MetadataValue:FeatureValue=value=MetadataReference + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + + if (poco.value != null) + { + var elementForOwnedRelationship = poco.value.OwnedRelationship[0]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Root.Namespaces.IMembership elementAsMembership) + { + MembershipTextualNotationBuilder.BuildElementReferenceMember(elementAsMembership, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule PrimaryArgumentValue + /// PrimaryArgumentValue:FeatureValue=value=PrimaryExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPrimaryArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + + if (poco.value != null) + { + ExpressionTextualNotationBuilder.BuildPrimaryExpression(poco.value, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule NonFeatureChainPrimaryArgumentValue + /// NonFeatureChainPrimaryArgumentValue:FeatureValue=value=NonFeatureChainPrimaryExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNonFeatureChainPrimaryArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + + if (poco.value != null) + { + ExpressionTextualNotationBuilder.BuildNonFeatureChainPrimaryExpression(poco.value, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule BodyArgumentValue + /// BodyArgumentValue:FeatureValue=value=BodyExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBodyArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + + if (poco.value != null) + { + var elementForOwnedRelationship = poco.value.OwnedRelationship[0]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Core.Types.IFeatureMembership elementAsFeatureMembership) + { + FeatureMembershipTextualNotationBuilder.BuildExpressionBodyMember(elementAsFeatureMembership, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule FunctionReferenceArgumentValue + /// FunctionReferenceArgumentValue:FeatureValue=value=FunctionReferenceExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunctionReferenceArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + + if (poco.value != null) + { + var elementForOwnedRelationship = poco.value.OwnedRelationship[0]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Core.Types.IFeatureMembership elementAsFeatureMembership) + { + FeatureMembershipTextualNotationBuilder.BuildFunctionReferenceMember(elementAsFeatureMembership, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule FeatureValue + /// FeatureValue=('='|isInitial?=':='|isDefault?='default'('='|isInitial?=':=')?)ownedRelatedElement+=OwnedExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + ownedRelatedElementOfExpressionIterator.MoveNext(); + + if (ownedRelatedElementOfExpressionIterator.Current != null) + { + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..8e03f5f9e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class FlowDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule FlowDefinition + /// FlowDefinition=OccurrenceDefinitionPrefix'flow''def'Definition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowDefinition(SysML2.NET.Core.POCO.Systems.Flows.IFlowDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("flow "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs new file mode 100644 index 000000000..b5cbf9dbb --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs @@ -0,0 +1,71 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class FlowEndTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule FlowEnd + /// FlowEnd=(ownedRelationship+=FlowEndSubsetting)?ownedRelationship+=FlowFeatureMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowEnd(SysML2.NET.Core.POCO.Kernel.Interactions.IFlowEnd poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (ownedRelationshipOfReferenceSubsettingIterator.MoveNext()) + { + + if (ownedRelationshipOfReferenceSubsettingIterator.Current != null) + { + ReferenceSubsettingTextualNotationBuilder.BuildFlowEndSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + } + stringBuilder.Append(' '); + } + + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildFlowFeatureMember(ownedRelationshipOfFeatureMembershipIterator.Current, 0, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs new file mode 100644 index 000000000..2d5dd3fa5 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs @@ -0,0 +1,69 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class FlowTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Flow + /// Flow=FeaturePrefix'flow'FlowDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlow(SysML2.NET.Core.POCO.Kernel.Interactions.IFlow poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } + + } + + stringBuilder.Append("flow "); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..ea478d7b3 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs @@ -0,0 +1,101 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class FlowUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Message + /// Message:FlowUsage=OccurrenceUsagePrefix'message'MessageDeclarationDefinitionBody{isAbstract=true} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMessage(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("message "); + BuildMessageDeclaration(poco, 0, stringBuilder); + TypeTextualNotationBuilder.BuildDefinitionBody(poco, stringBuilder); + // NonParsing Assignment Element : isAbstract = true => Does not have to be process + + } + + /// + /// Builds the Textual Notation string for the rule MessageDeclaration + /// MessageDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=MessageEventMember'to'ownedRelationship+=MessageEventMember)?|ownedRelationship+=MessageEventMember'to'ownedRelationship+=MessageEventMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildMessageDeclaration(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, int elementIndex, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule FlowDeclaration + /// FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildFlowDeclaration(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, int elementIndex, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule FlowUsage + /// FlowUsage=OccurrenceUsagePrefix'flow'FlowDeclarationDefinitionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowUsage(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("flow "); + BuildFlowDeclaration(poco, 0, stringBuilder); + TypeTextualNotationBuilder.BuildDefinitionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..5fcdee0bd --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs @@ -0,0 +1,75 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ForLoopActionUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ForLoopNode + /// ForLoopNode:ForLoopActionUsage=ActionNodePrefix'for'ownedRelationship+=ForVariableDeclarationMember'in'ownedRelationship+=NodeParameterMemberownedRelationship+=ActionBodyParameterMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildForLoopNode(SysML2.NET.Core.POCO.Systems.Actions.IForLoopActionUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, stringBuilder); + stringBuilder.Append("for "); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildForVariableDeclarationMember(ownedRelationshipOfFeatureMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append("in "); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildActionBodyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs new file mode 100644 index 000000000..2faff8438 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs @@ -0,0 +1,59 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ForkNodeTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ForkNode + /// ForkNode=ControlNodePrefixisComposite?='fork'UsageDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildForkNode(SysML2.NET.Core.POCO.Systems.Actions.IForkNode poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildControlNodePrefix(poco, stringBuilder); + if (poco.IsComposite) + { + stringBuilder.Append(" fork "); + } + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..1ccc9b46b --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs @@ -0,0 +1,61 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class FramedConcernMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule FramedConcernMember + /// FramedConcernMember:FramedConcernMembership=MemberPrefix?'frame'ownedRelatedElement+=FramedConcernUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFramedConcernMember(SysML2.NET.Core.POCO.Systems.Requirements.IFramedConcernMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfConcernUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("frame "); + ownedRelatedElementOfConcernUsageIterator.MoveNext(); + + if (ownedRelatedElementOfConcernUsageIterator.Current != null) + { + ConcernUsageTextualNotationBuilder.BuildFramedConcernUsage(ownedRelatedElementOfConcernUsageIterator.Current, 0, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs new file mode 100644 index 000000000..7533b9c93 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class FunctionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Function + /// Function=TypePrefix'function'ClassifierDeclarationFunctionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunction(SysML2.NET.Core.POCO.Kernel.Functions.IFunction poco, StringBuilder stringBuilder) + { + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); + stringBuilder.Append("function "); + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildFunctionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..671d029f7 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs @@ -0,0 +1,75 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class IfActionUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule IfNode + /// IfNode:IfActionUsage=ActionNodePrefix'if'ownedRelationship+=ExpressionParameterMemberownedRelationship+=ActionBodyParameterMember('else'ownedRelationship+=(ActionBodyParameterMember|IfNodeParameterMember))? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildIfNode(SysML2.NET.Core.POCO.Systems.Actions.IIfActionUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, stringBuilder); + stringBuilder.Append("if "); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildExpressionParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildActionBodyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + + if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) + { + stringBuilder.Append("else "); + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + stringBuilder.Append(' '); + } + + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs new file mode 100644 index 000000000..eec9b2919 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs @@ -0,0 +1,83 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ImportTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ImportDeclaration + /// ImportDeclaration:Import=MembershipImport|NamespaceImport + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildImportDeclaration(SysML2.NET.Core.POCO.Root.Namespaces.IImport poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Root.Namespaces.MembershipImport pocoMembershipImport: + MembershipImportTextualNotationBuilder.BuildMembershipImport(pocoMembershipImport, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.NamespaceImport pocoNamespaceImport: + NamespaceImportTextualNotationBuilder.BuildNamespaceImport(pocoNamespaceImport, stringBuilder); + break; + } + + } + + /// + /// Builds the Textual Notation string for the rule Import + /// Import=visibility=VisibilityIndicator'import'(isImportAll?='all')?ImportDeclarationRelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildImport(SysML2.NET.Core.POCO.Root.Namespaces.IImport poco, StringBuilder stringBuilder) + { + stringBuilder.Append(poco.Visibility.ToString().ToLower()); + stringBuilder.Append("import "); + + if (poco.IsImportAll) + { + stringBuilder.Append(" all "); + stringBuilder.Append(' '); + } + + BuildImportDeclaration(poco, stringBuilder); + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..007ad859f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs @@ -0,0 +1,59 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class IncludeUseCaseUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule IncludeUseCaseUsage + /// IncludeUseCaseUsage=OccurrenceUsagePrefix'include'(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'use''case'UsageDeclaration)ValuePart?CaseBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildIncludeUseCaseUsage(SysML2.NET.Core.POCO.Systems.UseCases.IIncludeUseCaseUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("include "); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs new file mode 100644 index 000000000..3a765c76c --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs @@ -0,0 +1,69 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class IndexExpressionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule IndexExpression + /// IndexExpression=ownedRelationship+=PrimaryArgumentMember'#''('ownedRelationship+=SequenceExpressionListMember')' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildIndexExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IIndexExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append("#"); + stringBuilder.Append("("); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildSequenceExpressionListMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append(")"); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs new file mode 100644 index 000000000..55e47728f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class InteractionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Interaction + /// Interaction=TypePrefix'interaction'ClassifierDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInteraction(SysML2.NET.Core.POCO.Kernel.Interactions.IInteraction poco, StringBuilder stringBuilder) + { + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); + stringBuilder.Append("interaction "); + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..b1efd5bd6 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class InterfaceDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule InterfaceDefinition + /// InterfaceDefinition=OccurrenceDefinitionPrefix'interface''def'DefinitionDeclarationInterfaceBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceDefinition(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("interface "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildInterfaceBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..465955ba3 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs @@ -0,0 +1,141 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class InterfaceUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule InterfaceUsageDeclaration + /// InterfaceUsageDeclaration:InterfaceUsage=UsageDeclarationValuePart?('connect'InterfacePart)?|InterfacePart + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceUsageDeclaration(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule InterfacePart + /// InterfacePart:InterfaceUsage=BinaryInterfacePart|NaryInterfacePart + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule BinaryInterfacePart + /// BinaryInterfacePart:InterfaceUsage=ownedRelationship+=InterfaceEndMember'to'ownedRelationship+=InterfaceEndMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBinaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append("to "); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule NaryInterfacePart + /// NaryInterfacePart:InterfaceUsage='('ownedRelationship+=InterfaceEndMember','ownedRelationship+=InterfaceEndMember(','ownedRelationship+=InterfaceEndMember)*')' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("("); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append(","); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + + while (ownedRelationshipOfEndFeatureMembershipIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + + } + stringBuilder.Append(")"); + + } + + /// + /// Builds the Textual Notation string for the rule InterfaceUsage + /// InterfaceUsage=OccurrenceUsagePrefix'interface'InterfaceUsageDeclarationInterfaceBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceUsage(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("interface "); + BuildInterfaceUsageDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildInterfaceBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs new file mode 100644 index 000000000..68dca93d3 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs @@ -0,0 +1,73 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class IntersectingTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Intersecting + /// Intersecting=intersectingType=[QualifiedName]|ownedRelatedElement+=OwnedFeatureChain + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildIntersecting(SysML2.NET.Core.POCO.Core.Types.IIntersecting poco, int elementIndex, StringBuilder stringBuilder) + { + if (poco.IntersectingType != null) + { + stringBuilder.Append(poco.IntersectingType.qualifiedName); + stringBuilder.Append(' '); + } + else + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Core.Features.IFeature elementAsFeature) + { + FeatureTextualNotationBuilder.BuildOwnedFeatureChain(elementAsFeature, stringBuilder); + } + } + } + + return elementIndex; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs new file mode 100644 index 000000000..a50203ff7 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs @@ -0,0 +1,79 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class InvariantTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Invariant + /// Invariant=FeaturePrefix'inv'('true'|isNegated?='false')?FeatureDeclarationValuePart?FunctionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInvariant(SysML2.NET.Core.POCO.Kernel.Functions.IInvariant poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } + + } + + stringBuilder.Append("inv "); + if (!poco.IsNegated) + { + stringBuilder.Append("true "); + + } + else + { + stringBuilder.Append(" false "); + } + FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + TypeTextualNotationBuilder.BuildFunctionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs new file mode 100644 index 000000000..d0be9db9c --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs @@ -0,0 +1,121 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class InvocationExpressionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule FunctionOperationExpression + /// FunctionOperationExpression:InvocationExpression=ownedRelationship+=PrimaryArgumentMember'->'ownedRelationship+=InvocationTypeMember(ownedRelationship+=BodyArgumentMember|ownedRelationship+=FunctionReferenceArgumentMember|ArgumentList)ownedRelationship+=EmptyResultMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunctionOperationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IInvocationExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfInvocationExpressionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append("-> "); + ownedRelationshipOfInvocationExpressionIterator.MoveNext(); + + if (ownedRelationshipOfInvocationExpressionIterator.Current != null) + { + BuildInvocationTypeMember(ownedRelationshipOfInvocationExpressionIterator.Current, stringBuilder); + } + if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildBodyArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + } + else if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildFunctionReferenceArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + } + else + { + FeatureTextualNotationBuilder.BuildArgumentList(poco, stringBuilder); + } + stringBuilder.Append(' '); + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule InvocationExpression + /// InvocationExpression:InvocationExpression=ownedRelationship+=InstantiatedTypeMemberArgumentListownedRelationship+=EmptyResultMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInvocationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IInvocationExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfMembershipIterator.MoveNext(); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildInstantiatedTypeMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } + FeatureTextualNotationBuilder.BuildArgumentList(poco, stringBuilder); + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, 0, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..20e3209d6 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ItemDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ItemDefinition + /// ItemDefinition=OccurrenceDefinitionPrefix'item''def'Definition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildItemDefinition(SysML2.NET.Core.POCO.Systems.Items.IItemDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("item "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..9e9772f7f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs @@ -0,0 +1,55 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ItemUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ItemUsage + /// ItemUsage=OccurrenceUsagePrefix'item'Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildItemUsage(SysML2.NET.Core.POCO.Systems.Items.IItemUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("item "); + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs new file mode 100644 index 000000000..1755fd7af --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs @@ -0,0 +1,59 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class JoinNodeTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule JoinNode + /// JoinNode=ControlNodePrefixisComposite?='join'UsageDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildJoinNode(SysML2.NET.Core.POCO.Systems.Actions.IJoinNode poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildControlNodePrefix(poco, stringBuilder); + if (poco.IsComposite) + { + stringBuilder.Append(" join "); + } + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs new file mode 100644 index 000000000..9273a2460 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs @@ -0,0 +1,69 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class LibraryPackageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule LibraryPackage + /// LibraryPackage=(isStandard?='standard')'library'(ownedRelationship+=PrefixMetadataMember)*PackageDeclarationPackageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildLibraryPackage(SysML2.NET.Core.POCO.Kernel.Packages.ILibraryPackage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append(" standard "); + + stringBuilder.Append(' '); + stringBuilder.Append("library "); + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } + + } + PackageTextualNotationBuilder.BuildPackageDeclaration(poco, stringBuilder); + PackageTextualNotationBuilder.BuildPackageBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs new file mode 100644 index 000000000..3179d4426 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs @@ -0,0 +1,53 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class LiteralBooleanTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule LiteralBoolean + /// LiteralBoolean=value=BooleanValue + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildLiteralBoolean(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralBoolean poco, StringBuilder stringBuilder) + { + stringBuilder.Append(poco.Value.ToString().ToLower()); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs new file mode 100644 index 000000000..e6cd3e413 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs @@ -0,0 +1,71 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class LiteralExpressionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule LiteralExpression + /// LiteralExpression=LiteralBoolean|LiteralString|LiteralInteger|LiteralReal|LiteralInfinity + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildLiteralExpression(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralExpression poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralBoolean pocoLiteralBoolean: + LiteralBooleanTextualNotationBuilder.BuildLiteralBoolean(pocoLiteralBoolean, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralString pocoLiteralString: + LiteralStringTextualNotationBuilder.BuildLiteralString(pocoLiteralString, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralInteger pocoLiteralInteger: + LiteralIntegerTextualNotationBuilder.BuildLiteralInteger(pocoLiteralInteger, stringBuilder); + break; + case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralInfinity pocoLiteralInfinity: + LiteralInfinityTextualNotationBuilder.BuildLiteralInfinity(pocoLiteralInfinity, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Elements.IElement pocoElement: + BuildValue(poco, stringBuilder); + + break; + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs new file mode 100644 index 000000000..e877fdf13 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs @@ -0,0 +1,53 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class LiteralInfinityTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule LiteralInfinity + /// LiteralInfinity='*' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildLiteralInfinity(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralInfinity poco, StringBuilder stringBuilder) + { + stringBuilder.Append("*"); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs new file mode 100644 index 000000000..55e8bf07f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs @@ -0,0 +1,53 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class LiteralIntegerTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule LiteralInteger + /// LiteralInteger=value=DECIMAL_VALUE + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildLiteralInteger(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralInteger poco, StringBuilder stringBuilder) + { + stringBuilder.Append(poco.Value.ToString()); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs new file mode 100644 index 000000000..4e1731783 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs @@ -0,0 +1,53 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class LiteralStringTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule LiteralString + /// LiteralString=value=STRING_VALUE + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildLiteralString(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralString poco, StringBuilder stringBuilder) + { + stringBuilder.Append(poco.Value); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs new file mode 100644 index 000000000..76ef4447c --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs @@ -0,0 +1,53 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class MembershipExposeTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule MembershipExpose + /// MembershipExpose=MembershipImport + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMembershipExpose(SysML2.NET.Core.POCO.Systems.Views.IMembershipExpose poco, StringBuilder stringBuilder) + { + MembershipImportTextualNotationBuilder.BuildMembershipImport(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs new file mode 100644 index 000000000..f9cf6028e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs @@ -0,0 +1,66 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class MembershipImportTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule MembershipImport + /// MembershipImport=importedMembership=[QualifiedName]('::'isRecursive?='**')? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMembershipImport(SysML2.NET.Core.POCO.Root.Namespaces.IMembershipImport poco, StringBuilder stringBuilder) + { + + if (poco.ImportedMembership != null) + { + stringBuilder.Append(poco.ImportedMembership.qualifiedName); + stringBuilder.Append(' '); + } + + if (poco.IsRecursive) + { + stringBuilder.Append(":: "); + stringBuilder.Append(" ** "); + stringBuilder.Append(' '); + } + + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..e0729761c --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs @@ -0,0 +1,210 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class MembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule MemberPrefix + /// MemberPrefix:Membership=(visibility=VisibilityIndicator)? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMemberPrefix(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) + { + + if (poco.Visibility != SysML2.NET.Core.Root.Namespaces.VisibilityKind.Public) + { + stringBuilder.Append(poco.Visibility.ToString().ToLower()); + stringBuilder.Append(' '); + } + + + } + + /// + /// Builds the Textual Notation string for the rule AliasMember + /// AliasMember:Membership=MemberPrefix'alias'('<'memberShortName=NAME'>')?(memberName=NAME)?'for'memberElement=[QualifiedName]RelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAliasMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) + { + BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("alias "); + + if (!string.IsNullOrWhiteSpace(poco.MemberShortName)) + { + stringBuilder.Append("<"); + stringBuilder.Append(poco.MemberShortName); + stringBuilder.Append(">"); + stringBuilder.Append(' '); + } + + + if (!string.IsNullOrWhiteSpace(poco.MemberName)) + { + stringBuilder.Append(poco.MemberName); + stringBuilder.Append(' '); + } + + stringBuilder.Append("for "); + + if (poco.MemberElement != null) + { + stringBuilder.Append(poco.MemberElement.qualifiedName); + stringBuilder.Append(' '); + } + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule FeatureChainMember + /// FeatureChainMember:Membership=memberElement=[QualifiedName]|OwnedFeatureChainMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureChainMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) + { + + if (poco.MemberElement != null) + { + stringBuilder.Append(poco.MemberElement.qualifiedName); + stringBuilder.Append(' '); + } + else + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[0]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Core.Features.IFeature elementAsFeature) + { + FeatureTextualNotationBuilder.BuildOwnedFeatureChain(elementAsFeature, stringBuilder); + } + + } + } + + /// + /// Builds the Textual Notation string for the rule FeatureReferenceMember + /// FeatureReferenceMember:Membership=memberElement=FeatureReference + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureReferenceMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) + { + + if (poco.MemberElement != null) + { + stringBuilder.Append(poco.MemberElement.qualifiedName); + stringBuilder.Append(' '); + + } + + } + + /// + /// Builds the Textual Notation string for the rule ElementReferenceMember + /// ElementReferenceMember:Membership=memberElement=[QualifiedName] + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildElementReferenceMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) + { + + if (poco.MemberElement != null) + { + stringBuilder.Append(poco.MemberElement.qualifiedName); + stringBuilder.Append(' '); + } + + } + + /// + /// Builds the Textual Notation string for the rule InstantiatedTypeMember + /// InstantiatedTypeMember:Membership=memberElement=InstantiatedTypeReference|OwnedFeatureChainMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInstantiatedTypeMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) + { + + if (poco.MemberElement != null) + { + stringBuilder.Append(poco.MemberElement.qualifiedName); + stringBuilder.Append(' '); + + } + else + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[0]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Core.Features.IFeature elementAsFeature) + { + FeatureTextualNotationBuilder.BuildOwnedFeatureChain(elementAsFeature, stringBuilder); + } + + } + } + + /// + /// Builds the Textual Notation string for the rule MetadataBodyElement + /// MetadataBodyElement:Membership=NonFeatureMember|MetadataBodyFeatureMember|AliasMember|Import + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataBodyElement(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Core.Types.FeatureMembership pocoFeatureMembership: + FeatureMembershipTextualNotationBuilder.BuildMetadataBodyFeatureMember(pocoFeatureMembership, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.OwningMembership pocoOwningMembership: + OwningMembershipTextualNotationBuilder.BuildNonFeatureMember(pocoOwningMembership, stringBuilder); + break; + default: + BuildAliasMember(poco, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.IImport pocoImport: + ImportTextualNotationBuilder.BuildImport(pocoImport, stringBuilder); + break; + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs new file mode 100644 index 000000000..d1084bc75 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs @@ -0,0 +1,59 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class MergeNodeTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule MergeNode + /// MergeNode=ControlNodePrefixisComposite?='merge'UsageDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMergeNode(SysML2.NET.Core.POCO.Systems.Actions.IMergeNode poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildControlNodePrefix(poco, stringBuilder); + if (poco.IsComposite) + { + stringBuilder.Append(" merge "); + } + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs new file mode 100644 index 000000000..54c203f6d --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class MetaclassTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Metaclass + /// Metaclass=TypePrefix'metaclass'ClassifierDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetaclass(SysML2.NET.Core.POCO.Kernel.Metadata.IMetaclass poco, StringBuilder stringBuilder) + { + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); + stringBuilder.Append("metaclass "); + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs new file mode 100644 index 000000000..a7cfffebb --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs @@ -0,0 +1,85 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class MetadataAccessExpressionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule MetadataReference + /// MetadataReference:MetadataAccessExpression=ownedRelationship+=ElementReferenceMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildMetadataReference(SysML2.NET.Core.POCO.Kernel.Expressions.IMetadataAccessExpression poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Root.Namespaces.IMembership elementAsMembership) + { + MembershipTextualNotationBuilder.BuildElementReferenceMember(elementAsMembership, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule MetadataAccessExpression + /// MetadataAccessExpression=ownedRelationship+=ElementReferenceMember'.''metadata' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataAccessExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IMetadataAccessExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfMembershipIterator.MoveNext(); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildElementReferenceMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append("."); + stringBuilder.Append("metadata "); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..d65e7d2cb --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs @@ -0,0 +1,67 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class MetadataDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule MetadataDefinition + /// MetadataDefinition=(isAbstract?='abstract')?DefinitionExtensionKeyword*'metadata''def'Definition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataDefinition(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataDefinition poco, StringBuilder stringBuilder) + { + + if (poco.IsAbstract) + { + stringBuilder.Append(" abstract "); + stringBuilder.Append(' '); + } + + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = DefinitionTextualNotationBuilder.BuildDefinitionExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + stringBuilder.Append("metadata "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs new file mode 100644 index 000000000..b11d9697e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs @@ -0,0 +1,142 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class MetadataFeatureTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule PrefixMetadataFeature + /// PrefixMetadataFeature:MetadataFeature=ownedRelationship+=OwnedFeatureTyping + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildPrefixMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Core.Features.IFeatureTyping elementAsFeatureTyping) + { + FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(elementAsFeatureTyping, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule MetadataFeatureDeclaration + /// MetadataFeatureDeclaration:MetadataFeature=(Identification(':'|'typed''by'))?ownedRelationship+=OwnedFeatureTyping + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataFeatureDeclaration(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (BuildGroupConditionForMetadataFeatureDeclaration(poco)) + { + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + stringBuilder.Append(' '); + } + + ownedRelationshipOfFeatureTypingIterator.MoveNext(); + + if (ownedRelationshipOfFeatureTypingIterator.Current != null) + { + FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule MetadataFeature + /// MetadataFeature=(ownedRelationship+=PrefixMetadataMember)*('@'|'metadata')MetadataFeatureDeclaration('about'ownedRelationship+=Annotation(','ownedRelationship+=Annotation)*)?MetadataBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfAnnotationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } + + } + stringBuilder.Append(" @ "); + stringBuilder.Append(' '); + BuildMetadataFeatureDeclaration(poco, stringBuilder); + + if (ownedRelationshipOfAnnotationIterator.MoveNext()) + { + stringBuilder.Append("about "); + + if (ownedRelationshipOfAnnotationIterator.Current != null) + { + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } + + while (ownedRelationshipOfAnnotationIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfAnnotationIterator.Current != null) + { + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } + + } + stringBuilder.Append(' '); + } + + TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..a8a6258bd --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs @@ -0,0 +1,136 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class MetadataUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule PrefixMetadataUsage + /// PrefixMetadataUsage:MetadataUsage=ownedRelationship+=OwnedFeatureTyping + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildPrefixMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Core.Features.IFeatureTyping elementAsFeatureTyping) + { + FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(elementAsFeatureTyping, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule MetadataUsageDeclaration + /// MetadataUsageDeclaration:MetadataUsage=(Identification(':'|'typed''by'))?ownedRelationship+=OwnedFeatureTyping + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataUsageDeclaration(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (BuildGroupConditionForMetadataUsageDeclaration(poco)) + { + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + stringBuilder.Append(' '); + } + + ownedRelationshipOfFeatureTypingIterator.MoveNext(); + + if (ownedRelationshipOfFeatureTypingIterator.Current != null) + { + FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule MetadataUsage + /// MetadataUsage=UsageExtensionKeyword*('@'|'metadata')MetadataUsageDeclaration('about'ownedRelationship+=Annotation(','ownedRelationship+=Annotation)*)?MetadataBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfAnnotationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + stringBuilder.Append(" @ "); + stringBuilder.Append(' '); + BuildMetadataUsageDeclaration(poco, stringBuilder); + + if (ownedRelationshipOfAnnotationIterator.MoveNext()) + { + stringBuilder.Append("about "); + + if (ownedRelationshipOfAnnotationIterator.Current != null) + { + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } + + while (ownedRelationshipOfAnnotationIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfAnnotationIterator.Current != null) + { + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } + + } + stringBuilder.Append(' '); + } + + TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs new file mode 100644 index 000000000..bee174818 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs @@ -0,0 +1,117 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class MultiplicityRangeTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OwnedMultiplicityRange + /// OwnedMultiplicityRange:MultiplicityRange=MultiplicityBounds + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedMultiplicityRange(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, StringBuilder stringBuilder) + { + BuildMultiplicityBounds(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule MultiplicityBounds + /// MultiplicityBounds:MultiplicityRange='['(ownedRelationship+=MultiplicityExpressionMember'..')?ownedRelationship+=MultiplicityExpressionMember']' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMultiplicityBounds(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("["); + + if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildMultiplicityExpressionMember(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append(".. "); + stringBuilder.Append(' '); + } + + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildMultiplicityExpressionMember(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append("]"); + + } + + /// + /// Builds the Textual Notation string for the rule MultiplicityRange + /// MultiplicityRange='['(ownedRelationship+=MultiplicityExpressionMember'..')?ownedRelationship+=MultiplicityExpressionMember']' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMultiplicityRange(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("["); + + if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildMultiplicityExpressionMember(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append(".. "); + stringBuilder.Append(' '); + } + + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildMultiplicityExpressionMember(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append("]"); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs new file mode 100644 index 000000000..2050a00e8 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs @@ -0,0 +1,87 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class MultiplicityTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule EmptyMultiplicity + /// EmptyMultiplicity:Multiplicity={} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEmptyMultiplicity(SysML2.NET.Core.POCO.Core.Types.IMultiplicity poco, StringBuilder stringBuilder) + { + + } + + /// + /// Builds the Textual Notation string for the rule MultiplicitySubset + /// MultiplicitySubset:Multiplicity='multiplicity'IdentificationSubsetsTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMultiplicitySubset(SysML2.NET.Core.POCO.Core.Types.IMultiplicity poco, StringBuilder stringBuilder) + { + stringBuilder.Append("multiplicity "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + FeatureTextualNotationBuilder.BuildSubsets(poco, stringBuilder); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule Multiplicity + /// Multiplicity=MultiplicitySubset|MultiplicityRange + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMultiplicity(SysML2.NET.Core.POCO.Core.Types.IMultiplicity poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Kernel.Multiplicities.MultiplicityRange pocoMultiplicityRange: + MultiplicityRangeTextualNotationBuilder.BuildMultiplicityRange(pocoMultiplicityRange, stringBuilder); + break; + default: + BuildMultiplicitySubset(poco, stringBuilder); + break; + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs new file mode 100644 index 000000000..f31c167ba --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs @@ -0,0 +1,53 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class NamespaceExposeTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule NamespaceExpose + /// NamespaceExpose=NamespaceImport + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamespaceExpose(SysML2.NET.Core.POCO.Systems.Views.INamespaceExpose poco, StringBuilder stringBuilder) + { + NamespaceImportTextualNotationBuilder.BuildNamespaceImport(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs new file mode 100644 index 000000000..e325221f2 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs @@ -0,0 +1,52 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class NamespaceImportTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule NamespaceImport + /// NamespaceImport=importedNamespace=[QualifiedName]'::''*'('::'isRecursive?='**')?|importedNamespace=FilterPackage{ownedRelatedElement+=importedNamespace} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamespaceImport(SysML2.NET.Core.POCO.Root.Namespaces.INamespaceImport poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs new file mode 100644 index 000000000..f313142fa --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs @@ -0,0 +1,147 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class NamespaceTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule RootNamespace + /// RootNamespace:Namespace=PackageBodyElement* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRootNamespace(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, StringBuilder stringBuilder) + { + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + switch (elementInOwnedRelationship) + { + case SysML2.NET.Core.POCO.Kernel.Packages.ElementFilterMembership elementFilterMembership: + ElementFilterMembershipTextualNotationBuilder.BuildElementFilterMember(elementFilterMembership, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.OwningMembership owningMembership: + OwningMembershipTextualNotationBuilder.BuildPackageMember(owningMembership, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.Membership membership: + MembershipTextualNotationBuilder.BuildAliasMember(membership, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.IImport import: + ImportTextualNotationBuilder.BuildImport(import, stringBuilder); + break; + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule NamespaceDeclaration + /// NamespaceDeclaration:Namespace='namespace'Identification + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamespaceDeclaration(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, StringBuilder stringBuilder) + { + stringBuilder.Append("namespace "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule NamespaceBody + /// NamespaceBody:Namespace=';'|'{'NamespaceBodyElement*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamespaceBody(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule NamespaceBodyElement + /// NamespaceBodyElement:Namespace=ownedRelationship+=NamespaceMember|ownedRelationship+=AliasMember|ownedRelationship+=Import + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildNamespaceBodyElement(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, int elementIndex, StringBuilder stringBuilder) + { + switch (elementInOwnedRelationship) + { + case SysML2.NET.Core.POCO.Root.Namespaces.OwningMembership owningMembership: + OwningMembershipTextualNotationBuilder.BuildNamespaceMember(owningMembership, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.Membership membership: + MembershipTextualNotationBuilder.BuildAliasMember(membership, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.IImport import: + ImportTextualNotationBuilder.BuildImport(import, stringBuilder); + break; + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule Namespace + /// Namespace=(ownedRelationship+=PrefixMetadataMember)*NamespaceDeclarationNamespaceBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamespace(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } + + } + BuildNamespaceDeclaration(poco, stringBuilder); + BuildNamespaceBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs new file mode 100644 index 000000000..0b5aba454 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs @@ -0,0 +1,52 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class NullExpressionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule NullExpression + /// NullExpression:NullExpression='null'|'('')' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNullExpression(SysML2.NET.Core.POCO.Kernel.Expressions.INullExpression poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..7a6248213 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs @@ -0,0 +1,61 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ObjectiveMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ObjectiveMember + /// ObjectiveMember:ObjectiveMembership=MemberPrefix'objective'ownedRelatedElement+=ObjectiveRequirementUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildObjectiveMember(SysML2.NET.Core.POCO.Systems.Cases.IObjectiveMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfRequirementUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("objective "); + ownedRelatedElementOfRequirementUsageIterator.MoveNext(); + + if (ownedRelatedElementOfRequirementUsageIterator.Current != null) + { + RequirementUsageTextualNotationBuilder.BuildObjectiveRequirementUsage(ownedRelatedElementOfRequirementUsageIterator.Current, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..07cabf690 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs @@ -0,0 +1,132 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class OccurrenceDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OccurrenceDefinitionPrefix + /// OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOccurrenceDefinitionPrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + if (poco.IsAbstract) + { + stringBuilder.Append(" abstract "); + } + else if (poco.IsVariation) + { + stringBuilder.Append(" variation "); + } + + + if (poco.IsIndividual && ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + stringBuilder.Append(" individual "); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildEmptyMultiplicityMember(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append(' '); + } + + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = DefinitionTextualNotationBuilder.BuildDefinitionExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule IndividualDefinition + /// IndividualDefinition:OccurrenceDefinition=BasicDefinitionPrefix?isIndividual?='individual'DefinitionExtensionKeyword*'def'DefinitionownedRelationship+=EmptyMultiplicityMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildIndividualDefinition(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + if (poco.IsAbstract) + { + stringBuilder.Append(" abstract "); + } + else if (poco.IsVariation) + { + stringBuilder.Append(" variation "); + } + + if (poco.IsIndividual) + { + stringBuilder.Append(" individual "); + } + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = DefinitionTextualNotationBuilder.BuildDefinitionExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildEmptyMultiplicityMember(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule OccurrenceDefinition + /// OccurrenceDefinition=OccurrenceDefinitionPrefix'occurrence''def'Definition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOccurrenceDefinition(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, StringBuilder stringBuilder) + { + BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("occurrence "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..44571d68c --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs @@ -0,0 +1,168 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class OccurrenceUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OccurrenceUsagePrefix + /// OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOccurrenceUsagePrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) + { + UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, stringBuilder); + + if (poco.IsIndividual) + { + stringBuilder.Append(" individual "); + stringBuilder.Append(' '); + } + + + if (poco.PortionKind.HasValue) + { + stringBuilder.Append(poco.PortionKind.ToString().ToLower()); + // NonParsing Assignment Element : isPortion = true => Does not have to be process + stringBuilder.Append(' '); + } + + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule IndividualUsage + /// IndividualUsage:OccurrenceUsage=BasicUsagePrefixisIndividual?='individual'UsageExtensionKeyword*Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildIndividualUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) + { + UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, stringBuilder); + if (poco.IsIndividual) + { + stringBuilder.Append(" individual "); + } + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule PortionUsage + /// PortionUsage:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?portionKind=PortionKindUsageExtensionKeyword*Usage{isPortion=true} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPortionUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) + { + UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, stringBuilder); + + if (poco.IsIndividual) + { + stringBuilder.Append(" individual "); + stringBuilder.Append(' '); + } + + stringBuilder.Append(poco.PortionKind.ToString().ToLower()); + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + // NonParsing Assignment Element : isPortion = true => Does not have to be process + + } + + /// + /// Builds the Textual Notation string for the rule ControlNodePrefix + /// ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildControlNodePrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) + { + UsageTextualNotationBuilder.BuildRefPrefix(poco, stringBuilder); + + if (poco.IsIndividual) + { + stringBuilder.Append(" individual "); + stringBuilder.Append(' '); + } + + + if (poco.PortionKind.HasValue) + { + stringBuilder.Append(poco.PortionKind.ToString().ToLower()); + // NonParsing Assignment Element : isPortion = true => Does not have to be process + stringBuilder.Append(' '); + } + + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule OccurrenceUsage + /// OccurrenceUsage=OccurrenceUsagePrefix'occurrence'Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOccurrenceUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) + { + BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("occurrence "); + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs new file mode 100644 index 000000000..589ac01e2 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs @@ -0,0 +1,303 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class OperatorExpressionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ConditionalExpression + /// ConditionalExpression:OperatorExpression=operator='if'ownedRelationship+=ArgumentMember'?'ownedRelationship+=ArgumentExpressionMember'else'ownedRelationship+=ArgumentExpressionMemberownedRelationship+=EmptyResultMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConditionalExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append(poco.Operator); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append("?"); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentExpressionMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append("else "); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentExpressionMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule ConditionalBinaryOperatorExpression + /// ConditionalBinaryOperatorExpression:OperatorExpression=ownedRelationship+=ArgumentMemberoperator=ConditionalBinaryOperatorownedRelationship+=ArgumentExpressionMemberownedRelationship+=EmptyResultMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConditionalBinaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append(poco.Operator); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentExpressionMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule BinaryOperatorExpression + /// BinaryOperatorExpression:OperatorExpression=ownedRelationship+=ArgumentMemberoperator=BinaryOperatorownedRelationship+=ArgumentMemberownedRelationship+=EmptyResultMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBinaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append(poco.Operator); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule UnaryOperatorExpression + /// UnaryOperatorExpression:OperatorExpression=operator=UnaryOperatorownedRelationship+=ArgumentMemberownedRelationship+=EmptyResultMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUnaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append(poco.Operator); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule ClassificationExpression + /// ClassificationExpression:OperatorExpression=(ownedRelationship+=ArgumentMember)?(operator=ClassificationTestOperatorownedRelationship+=TypeReferenceMember|operator=CastOperatorownedRelationship+=TypeResultMember)ownedRelationship+=EmptyResultMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildClassificationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipIterator = poco.OwnedRelationship.GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append(' '); + } + + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule MetaclassificationExpression + /// MetaclassificationExpression:OperatorExpression=ownedRelationship+=MetadataArgumentMember(operator=ClassificationTestOperatorownedRelationship+=TypeReferenceMember|operator=MetaCastOperatorownedRelationship+=TypeResultMember)ownedRelationship+=EmptyResultMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetaclassificationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipIterator = poco.OwnedRelationship.GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildMetadataArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule ExtentExpression + /// ExtentExpression:OperatorExpression=operator='all'ownedRelationship+=TypeReferenceMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExtentExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append(poco.Operator); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildTypeReferenceMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule BracketExpression + /// BracketExpression:OperatorExpression=ownedRelationship+=PrimaryArgumentMemberoperator='['ownedRelationship+=SequenceExpressionListMember']' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBracketExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append(poco.Operator); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildSequenceExpressionListMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append("]"); + + } + + /// + /// Builds the Textual Notation string for the rule SequenceOperatorExpression + /// SequenceOperatorExpression:OperatorExpression=ownedRelationship+=OwnedExpressionMemberoperator=','ownedRelationship+=SequenceExpressionListMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSequenceOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildOwnedExpressionMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append(poco.Operator); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildSequenceExpressionListMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..58a26856e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs @@ -0,0 +1,417 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class OwningMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule AnnotatingMember + /// AnnotatingMember:OwningMembership=ownedRelatedElement+=AnnotatingElement + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildAnnotatingMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Root.Annotations.IAnnotatingElement elementAsAnnotatingElement) + { + AnnotatingElementTextualNotationBuilder.BuildAnnotatingElement(elementAsAnnotatingElement, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule PackageMember + /// PackageMember:OwningMembership=MemberPrefix(ownedRelatedElement+=DefinitionElement|ownedRelatedElement=UsageElement) + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPackageMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementIterator = poco.OwnedRelatedElement.GetEnumerator(); + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + using var iterator = SysML2.NET.Extensions.EnumerableExtensions.GetElementsOfType(poco.OwnedRelatedElement, typeof(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.Usage), typeof(SysML2.NET.Core.POCO.Root.Elements.IElement)).GetEnumerator(); + iterator.MoveNext(); + + if (iterator.Current != null) + { + switch (iterator.Current) + { + case SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.Usage usage: + UsageTextualNotationBuilder.BuildUsageElement(usage, stringBuilder); + break; + case { } element: + ElementTextualNotationBuilder.BuildDefinitionElement(element, stringBuilder); + break; + } + } + + stringBuilder.Append(' '); + + } + + /// + /// Builds the Textual Notation string for the rule DefinitionMember + /// DefinitionMember:OwningMembership=MemberPrefixownedRelatedElement+=DefinitionElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefinitionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementIterator = poco.OwnedRelatedElement.GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementIterator.MoveNext(); + + if (ownedRelatedElementIterator.Current != null) + { + ElementTextualNotationBuilder.BuildDefinitionElement(ownedRelatedElementIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule OwnedCrossFeatureMember + /// OwnedCrossFeatureMember:OwningMembership=ownedRelatedElement+=OwnedCrossFeature + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildOwnedCrossFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage elementAsReferenceUsage) + { + ReferenceUsageTextualNotationBuilder.BuildOwnedCrossFeature(elementAsReferenceUsage, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule OwnedMultiplicity + /// OwnedMultiplicity:OwningMembership=ownedRelatedElement+=MultiplicityRange + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildOwnedMultiplicity(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange elementAsMultiplicityRange) + { + MultiplicityRangeTextualNotationBuilder.BuildMultiplicityRange(elementAsMultiplicityRange, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule MultiplicityExpressionMember + /// MultiplicityExpressionMember:OwningMembership=ownedRelatedElement+=(LiteralExpression|FeatureReferenceExpression) + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildMultiplicityExpressionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, int elementIndex, StringBuilder stringBuilder) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + switch (elementForOwnedRelatedElement) + { + case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralExpression pocoLiteralExpression: + + if (pocoLiteralExpression is SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralExpression elementAsLiteralExpression) + { + LiteralExpressionTextualNotationBuilder.BuildLiteralExpression(elementAsLiteralExpression, stringBuilder); + } + break; + case SysML2.NET.Core.POCO.Kernel.Expressions.FeatureReferenceExpression pocoFeatureReferenceExpression: + + if (pocoFeatureReferenceExpression is SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression elementAsFeatureReferenceExpression) + { + FeatureReferenceExpressionTextualNotationBuilder.BuildFeatureReferenceExpression(elementAsFeatureReferenceExpression, stringBuilder); + } + break; + } + + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule EmptyMultiplicityMember + /// EmptyMultiplicityMember:OwningMembership=ownedRelatedElement+=EmptyMultiplicity + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildEmptyMultiplicityMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Core.Types.IMultiplicity elementAsMultiplicity) + { + MultiplicityTextualNotationBuilder.BuildEmptyMultiplicity(elementAsMultiplicity, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule ConjugatedPortDefinitionMember + /// ConjugatedPortDefinitionMember:OwningMembership=ownedRelatedElement+=ConjugatedPortDefinition + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildConjugatedPortDefinitionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.Ports.IConjugatedPortDefinition elementAsConjugatedPortDefinition) + { + ConjugatedPortDefinitionTextualNotationBuilder.BuildConjugatedPortDefinition(elementAsConjugatedPortDefinition, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule OwnedCrossMultiplicityMember + /// OwnedCrossMultiplicityMember:OwningMembership=ownedRelatedElement+=OwnedCrossMultiplicity + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildOwnedCrossMultiplicityMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Core.Features.IFeature elementAsFeature) + { + FeatureTextualNotationBuilder.BuildOwnedCrossMultiplicity(elementAsFeature, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule OwnedFeatureChainMember + /// OwnedFeatureChainMember:OwningMembership=ownedRelatedElement+=OwnedFeatureChain + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildOwnedFeatureChainMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Core.Features.IFeature elementAsFeature) + { + FeatureTextualNotationBuilder.BuildOwnedFeatureChain(elementAsFeature, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule TransitionSuccessionMember + /// TransitionSuccessionMember:OwningMembership=ownedRelatedElement+=TransitionSuccession + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildTransitionSuccessionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession elementAsSuccession) + { + SuccessionTextualNotationBuilder.BuildTransitionSuccession(elementAsSuccession, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule PrefixMetadataMember + /// PrefixMetadataMember:OwningMembership='#'ownedRelatedElement=PrefixMetadataUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPrefixMetadataMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfMetadataUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + stringBuilder.Append("#"); + ownedRelatedElementOfMetadataUsageIterator.MoveNext(); + + if (ownedRelatedElementOfMetadataUsageIterator.Current != null) + { + MetadataUsageTextualNotationBuilder.BuildPrefixMetadataUsage(ownedRelatedElementOfMetadataUsageIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule NamespaceMember + /// NamespaceMember:OwningMembership=NonFeatureMember|NamespaceFeatureMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamespaceMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule NonFeatureMember + /// NonFeatureMember:OwningMembership=MemberPrefixownedRelatedElement+=MemberElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNonFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementIterator = poco.OwnedRelatedElement.GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementIterator.MoveNext(); + + if (ownedRelatedElementIterator.Current != null) + { + ElementTextualNotationBuilder.BuildMemberElement(ownedRelatedElementIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule NamespaceFeatureMember + /// NamespaceFeatureMember:OwningMembership=MemberPrefixownedRelatedElement+=FeatureElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamespaceFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfFeatureIterator.MoveNext(); + + if (ownedRelatedElementOfFeatureIterator.Current != null) + { + FeatureTextualNotationBuilder.BuildFeatureElement(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule FeatureMember + /// FeatureMember:OwningMembership=TypeFeatureMember|OwnedFeatureMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Core.Types.FeatureMembership pocoFeatureMembership: + FeatureMembershipTextualNotationBuilder.BuildOwnedFeatureMember(pocoFeatureMembership, stringBuilder); + break; + default: + BuildTypeFeatureMember(poco, stringBuilder); + break; + } + + } + + /// + /// Builds the Textual Notation string for the rule TypeFeatureMember + /// TypeFeatureMember:OwningMembership=MemberPrefix'member'ownedRelatedElement+=FeatureElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypeFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("member "); + ownedRelatedElementOfFeatureIterator.MoveNext(); + + if (ownedRelatedElementOfFeatureIterator.Current != null) + { + FeatureTextualNotationBuilder.BuildFeatureElement(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs new file mode 100644 index 000000000..e1d2be345 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs @@ -0,0 +1,149 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class PackageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule PackageDeclaration + /// PackageDeclaration:Package='package'Identification + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPackageDeclaration(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, StringBuilder stringBuilder) + { + stringBuilder.Append("package "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule PackageBody + /// PackageBody:Package=';'|'{'PackageBodyElement*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPackageBody(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule PackageBodyElement + /// PackageBodyElement:Package=ownedRelationship+=PackageMember|ownedRelationship+=ElementFilterMember|ownedRelationship+=AliasMember|ownedRelationship+=Import + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildPackageBodyElement(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, int elementIndex, StringBuilder stringBuilder) + { + switch (elementInOwnedRelationship) + { + case SysML2.NET.Core.POCO.Kernel.Packages.ElementFilterMembership elementFilterMembership: + ElementFilterMembershipTextualNotationBuilder.BuildElementFilterMember(elementFilterMembership, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.OwningMembership owningMembership: + OwningMembershipTextualNotationBuilder.BuildPackageMember(owningMembership, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.Membership membership: + MembershipTextualNotationBuilder.BuildAliasMember(membership, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.IImport import: + ImportTextualNotationBuilder.BuildImport(import, stringBuilder); + break; + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule FilterPackage + /// FilterPackage:Package=ownedRelationship+=FilterPackageImport(ownedRelationship+=FilterPackageMember)+ + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFilterPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfPackageIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfElementFilterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfPackageIterator.MoveNext(); + + if (ownedRelationshipOfPackageIterator.Current != null) + { + BuildFilterPackageImport(ownedRelationshipOfPackageIterator.Current, stringBuilder); + } + + while (ownedRelationshipOfElementFilterMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfElementFilterMembershipIterator.Current != null) + { + ElementFilterMembershipTextualNotationBuilder.BuildFilterPackageMember(ownedRelationshipOfElementFilterMembershipIterator.Current, stringBuilder); + } + + } + stringBuilder.Append(' '); + + } + + /// + /// Builds the Textual Notation string for the rule Package + /// Package=(ownedRelationship+=PrefixMetadataMember)*PackageDeclarationPackageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } + + } + BuildPackageDeclaration(poco, stringBuilder); + BuildPackageBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..56e81790f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs @@ -0,0 +1,368 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ParameterMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule MessageEventMember + /// MessageEventMember:ParameterMembership=ownedRelatedElement+=MessageEvent + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildMessageEventMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.Occurrences.IEventOccurrenceUsage elementAsEventOccurrenceUsage) + { + EventOccurrenceUsageTextualNotationBuilder.BuildMessageEvent(elementAsEventOccurrenceUsage, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule PayloadParameterMember + /// PayloadParameterMember:ParameterMembership=ownedRelatedElement+=PayloadParameter + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildPayloadParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage elementAsReferenceUsage) + { + ReferenceUsageTextualNotationBuilder.BuildPayloadParameter(elementAsReferenceUsage, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule ArgumentMember + /// ArgumentMember:ParameterMembership=ownedMemberParameter=Argument + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + + if (poco.ownedMemberParameter != null) + { + FeatureTextualNotationBuilder.BuildArgument(poco.ownedMemberParameter, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule ArgumentExpressionMember + /// ArgumentExpressionMember:ParameterMembership=ownedRelatedElement+=ArgumentExpression + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildArgumentExpressionMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Core.Features.IFeature elementAsFeature) + { + FeatureTextualNotationBuilder.BuildArgumentExpression(elementAsFeature, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule NodeParameterMember + /// NodeParameterMember:ParameterMembership=ownedRelatedElement+=NodeParameter + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage elementAsReferenceUsage) + { + ReferenceUsageTextualNotationBuilder.BuildNodeParameter(elementAsReferenceUsage, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule EmptyParameterMember + /// EmptyParameterMember:ParameterMembership=ownedRelatedElement+=EmptyUsage + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildEmptyParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage elementAsReferenceUsage) + { + ReferenceUsageTextualNotationBuilder.BuildEmptyUsage(elementAsReferenceUsage, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule AssignmentTargetMember + /// AssignmentTargetMember:ParameterMembership=ownedRelatedElement+=AssignmentTargetParameter + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildAssignmentTargetMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage elementAsReferenceUsage) + { + ReferenceUsageTextualNotationBuilder.BuildAssignmentTargetParameter(elementAsReferenceUsage, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule ExpressionParameterMember + /// ExpressionParameterMember:ParameterMembership=ownedRelatedElement+=OwnedExpression + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildExpressionParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Kernel.Functions.IExpression elementAsExpression) + { + ExpressionTextualNotationBuilder.BuildOwnedExpression(elementAsExpression, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule ActionBodyParameterMember + /// ActionBodyParameterMember:ParameterMembership=ownedRelatedElement+=ActionBodyParameter + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildActionBodyParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.Actions.IActionUsage elementAsActionUsage) + { + ActionUsageTextualNotationBuilder.BuildActionBodyParameter(elementAsActionUsage, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule IfNodeParameterMember + /// IfNodeParameterMember:ParameterMembership=ownedRelatedElement+=IfNode + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildIfNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.Actions.IIfActionUsage elementAsIfActionUsage) + { + IfActionUsageTextualNotationBuilder.BuildIfNode(elementAsIfActionUsage, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule MetadataArgumentMember + /// MetadataArgumentMember:ParameterMembership=ownedRelatedElement+=MetadataArgument + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildMetadataArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Core.Features.IFeature elementAsFeature) + { + FeatureTextualNotationBuilder.BuildMetadataArgument(elementAsFeature, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule TypeReferenceMember + /// TypeReferenceMember:ParameterMembership=ownedMemberFeature=TypeReference + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypeReferenceMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + + if (poco.ownedMemberFeature != null) + { + FeatureTextualNotationBuilder.BuildTypeReference(poco.ownedMemberFeature, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule PrimaryArgumentMember + /// PrimaryArgumentMember:ParameterMembership=ownedMemberParameter=PrimaryArgument + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPrimaryArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + + if (poco.ownedMemberParameter != null) + { + FeatureTextualNotationBuilder.BuildPrimaryArgument(poco.ownedMemberParameter, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule NonFeatureChainPrimaryArgumentMember + /// NonFeatureChainPrimaryArgumentMember:ParameterMembership=ownedMemberParameter=PrimaryArgument + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNonFeatureChainPrimaryArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + + if (poco.ownedMemberParameter != null) + { + FeatureTextualNotationBuilder.BuildPrimaryArgument(poco.ownedMemberParameter, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule BodyArgumentMember + /// BodyArgumentMember:ParameterMembership=ownedMemberParameter=BodyArgument + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBodyArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + + if (poco.ownedMemberParameter != null) + { + FeatureTextualNotationBuilder.BuildBodyArgument(poco.ownedMemberParameter, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule FunctionReferenceArgumentMember + /// FunctionReferenceArgumentMember:ParameterMembership=ownedMemberParameter=FunctionReferenceArgument + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunctionReferenceArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + + if (poco.ownedMemberParameter != null) + { + FeatureTextualNotationBuilder.BuildFunctionReferenceArgument(poco.ownedMemberParameter, 0, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..be495e173 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class PartDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule PartDefinition + /// PartDefinition=OccurrenceDefinitionPrefix'part''def'Definition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPartDefinition(SysML2.NET.Core.POCO.Systems.Parts.IPartDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("part "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..5b4a2481f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs @@ -0,0 +1,91 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class PartUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ActorUsage + /// ActorUsage:PartUsage='actor'UsageExtensionKeyword*Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActorUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage poco, StringBuilder stringBuilder) + { + stringBuilder.Append("actor "); + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule StakeholderUsage + /// StakeholderUsage:PartUsage='stakeholder'UsageExtensionKeyword*Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStakeholderUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage poco, StringBuilder stringBuilder) + { + stringBuilder.Append("stakeholder "); + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule PartUsage + /// PartUsage=OccurrenceUsagePrefix'part'Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPartUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("part "); + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs new file mode 100644 index 000000000..d6afd0296 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs @@ -0,0 +1,53 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class PayloadFeatureTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule FlowPayloadFeature + /// FlowPayloadFeature:PayloadFeature=PayloadFeature + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowPayloadFeature(SysML2.NET.Core.POCO.Kernel.Interactions.IPayloadFeature poco, StringBuilder stringBuilder) + { + FeatureTextualNotationBuilder.BuildPayloadFeature(poco, 0, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..c630d6655 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs @@ -0,0 +1,109 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class PerformActionUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule PerformActionUsageDeclaration + /// PerformActionUsageDeclaration:PerformActionUsage=(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'action'UsageDeclaration)ValuePart? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPerformActionUsageDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule StatePerformActionUsage + /// StatePerformActionUsage:PerformActionUsage=PerformActionUsageDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStatePerformActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, StringBuilder stringBuilder) + { + BuildPerformActionUsageDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule TransitionPerformActionUsage + /// TransitionPerformActionUsage:PerformActionUsage=PerformActionUsageDeclaration('{'ActionBodyItem*'}')? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTransitionPerformActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, StringBuilder stringBuilder) + { + BuildPerformActionUsageDeclaration(poco, stringBuilder); + + if (BuildGroupConditionForTransitionPerformActionUsage(poco)) + { + stringBuilder.Append("{"); + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = TypeTextualNotationBuilder.BuildActionBodyItem(poco, ownedRelationshipIndex, stringBuilder); + } + stringBuilder.Append("}"); + stringBuilder.Append(' '); + } + + + } + + /// + /// Builds the Textual Notation string for the rule PerformActionUsage + /// PerformActionUsage=OccurrenceUsagePrefix'perform'PerformActionUsageDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPerformActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("perform "); + BuildPerformActionUsageDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs new file mode 100644 index 000000000..ec8ddda96 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs @@ -0,0 +1,52 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class PortConjugationTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule PortConjugation + /// PortConjugation={} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPortConjugation(SysML2.NET.Core.POCO.Systems.Ports.IPortConjugation poco, StringBuilder stringBuilder) + { + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..3fb228633 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs @@ -0,0 +1,64 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class PortDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule PortDefinition + /// PortDefinition=DefinitionPrefix'port''def'DefinitionownedRelationship+=ConjugatedPortDefinitionMember{conjugatedPortDefinition.ownedPortConjugator.originalPortDefinition=this} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPortDefinition(SysML2.NET.Core.POCO.Systems.Ports.IPortDefinition poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + DefinitionTextualNotationBuilder.BuildDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("port "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildConjugatedPortDefinitionMember(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + // NonParsing Assignment Element : conjugatedPortDefinition.ownedPortConjugator.originalPortDefinition = this => Does not have to be process + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..afb385055 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs @@ -0,0 +1,109 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class PortUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule DefaultInterfaceEnd + /// DefaultInterfaceEnd:PortUsage=isEnd?='end'Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefaultInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.IPortUsage poco, StringBuilder stringBuilder) + { + if (poco.IsEnd) + { + stringBuilder.Append(" end "); + } + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule InterfaceEnd + /// InterfaceEnd:PortUsage=(ownedRelationship+=OwnedCrossMultiplicityMember)?(declaredName=NAMEREFERENCES)?ownedRelationship+=OwnedReferenceSubsetting + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.IPortUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildOwnedCrossMultiplicityMember(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append(' '); + } + + + if (!string.IsNullOrWhiteSpace(poco.DeclaredName)) + { + stringBuilder.Append(poco.DeclaredName); + stringBuilder.Append(" ::> "); + stringBuilder.Append(' '); + } + + ownedRelationshipOfReferenceSubsettingIterator.MoveNext(); + + if (ownedRelationshipOfReferenceSubsettingIterator.Current != null) + { + ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule PortUsage + /// PortUsage=OccurrenceUsagePrefix'port'Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPortUsage(SysML2.NET.Core.POCO.Systems.Ports.IPortUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("port "); + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortionKindTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortionKindTextualNotationBuilder.cs new file mode 100644 index 000000000..ff40e40e2 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortionKindTextualNotationBuilder.cs @@ -0,0 +1,52 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class PortionKindTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule PortionKind + /// PortionKind='snapshot'|'timeslice' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPortionKind(SysML2.NET.Core.Systems.Occurrences.PortionKind poco, StringBuilder stringBuilder) + { + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs new file mode 100644 index 000000000..f151f59da --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class PredicateTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Predicate + /// Predicate=TypePrefix'predicate'ClassifierDeclarationFunctionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPredicate(SysML2.NET.Core.POCO.Kernel.Functions.IPredicate poco, StringBuilder stringBuilder) + { + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); + stringBuilder.Append("predicate "); + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildFunctionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..fb4cf0486 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs @@ -0,0 +1,110 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class RedefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OwnedRedefinition + /// OwnedRedefinition:Redefinition=redefinedFeature=[QualifiedName]|redefinedFeature=OwnedFeatureChain{ownedRelatedElement+=redefinedFeature} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule FlowFeatureRedefinition + /// FlowFeatureRedefinition:Redefinition=redefinedFeature=[QualifiedName] + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowFeatureRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, StringBuilder stringBuilder) + { + + if (poco.RedefinedFeature != null) + { + stringBuilder.Append(poco.RedefinedFeature.qualifiedName); + stringBuilder.Append(' '); + } + + } + + /// + /// Builds the Textual Notation string for the rule ParameterRedefinition + /// ParameterRedefinition:Redefinition=redefinedFeature=[QualifiedName] + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildParameterRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, StringBuilder stringBuilder) + { + + if (poco.RedefinedFeature != null) + { + stringBuilder.Append(poco.RedefinedFeature.qualifiedName); + stringBuilder.Append(' '); + } + + } + + /// + /// Builds the Textual Notation string for the rule Redefinition + /// Redefinition=('specialization'Identification)?'redefinition'SpecificTypeREDEFINESGeneralTypeRelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, StringBuilder stringBuilder) + { + + if (BuildGroupConditionForRedefinition(poco)) + { + stringBuilder.Append("specialization "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append(' '); + } + + stringBuilder.Append("redefinition "); + SpecializationTextualNotationBuilder.BuildSpecificType(poco, 0, stringBuilder); + stringBuilder.Append(" :>> "); + SpecializationTextualNotationBuilder.BuildGeneralType(poco, 0, stringBuilder); + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs new file mode 100644 index 000000000..03dac04f5 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs @@ -0,0 +1,63 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ReferenceSubsettingTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OwnedReferenceSubsetting + /// OwnedReferenceSubsetting:ReferenceSubsetting=referencedFeature=[QualifiedName]|referencedFeature=OwnedFeatureChain{ownedRelatedElement+=referenceFeature} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedReferenceSubsetting(SysML2.NET.Core.POCO.Core.Features.IReferenceSubsetting poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule FlowEndSubsetting + /// FlowEndSubsetting:ReferenceSubsetting=referencedFeature=[QualifiedName]|referencedFeature=FeatureChainPrefix{ownedRelatedElement+=referencedFeature} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowEndSubsetting(SysML2.NET.Core.POCO.Core.Features.IReferenceSubsetting poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..ea54d1a5e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs @@ -0,0 +1,344 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ReferenceUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OwnedCrossFeature + /// OwnedCrossFeature:ReferenceUsage=BasicUsagePrefixUsageDeclaration + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedCrossFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, stringBuilder); + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule DefaultReferenceUsage + /// DefaultReferenceUsage:ReferenceUsage=RefPrefixUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefaultReferenceUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + UsageTextualNotationBuilder.BuildRefPrefix(poco, stringBuilder); + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule VariantReference + /// VariantReference:ReferenceUsage=ownedRelationship+=OwnedReferenceSubsettingFeatureSpecialization*UsageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildVariantReference(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfReferenceSubsettingIterator.MoveNext(); + + if (ownedRelationshipOfReferenceSubsettingIterator.Current != null) + { + ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + } + // Handle collection Non Terminal + BuildFeatureSpecializationInternal(poco, stringBuilder); FeatureTextualNotationBuilder.BuildFeatureSpecialization(poco, stringBuilder); + UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule SourceEnd + /// SourceEnd:ReferenceUsage=(ownedRelationship+=OwnedMultiplicity)? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSourceEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildOwnedMultiplicity(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append(' '); + } + + + } + + /// + /// Builds the Textual Notation string for the rule ConnectorEnd + /// ConnectorEnd:ReferenceUsage=(ownedRelationship+=OwnedCrossMultiplicityMember)?(declaredName=NAMEREFERENCES)?ownedRelationship+=OwnedReferenceSubsetting + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConnectorEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildOwnedCrossMultiplicityMember(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append(' '); + } + + + if (!string.IsNullOrWhiteSpace(poco.DeclaredName)) + { + stringBuilder.Append(poco.DeclaredName); + stringBuilder.Append(" ::> "); + stringBuilder.Append(' '); + } + + ownedRelationshipOfReferenceSubsettingIterator.MoveNext(); + + if (ownedRelationshipOfReferenceSubsettingIterator.Current != null) + { + ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule FlowFeature + /// FlowFeature:ReferenceUsage=ownedRelationship+=FlowFeatureRedefinition + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildFlowFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Core.Features.IRedefinition elementAsRedefinition) + { + RedefinitionTextualNotationBuilder.BuildFlowFeatureRedefinition(elementAsRedefinition, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule PayloadParameter + /// PayloadParameter:ReferenceUsage=PayloadFeature|IdentificationPayloadFeatureSpecializationPart?TriggerValuePart + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPayloadParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule NodeParameter + /// NodeParameter:ReferenceUsage=ownedRelationship+=FeatureBinding + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildNodeParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue elementAsFeatureValue) + { + FeatureValueTextualNotationBuilder.BuildFeatureBinding(elementAsFeatureValue, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule EmptyUsage + /// EmptyUsage:ReferenceUsage={} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEmptyUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + + } + + /// + /// Builds the Textual Notation string for the rule AssignmentTargetParameter + /// AssignmentTargetParameter:ReferenceUsage=(ownedRelationship+=AssignmentTargetBinding'.')? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAssignmentTargetParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (ownedRelationshipOfFeatureValueIterator.MoveNext()) + { + + if (ownedRelationshipOfFeatureValueIterator.Current != null) + { + FeatureValueTextualNotationBuilder.BuildAssignmentTargetBinding(ownedRelationshipOfFeatureValueIterator.Current, 0, stringBuilder); + } + stringBuilder.Append("."); + stringBuilder.Append(' '); + } + + + } + + /// + /// Builds the Textual Notation string for the rule ForVariableDeclaration + /// ForVariableDeclaration:ReferenceUsage=UsageDeclaration + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildForVariableDeclaration(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule EmptyFeature + /// EmptyFeature:ReferenceUsage={} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEmptyFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + + } + + /// + /// Builds the Textual Notation string for the rule SubjectUsage + /// SubjectUsage:ReferenceUsage='subject'UsageExtensionKeyword*Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSubjectUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + stringBuilder.Append("subject "); + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule SatisfactionParameter + /// SatisfactionParameter:ReferenceUsage=ownedRelationship+=SatisfactionFeatureValue + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildSatisfactionParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue elementAsFeatureValue) + { + FeatureValueTextualNotationBuilder.BuildSatisfactionFeatureValue(elementAsFeatureValue, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule MetadataBodyUsage + /// MetadataBodyUsage:ReferenceUsage='ref'?(':>>'|'redefines')?ownedRelationship+=OwnedRedefinitionFeatureSpecializationPart?ValuePart?MetadataBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataBodyUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfRedefinitionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("ref "); + stringBuilder.Append(" :>> "); + ownedRelationshipOfRedefinitionIterator.MoveNext(); + + if (ownedRelationshipOfRedefinitionIterator.Current != null) + { + RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + } + FeatureTextualNotationBuilder.BuildFeatureSpecializationPart(poco, stringBuilder); + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule ReferenceUsage + /// ReferenceUsage=(EndUsagePrefix|RefPrefix)'ref'Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildReferenceUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + stringBuilder.Append(' '); + stringBuilder.Append("ref "); + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RelationshipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RelationshipTextualNotationBuilder.cs new file mode 100644 index 000000000..e402e1405 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RelationshipTextualNotationBuilder.cs @@ -0,0 +1,90 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class RelationshipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule RelationshipBody + /// RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRelationshipBody(SysML2.NET.Core.POCO.Root.Elements.IRelationship poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule RelationshipOwnedElement + /// RelationshipOwnedElement:Relationship=ownedRelatedElement+=OwnedRelatedElement|ownedRelationship+=OwnedAnnotation + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildRelationshipOwnedElement(SysML2.NET.Core.POCO.Root.Elements.IRelationship poco, int elementIndex, StringBuilder stringBuilder) + { + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Root.Elements.IElement elementAsElement) + { + ElementTextualNotationBuilder.BuildOwnedRelatedElement(elementAsElement, stringBuilder); + } + } + } +else + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Root.Annotations.IAnnotation elementAsAnnotation) + { + AnnotationTextualNotationBuilder.BuildOwnedAnnotation(elementAsAnnotation, 0, stringBuilder); + } + } + } + + return elementIndex; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..50209fc80 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class RenderingDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule RenderingDefinition + /// RenderingDefinition=OccurrenceDefinitionPrefix'rendering''def'Definition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRenderingDefinition(SysML2.NET.Core.POCO.Systems.Views.IRenderingDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("rendering "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..3dc595cd4 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs @@ -0,0 +1,70 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class RenderingUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ViewRenderingUsage + /// ViewRenderingUsage:RenderingUsage=ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?UsageBody|(UsageExtensionKeyword*'rendering'|UsageExtensionKeyword+)Usage + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildViewRenderingUsage(SysML2.NET.Core.POCO.Systems.Views.IRenderingUsage poco, int elementIndex, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule RenderingUsage + /// RenderingUsage=OccurrenceUsagePrefix'rendering'Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRenderingUsage(SysML2.NET.Core.POCO.Systems.Views.IRenderingUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("rendering "); + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..786063c3f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs @@ -0,0 +1,72 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class RequirementConstraintMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule RequirementConstraintMember + /// RequirementConstraintMember:RequirementConstraintMembership=MemberPrefix?RequirementKindownedRelatedElement+=RequirementConstraintUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRequirementConstraintMember(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementConstraintMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfConstraintUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + BuildRequirementKind(poco, stringBuilder); + ownedRelatedElementOfConstraintUsageIterator.MoveNext(); + + if (ownedRelatedElementOfConstraintUsageIterator.Current != null) + { + ConstraintUsageTextualNotationBuilder.BuildRequirementConstraintUsage(ownedRelatedElementOfConstraintUsageIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule RequirementKind + /// RequirementKind:RequirementConstraintMembership='assume'{kind='assumption'}|'require'{kind='requirement'} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRequirementKind(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementConstraintMembership poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..df6dc74d3 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class RequirementDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule RequirementDefinition + /// RequirementDefinition=OccurrenceDefinitionPrefix'requirement''def'DefinitionDeclarationRequirementBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRequirementDefinition(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("requirement "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..09ae173c4 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs @@ -0,0 +1,89 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class RequirementUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ObjectiveRequirementUsage + /// ObjectiveRequirementUsage:RequirementUsage=UsageExtensionKeyword*ConstraintUsageDeclarationRequirementBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildObjectiveRequirementUsage(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage poco, StringBuilder stringBuilder) + { + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + ConstraintUsageTextualNotationBuilder.BuildConstraintUsageDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule RequirementVerificationUsage + /// RequirementVerificationUsage:RequirementUsage=ownedRelationship+=OwnedReferenceSubsettingFeatureSpecialization*RequirementBody|(UsageExtensionKeyword*'requirement'|UsageExtensionKeyword+)ConstraintUsageDeclarationRequirementBody + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildRequirementVerificationUsage(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage poco, int elementIndex, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule RequirementUsage + /// RequirementUsage=OccurrenceUsagePrefix'requirement'ConstraintUsageDeclarationRequirementBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRequirementUsage(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("requirement "); + ConstraintUsageTextualNotationBuilder.BuildConstraintUsageDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..f05e179d8 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs @@ -0,0 +1,62 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class RequirementVerificationMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule RequirementVerificationMember + /// RequirementVerificationMember:RequirementVerificationMembership=MemberPrefix'verify'{kind='requirement'}ownedRelatedElement+=RequirementVerificationUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRequirementVerificationMember(SysML2.NET.Core.POCO.Systems.VerificationCases.IRequirementVerificationMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfRequirementUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("verify "); + // NonParsing Assignment Element : kind = 'requirement' => Does not have to be process + ownedRelatedElementOfRequirementUsageIterator.MoveNext(); + + if (ownedRelatedElementOfRequirementUsageIterator.Current != null) + { + RequirementUsageTextualNotationBuilder.BuildRequirementVerificationUsage(ownedRelatedElementOfRequirementUsageIterator.Current, 0, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..aa2417e87 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs @@ -0,0 +1,60 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ResultExpressionMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ResultExpressionMember + /// ResultExpressionMember:ResultExpressionMembership=MemberPrefix?ownedRelatedElement+=OwnedExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildResultExpressionMember(SysML2.NET.Core.POCO.Kernel.Functions.IResultExpressionMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfExpressionIterator.MoveNext(); + + if (ownedRelatedElementOfExpressionIterator.Current != null) + { + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..ba67efc37 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs @@ -0,0 +1,128 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ReturnParameterMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ReturnParameterMember + /// ReturnParameterMember:ReturnParameterMembership=MemberPrefix?'return'ownedRelatedElement+=UsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildReturnParameterMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("return "); + ownedRelatedElementOfUsageIterator.MoveNext(); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule ReturnFeatureMember + /// ReturnFeatureMember:ReturnParameterMembership=MemberPrefix'return'ownedRelatedElement+=FeatureElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildReturnFeatureMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("return "); + ownedRelatedElementOfFeatureIterator.MoveNext(); + + if (ownedRelatedElementOfFeatureIterator.Current != null) + { + FeatureTextualNotationBuilder.BuildFeatureElement(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule EmptyResultMember + /// EmptyResultMember:ReturnParameterMembership=ownedRelatedElement+=EmptyFeature + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildEmptyResultMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage elementAsReferenceUsage) + { + ReferenceUsageTextualNotationBuilder.BuildEmptyFeature(elementAsReferenceUsage, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule ConstructorResultMember + /// ConstructorResultMember:ReturnParameterMembership=ownedRelatedElement+=ConstructorResult + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildConstructorResultMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Core.Features.IFeature elementAsFeature) + { + FeatureTextualNotationBuilder.BuildConstructorResult(elementAsFeature, stringBuilder); + } + } + + return elementIndex; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..18847f9ba --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs @@ -0,0 +1,76 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class SatisfyRequirementUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule SatisfyRequirementUsage + /// SatisfyRequirementUsage=OccurrenceUsagePrefix'assert'(isNegated?='not')'satisfy'(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'requirement'UsageDeclaration)ValuePart?('by'ownedRelationship+=SatisfactionSubjectMember)?RequirementBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSatisfyRequirementUsage(SysML2.NET.Core.POCO.Systems.Requirements.ISatisfyRequirementUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfSubjectMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("assert "); + stringBuilder.Append(" not "); + + stringBuilder.Append(' '); + stringBuilder.Append("satisfy "); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + + if (ownedRelationshipOfSubjectMembershipIterator.MoveNext()) + { + stringBuilder.Append("by "); + + if (ownedRelationshipOfSubjectMembershipIterator.Current != null) + { + SubjectMembershipTextualNotationBuilder.BuildSatisfactionSubjectMember(ownedRelationshipOfSubjectMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append(' '); + } + + TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs new file mode 100644 index 000000000..c0276adc3 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs @@ -0,0 +1,66 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class SelectExpressionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule SelectExpression + /// SelectExpression=ownedRelationship+=PrimaryArgumentMember'.?'ownedRelationship+=BodyArgumentMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSelectExpression(SysML2.NET.Core.POCO.Kernel.Expressions.ISelectExpression poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append(".? "); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildBodyArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..f2cb2315d --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs @@ -0,0 +1,132 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class SendActionUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule SendNode + /// SendNode:SendActionUsage=OccurrenceUsagePrefixActionUsageDeclaration?'send'(ownedRelationship+=NodeParameterMemberSenderReceiverPart?|ownedRelationship+=EmptyParameterMemberSenderReceiverPart)?ActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSendNode(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + ActionUsageTextualNotationBuilder.BuildActionUsageDeclaration(poco, stringBuilder); + stringBuilder.Append("send "); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule SendNodeDeclaration + /// SendNodeDeclaration:SendActionUsage=ActionNodeUsageDeclaration?'send'ownedRelationship+=NodeParameterMemberSenderReceiverPart? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSendNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ActionUsageTextualNotationBuilder.BuildActionNodeUsageDeclaration(poco, stringBuilder); + stringBuilder.Append("send "); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + BuildSenderReceiverPart(poco, 0, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule SenderReceiverPart + /// SenderReceiverPart:SendActionUsage='via'ownedRelationship+=NodeParameterMember('to'ownedRelationship+=NodeParameterMember)?|ownedRelationship+=EmptyParameterMember'to'ownedRelationship+=NodeParameterMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildSenderReceiverPart(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, int elementIndex, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule StateSendActionUsage + /// StateSendActionUsage:SendActionUsage=SendNodeDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateSendActionUsage(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, StringBuilder stringBuilder) + { + BuildSendNodeDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule TransitionSendActionUsage + /// TransitionSendActionUsage:SendActionUsage=SendNodeDeclaration('{'ActionBodyItem*'}')? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTransitionSendActionUsage(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, StringBuilder stringBuilder) + { + BuildSendNodeDeclaration(poco, stringBuilder); + + if (BuildGroupConditionForTransitionSendActionUsage(poco)) + { + stringBuilder.Append("{"); + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = TypeTextualNotationBuilder.BuildActionBodyItem(poco, ownedRelationshipIndex, stringBuilder); + } + stringBuilder.Append("}"); + stringBuilder.Append(' '); + } + + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs new file mode 100644 index 000000000..06481f54f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs @@ -0,0 +1,106 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class SpecializationTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OwnedSpecialization + /// OwnedSpecialization:Specialization=GeneralType + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedSpecialization(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, StringBuilder stringBuilder) + { + BuildGeneralType(poco, 0, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule SpecificType + /// SpecificType:Specialization=specific=[QualifiedName]|specific+=OwnedFeatureChain{ownedRelatedElement+=specific} + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildSpecificType(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, int elementIndex, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule GeneralType + /// GeneralType:Specialization=general=[QualifiedName]|general+=OwnedFeatureChain{ownedRelatedElement+=general} + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildGeneralType(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, int elementIndex, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule Specialization + /// Specialization=('specialization'Identification)?'subtype'SpecificTypeSPECIALIZESGeneralTypeRelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSpecialization(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, StringBuilder stringBuilder) + { + + if (BuildGroupConditionForSpecialization(poco)) + { + stringBuilder.Append("specialization "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append(' '); + } + + stringBuilder.Append("subtype "); + BuildSpecificType(poco, 0, stringBuilder); + stringBuilder.Append(" :> "); + BuildGeneralType(poco, 0, stringBuilder); + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..93c35b22f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs @@ -0,0 +1,60 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class StakeholderMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule StakeholderMember + /// StakeholderMember:StakeholderMembership=MemberPrefixownedRelatedElement+=StakeholderUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStakeholderMember(SysML2.NET.Core.POCO.Systems.Requirements.IStakeholderMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfPartUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfPartUsageIterator.MoveNext(); + + if (ownedRelatedElementOfPartUsageIterator.Current != null) + { + PartUsageTextualNotationBuilder.BuildStakeholderUsage(ownedRelatedElementOfPartUsageIterator.Current, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..ed74d6cf9 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs @@ -0,0 +1,68 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class StateDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule StateDefBody + /// StateDefBody:StateDefinition=';'|(isParallel?='parallel')?'{'StateBodyItem*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateDefBody(SysML2.NET.Core.POCO.Systems.States.IStateDefinition poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule StateDefinition + /// StateDefinition=OccurrenceDefinitionPrefix'state''def'DefinitionDeclarationStateDefBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateDefinition(SysML2.NET.Core.POCO.Systems.States.IStateDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("state "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + BuildStateDefBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..9f7ea3844 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs @@ -0,0 +1,101 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class StateSubactionMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule EntryActionMember + /// EntryActionMember:StateSubactionMembership=MemberPrefixkind='entry'ownedRelatedElement+=StateActionUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEntryActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append(poco.Kind.ToString().ToLower()); + ownedRelatedElementOfActionUsageIterator.MoveNext(); + + if (ownedRelatedElementOfActionUsageIterator.Current != null) + { + ActionUsageTextualNotationBuilder.BuildStateActionUsage(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule DoActionMember + /// DoActionMember:StateSubactionMembership=MemberPrefixkind='do'ownedRelatedElement+=StateActionUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDoActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append(poco.Kind.ToString().ToLower()); + ownedRelatedElementOfActionUsageIterator.MoveNext(); + + if (ownedRelatedElementOfActionUsageIterator.Current != null) + { + ActionUsageTextualNotationBuilder.BuildStateActionUsage(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule ExitActionMember + /// ExitActionMember:StateSubactionMembership=MemberPrefixkind='exit'ownedRelatedElement+=StateActionUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExitActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append(poco.Kind.ToString().ToLower()); + ownedRelatedElementOfActionUsageIterator.MoveNext(); + + if (ownedRelatedElementOfActionUsageIterator.Current != null) + { + ActionUsageTextualNotationBuilder.BuildStateActionUsage(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..3515d42cc --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs @@ -0,0 +1,67 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class StateUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule StateUsageBody + /// StateUsageBody:StateUsage=';'|(isParallel?='parallel')?'{'StateBodyItem*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateUsageBody(SysML2.NET.Core.POCO.Systems.States.IStateUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule StateUsage + /// StateUsage=OccurrenceUsagePrefix'state'ActionUsageDeclarationStateUsageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateUsage(SysML2.NET.Core.POCO.Systems.States.IStateUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("state "); + ActionUsageTextualNotationBuilder.BuildActionUsageDeclaration(poco, stringBuilder); + BuildStateUsageBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs new file mode 100644 index 000000000..35d18497c --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs @@ -0,0 +1,70 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class StepTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Step + /// Step=FeaturePrefix'step'FeatureDeclarationValuePart?TypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStep(SysML2.NET.Core.POCO.Kernel.Behaviors.IStep poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } + + } + + stringBuilder.Append("step "); + FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs new file mode 100644 index 000000000..cf7cd2144 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class StructureTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Structure + /// Structure=TypePrefix'struct'ClassifierDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStructure(SysML2.NET.Core.POCO.Kernel.Structures.IStructure poco, StringBuilder stringBuilder) + { + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); + stringBuilder.Append("struct "); + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs new file mode 100644 index 000000000..f6dca58bf --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs @@ -0,0 +1,92 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class SubclassificationTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OwnedSubclassification + /// OwnedSubclassification:Subclassification=superClassifier=[QualifiedName] + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedSubclassification(SysML2.NET.Core.POCO.Core.Classifiers.ISubclassification poco, StringBuilder stringBuilder) + { + + if (poco.Superclassifier != null) + { + stringBuilder.Append(poco.Superclassifier.qualifiedName); + stringBuilder.Append(' '); + } + + } + + /// + /// Builds the Textual Notation string for the rule Subclassification + /// Subclassification=('specialization'Identification)?'subclassifier'subclassifier=[QualifiedName]SPECIALIZESsuperclassifier=[QualifiedName]RelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSubclassification(SysML2.NET.Core.POCO.Core.Classifiers.ISubclassification poco, StringBuilder stringBuilder) + { + + if (BuildGroupConditionForSubclassification(poco)) + { + stringBuilder.Append("specialization "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append(' '); + } + + stringBuilder.Append("subclassifier "); + + if (poco.Subclassifier != null) + { + stringBuilder.Append(poco.Subclassifier.qualifiedName); + stringBuilder.Append(' '); + } + stringBuilder.Append(" :> "); + + if (poco.Superclassifier != null) + { + stringBuilder.Append(poco.Superclassifier.qualifiedName); + stringBuilder.Append(' '); + } + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..d2c0415df --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs @@ -0,0 +1,84 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class SubjectMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule SubjectMember + /// SubjectMember:SubjectMembership=MemberPrefixownedRelatedElement+=SubjectUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSubjectMember(SysML2.NET.Core.POCO.Systems.Requirements.ISubjectMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfReferenceUsageIterator.MoveNext(); + + if (ownedRelatedElementOfReferenceUsageIterator.Current != null) + { + ReferenceUsageTextualNotationBuilder.BuildSubjectUsage(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule SatisfactionSubjectMember + /// SatisfactionSubjectMember:SubjectMembership=ownedRelatedElement+=SatisfactionParameter + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildSatisfactionSubjectMember(SysML2.NET.Core.POCO.Systems.Requirements.ISubjectMembership poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage elementAsReferenceUsage) + { + ReferenceUsageTextualNotationBuilder.BuildSatisfactionParameter(elementAsReferenceUsage, 0, stringBuilder); + } + } + + return elementIndex; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs new file mode 100644 index 000000000..7d3d4c8de --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs @@ -0,0 +1,76 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class SubsettingTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OwnedSubsetting + /// OwnedSubsetting:Subsetting=subsettedFeature=[QualifiedName]|subsettedFeature=OwnedFeatureChain{ownedRelatedElement+=subsettedFeature} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedSubsetting(SysML2.NET.Core.POCO.Core.Features.ISubsetting poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule Subsetting + /// Subsetting=('specialization'Identification)?'subset'SpecificTypeSUBSETSGeneralTypeRelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSubsetting(SysML2.NET.Core.POCO.Core.Features.ISubsetting poco, StringBuilder stringBuilder) + { + + if (BuildGroupConditionForSubsetting(poco)) + { + stringBuilder.Append("specialization "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append(' '); + } + + stringBuilder.Append("subset "); + SpecializationTextualNotationBuilder.BuildSpecificType(poco, 0, stringBuilder); + stringBuilder.Append(" :> "); + SpecializationTextualNotationBuilder.BuildGeneralType(poco, 0, stringBuilder); + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..c24ffba15 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs @@ -0,0 +1,126 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class SuccessionAsUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule SourceSuccession + /// SourceSuccession:SuccessionAsUsage=ownedRelationship+=SourceEndMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildSourceSuccession(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership elementAsEndFeatureMembership) + { + EndFeatureMembershipTextualNotationBuilder.BuildSourceEndMember(elementAsEndFeatureMembership, 0, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule TargetSuccession + /// TargetSuccession:SuccessionAsUsage=ownedRelationship+=SourceEndMember'then'ownedRelationship+=ConnectorEndMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTargetSuccession(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildSourceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append("then "); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule SuccessionAsUsage + /// SuccessionAsUsage=UsagePrefix('succession'UsageDeclaration)?'first's.ownedRelationship+=ConnectorEndMember'then's.ownedRelationship+=ConnectorEndMemberUsageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSuccessionAsUsage(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + UsageTextualNotationBuilder.BuildUsagePrefix(poco, stringBuilder); + + if (BuildGroupConditionForSuccessionAsUsage(poco)) + { + stringBuilder.Append("succession "); + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + stringBuilder.Append(' '); + } + + stringBuilder.Append("first "); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append("then "); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs new file mode 100644 index 000000000..31051b1dd --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs @@ -0,0 +1,70 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class SuccessionFlowTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule SuccessionFlow + /// SuccessionFlow=FeaturePrefix'succession''flow'FlowDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSuccessionFlow(SysML2.NET.Core.POCO.Kernel.Interactions.ISuccessionFlow poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } + + } + + stringBuilder.Append("succession "); + stringBuilder.Append("flow "); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..f7dd5718e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class SuccessionFlowUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule SuccessionFlowUsage + /// SuccessionFlowUsage=OccurrenceUsagePrefix'succession''flow'FlowDeclarationDefinitionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSuccessionFlowUsage(SysML2.NET.Core.POCO.Systems.Flows.ISuccessionFlowUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("succession "); + stringBuilder.Append("flow "); + FlowUsageTextualNotationBuilder.BuildFlowDeclaration(poco, 0, stringBuilder); + TypeTextualNotationBuilder.BuildDefinitionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs new file mode 100644 index 000000000..0328df9f3 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs @@ -0,0 +1,104 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class SuccessionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule TransitionSuccession + /// TransitionSuccession:Succession=ownedRelationship+=EmptyEndMemberownedRelationship+=ConnectorEndMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTransitionSuccession(SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildEmptyEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule SuccessionDeclaration + /// SuccessionDeclaration:Succession=FeatureDeclaration('first'ownedRelationship+=ConnectorEndMember'then'ownedRelationship+=ConnectorEndMember)?|(s.isSufficient?='all')?('first'?ownedRelationship+=ConnectorEndMember'then'ownedRelationship+=ConnectorEndMember)? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSuccessionDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule Succession + /// Succession=FeaturePrefix'succession'SuccessionDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSuccession(SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } + + } + + stringBuilder.Append("succession "); + BuildSuccessionDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..07427c559 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs @@ -0,0 +1,68 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class TerminateActionUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule TerminateNode + /// TerminateNode:TerminateActionUsage=OccurrenceUsagePrefixActionNodeUsageDeclaration?'terminate'(ownedRelationship+=NodeParameterMember)?ActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTerminateNode(SysML2.NET.Core.POCO.Systems.Actions.ITerminateActionUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + ActionUsageTextualNotationBuilder.BuildActionNodeUsageDeclaration(poco, stringBuilder); + stringBuilder.Append("terminate "); + + if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append(' '); + } + + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs new file mode 100644 index 000000000..e2fc7c20a --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs @@ -0,0 +1,63 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class TextualRepresentationTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule TextualRepresentation + /// TextualRepresentation=('rep'Identification)?'language'language=STRING_VALUEbody=REGULAR_COMMENT + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTextualRepresentation(SysML2.NET.Core.POCO.Root.Annotations.ITextualRepresentation poco, StringBuilder stringBuilder) + { + + if (BuildGroupConditionForTextualRepresentation(poco)) + { + stringBuilder.Append("rep "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append(' '); + } + + stringBuilder.Append("language "); + stringBuilder.Append(poco.Language); + stringBuilder.Append(poco.Body); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..554f93de5 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs @@ -0,0 +1,101 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class TransitionFeatureMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule TriggerActionMember + /// TriggerActionMember:TransitionFeatureMembership='accept'{kind='trigger'}ownedRelatedElement+=TriggerAction + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTriggerActionMember(SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfAcceptActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + stringBuilder.Append("accept "); + // NonParsing Assignment Element : kind = 'trigger' => Does not have to be process + ownedRelatedElementOfAcceptActionUsageIterator.MoveNext(); + + if (ownedRelatedElementOfAcceptActionUsageIterator.Current != null) + { + AcceptActionUsageTextualNotationBuilder.BuildTriggerAction(ownedRelatedElementOfAcceptActionUsageIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule GuardExpressionMember + /// GuardExpressionMember:TransitionFeatureMembership='if'{kind='guard'}ownedRelatedElement+=OwnedExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildGuardExpressionMember(SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + stringBuilder.Append("if "); + // NonParsing Assignment Element : kind = 'guard' => Does not have to be process + ownedRelatedElementOfExpressionIterator.MoveNext(); + + if (ownedRelatedElementOfExpressionIterator.Current != null) + { + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule EffectBehaviorMember + /// EffectBehaviorMember:TransitionFeatureMembership='do'{kind='effect'}ownedRelatedElement+=EffectBehaviorUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEffectBehaviorMember(SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + stringBuilder.Append("do "); + // NonParsing Assignment Element : kind = 'effect' => Does not have to be process + ownedRelatedElementOfActionUsageIterator.MoveNext(); + + if (ownedRelatedElementOfActionUsageIterator.Current != null) + { + ActionUsageTextualNotationBuilder.BuildEffectBehaviorUsage(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..14a695a5e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs @@ -0,0 +1,240 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class TransitionUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule GuardedTargetSuccession + /// GuardedTargetSuccession:TransitionUsage=ownedRelationship+=GuardExpressionMember'then'ownedRelationship+=TransitionSuccessionMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildGuardedTargetSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfTransitionFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfTransitionFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfTransitionFeatureMembershipIterator.Current != null) + { + TransitionFeatureMembershipTextualNotationBuilder.BuildGuardExpressionMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append("then "); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule DefaultTargetSuccession + /// DefaultTargetSuccession:TransitionUsage='else'ownedRelationship+=TransitionSuccessionMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefaultTargetSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("else "); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule GuardedSuccession + /// GuardedSuccession:TransitionUsage=('succession'UsageDeclaration)?'first'ownedRelationship+=FeatureChainMemberownedRelationship+=GuardExpressionMember'then'ownedRelationship+=TransitionSuccessionMemberUsageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildGuardedSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfTransitionFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (BuildGroupConditionForGuardedSuccession(poco)) + { + stringBuilder.Append("succession "); + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + stringBuilder.Append(' '); + } + + stringBuilder.Append("first "); + ownedRelationshipOfMembershipIterator.MoveNext(); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } + ownedRelationshipOfTransitionFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfTransitionFeatureMembershipIterator.Current != null) + { + TransitionFeatureMembershipTextualNotationBuilder.BuildGuardExpressionMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append("then "); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule TargetTransitionUsage + /// TargetTransitionUsage:TransitionUsage=ownedRelationship+=EmptyParameterMember('transition'(ownedRelationship+=EmptyParameterMemberownedRelationship+=TriggerActionMember)?(ownedRelationship+=GuardExpressionMember)?(ownedRelationship+=EffectBehaviorMember)?|ownedRelationship+=EmptyParameterMemberownedRelationship+=TriggerActionMember(ownedRelationship+=GuardExpressionMember)?(ownedRelationship+=EffectBehaviorMember)?|ownedRelationship+=GuardExpressionMember(ownedRelationship+=EffectBehaviorMember)?)?'then'ownedRelationship+=TransitionSuccessionMemberActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTargetTransitionUsage(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfTransitionFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildEmptyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append("then "); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule TransitionUsage + /// TransitionUsage='transition'(UsageDeclaration'first')?ownedRelationship+=FeatureChainMemberownedRelationship+=EmptyParameterMember(ownedRelationship+=EmptyParameterMemberownedRelationship+=TriggerActionMember)?(ownedRelationship+=GuardExpressionMember)?(ownedRelationship+=EffectBehaviorMember)?'then'ownedRelationship+=TransitionSuccessionMemberActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTransitionUsage(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfTransitionFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("transition "); + + if (BuildGroupConditionForTransitionUsage(poco)) + { + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + stringBuilder.Append("first "); + stringBuilder.Append(' '); + } + + ownedRelationshipOfMembershipIterator.MoveNext(); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildEmptyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + + if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildEmptyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + + if (ownedRelationshipOfTransitionFeatureMembershipIterator.Current != null) + { + TransitionFeatureMembershipTextualNotationBuilder.BuildTriggerActionMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append(' '); + } + + + if (ownedRelationshipOfTransitionFeatureMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfTransitionFeatureMembershipIterator.Current != null) + { + TransitionFeatureMembershipTextualNotationBuilder.BuildGuardExpressionMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append(' '); + } + + + if (ownedRelationshipOfTransitionFeatureMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfTransitionFeatureMembershipIterator.Current != null) + { + TransitionFeatureMembershipTextualNotationBuilder.BuildEffectBehaviorMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append(' '); + } + + stringBuilder.Append("then "); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs new file mode 100644 index 000000000..9d1e38c87 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class TriggerInvocationExpressionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule TriggerExpression + /// TriggerExpression:TriggerInvocationExpression=kind=('at'|'after')ownedRelationship+=ArgumentMember|kind='when'ownedRelationship+=ArgumentExpressionMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildTriggerExpression(SysML2.NET.Core.POCO.Systems.Actions.ITriggerInvocationExpression poco, int elementIndex, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + return elementIndex; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs new file mode 100644 index 000000000..19d95abcc --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs @@ -0,0 +1,92 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class TypeFeaturingTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule OwnedTypeFeaturing + /// OwnedTypeFeaturing:TypeFeaturing=featuringType=[QualifiedName] + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.ITypeFeaturing poco, StringBuilder stringBuilder) + { + + if (poco.FeaturingType != null) + { + stringBuilder.Append(poco.FeaturingType.qualifiedName); + stringBuilder.Append(' '); + } + + } + + /// + /// Builds the Textual Notation string for the rule TypeFeaturing + /// TypeFeaturing='featuring'(Identification'of')?featureOfType=[QualifiedName]'by'featuringType=[QualifiedName]RelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.ITypeFeaturing poco, StringBuilder stringBuilder) + { + stringBuilder.Append("featuring "); + + if (BuildGroupConditionForTypeFeaturing(poco)) + { + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append("of "); + stringBuilder.Append(' '); + } + + + if (poco.FeatureOfType != null) + { + stringBuilder.Append(poco.FeatureOfType.qualifiedName); + stringBuilder.Append(' '); + } + stringBuilder.Append("by "); + + if (poco.FeaturingType != null) + { + stringBuilder.Append(poco.FeaturingType.qualifiedName); + stringBuilder.Append(' '); + } + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs new file mode 100644 index 000000000..31c862300 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs @@ -0,0 +1,638 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class TypeTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule DefinitionBody + /// DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefinitionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule DefinitionBodyItem + /// DefinitionBodyItem:Type=ownedRelationship+=DefinitionMember|ownedRelationship+=VariantUsageMember|ownedRelationship+=NonOccurrenceUsageMember|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=OccurrenceUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildDefinitionBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, int elementIndex, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule InterfaceBody + /// InterfaceBody:Type=';'|'{'InterfaceBodyItem*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule InterfaceBodyItem + /// InterfaceBodyItem:Type=ownedRelationship+=DefinitionMember|ownedRelationship+=VariantUsageMember|ownedRelationship+=InterfaceNonOccurrenceUsageMember|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=InterfaceOccurrenceUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildInterfaceBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, int elementIndex, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule ActionBody + /// ActionBody:Type=';'|'{'ActionBodyItem*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule ActionBodyItem + /// ActionBodyItem:Type=NonBehaviorBodyItem|ownedRelationship+=InitialNodeMember(ownedRelationship+=ActionTargetSuccessionMember)*|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=ActionBehaviorMember(ownedRelationship+=ActionTargetSuccessionMember)*|ownedRelationship+=GuardedSuccessionMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildActionBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, int elementIndex, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule StateBodyItem + /// StateBodyItem:Type=NonBehaviorBodyItem|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=BehaviorUsageMember(ownedRelationship+=TargetTransitionUsageMember)*|ownedRelationship+=TransitionUsageMember|ownedRelationship+=EntryActionMember(ownedRelationship+=EntryTransitionMember)*|ownedRelationship+=DoActionMember|ownedRelationship+=ExitActionMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildStateBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, int elementIndex, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule CalculationBody + /// CalculationBody:Type=';'|'{'CalculationBodyPart'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCalculationBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule CalculationBodyPart + /// CalculationBodyPart:Type=CalculationBodyItem*(ownedRelationship+=ResultExpressionMember)? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCalculationBodyPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfResultExpressionMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = BuildCalculationBodyItem(poco, ownedRelationshipIndex, stringBuilder); + } + + if (ownedRelationshipOfResultExpressionMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfResultExpressionMembershipIterator.Current != null) + { + ResultExpressionMembershipTextualNotationBuilder.BuildResultExpressionMember(ownedRelationshipOfResultExpressionMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append(' '); + } + + + } + + /// + /// Builds the Textual Notation string for the rule CalculationBodyItem + /// CalculationBodyItem:Type=ActionBodyItem|ownedRelationship+=ReturnParameterMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildCalculationBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, int elementIndex, StringBuilder stringBuilder) + { + var elementsElement = poco.OwnedRelationship[elementIndex]; + + switch (elementsElement) + { + case SysML2.NET.Core.POCO.Kernel.Functions.ReturnParameterMembership returnParameterMembership: + ReturnParameterMembershipTextualNotationBuilder.BuildReturnParameterMember(returnParameterMembership, stringBuilder); break; + case SysML2.NET.Core.POCO.Core.Types.IType type: + elementIndex = BuildActionBodyItem(type, elementIndex, stringBuilder); + break; + + } + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule RequirementBody + /// RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRequirementBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule RequirementBodyItem + /// RequirementBodyItem:Type=DefinitionBodyItem|ownedRelationship+=SubjectMember|ownedRelationship+=RequirementConstraintMember|ownedRelationship+=FramedConcernMember|ownedRelationship+=RequirementVerificationMember|ownedRelationship+=ActorMember|ownedRelationship+=StakeholderMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildRequirementBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, int elementIndex, StringBuilder stringBuilder) + { + var elementsElement = poco.OwnedRelationship[elementIndex]; + + switch (elementsElement) + { + case SysML2.NET.Core.POCO.Systems.Requirements.SubjectMembership subjectMembership: + SubjectMembershipTextualNotationBuilder.BuildSubjectMember(subjectMembership, stringBuilder); break; + case SysML2.NET.Core.POCO.Systems.Requirements.RequirementConstraintMembership requirementConstraintMembership: + RequirementConstraintMembershipTextualNotationBuilder.BuildRequirementConstraintMember(requirementConstraintMembership, stringBuilder); break; + case SysML2.NET.Core.POCO.Systems.Requirements.FramedConcernMembership framedConcernMembership: + FramedConcernMembershipTextualNotationBuilder.BuildFramedConcernMember(framedConcernMembership, stringBuilder); break; + case SysML2.NET.Core.POCO.Systems.VerificationCases.RequirementVerificationMembership requirementVerificationMembership: + RequirementVerificationMembershipTextualNotationBuilder.BuildRequirementVerificationMember(requirementVerificationMembership, stringBuilder); break; + case SysML2.NET.Core.POCO.Systems.Requirements.ActorMembership actorMembership: + ActorMembershipTextualNotationBuilder.BuildActorMember(actorMembership, stringBuilder); break; + case SysML2.NET.Core.POCO.Systems.Requirements.StakeholderMembership stakeholderMembership: + StakeholderMembershipTextualNotationBuilder.BuildStakeholderMember(stakeholderMembership, stringBuilder); break; + case SysML2.NET.Core.POCO.Core.Types.IType type: + elementIndex = BuildDefinitionBodyItem(type, elementIndex, stringBuilder); + break; + + } + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule CaseBody + /// CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCaseBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule CaseBodyItem + /// CaseBodyItem:Type=ActionBodyItem|ownedRelationship+=SubjectMember|ownedRelationship+=ActorMember|ownedRelationship+=ObjectiveMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildCaseBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, int elementIndex, StringBuilder stringBuilder) + { + var elementsElement = poco.OwnedRelationship[elementIndex]; + + switch (elementsElement) + { + case SysML2.NET.Core.POCO.Systems.Requirements.SubjectMembership subjectMembership: + SubjectMembershipTextualNotationBuilder.BuildSubjectMember(subjectMembership, stringBuilder); break; + case SysML2.NET.Core.POCO.Systems.Requirements.ActorMembership actorMembership: + ActorMembershipTextualNotationBuilder.BuildActorMember(actorMembership, stringBuilder); break; + case SysML2.NET.Core.POCO.Systems.Cases.ObjectiveMembership objectiveMembership: + ObjectiveMembershipTextualNotationBuilder.BuildObjectiveMember(objectiveMembership, stringBuilder); break; + case SysML2.NET.Core.POCO.Core.Types.IType type: + elementIndex = BuildActionBodyItem(type, elementIndex, stringBuilder); + break; + + } + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule MetadataBody + /// MetadataBody:Type=';'|'{'(ownedRelationship+=DefinitionMember|ownedRelationship+=MetadataBodyUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import)*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule TypePrefix + /// TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypePrefix(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (poco.IsAbstract) + { + stringBuilder.Append(" abstract "); + stringBuilder.Append(' '); + } + + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule TypeDeclaration + /// TypeDeclaration:Type=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SpecializationPart|ConjugationPart)+TypeRelationshipPart* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypeDeclaration(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (poco.IsSufficient) + { + stringBuilder.Append(" all "); + stringBuilder.Append(' '); + } + + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildOwnedMultiplicity(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append(' '); + } + + // Have to handle group collection + stringBuilder.Append(' '); + // Handle collection Non Terminal + BuildTypeRelationshipPartInternal(poco, stringBuilder); BuildTypeRelationshipPart(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule SpecializationPart + /// SpecializationPart:Type=SPECIALIZESownedRelationship+=OwnedSpecialization(','ownedRelationship+=OwnedSpecialization)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSpecializationPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfSpecializationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append(" :> "); + ownedRelationshipOfSpecializationIterator.MoveNext(); + + if (ownedRelationshipOfSpecializationIterator.Current != null) + { + SpecializationTextualNotationBuilder.BuildOwnedSpecialization(ownedRelationshipOfSpecializationIterator.Current, stringBuilder); + } + + while (ownedRelationshipOfSpecializationIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfSpecializationIterator.Current != null) + { + SpecializationTextualNotationBuilder.BuildOwnedSpecialization(ownedRelationshipOfSpecializationIterator.Current, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule ConjugationPart + /// ConjugationPart:Type=CONJUGATESownedRelationship+=OwnedConjugation + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConjugationPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfConjugationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append(" ~ "); + ownedRelationshipOfConjugationIterator.MoveNext(); + + if (ownedRelationshipOfConjugationIterator.Current != null) + { + ConjugationTextualNotationBuilder.BuildOwnedConjugation(ownedRelationshipOfConjugationIterator.Current, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule TypeRelationshipPart + /// TypeRelationshipPart:Type=DisjoiningPart|UnioningPart|IntersectingPart|DifferencingPart + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypeRelationshipPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule DisjoiningPart + /// DisjoiningPart:Type='disjoint''from'ownedRelationship+=OwnedDisjoining(','ownedRelationship+=OwnedDisjoining)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDisjoiningPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfDisjoiningIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("disjoint "); + stringBuilder.Append("from "); + ownedRelationshipOfDisjoiningIterator.MoveNext(); + + if (ownedRelationshipOfDisjoiningIterator.Current != null) + { + DisjoiningTextualNotationBuilder.BuildOwnedDisjoining(ownedRelationshipOfDisjoiningIterator.Current, stringBuilder); + } + + while (ownedRelationshipOfDisjoiningIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfDisjoiningIterator.Current != null) + { + DisjoiningTextualNotationBuilder.BuildOwnedDisjoining(ownedRelationshipOfDisjoiningIterator.Current, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule UnioningPart + /// UnioningPart:Type='unions'ownedRelationship+=Unioning(','ownedRelationship+=Unioning)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUnioningPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfUnioningIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("unions "); + ownedRelationshipOfUnioningIterator.MoveNext(); + + if (ownedRelationshipOfUnioningIterator.Current != null) + { + UnioningTextualNotationBuilder.BuildUnioning(ownedRelationshipOfUnioningIterator.Current, 0, stringBuilder); + } + + while (ownedRelationshipOfUnioningIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfUnioningIterator.Current != null) + { + UnioningTextualNotationBuilder.BuildUnioning(ownedRelationshipOfUnioningIterator.Current, 0, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule IntersectingPart + /// IntersectingPart:Type='intersects'ownedRelationship+=Intersecting(','ownedRelationship+=Intersecting)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildIntersectingPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfIntersectingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("intersects "); + ownedRelationshipOfIntersectingIterator.MoveNext(); + + if (ownedRelationshipOfIntersectingIterator.Current != null) + { + IntersectingTextualNotationBuilder.BuildIntersecting(ownedRelationshipOfIntersectingIterator.Current, 0, stringBuilder); + } + + while (ownedRelationshipOfIntersectingIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfIntersectingIterator.Current != null) + { + IntersectingTextualNotationBuilder.BuildIntersecting(ownedRelationshipOfIntersectingIterator.Current, 0, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule DifferencingPart + /// DifferencingPart:Type='differences'ownedRelationship+=Differencing(','ownedRelationship+=Differencing)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDifferencingPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfDifferencingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("differences "); + ownedRelationshipOfDifferencingIterator.MoveNext(); + + if (ownedRelationshipOfDifferencingIterator.Current != null) + { + DifferencingTextualNotationBuilder.BuildDifferencing(ownedRelationshipOfDifferencingIterator.Current, 0, stringBuilder); + } + + while (ownedRelationshipOfDifferencingIterator.MoveNext()) + { + stringBuilder.Append(","); + + if (ownedRelationshipOfDifferencingIterator.Current != null) + { + DifferencingTextualNotationBuilder.BuildDifferencing(ownedRelationshipOfDifferencingIterator.Current, 0, stringBuilder); + } + + } + + } + + /// + /// Builds the Textual Notation string for the rule TypeBody + /// TypeBody:Type=';'|'{'TypeBodyElement*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypeBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule TypeBodyElement + /// TypeBodyElement:Type=ownedRelationship+=NonFeatureMember|ownedRelationship+=FeatureMember|ownedRelationship+=AliasMember|ownedRelationship+=Import + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildTypeBodyElement(SysML2.NET.Core.POCO.Core.Types.IType poco, int elementIndex, StringBuilder stringBuilder) + { + switch (elementInOwnedRelationship) + { + case SysML2.NET.Core.POCO.Root.Namespaces.OwningMembership owningMembership when owningMembership.IsValidForNonFeatureMember(): + OwningMembershipTextualNotationBuilder.BuildNonFeatureMember(owningMembership, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.OwningMembership owningMembership when owningMembership.IsValidForFeatureMember(): + OwningMembershipTextualNotationBuilder.BuildFeatureMember(owningMembership, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.Membership membership: + MembershipTextualNotationBuilder.BuildAliasMember(membership, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.IImport import: + ImportTextualNotationBuilder.BuildImport(import, stringBuilder); + break; + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule FunctionBody + /// FunctionBody:Type=';'|'{'FunctionBodyPart'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunctionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule FunctionBodyPart + /// FunctionBodyPart:Type=(TypeBodyElement|ownedRelationship+=ReturnFeatureMember)*(ownedRelationship+=ResultExpressionMember)? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunctionBodyPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfResultExpressionMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + // Have to handle group collection + + if (ownedRelationshipOfResultExpressionMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfResultExpressionMembershipIterator.Current != null) + { + ResultExpressionMembershipTextualNotationBuilder.BuildResultExpressionMember(ownedRelationshipOfResultExpressionMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append(' '); + } + + + } + + /// + /// Builds the Textual Notation string for the rule InstantiatedTypeReference + /// InstantiatedTypeReference:Type=[QualifiedName] + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInstantiatedTypeReference(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + stringBuilder.Append(poco.qualifiedName); + stringBuilder.Append(' '); + + } + + /// + /// Builds the Textual Notation string for the rule Type + /// Type=TypePrefix'type'TypeDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildType(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + BuildTypePrefix(poco, stringBuilder); + stringBuilder.Append("type "); + BuildTypeDeclaration(poco, stringBuilder); + BuildTypeBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs new file mode 100644 index 000000000..73c1d403b --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs @@ -0,0 +1,73 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class UnioningTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Unioning + /// Unioning=unioningType=[QualifiedName]|ownedRelatedElement+=OwnedFeatureChain + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildUnioning(SysML2.NET.Core.POCO.Core.Types.IUnioning poco, int elementIndex, StringBuilder stringBuilder) + { + if (poco.UnioningType != null) + { + stringBuilder.Append(poco.UnioningType.qualifiedName); + stringBuilder.Append(' '); + } + else + { + if (elementIndex < poco.OwnedRelatedElement.Count) + { + var elementForOwnedRelatedElement = poco.OwnedRelatedElement[elementIndex]; + + if (elementForOwnedRelatedElement is SysML2.NET.Core.POCO.Core.Features.IFeature elementAsFeature) + { + FeatureTextualNotationBuilder.BuildOwnedFeatureChain(elementAsFeature, stringBuilder); + } + } + } + + return elementIndex; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs new file mode 100644 index 000000000..4742b7b23 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs @@ -0,0 +1,420 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class UsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule UsageElement + /// UsageElement:Usage=NonOccurrenceUsageElement|OccurrenceUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule RefPrefix + /// RefPrefix:Usage=(direction=FeatureDirection)?(isDerived?='derived')?(isAbstract?='abstract'|isVariation?='variation')?(isConstant?='constant')? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRefPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + + if (poco.Direction.HasValue) + { + stringBuilder.Append(poco.Direction.ToString().ToLower()); + stringBuilder.Append(' '); + } + + + if (poco.IsDerived) + { + stringBuilder.Append(" derived "); + stringBuilder.Append(' '); + } + + if (poco.IsAbstract) + { + stringBuilder.Append(" abstract "); + } + else if (poco.IsVariation) + { + stringBuilder.Append(" variation "); + } + + + if (poco.IsConstant) + { + stringBuilder.Append(" constant "); + stringBuilder.Append(' '); + } + + + } + + /// + /// Builds the Textual Notation string for the rule BasicUsagePrefix + /// BasicUsagePrefix:Usage=RefPrefix(isReference?='ref')? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBasicUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + BuildRefPrefix(poco, stringBuilder); + + if (poco.isReference) + { + stringBuilder.Append(" ref "); + stringBuilder.Append(' '); + } + + + } + + /// + /// Builds the Textual Notation string for the rule EndUsagePrefix + /// EndUsagePrefix:Usage=isEnd?='end'(ownedRelationship+=OwnedCrossFeatureMember)? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEndUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + if (poco.IsEnd) + { + stringBuilder.Append(" end "); + } + + if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildOwnedCrossFeatureMember(ownedRelationshipOfOwningMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append(' '); + } + + + } + + /// + /// Builds the Textual Notation string for the rule UsageExtensionKeyword + /// UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildUsageExtensionKeyword(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, int elementIndex, StringBuilder stringBuilder) + { + if (elementIndex < poco.OwnedRelationship.Count) + { + var elementForOwnedRelationship = poco.OwnedRelationship[elementIndex]; + + if (elementForOwnedRelationship is SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership elementAsOwningMembership) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(elementAsOwningMembership, stringBuilder); + } + } + + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule UnextendedUsagePrefix + /// UnextendedUsagePrefix:Usage=EndUsagePrefix|BasicUsagePrefix + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUnextendedUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule UsagePrefix + /// UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + BuildUnextendedUsagePrefix(poco, stringBuilder); + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = BuildUsageExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule UsageDeclaration + /// UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUsageDeclaration(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + FeatureTextualNotationBuilder.BuildFeatureSpecializationPart(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule UsageCompletion + /// UsageCompletion:Usage=ValuePart?UsageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUsageCompletion(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + BuildUsageBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule UsageBody + /// UsageBody:Usage=DefinitionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUsageBody(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + TypeTextualNotationBuilder.BuildDefinitionBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule NonOccurrenceUsageElement + /// NonOccurrenceUsageElement:Usage=DefaultReferenceUsage|ReferenceUsage|AttributeUsage|EnumerationUsage|BindingConnectorAsUsage|SuccessionAsUsage|ExtendedUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNonOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule OccurrenceUsageElement + /// OccurrenceUsageElement:Usage=StructureUsageElement|BehaviorUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule StructureUsageElement + /// StructureUsageElement:Usage=OccurrenceUsage|IndividualUsage|PortionUsage|EventOccurrenceUsage|ItemUsage|PartUsage|ViewUsage|RenderingUsage|PortUsage|ConnectionUsage|InterfaceUsage|AllocationUsage|Message|FlowUsage|SuccessionFlowUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStructureUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule BehaviorUsageElement + /// BehaviorUsageElement:Usage=ActionUsage|CalculationUsage|StateUsage|ConstraintUsage|RequirementUsage|ConcernUsage|CaseUsage|AnalysisCaseUsage|VerificationCaseUsage|UseCaseUsage|ViewpointUsage|PerformActionUsage|ExhibitStateUsage|IncludeUseCaseUsage|AssertConstraintUsage|SatisfyRequirementUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBehaviorUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Systems.Calculations.CalculationUsage pocoCalculationUsage: + CalculationUsageTextualNotationBuilder.BuildCalculationUsage(pocoCalculationUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.States.StateUsage pocoStateUsage: + StateUsageTextualNotationBuilder.BuildStateUsage(pocoStateUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Actions.ActionUsage pocoActionUsage: + ActionUsageTextualNotationBuilder.BuildActionUsage(pocoActionUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Requirements.ConcernUsage pocoConcernUsage: + ConcernUsageTextualNotationBuilder.BuildConcernUsage(pocoConcernUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Requirements.RequirementUsage pocoRequirementUsage: + RequirementUsageTextualNotationBuilder.BuildRequirementUsage(pocoRequirementUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Constraints.ConstraintUsage pocoConstraintUsage: + ConstraintUsageTextualNotationBuilder.BuildConstraintUsage(pocoConstraintUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.AnalysisCases.AnalysisCaseUsage pocoAnalysisCaseUsage: + AnalysisCaseUsageTextualNotationBuilder.BuildAnalysisCaseUsage(pocoAnalysisCaseUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.VerificationCases.VerificationCaseUsage pocoVerificationCaseUsage: + VerificationCaseUsageTextualNotationBuilder.BuildVerificationCaseUsage(pocoVerificationCaseUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.UseCases.UseCaseUsage pocoUseCaseUsage: + UseCaseUsageTextualNotationBuilder.BuildUseCaseUsage(pocoUseCaseUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Cases.CaseUsage pocoCaseUsage: + CaseUsageTextualNotationBuilder.BuildCaseUsage(pocoCaseUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Views.ViewpointUsage pocoViewpointUsage: + ViewpointUsageTextualNotationBuilder.BuildViewpointUsage(pocoViewpointUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.States.ExhibitStateUsage pocoExhibitStateUsage: + ExhibitStateUsageTextualNotationBuilder.BuildExhibitStateUsage(pocoExhibitStateUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.UseCases.IncludeUseCaseUsage pocoIncludeUseCaseUsage: + IncludeUseCaseUsageTextualNotationBuilder.BuildIncludeUseCaseUsage(pocoIncludeUseCaseUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Actions.PerformActionUsage pocoPerformActionUsage: + PerformActionUsageTextualNotationBuilder.BuildPerformActionUsage(pocoPerformActionUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Requirements.SatisfyRequirementUsage pocoSatisfyRequirementUsage: + SatisfyRequirementUsageTextualNotationBuilder.BuildSatisfyRequirementUsage(pocoSatisfyRequirementUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Constraints.AssertConstraintUsage pocoAssertConstraintUsage: + AssertConstraintUsageTextualNotationBuilder.BuildAssertConstraintUsage(pocoAssertConstraintUsage, stringBuilder); + break; + } + + } + + /// + /// Builds the Textual Notation string for the rule VariantUsageElement + /// VariantUsageElement:Usage=VariantReference|ReferenceUsage|AttributeUsage|BindingConnectorAsUsage|SuccessionAsUsage|OccurrenceUsage|IndividualUsage|PortionUsage|EventOccurrenceUsage|ItemUsage|PartUsage|ViewUsage|RenderingUsage|PortUsage|ConnectionUsage|InterfaceUsage|AllocationUsage|Message|FlowUsage|SuccessionFlowUsage|BehaviorUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildVariantUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule InterfaceNonOccurrenceUsageElement + /// InterfaceNonOccurrenceUsageElement:Usage=ReferenceUsage|AttributeUsage|EnumerationUsage|BindingConnectorAsUsage|SuccessionAsUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceNonOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + switch (poco) + { + case SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.ReferenceUsage pocoReferenceUsage: + ReferenceUsageTextualNotationBuilder.BuildReferenceUsage(pocoReferenceUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Enumerations.EnumerationUsage pocoEnumerationUsage: + EnumerationUsageTextualNotationBuilder.BuildEnumerationUsage(pocoEnumerationUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Attributes.AttributeUsage pocoAttributeUsage: + AttributeUsageTextualNotationBuilder.BuildAttributeUsage(pocoAttributeUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Connections.BindingConnectorAsUsage pocoBindingConnectorAsUsage: + BindingConnectorAsUsageTextualNotationBuilder.BuildBindingConnectorAsUsage(pocoBindingConnectorAsUsage, stringBuilder); + break; + case SysML2.NET.Core.POCO.Systems.Connections.SuccessionAsUsage pocoSuccessionAsUsage: + SuccessionAsUsageTextualNotationBuilder.BuildSuccessionAsUsage(pocoSuccessionAsUsage, stringBuilder); + break; + } + + } + + /// + /// Builds the Textual Notation string for the rule InterfaceOccurrenceUsageElement + /// InterfaceOccurrenceUsageElement:Usage=DefaultInterfaceEnd|StructureUsageElement|BehaviorUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule ActionTargetSuccession + /// ActionTargetSuccession:Usage=(TargetSuccession|GuardedTargetSuccession|DefaultTargetSuccession)UsageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionTargetSuccession(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives with same referenced rule type not implemented yet"); + stringBuilder.Append(' '); + BuildUsageBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule ExtendedUsage + /// ExtendedUsage:Usage=UnextendedUsagePrefixUsageExtensionKeyword+Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExtendedUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + BuildUnextendedUsagePrefix(poco, stringBuilder); + // Handle collection Non Terminal + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < poco.OwnedRelationship.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = BuildUsageExtensionKeyword(poco, ownedRelationshipIndex, stringBuilder); + } + BuildUsage(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule Usage + /// Usage=UsageDeclarationUsageCompletion + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + BuildUsageDeclaration(poco, stringBuilder); + BuildUsageCompletion(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..2bff9828b --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs @@ -0,0 +1,58 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class UseCaseDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule UseCaseDefinition + /// UseCaseDefinition=OccurrenceDefinitionPrefix'use''case''def'DefinitionDeclarationCaseBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUseCaseDefinition(SysML2.NET.Core.POCO.Systems.UseCases.IUseCaseDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("use "); + stringBuilder.Append("case "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..db106a747 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs @@ -0,0 +1,59 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class UseCaseUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule UseCaseUsage + /// UseCaseUsage=OccurrenceUsagePrefix'use''case'ConstraintUsageDeclarationCaseBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUseCaseUsage(SysML2.NET.Core.POCO.Systems.UseCases.IUseCaseUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("use "); + stringBuilder.Append("case "); + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..779cd53e0 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs @@ -0,0 +1,78 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class VariantMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule VariantUsageMember + /// VariantUsageMember:VariantMembership=MemberPrefix'variant'ownedVariantUsage=VariantUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildVariantUsageMember(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IVariantMembership poco, StringBuilder stringBuilder) + { + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("variant "); + + if (poco.ownedVariantUsage != null) + { + UsageTextualNotationBuilder.BuildVariantUsageElement(poco.ownedVariantUsage, stringBuilder); + } + + } + + /// + /// Builds the Textual Notation string for the rule EnumerationUsageMember + /// EnumerationUsageMember:VariantMembership=MemberPrefixownedRelatedElement+=EnumeratedValue + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEnumerationUsageMember(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IVariantMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfEnumerationUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + ownedRelatedElementOfEnumerationUsageIterator.MoveNext(); + + if (ownedRelatedElementOfEnumerationUsageIterator.Current != null) + { + EnumerationUsageTextualNotationBuilder.BuildEnumeratedValue(ownedRelatedElementOfEnumerationUsageIterator.Current, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..18c99b5c8 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class VerificationCaseDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule VerificationCaseDefinition + /// VerificationCaseDefinition=OccurrenceDefinitionPrefix'verification''def'DefinitionDeclarationCaseBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildVerificationCaseDefinition(SysML2.NET.Core.POCO.Systems.VerificationCases.IVerificationCaseDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("verification "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..8ac0c4778 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs @@ -0,0 +1,58 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class VerificationCaseUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule VerificationCaseUsage + /// VerificationCaseUsage=OccurrenceUsagePrefix'verification'ConstraintUsageDeclarationCaseBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildVerificationCaseUsage(SysML2.NET.Core.POCO.Systems.VerificationCases.IVerificationCaseUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("verification "); + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..4f3c2bdec --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs @@ -0,0 +1,95 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ViewDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ViewDefinitionBody + /// ViewDefinitionBody:ViewDefinition=';'|'{'ViewDefinitionBodyItem*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewDefinitionBody(SysML2.NET.Core.POCO.Systems.Views.IViewDefinition poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule ViewDefinitionBodyItem + /// ViewDefinitionBodyItem:ViewDefinition=DefinitionBodyItem|ownedRelationship+=ElementFilterMember|ownedRelationship+=ViewRenderingMember + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildViewDefinitionBodyItem(SysML2.NET.Core.POCO.Systems.Views.IViewDefinition poco, int elementIndex, StringBuilder stringBuilder) + { + var elementsElement = poco.OwnedRelationship[elementIndex]; + + switch (elementsElement) + { + case SysML2.NET.Core.POCO.Kernel.Packages.ElementFilterMembership elementFilterMembership: + ElementFilterMembershipTextualNotationBuilder.BuildElementFilterMember(elementFilterMembership, stringBuilder); break; + case SysML2.NET.Core.POCO.Systems.Views.ViewRenderingMembership viewRenderingMembership: + ViewRenderingMembershipTextualNotationBuilder.BuildViewRenderingMember(viewRenderingMembership, stringBuilder); break; + case SysML2.NET.Core.POCO.Core.Types.IType type: + elementIndex = TypeTextualNotationBuilder.BuildDefinitionBodyItem(type, elementIndex, stringBuilder); + break; + + } + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule ViewDefinition + /// ViewDefinition=OccurrenceDefinitionPrefix'view''def'DefinitionDeclarationViewDefinitionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewDefinition(SysML2.NET.Core.POCO.Systems.Views.IViewDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("view "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + BuildViewDefinitionBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..9a42180b5 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs @@ -0,0 +1,61 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ViewRenderingMembershipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ViewRenderingMember + /// ViewRenderingMember:ViewRenderingMembership=MemberPrefix'render'ownedRelatedElement+=ViewRenderingUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewRenderingMember(SysML2.NET.Core.POCO.Systems.Views.IViewRenderingMembership poco, StringBuilder stringBuilder) + { + using var ownedRelatedElementOfRenderingUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("render "); + ownedRelatedElementOfRenderingUsageIterator.MoveNext(); + + if (ownedRelatedElementOfRenderingUsageIterator.Current != null) + { + RenderingUsageTextualNotationBuilder.BuildViewRenderingUsage(ownedRelatedElementOfRenderingUsageIterator.Current, 0, stringBuilder); + } + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..6b0343cb5 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs @@ -0,0 +1,97 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ViewUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ViewBody + /// ViewBody:ViewUsage=';'|'{'ViewBodyItem*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewBody(SysML2.NET.Core.POCO.Systems.Views.IViewUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule ViewBodyItem + /// ViewBodyItem:ViewUsage=DefinitionBodyItem|ownedRelationship+=ElementFilterMember|ownedRelationship+=ViewRenderingMember|ownedRelationship+=Expose + /// + /// The from which the rule should be build + /// The index of the to process inside the collection + /// The that contains the entire textual notation + /// The index of the next to be processed inside the collection + public static int BuildViewBodyItem(SysML2.NET.Core.POCO.Systems.Views.IViewUsage poco, int elementIndex, StringBuilder stringBuilder) + { + var elementsElement = poco.OwnedRelationship[elementIndex]; + + switch (elementsElement) + { + case SysML2.NET.Core.POCO.Kernel.Packages.ElementFilterMembership elementFilterMembership: + ElementFilterMembershipTextualNotationBuilder.BuildElementFilterMember(elementFilterMembership, stringBuilder); break; + case SysML2.NET.Core.POCO.Systems.Views.ViewRenderingMembership viewRenderingMembership: + ViewRenderingMembershipTextualNotationBuilder.BuildViewRenderingMember(viewRenderingMembership, stringBuilder); break; + case SysML2.NET.Core.POCO.Systems.Views.IExpose expose: + ExposeTextualNotationBuilder.BuildExpose(expose, stringBuilder); break; + case SysML2.NET.Core.POCO.Core.Types.IType type: + elementIndex = TypeTextualNotationBuilder.BuildDefinitionBodyItem(type, elementIndex, stringBuilder); + break; + + } + return elementIndex; + } + + /// + /// Builds the Textual Notation string for the rule ViewUsage + /// ViewUsage=OccurrenceUsagePrefix'view'UsageDeclaration?ValuePart?ViewBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewUsage(SysML2.NET.Core.POCO.Systems.Views.IViewUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("view "); + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + FeatureTextualNotationBuilder.BuildValuePart(poco, 0, stringBuilder); + BuildViewBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..ed73cc1fc --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ViewpointDefinitionTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ViewpointDefinition + /// ViewpointDefinition=OccurrenceDefinitionPrefix'viewpoint''def'DefinitionDeclarationRequirementBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewpointDefinition(SysML2.NET.Core.POCO.Systems.Views.IViewpointDefinition poco, StringBuilder stringBuilder) + { + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); + stringBuilder.Append("viewpoint "); + stringBuilder.Append("def "); + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..58d03e70d --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ViewpointUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ViewpointUsage + /// ViewpointUsage=OccurrenceUsagePrefix'viewpoint'ConstraintUsageDeclarationRequirementBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewpointUsage(SysML2.NET.Core.POCO.Systems.Views.IViewpointUsage poco, StringBuilder stringBuilder) + { + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("viewpoint "); + ConstraintUsageTextualNotationBuilder.BuildConstraintUsageDeclaration(poco, stringBuilder); + TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VisibilityKindTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VisibilityKindTextualNotationBuilder.cs new file mode 100644 index 000000000..da48d0a7d --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VisibilityKindTextualNotationBuilder.cs @@ -0,0 +1,52 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class VisibilityKindTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule VisibilityIndicator + /// VisibilityIndicator:VisibilityKind='public'|'private'|'protected' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildVisibilityIndicator(SysML2.NET.Core.Root.Namespaces.VisibilityKind poco, StringBuilder stringBuilder) + { + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..b8688b8e4 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs @@ -0,0 +1,75 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class WhileLoopActionUsageTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule WhileLoopNode + /// WhileLoopNode:WhileLoopActionUsage=ActionNodePrefix('while'ownedRelationship+=ExpressionParameterMember|'loop'ownedRelationship+=EmptyParameterMember)ownedRelationship+=ActionBodyParameterMember('until'ownedRelationship+=ExpressionParameterMember';')? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildWhileLoopNode(SysML2.NET.Core.POCO.Systems.Actions.IWhileLoopActionUsage poco, StringBuilder stringBuilder) + { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, stringBuilder); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildActionBodyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + + if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) + { + stringBuilder.Append("until "); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildExpressionParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, 0, stringBuilder); + } + stringBuilder.Append(";"); + stringBuilder.Append(' '); + } + + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/BindingConnectorAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/BindingConnectorAsUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..448b9cf43 --- /dev/null +++ b/SysML2.NET/TextualNotation/BindingConnectorAsUsageTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.Connections; + + /// + /// Hand-coded part of the + /// + public static partial class BindingConnectorAsUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the BindingConnectorAsUsage rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForBindingConnectorAsUsage(IBindingConnectorAsUsage poco) + { + return CommonTextualNotationBuilder.DoesDefinesUsageDeclaration(poco); + } + } +} diff --git a/SysML2.NET/TextualNotation/CollectionCursor.cs b/SysML2.NET/TextualNotation/CollectionCursor.cs new file mode 100644 index 000000000..098c44e44 --- /dev/null +++ b/SysML2.NET/TextualNotation/CollectionCursor.cs @@ -0,0 +1,121 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System; + using System.Collections.Generic; + + /// + /// Represents a cursor over a read-only collection that allows sequential, + /// forward-only traversal of elements. This class is primarily used to + /// simulate grammar-driven consumption of elements. + /// + /// The type of elements in the collection. + public class CollectionCursor where T : class + { + /// + /// Gets the collection that is currently traversed. + /// + private readonly IReadOnlyList elements; + + /// + /// Gets the value of the current index. + /// + private int index; + + /// + /// Initializes a new instance of the class. + /// + /// The collection to iterate over. + public CollectionCursor(IReadOnlyList elements) + { + this.elements = elements ?? throw new ArgumentNullException(nameof(elements)); + } + + /// + /// Gets the current element at the cursor position. + /// Returns default if the cursor is out of range. + /// + public T Current => this.GetCurrent(this.index); + + /// + /// Gets the element at a specific index without modifying the cursor position. + /// + /// The index to read from. + /// + /// The element at the given index, or default if the index is out of bounds. + /// + private T GetCurrent(int indexToUse) + { + return indexToUse >= this.elements.Count || indexToUse < 0 ? default : this.elements[indexToUse]; + } + + /// + /// Peeks ahead in the collection without advancing the cursor. + /// + /// + /// The number of positions to look ahead. Must be greater than or equal to zero. + /// + /// + /// The element located at the current index plus the specified offset, + /// or default if the resulting index is out of bounds. + /// + /// + /// Thrown when is negative. + /// + public T GetNext(int amount) + { + return amount < 0 ? throw new ArgumentException("Not able to get previous element in the collection") : this.GetCurrent(this.index + amount); + } + + /// + /// Advances the cursor to the next element in the collection. + /// + /// The amount to move-on the cursor position. + /// + /// true if the cursor successfully moved to the next element; + /// false if the end of the collection has been reached. + /// + public void Move(int amount = 1) + { + if (amount < 0) + { + throw new ArgumentOutOfRangeException(nameof(amount)); + } + + this.index = Math.Min(this.index + amount, this.elements.Count); + } + + /// + /// Tries to get the current element as . + /// + /// The retrieved element, if applicable + /// Any class inheriting from + /// + /// true if the could be assigned to + /// false otherwise + public bool TryGetCurrent(out TDerived value) where TDerived : class, T + { + value = this.Current as TDerived; + return value != null; + } + } +} diff --git a/SysML2.NET/TextualNotation/CommentTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/CommentTextualNotationBuilder.cs new file mode 100644 index 000000000..02fa70d24 --- /dev/null +++ b/SysML2.NET/TextualNotation/CommentTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Annotations; + + /// + /// Hand-coded part of the + /// + public static partial class CommentTextualNotationBuilder + { + /// + /// Builds the conditional part for the Comment rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForComment(IComment poco) + { + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco) || poco.ownedAnnotation.Count != 0; + } + } +} diff --git a/SysML2.NET/TextualNotation/CommonTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/CommonTextualNotationBuilder.cs new file mode 100644 index 000000000..08b21374f --- /dev/null +++ b/SysML2.NET/TextualNotation/CommonTextualNotationBuilder.cs @@ -0,0 +1,54 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Linq; + + using SysML2.NET.Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Core.POCO.Systems.DefinitionAndUsage; + + /// + /// Textual Notation Builder that provides common features, usable by others builder + /// + public static class CommonTextualNotationBuilder + { + /// + /// Asserts that an defines properties used by the Identification rule + /// + /// The + /// True if the or is defined + public static bool DoesDefinesIdentificationProperties(IElement poco) + { + return !string.IsNullOrWhiteSpace(poco.DeclaredName) || !string.IsNullOrWhiteSpace(poco.DeclaredShortName); + } + + /// + /// Asserts that an defines properties used by the UsageDeclaration rule + /// + /// The + /// True if respects the or have not empty + public static bool DoesDefinesUsageDeclaration(IElement poco) + { + return DoesDefinesIdentificationProperties(poco) || poco.OwnedRelationship.OfType().Any(); + } + } +} diff --git a/SysML2.NET/TextualNotation/ConjugatedPortTypingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/ConjugatedPortTypingTextualNotationBuilder.cs new file mode 100644 index 000000000..afe670ebf --- /dev/null +++ b/SysML2.NET/TextualNotation/ConjugatedPortTypingTextualNotationBuilder.cs @@ -0,0 +1,41 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Text; + + using SysML2.NET.Core.POCO.Systems.Ports; + + /// + /// Hand-coded part of the + /// + public static partial class ConjugatedPortTypingTextualNotationBuilder + { + /// + /// Build the originalPortDefinition=~[QualifiedName] rule part + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + private static void BuildOriginalPortDefinition(IConjugatedPortTyping poco, StringBuilder stringBuilder) + { + } + } +} diff --git a/SysML2.NET/TextualNotation/ConjugationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/ConjugationTextualNotationBuilder.cs new file mode 100644 index 000000000..cb62745fb --- /dev/null +++ b/SysML2.NET/TextualNotation/ConjugationTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Core.Types; + + /// + /// Hand-coded part of the + /// + public static partial class ConjugationTextualNotationBuilder + { + /// + /// Builds the conditional part for the Conjugation rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForConjugation(IConjugation poco) + { + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); + } + } +} diff --git a/SysML2.NET/TextualNotation/DependencyTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/DependencyTextualNotationBuilder.cs new file mode 100644 index 000000000..1c400c228 --- /dev/null +++ b/SysML2.NET/TextualNotation/DependencyTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Dependencies; + + /// + /// Hand-coded part of the + /// + public static partial class DependencyTextualNotationBuilder + { + /// + /// Builds the conditional part for the DependencyDeclaration rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForDependencyDeclaration(IDependency poco) + { + return poco.Client.Count != 0 && poco.Supplier.Count != 0; + } + } +} diff --git a/SysML2.NET/TextualNotation/DisjoiningTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/DisjoiningTextualNotationBuilder.cs new file mode 100644 index 000000000..6d39056b8 --- /dev/null +++ b/SysML2.NET/TextualNotation/DisjoiningTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Core.Types; + + /// + /// Hand-coded part of the + /// + public static partial class DisjoiningTextualNotationBuilder + { + /// + /// Builds the conditional part for the Disjoining rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForDisjoining(IDisjoining poco) + { + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); + } + } +} diff --git a/SysML2.NET/TextualNotation/FeatureInvertingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/FeatureInvertingTextualNotationBuilder.cs new file mode 100644 index 000000000..d4d7a919f --- /dev/null +++ b/SysML2.NET/TextualNotation/FeatureInvertingTextualNotationBuilder.cs @@ -0,0 +1,42 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Buffers; + + using SysML2.NET.Core.POCO.Core.Features; + + /// + /// Hand-coded part of the + /// + public static partial class FeatureInvertingTextualNotationBuilder + { + /// + /// Builds the conditional part for the FeatureInverting rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForFeatureInverting(IFeatureInverting poco) + { + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); + } + } +} diff --git a/SysML2.NET/TextualNotation/FeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/FeatureMembershipTextualNotationBuilder.cs new file mode 100644 index 000000000..e1c0ddbf1 --- /dev/null +++ b/SysML2.NET/TextualNotation/FeatureMembershipTextualNotationBuilder.cs @@ -0,0 +1,41 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Text; + + using SysML2.NET.Core.POCO.Core.Types; + + /// + /// Hand-coded part of the + /// + public static partial class FeatureMembershipTextualNotationBuilder + { + /// + /// Build the memberFeature=[QualifiedName] of the rule + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + private static void BuildMemberFeature(IFeatureMembership poco, StringBuilder stringBuilder) + { + } + } +} diff --git a/SysML2.NET/TextualNotation/InvocationExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/InvocationExpressionTextualNotationBuilder.cs new file mode 100644 index 000000000..8cd8fe575 --- /dev/null +++ b/SysML2.NET/TextualNotation/InvocationExpressionTextualNotationBuilder.cs @@ -0,0 +1,41 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Text; + + using SysML2.NET.Core.POCO.Kernel.Expressions; + + /// + /// Hand-coded part of the + /// + public static partial class InvocationExpressionTextualNotationBuilder + { + /// + /// Build the non-existing InvocationTypeMember rule + /// + /// The + /// The + private static void BuildInvocationTypeMember(InvocationExpression invocationExpression, StringBuilder stringBuilder) + { + } + } +} diff --git a/SysML2.NET/TextualNotation/LiteralExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/LiteralExpressionTextualNotationBuilder.cs new file mode 100644 index 000000000..c70afaab6 --- /dev/null +++ b/SysML2.NET/TextualNotation/LiteralExpressionTextualNotationBuilder.cs @@ -0,0 +1,41 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Text; + + using SysML2.NET.Core.POCO.Kernel.Expressions; + + /// + /// Hand-Coded part of the + /// + public static partial class LiteralExpressionTextualNotationBuilder + { + /// + /// Build the Value rule for real + /// + /// The + /// The + private static void BuildValue(ILiteralExpression poco, StringBuilder stringBuilder) + { + } + } +} diff --git a/SysML2.NET/TextualNotation/MetadataFeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/MetadataFeatureTextualNotationBuilder.cs new file mode 100644 index 000000000..e4f7f8f6c --- /dev/null +++ b/SysML2.NET/TextualNotation/MetadataFeatureTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Kernel.Metadata; + + /// + /// Hand-coded part of the + /// + public static partial class MetadataFeatureTextualNotationBuilder + { + /// + /// Builds the conditional part for the MetadataFeatureDeclaration rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForMetadataFeatureDeclaration(IMetadataFeature poco) + { + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); + } + } +} diff --git a/SysML2.NET/TextualNotation/MetadataUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/MetadataUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..dea71f2f3 --- /dev/null +++ b/SysML2.NET/TextualNotation/MetadataUsageTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.Metadata; + + /// + /// Hand-coded part of the + /// + public static partial class MetadataUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the MetadataUsageDeclaration rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForMetadataUsageDeclaration(IMetadataUsage poco) + { + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); + } + } +} diff --git a/SysML2.NET/TextualNotation/PackageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/PackageTextualNotationBuilder.cs new file mode 100644 index 000000000..0ea35d1e4 --- /dev/null +++ b/SysML2.NET/TextualNotation/PackageTextualNotationBuilder.cs @@ -0,0 +1,41 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Text; + + using SysML2.NET.Core.POCO.Kernel.Packages; + + /// + /// Hand-coded part of the + /// + public static partial class PackageTextualNotationBuilder + { + /// + /// Build the non-existing Filter Package import rule + /// + /// The package + /// The + private static void BuildFilterPackageImport(Package package, StringBuilder stringBuilder) + { + } + } +} diff --git a/SysML2.NET/TextualNotation/PerformActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/PerformActionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..eb43b430e --- /dev/null +++ b/SysML2.NET/TextualNotation/PerformActionUsageTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.Actions; + + /// + /// Hand-coded part of + /// + public static partial class PerformActionUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the TransitionPerformActionUsage rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForTransitionPerformActionUsage(IPerformActionUsage poco) + { + return poco.OwnedRelationship.Count != 0; + } + } +} diff --git a/SysML2.NET/TextualNotation/RedefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/RedefinitionTextualNotationBuilder.cs new file mode 100644 index 000000000..6386e12f3 --- /dev/null +++ b/SysML2.NET/TextualNotation/RedefinitionTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Core.Features; + + /// + /// Hand-coded part of the + /// + public static partial class RedefinitionTextualNotationBuilder + { + /// + /// Builds the conditional part for the Redefinition rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForRedefinition(IRedefinition poco) + { + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); + } + } +} diff --git a/SysML2.NET/TextualNotation/SendActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/SendActionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..3650ac5b7 --- /dev/null +++ b/SysML2.NET/TextualNotation/SendActionUsageTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.Actions; + + /// + /// Hand-coded part of the + /// + public static partial class SendActionUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the TransitionSendActionUsage rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForTransitionSendActionUsage(ISendActionUsage poco) + { + return poco.OwnedRelationship.Count != 0; + } + } +} diff --git a/SysML2.NET/TextualNotation/SpecializationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/SpecializationTextualNotationBuilder.cs new file mode 100644 index 000000000..2b9367b22 --- /dev/null +++ b/SysML2.NET/TextualNotation/SpecializationTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Core.Types; + + /// + /// Hand-coded part of the + /// + public static partial class SpecializationTextualNotationBuilder + { + /// + /// Builds the conditional part for the Specialization rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForSpecialization(ISpecialization poco) + { + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); + } + } +} diff --git a/SysML2.NET/TextualNotation/SubclassificationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/SubclassificationTextualNotationBuilder.cs new file mode 100644 index 000000000..ece869414 --- /dev/null +++ b/SysML2.NET/TextualNotation/SubclassificationTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Core.Classifiers; + + /// + /// Hand-coded part of the + /// + public static partial class SubclassificationTextualNotationBuilder + { + /// + /// Builds the conditional part for the Subclassification rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForSubclassification(ISubclassification poco) + { + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); + } + } +} diff --git a/SysML2.NET/TextualNotation/SubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/SubsettingTextualNotationBuilder.cs new file mode 100644 index 000000000..bda14aa07 --- /dev/null +++ b/SysML2.NET/TextualNotation/SubsettingTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Core.Features; + + /// + /// Hand-coded part of the + /// + public static partial class SubsettingTextualNotationBuilder + { + /// + /// Builds the conditional part for the Subsetting rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForSubsetting(ISubsetting poco) + { + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); + } + } +} diff --git a/SysML2.NET/TextualNotation/SuccessionAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/SuccessionAsUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..6881b77d1 --- /dev/null +++ b/SysML2.NET/TextualNotation/SuccessionAsUsageTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.Connections; + + /// + /// Hand-coded part of the + /// + public static partial class SuccessionAsUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the SuccessionAsUsage rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForSuccessionAsUsage(ISuccessionAsUsage poco) + { + return CommonTextualNotationBuilder.DoesDefinesUsageDeclaration(poco); + } + } +} diff --git a/SysML2.NET/TextualNotation/TextualRepresentationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/TextualRepresentationTextualNotationBuilder.cs new file mode 100644 index 000000000..ce7ea3e0e --- /dev/null +++ b/SysML2.NET/TextualNotation/TextualRepresentationTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Annotations; + + /// + /// Hand-coded part of the + /// + public static partial class TextualRepresentationTextualNotationBuilder + { + /// + /// Builds the conditional part for the TextualRepresentation rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForTextualRepresentation(ITextualRepresentation poco) + { + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); + } + } +} diff --git a/SysML2.NET/TextualNotation/TransitionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/TransitionUsageTextualNotationBuilder.cs new file mode 100644 index 000000000..f455d8b52 --- /dev/null +++ b/SysML2.NET/TextualNotation/TransitionUsageTextualNotationBuilder.cs @@ -0,0 +1,50 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.States; + + /// + /// Hand-coded part of the + /// + public static partial class TransitionUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the GuardedSuccession rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForGuardedSuccession(ITransitionUsage poco) + { + return CommonTextualNotationBuilder.DoesDefinesUsageDeclaration(poco); + } + + /// + /// Builds the conditional part for the TransitionUsage rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForTransitionUsage(ITransitionUsage poco) + { + return CommonTextualNotationBuilder.DoesDefinesUsageDeclaration(poco); + } + } +} diff --git a/SysML2.NET/TextualNotation/TypeFeaturingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/TypeFeaturingTextualNotationBuilder.cs new file mode 100644 index 000000000..570b7fbba --- /dev/null +++ b/SysML2.NET/TextualNotation/TypeFeaturingTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Core.Features; + + /// + /// Hand-coded part of the + /// + public static partial class TypeFeaturingTextualNotationBuilder + { + /// + /// Builds the conditional part for the TypeFeaturing rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForTypeFeaturing(ITypeFeaturing poco) + { + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); + } + } +} diff --git a/SysML2.NET/TextualNotation/TypeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/TypeTextualNotationBuilder.cs new file mode 100644 index 000000000..fdce017cf --- /dev/null +++ b/SysML2.NET/TextualNotation/TypeTextualNotationBuilder.cs @@ -0,0 +1,203 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Collections.Generic; + using System.Linq; + using System.Text; + + using SysML2.NET.Core.POCO.Core.Types; + using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Core.POCO.Systems.DefinitionAndUsage; + + /// + /// Hand-coded part of the + /// + public static partial class TypeTextualNotationBuilder + { + /// + /// Build the complex DefinitionBodyItem:Type=ownedRelationship+=DefinitionMember|ownedRelationship+=VariantUsageMember|ownedRelationship+=NonOccurrenceUsageMember|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=OccurrenceUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import rule + /// + /// The + /// The + internal static void BuildDefinitionBodyItemInternal(IType poco, StringBuilder stringBuilder) + { + var relationships = poco.OwnedRelationship.ToList(); + + for (var ownedRelationshipIndex = 0; ownedRelationshipIndex < relationships.Count; ownedRelationshipIndex++) + { + ownedRelationshipIndex = BuildDefinitionBodyItem(ownedRelationshipIndex, relationships, stringBuilder); + } + } + + /// + /// Build the logic for the DefinitionBodyItem:Type=ownedRelationship+=DefinitionMember|ownedRelationship+=VariantUsageMember|ownedRelationship+=NonOccurrenceUsageMember| + /// (ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=OccurrenceUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import rule + /// + /// The index of the inside the to process + /// A collection of to process + /// The + /// The current index that could have been modified during the process + internal static int BuildDefinitionBodyItem(int relationshipIndex, IReadOnlyList relationships, StringBuilder stringBuilder) + { + var ownedRelationship = relationships[relationshipIndex]; + + switch (ownedRelationship) + { + case OwningMembership owningMembership: + OwningMembershipTextualNotationBuilder.BuildDefinitionMember(owningMembership, stringBuilder); + break; + + case VariantMembership variantMembership: + VariantMembershipTextualNotationBuilder.BuildVariantUsageMember(variantMembership, stringBuilder); + break; + + case FeatureMembership featureMembershipForSuccession when featureMembershipForSuccession.IsValidForSourceSuccessionMember(): + { + var nextElement = relationshipIndex + 1 < relationships.Count ? relationships[relationshipIndex + 1] : null; + + if (nextElement is FeatureMembership featureMembership && featureMembership.IsValidForOccurrenceUsageMember()) + { + FeatureMembershipTextualNotationBuilder.BuildSourceSuccessionMember(featureMembershipForSuccession, stringBuilder); + FeatureMembershipTextualNotationBuilder.BuildOccurrenceUsageMember(featureMembership, stringBuilder); + return relationshipIndex + 1; + } + + break; + } + + case FeatureMembership featureMembershipForOccurenceUsageMember when featureMembershipForOccurenceUsageMember.IsValidForOccurrenceUsageMember(): + FeatureMembershipTextualNotationBuilder.BuildOccurrenceUsageMember(featureMembershipForOccurenceUsageMember, stringBuilder); + break; + + case FeatureMembership featureMembershipForNonOccurenceUsageMember when featureMembershipForNonOccurenceUsageMember.IsValidForNonOccurrenceUsageMember(): + FeatureMembershipTextualNotationBuilder.BuildNonOccurrenceUsageMember(featureMembershipForNonOccurenceUsageMember, stringBuilder); + break; + + case Membership membership: + MembershipTextualNotationBuilder.BuildAliasMember(membership, stringBuilder); + break; + + case IImport import: + ImportTextualNotationBuilder.BuildImport(import, stringBuilder); + break; + } + + return relationshipIndex; + } + + /// + /// Build the logic for the ActionBodyItem:Type=NonBehaviorBodyItem|ownedRelationship+=InitialNodeMember(ownedRelationship+=ActionTargetSuccessionMember)*|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=ActionBehaviorMember(ownedRelationship+=ActionTargetSuccessionMember)*|ownedRelationship+=GuardedSuccessionMember rule + /// + /// The index of the inside the to process + /// A collection of to process + /// The + /// The current index that could have been modified during the process + private static int BuildActionBodyItem(int relationshipIndex, List relationships, StringBuilder stringBuilder) + { + return relationshipIndex; + } + + /// + /// Build the logic for the NonBehaviorBodyItem =ownedRelationship+=Import|ownedRelationship+=AliasMember|ownedRelationship+=DefinitionMember|ownedRelationship+=VariantUsageMember|ownedRelationship+=NonOccurrenceUsageMember|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=StructureUsageMember rule + /// + /// The index of the inside the to process + /// A collection of to process + /// The + /// The current index that could have been modified during the process + private static int BuildNonBehaviorBodyItem(int relationshipIndex, List relationships, StringBuilder stringBuilder) + { + var elementInOwnedRelationship = relationships[relationshipIndex]; + + switch (elementInOwnedRelationship) + { + case IImport import: + ImportTextualNotationBuilder.BuildImport(import, stringBuilder); + break; + case Membership membership: + MembershipTextualNotationBuilder.BuildAliasMember(membership, stringBuilder); + break; + case OwningMembership owningMembership: + OwningMembershipTextualNotationBuilder.BuildDefinitionMember(owningMembership, stringBuilder); + break; + case VariantMembership variantMembership: + VariantMembershipTextualNotationBuilder.BuildVariantUsageMember(variantMembership, stringBuilder); + break; + + case FeatureMembership featureMembershipForSuccession when featureMembershipForSuccession.IsValidForSourceSuccessionMember(): + { + var nextElement = relationshipIndex + 1 < relationships.Count ? relationships[relationshipIndex + 1] : null; + + if (nextElement is FeatureMembership featureMembership && featureMembership.IsValidForStructureUsageMember()) + { + FeatureMembershipTextualNotationBuilder.BuildSourceSuccessionMember(featureMembershipForSuccession, stringBuilder); + FeatureMembershipTextualNotationBuilder.BuildStructureUsageMember(featureMembership, stringBuilder); + return relationshipIndex + 1; + } + + break; + } + + case FeatureMembership featureMembershipForOccurenceUsageMember when featureMembershipForOccurenceUsageMember.IsValidForStructureUsageMember(): + FeatureMembershipTextualNotationBuilder.BuildStructureUsageMember(featureMembershipForOccurenceUsageMember, stringBuilder); + break; + + case FeatureMembership featureMembershipForNonOccurenceUsageMember when featureMembershipForNonOccurenceUsageMember.IsValidForNonOccurrenceUsageMember(): + FeatureMembershipTextualNotationBuilder.BuildNonOccurrenceUsageMember(featureMembershipForNonOccurenceUsageMember, stringBuilder); + break; + } + + return relationshipIndex; + } + + /// + /// Build the logic for the ypeBodyElement:Type=ownedRelationship+=NonFeatureMember|ownedRelationship+=FeatureMember|ownedRelationship+=AliasMember|ownedRelationship+=Import rule + /// This implementation is a copy paste from the other one but required for Other rules + /// + /// The index of the inside the to process + /// A collection of to process + /// The + /// The current index that could have been modified during the process + private static int BuildTypeBodyElement(int relationshipIndex, List relationships, StringBuilder stringBuilder) + { + var elementInOwnedRelationship = relationships[relationshipIndex]; + + switch (elementInOwnedRelationship) + { + case SysML2.NET.Core.POCO.Root.Namespaces.OwningMembership owningMembership when owningMembership.IsValidForNonFeatureMember(): + OwningMembershipTextualNotationBuilder.BuildNonFeatureMember(owningMembership, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.OwningMembership owningMembership when owningMembership.IsValidForFeatureMember(): + OwningMembershipTextualNotationBuilder.BuildFeatureMember(owningMembership, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.Membership membership: + MembershipTextualNotationBuilder.BuildAliasMember(membership, stringBuilder); + break; + case SysML2.NET.Core.POCO.Root.Namespaces.IImport import: + ImportTextualNotationBuilder.BuildImport(import, stringBuilder); + break; + } + + return relationshipIndex; + } + } +}