Пример #1
0
		public virtual void ValidateConversionModelInfo(DslEditorModeling::ModelValidationContext context)
		{
			// validate required attribute HasModelChanged
			if( this.HasModelChanged == null )
			{
				context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.PDE.ModelingDSL.PDEModelingDSLValidationMessageIds.ConversionModelInfo_HasModelChanged, DslEditorModeling::ModelValidationViolationType.Error, "Property 'HasModelChanged' has no value although it is required", this));
			}
		}
Пример #2
0
 public virtual void ValidatePet(DslEditorModeling::ModelValidationContext context)
 {
     // validate required attribute Name
     if (System.String.IsNullOrEmpty(this.Name))
     {
         context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.FamilyTreeDSL.FamilyTreeDSLValidationMessageIds.Pet_Name, DslEditorModeling::ModelValidationViolationType.Error, "Property 'Name' has no value although it is required", this));
     }
 }
Пример #3
0
 public virtual void ValidateTransition(DslEditorModeling::ModelValidationContext context)
 {
     // validate required attribute Condition
     if (System.String.IsNullOrEmpty(this.Condition))
     {
         context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.StateMachineDSL.StateMachineLanguageValidationMessageIds.Transition_Condition, DslEditorModeling::ModelValidationViolationType.Error, "Property 'Condition' has no value although it is required", this));
     }
 }
Пример #4
0
		public virtual void ValidateDomainEnumeration(DslEditorModeling::ModelValidationContext context)
		{
			// validate required attribute IsFlags
			if( this.IsFlags == null )
			{
				context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.PDE.ModelingDSL.PDEModelingDSLValidationMessageIds.DomainEnumeration_IsFlags, DslEditorModeling::ModelValidationViolationType.Error, "Property 'IsFlags' has no value although it is required", this));
			}
		}
Пример #5
0
		public virtual void ValidateBaseDomainElementType(DslEditorModeling::ModelValidationContext context)
		{
			// validate required attribute Name
			if( System.String.IsNullOrEmpty(this.Name) )
			{
				context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.PDE.ModelingDSL.PDEModelingDSLValidationMessageIds.BaseDomainElementType_Name, DslEditorModeling::ModelValidationViolationType.Error, "Property 'Name' has no value although it is required", this));
			}
		}
Пример #6
0
		public virtual void ValidateEmbeddableElement(DslEditorModeling::ModelValidationContext context)
		{

			// validate reference relationship from Child to Parent (Side: Child)
			System.Collections.ObjectModel.ReadOnlyCollection<global::Tum.PDE.ModelingDSL.EmbeddingRelationship> allMEmbeddingRelationshipInstances0 =  DslModeling::DomainRoleInfo.GetElementLinks<global::Tum.PDE.ModelingDSL.EmbeddingRelationship>(this, global::Tum.PDE.ModelingDSL.EmbeddingRelationship.ChildDomainRoleId);
			// validate reference relationships --> see if cardinality constraints are met
			if( allMEmbeddingRelationshipInstances0.Count > 1 )
			{
				context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.PDE.ModelingDSL.PDEModelingDSLValidationMessageIds.EmbeddingRelationship_Parent, DslEditorModeling::ModelValidationViolationType.Error, "There are multiple references to elements of type Embeddable Element, although only one is allowed. Role name: + Parent", this));
			}
		}
Пример #7
0
		public virtual void ValidateDomainElement(DslEditorModeling::ModelValidationContext context)
		{

			// validate reference relationship from DomainElement to DEType (Side: DomainElement)
			System.Collections.ObjectModel.ReadOnlyCollection<global::Tum.PDE.ModelingDSL.DomainElementReferencesDEType> allMDomainElementReferencesDETypeInstances0 =  DslModeling::DomainRoleInfo.GetElementLinks<global::Tum.PDE.ModelingDSL.DomainElementReferencesDEType>(this, global::Tum.PDE.ModelingDSL.DomainElementReferencesDEType.DomainElementDomainRoleId);
			// validate reference relationships --> see if cardinality constraints are met
			if( allMDomainElementReferencesDETypeInstances0.Count == 0 )
			{
				context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.PDE.ModelingDSL.PDEModelingDSLValidationMessageIds.DomainElementReferencesDEType_DEType, DslEditorModeling::ModelValidationViolationType.Error, "Reference to element of type DEType is missing, although it is required. Role name: + ElementType", this));
			}
		}
