From ce1d661d0dfcb0e66b2c4b16f7cc58d413913d0f Mon Sep 17 00:00:00 2001 From: Fabian Brosig <fabian.brosig@uni-wuerzburg.de> Date: Tue, 25 Nov 2014 08:14:41 +0000 Subject: [PATCH] removed CoarseGrainedBehavior#describedEntity (now also the corresponding OCLconstraint) git-svn-id: https://se1.informatik.uni-wuerzburg.de/usvn/svn/code/DMM/trunk@16516 9e42b895-fcda-4063-8a3b-11be15eb1bbd --- .../model/servicebehavior.ecore | 9 ------ .../model/servicebehavior.ecore.oclinecore | 2 -- .../CoarseGrainedBehavior.java | 31 +------------------ .../impl/ServicebehaviorPackageImpl.java | 12 ------- .../util/ServicebehaviorValidator.java | 31 ------------------- 5 files changed, 1 insertion(+), 84 deletions(-) diff --git a/edu.kit.ipd.descartes.mm.applicationlevel/model/servicebehavior.ecore b/edu.kit.ipd.descartes.mm.applicationlevel/model/servicebehavior.ecore index 9fbf18a5..f8e11523 100644 --- a/edu.kit.ipd.descartes.mm.applicationlevel/model/servicebehavior.ecore +++ b/edu.kit.ipd.descartes.mm.applicationlevel/model/servicebehavior.ecore @@ -119,15 +119,6 @@ containment="true"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="CoarseGrainedBehavior" eSuperTypes="#//ServiceBehaviorAbstraction"> - <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> - <details key="documentation" value="--# TODO discuss this construction of InternalCallAction and InternalHelper(Container)
class InternalCallAction {
property internalFineGrainedBehaviorHelper : InternalFineGrainedBehaviorHelper[1];
}
class InternalFineGrainedBehaviorHelper extends core_0::Entity {
invariant parametersMustHaveUniqueNames: self.parameters->isUnique(p : repository_0::Parameter | p.name);
property parameters : repository_0::Parameter[0..*] { composes };
property returnType : repository_0::DataType[0..1];
property internalFineGrainedBehaviorHelperContainer#internalFineGrainedBehaviorHelper : InternalFineGrainedBehaviorHelperContainer[1];
property behavior : ComponentInternalBehavior[1] { composes };
}
class InternalFineGrainedBehaviorHelperContainer extends core_0::Entity {
invariant internalFineGrainedBehaviorHelperMustBeUnique:
let helper : Bag(
-- parameters: Sequence of DataType, NOT name
-- return types have not to be considered
-- exceptions have not to be considered
Tuple(helperName : String, parameters : Sequence(repository_0::DataType) )
) = self.internalFineGrainedBehaviorHelper->collect(h : InternalFineGrainedBehaviorHelper | Tuple{
helperName : String = h.name,
parameters : Sequence(repository_0::DataType) = h.parameters.dataType }
) in helper->isUnique(h|h);
property internalFineGrainedBehaviorHelper#internalFineGrainedBehaviorHelperContainer : InternalFineGrainedBehaviorHelper[0..*] { composes };
property component#internalFineGrainedBehaviorHelperContainer : repository_0::BasicComponent[1];
}"/> - </eAnnotations> - <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore"> - <details key="constraints" value="AtMostOneCoarseGrainedBehaviorPerProvidedService"/> - </eAnnotations> - <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> - <details key="AtMostOneCoarseGrainedBehaviorPerProvidedService" value="
			self.describedEntity.coarseGrainedBehavior->forAll(cgb1 : CoarseGrainedBehavior | cgb1.describedSignature = self.describedSignature implies cgb1 = self)"/> - </eAnnotations> <eStructuralFeatures xsi:type="ecore:EReference" name="externalCallFrequency" ordered="false" upperBound="-1" eType="#//ExternalCallFrequency" containment="true" eOpposite="#//ExternalCallFrequency/coarseGrainedBehavior"/> diff --git a/edu.kit.ipd.descartes.mm.applicationlevel/model/servicebehavior.ecore.oclinecore b/edu.kit.ipd.descartes.mm.applicationlevel/model/servicebehavior.ecore.oclinecore index f50addef..771110f7 100644 --- a/edu.kit.ipd.descartes.mm.applicationlevel/model/servicebehavior.ecore.oclinecore +++ b/edu.kit.ipd.descartes.mm.applicationlevel/model/servicebehavior.ecore.oclinecore @@ -120,8 +120,6 @@ package servicebehavior : servicebehavior = 'http://www.descartes-research.net/m class CoarseGrainedBehavior extends ServiceBehaviorAbstraction { - invariant AtMostOneCoarseGrainedBehaviorPerProvidedService: - self.describedEntity.coarseGrainedBehavior->forAll(cgb1 : CoarseGrainedBehavior | cgb1.describedSignature = self.describedSignature implies cgb1 = self); property externalCallFrequency#coarseGrainedBehavior : ExternalCallFrequency[*] { composes }; property resourceDemand#coarseGrainedBehavior : ResourceDemand[*] { composes }; } diff --git a/edu.kit.ipd.descartes.mm.applicationlevel/src/edu/kit/ipd/descartes/mm/applicationlevel/servicebehavior/CoarseGrainedBehavior.java b/edu.kit.ipd.descartes.mm.applicationlevel/src/edu/kit/ipd/descartes/mm/applicationlevel/servicebehavior/CoarseGrainedBehavior.java index 15c377ef..20fe82f1 100644 --- a/edu.kit.ipd.descartes.mm.applicationlevel/src/edu/kit/ipd/descartes/mm/applicationlevel/servicebehavior/CoarseGrainedBehavior.java +++ b/edu.kit.ipd.descartes.mm.applicationlevel/src/edu/kit/ipd/descartes/mm/applicationlevel/servicebehavior/CoarseGrainedBehavior.java @@ -10,34 +10,6 @@ import org.eclipse.emf.common.util.EList; * A representation of the model object '<em><b>Coarse Grained Behavior</b></em>'. * <!-- end-user-doc --> * - * <!-- begin-model-doc --> - * --# TODO discuss this construction of InternalCallAction and InternalHelper(Container) - * class InternalCallAction { - * property internalFineGrainedBehaviorHelper : InternalFineGrainedBehaviorHelper[1]; - * } - * class InternalFineGrainedBehaviorHelper extends core_0::Entity { - * invariant parametersMustHaveUniqueNames: self.parameters->isUnique(p : repository_0::Parameter | p.name); - * property parameters : repository_0::Parameter[0..*] { composes }; - * property returnType : repository_0::DataType[0..1]; - * property internalFineGrainedBehaviorHelperContainer#internalFineGrainedBehaviorHelper : InternalFineGrainedBehaviorHelperContainer[1]; - * property behavior : ComponentInternalBehavior[1] { composes }; - * } - * class InternalFineGrainedBehaviorHelperContainer extends core_0::Entity { - * invariant internalFineGrainedBehaviorHelperMustBeUnique: - * let helper : Bag( - * -- parameters: Sequence of DataType, NOT name - * -- return types have not to be considered - * -- exceptions have not to be considered - * Tuple(helperName : String, parameters : Sequence(repository_0::DataType) ) - * ) = self.internalFineGrainedBehaviorHelper->collect(h : InternalFineGrainedBehaviorHelper | Tuple{ - * helperName : String = h.name, - * parameters : Sequence(repository_0::DataType) = h.parameters.dataType } - * ) in helper->isUnique(h|h); - * property internalFineGrainedBehaviorHelper#internalFineGrainedBehaviorHelperContainer : InternalFineGrainedBehaviorHelper[0..*] { composes }; - * property component#internalFineGrainedBehaviorHelperContainer : repository_0::BasicComponent[1]; - * } - * <!-- end-model-doc --> - * * <p> * The following features are supported: * <ul> @@ -47,8 +19,7 @@ import org.eclipse.emf.common.util.EList; * </p> * * @see edu.kit.ipd.descartes.mm.applicationlevel.servicebehavior.ServicebehaviorPackage#getCoarseGrainedBehavior() - * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='AtMostOneCoarseGrainedBehaviorPerProvidedService'" - * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot AtMostOneCoarseGrainedBehaviorPerProvidedService='\n\t\t\tself.describedEntity.coarseGrainedBehavior->forAll(cgb1 : CoarseGrainedBehavior | cgb1.describedSignature = self.describedSignature implies cgb1 = self)'" + * @model * @generated */ public interface CoarseGrainedBehavior extends ServiceBehaviorAbstraction { diff --git a/edu.kit.ipd.descartes.mm.applicationlevel/src/edu/kit/ipd/descartes/mm/applicationlevel/servicebehavior/impl/ServicebehaviorPackageImpl.java b/edu.kit.ipd.descartes.mm.applicationlevel/src/edu/kit/ipd/descartes/mm/applicationlevel/servicebehavior/impl/ServicebehaviorPackageImpl.java index 9d3ee31f..608c450a 100644 --- a/edu.kit.ipd.descartes.mm.applicationlevel/src/edu/kit/ipd/descartes/mm/applicationlevel/servicebehavior/impl/ServicebehaviorPackageImpl.java +++ b/edu.kit.ipd.descartes.mm.applicationlevel/src/edu/kit/ipd/descartes/mm/applicationlevel/servicebehavior/impl/ServicebehaviorPackageImpl.java @@ -1152,12 +1152,6 @@ public class ServicebehaviorPackageImpl extends EPackageImpl implements Serviceb new String[] { "constraints", "EnforceExplicitDescriptionWhenExplicitCharacterizationType" }); - addAnnotation - (coarseGrainedBehaviorEClass, - source, - new String[] { - "constraints", "AtMostOneCoarseGrainedBehaviorPerProvidedService" - }); addAnnotation (responseTimeEClass, source, @@ -1193,12 +1187,6 @@ public class ServicebehaviorPackageImpl extends EPackageImpl implements Serviceb new String[] { "EnforceExplicitDescriptionWhenExplicitCharacterizationType", "\n\t\t self.characterization = parameterdependencies::RelationshipCharacterizationType::EXPLICIT implies explicitDescription <> null" }); - addAnnotation - (coarseGrainedBehaviorEClass, - source, - new String[] { - "AtMostOneCoarseGrainedBehaviorPerProvidedService", "\n\t\t\tself.describedEntity.coarseGrainedBehavior->forAll(cgb1 : CoarseGrainedBehavior | cgb1.describedSignature = self.describedSignature implies cgb1 = self)" - }); addAnnotation (responseTimeEClass, source, diff --git a/edu.kit.ipd.descartes.mm.applicationlevel/src/edu/kit/ipd/descartes/mm/applicationlevel/servicebehavior/util/ServicebehaviorValidator.java b/edu.kit.ipd.descartes.mm.applicationlevel/src/edu/kit/ipd/descartes/mm/applicationlevel/servicebehavior/util/ServicebehaviorValidator.java index 6ef15ba4..56f7072e 100644 --- a/edu.kit.ipd.descartes.mm.applicationlevel/src/edu/kit/ipd/descartes/mm/applicationlevel/servicebehavior/util/ServicebehaviorValidator.java +++ b/edu.kit.ipd.descartes.mm.applicationlevel/src/edu/kit/ipd/descartes/mm/applicationlevel/servicebehavior/util/ServicebehaviorValidator.java @@ -490,40 +490,9 @@ public class ServicebehaviorValidator extends EObjectValidator { if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(coarseGrainedBehavior, diagnostics, context); if (result || diagnostics != null) result &= validateServiceBehaviorAbstraction_DescribedSignatureMustBelongToInterfaceReferencedByInterfaceProvidingRole(coarseGrainedBehavior, diagnostics, context); if (result || diagnostics != null) result &= validateServiceBehaviorAbstraction_InfluencingParameterNamesMustBeUnique(coarseGrainedBehavior, diagnostics, context); - if (result || diagnostics != null) result &= validateCoarseGrainedBehavior_AtMostOneCoarseGrainedBehaviorPerProvidedService(coarseGrainedBehavior, diagnostics, context); return result; } - /** - * The cached validation expression for the AtMostOneCoarseGrainedBehaviorPerProvidedService constraint of '<em>Coarse Grained Behavior</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - protected static final String COARSE_GRAINED_BEHAVIOR__AT_MOST_ONE_COARSE_GRAINED_BEHAVIOR_PER_PROVIDED_SERVICE__EEXPRESSION = "\n" + - "\t\t\tself.describedEntity.coarseGrainedBehavior->forAll(cgb1 : CoarseGrainedBehavior | cgb1.describedSignature = self.describedSignature implies cgb1 = self)"; - - /** - * Validates the AtMostOneCoarseGrainedBehaviorPerProvidedService constraint of '<em>Coarse Grained Behavior</em>'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - */ - public boolean validateCoarseGrainedBehavior_AtMostOneCoarseGrainedBehaviorPerProvidedService(CoarseGrainedBehavior coarseGrainedBehavior, DiagnosticChain diagnostics, Map<Object, Object> context) { - return - validate - (ServicebehaviorPackage.Literals.COARSE_GRAINED_BEHAVIOR, - coarseGrainedBehavior, - diagnostics, - context, - "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", - "AtMostOneCoarseGrainedBehaviorPerProvidedService", - COARSE_GRAINED_BEHAVIOR__AT_MOST_ONE_COARSE_GRAINED_BEHAVIOR_PER_PROVIDED_SERVICE__EEXPRESSION, - Diagnostic.ERROR, - DIAGNOSTIC_SOURCE, - 0); - } - /** * <!-- begin-user-doc --> * <!-- end-user-doc --> -- GitLab