Пример #8
0
		public virtual void ValidateReferenceRelationship(DslEditorModeling::ModelValidationContext context)
		{
			// validate required attribute SourceMultiplicity
			if( this.SourceMultiplicity == null )
			{
				context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.PDE.ModelingDSL.PDEModelingDSLValidationMessageIds.ReferenceRelationship_SourceMultiplicity, DslEditorModeling::ModelValidationViolationType.Error, "Property 'SourceMultiplicity' has no value although it is required", this));
			}
			// validate required attribute TargetMultiplicity
			if( this.TargetMultiplicity == null )
			{
				context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.PDE.ModelingDSL.PDEModelingDSLValidationMessageIds.ReferenceRelationship_TargetMultiplicity, DslEditorModeling::ModelValidationViolationType.Error, "Property 'TargetMultiplicity' has no value although it is required", this));
			}
		}
Пример #9
0
 public virtual void ValidateTest(DslEditorModeling::ModelValidationContext context)
 {
     // validate required attribute Name
     if (System.String.IsNullOrEmpty(this.Name))
     {
         context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.TestLanguage.TestLanguageValidationMessageIds.Test_Name, DslEditorModeling::ModelValidationViolationType.Error, "Property 'Name' has no value although it is required", this));
     }
     // validate required attribute Number
     if (this.Number == null)
     {
         context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.TestLanguage.TestLanguageValidationMessageIds.Test_Number, DslEditorModeling::ModelValidationViolationType.Error, "Property 'Number' has no value although it is required", this));
     }
 }
Пример #10
0
        public virtual void ValidateFamilyTreePerson(DslEditorModeling::ModelValidationContext context)
        {
            // validate reference relationship from Husband to Wife (Side: Husband)
            System.Collections.ObjectModel.ReadOnlyCollection <global::Tum.FamilyTreeDSL.MarriedTo> allMMarriedToInstances0 = DslModeling::DomainRoleInfo.GetElementLinks <global::Tum.FamilyTreeDSL.MarriedTo>(this, global::Tum.FamilyTreeDSL.MarriedTo.HusbandDomainRoleId);
            // validate reference relationships --> see if cardinality constraints are met
            if (allMMarriedToInstances0.Count > 1)
            {
                context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.FamilyTreeDSL.FamilyTreeDSLValidationMessageIds.MarriedTo_Wife, DslEditorModeling::ModelValidationViolationType.Error, "There are multiple references to elements of type Family Tree Person, although only one is allowed. Role name: + Wife", this));
            }

            // validate reference relationship from Husband to Wife (Side: Wife)
            System.Collections.ObjectModel.ReadOnlyCollection <global::Tum.FamilyTreeDSL.MarriedTo> allMMarriedToInstances1 = DslModeling::DomainRoleInfo.GetElementLinks <global::Tum.FamilyTreeDSL.MarriedTo>(this, global::Tum.FamilyTreeDSL.MarriedTo.WifeDomainRoleId);
            // validate reference relationships --> see if cardinality constraints are met
            if (allMMarriedToInstances1.Count > 1)
            {
                context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.FamilyTreeDSL.FamilyTreeDSLValidationMessageIds.MarriedTo_Husband, DslEditorModeling::ModelValidationViolationType.Error, "There are multiple references to elements of type Family Tree Person, although only one is allowed. Role name: + Husband", this));
            }
        }
Пример #11
0
        public virtual void ValidateStateMachineDomainModel(DslEditorModeling::ModelValidationContext context)
        {
            // validate embedding relationship from StateMachineDomainModel to StartState
            System.Collections.ObjectModel.ReadOnlyCollection <global::Tum.StateMachineDSL.StateMachineDomainModelHasStartState> allMStateMachineDomainModelHasStartStateInstances0 = DslModeling::DomainRoleInfo.GetElementLinks <global::Tum.StateMachineDSL.StateMachineDomainModelHasStartState>(this, global::Tum.StateMachineDSL.StateMachineDomainModelHasStartState.StateMachineDomainModelDomainRoleId);
            // validate embedding relationships --> see if cardinality constraints are met
            if (allMStateMachineDomainModelHasStartStateInstances0.Count == 0)
            {
                context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.StateMachineDSL.StateMachineLanguageValidationMessageIds.StateMachineDomainModelHasStartState_StartState, DslEditorModeling::ModelValidationViolationType.Error, "Embedded element of type StartState is missing, although it is required.", this));
            }

            // validate embedding relationship from StateMachineDomainModel to EndState
            System.Collections.ObjectModel.ReadOnlyCollection <global::Tum.StateMachineDSL.StateMachineDomainModelHasEndState> allMStateMachineDomainModelHasEndStateInstances1 = DslModeling::DomainRoleInfo.GetElementLinks <global::Tum.StateMachineDSL.StateMachineDomainModelHasEndState>(this, global::Tum.StateMachineDSL.StateMachineDomainModelHasEndState.StateMachineDomainModelDomainRoleId);
            // validate embedding relationships --> see if cardinality constraints are met
            if (allMStateMachineDomainModelHasEndStateInstances1.Count == 0)
            {
                context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.StateMachineDSL.StateMachineLanguageValidationMessageIds.StateMachineDomainModelHasEndState_EndState, DslEditorModeling::ModelValidationViolationType.Error, "Embedded element of type EndState is missing, although it is required.", this));
            }
        }
Пример #12
0
		public virtual void ValidateDomainModel(DslEditorModeling::ModelValidationContext context)
		{

			// validate embedding relationship from DomainModel to DomainElements
			System.Collections.ObjectModel.ReadOnlyCollection<global::Tum.PDE.ModelingDSL.DomainModelHasDomainElements> allMDomainModelHasDomainElementsInstances0 =  DslModeling::DomainRoleInfo.GetElementLinks<global::Tum.PDE.ModelingDSL.DomainModelHasDomainElements>(this, global::Tum.PDE.ModelingDSL.DomainModelHasDomainElements.DomainModelDomainRoleId);
			// validate embedding relationships --> see if cardinality constraints are met
			if( allMDomainModelHasDomainElementsInstances0.Count == 0 )
			{
				context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.PDE.ModelingDSL.PDEModelingDSLValidationMessageIds.DomainModelHasDomainElements_DomainElements, DslEditorModeling::ModelValidationViolationType.Error, "Embedded element of type DomainElements is missing, although it is required.", this));
			}

			// validate embedding relationship from DomainModel to DomainTypes
			System.Collections.ObjectModel.ReadOnlyCollection<global::Tum.PDE.ModelingDSL.DomainModelHasDomainTypes> allMDomainModelHasDomainTypesInstances1 =  DslModeling::DomainRoleInfo.GetElementLinks<global::Tum.PDE.ModelingDSL.DomainModelHasDomainTypes>(this, global::Tum.PDE.ModelingDSL.DomainModelHasDomainTypes.DomainModelDomainRoleId);
			// validate embedding relationships --> see if cardinality constraints are met
			if( allMDomainModelHasDomainTypesInstances1.Count == 0 )
			{
				context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.PDE.ModelingDSL.PDEModelingDSLValidationMessageIds.DomainModelHasDomainTypes_DomainTypes, DslEditorModeling::ModelValidationViolationType.Error, "Embedded element of type DomainTypes is missing, although it is required.", this));
			}

			// validate embedding relationship from DomainModel to DETypes
			System.Collections.ObjectModel.ReadOnlyCollection<global::Tum.PDE.ModelingDSL.DomainModelHasDETypes> allMDomainModelHasDETypesInstances2 =  DslModeling::DomainRoleInfo.GetElementLinks<global::Tum.PDE.ModelingDSL.DomainModelHasDETypes>(this, global::Tum.PDE.ModelingDSL.DomainModelHasDETypes.DomainModelDomainRoleId);
			// validate embedding relationships --> see if cardinality constraints are met
			if( allMDomainModelHasDETypesInstances2.Count == 0 )
			{
				context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.PDE.ModelingDSL.PDEModelingDSLValidationMessageIds.DomainModelHasDETypes_DETypes, DslEditorModeling::ModelValidationViolationType.Error, "Embedded element of type DETypes is missing, although it is required.", this));
			}

			// validate embedding relationship from DomainModel to DRTypes
			System.Collections.ObjectModel.ReadOnlyCollection<global::Tum.PDE.ModelingDSL.DomainModelHasDRTypes> allMDomainModelHasDRTypesInstances3 =  DslModeling::DomainRoleInfo.GetElementLinks<global::Tum.PDE.ModelingDSL.DomainModelHasDRTypes>(this, global::Tum.PDE.ModelingDSL.DomainModelHasDRTypes.DomainModelDomainRoleId);
			// validate embedding relationships --> see if cardinality constraints are met
			if( allMDomainModelHasDRTypesInstances3.Count == 0 )
			{
				context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.PDE.ModelingDSL.PDEModelingDSLValidationMessageIds.DomainModelHasDRTypes_DRTypes, DslEditorModeling::ModelValidationViolationType.Error, "Embedded element of type DRTypes is missing, although it is required.", this));
			}

			// validate embedding relationship from DomainModel to ConversionModelInfo
			System.Collections.ObjectModel.ReadOnlyCollection<global::Tum.PDE.ModelingDSL.DomainModelHasConversionModelInfo> allMDomainModelHasConversionModelInfoInstances4 =  DslModeling::DomainRoleInfo.GetElementLinks<global::Tum.PDE.ModelingDSL.DomainModelHasConversionModelInfo>(this, global::Tum.PDE.ModelingDSL.DomainModelHasConversionModelInfo.DomainModelDomainRoleId);
			// validate embedding relationships --> see if cardinality constraints are met
			if( allMDomainModelHasConversionModelInfoInstances4.Count == 0 )
			{
				context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.PDE.ModelingDSL.PDEModelingDSLValidationMessageIds.DomainModelHasConversionModelInfo_ConversionModelInfo, DslEditorModeling::ModelValidationViolationType.Error, "Embedded element of type ConversionModelInfo is missing, although it is required.", this));
			}
		}
Пример #13
0
		public virtual void ValidateDomainProperty(DslEditorModeling::ModelValidationContext context)
		{
			// validate required attribute Name
			if( System.String.IsNullOrEmpty(this.Name) )
			{
				context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.PDE.ModelingDSL.PDEModelingDSLValidationMessageIds.DomainProperty_Name, DslEditorModeling::ModelValidationViolationType.Error, "Property 'Name' has no value although it is required", this));
			}
			// validate required attribute Value
			if( System.String.IsNullOrEmpty(this.Value) )
			{
				context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.PDE.ModelingDSL.PDEModelingDSLValidationMessageIds.DomainProperty_Value, DslEditorModeling::ModelValidationViolationType.Error, "Property 'Value' has no value although it is required", this));
			}

			// validate reference relationship from DomainProperty to DomainType (Side: DomainProperty)
			System.Collections.ObjectModel.ReadOnlyCollection<global::Tum.PDE.ModelingDSL.DomainPropertyReferencesDomainType> allMDomainPropertyReferencesDomainTypeInstances0 =  DslModeling::DomainRoleInfo.GetElementLinks<global::Tum.PDE.ModelingDSL.DomainPropertyReferencesDomainType>(this, global::Tum.PDE.ModelingDSL.DomainPropertyReferencesDomainType.DomainPropertyDomainRoleId);
			// validate reference relationships --> see if cardinality constraints are met
			if( allMDomainPropertyReferencesDomainTypeInstances0.Count == 0 )
			{
				context.AddMessage(new DslEditorModeling::ModelValidationMessage(Tum.PDE.ModelingDSL.PDEModelingDSLValidationMessageIds.DomainPropertyReferencesDomainType_DomainType, DslEditorModeling::ModelValidationViolationType.Error, "Reference to element of type Domain Type is missing, although it is required. Role name: + DomainType", this));
			}
		}