| /******************************************************************************* |
| * Copyright (c) 2011, 2018 Willink Transformations and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v2.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v20.html |
| * |
| * Contributors: |
| * E.D.Willink - initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.qvtd.pivot.qvtbase; |
| |
| import java.util.Map; |
| import org.eclipse.emf.common.util.DiagnosticChain; |
| import org.eclipse.emf.common.util.EList; |
| import org.eclipse.jdt.annotation.NonNull; |
| import org.eclipse.ocl.pivot.Annotation; |
| import org.eclipse.ocl.pivot.Variable; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * A representation of the model object '<em><b>Transformation</b></em>'. |
| * <!-- end-user-doc --> |
| * |
| * <p> |
| * The following features are supported: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.qvtd.pivot.qvtbase.Transformation#getOwnedTag <em>Owned Tag</em>}</li> |
| * <li>{@link org.eclipse.qvtd.pivot.qvtbase.Transformation#getModelParameter <em>Model Parameter</em>}</li> |
| * <li>{@link org.eclipse.qvtd.pivot.qvtbase.Transformation#getRule <em>Rule</em>}</li> |
| * <li>{@link org.eclipse.qvtd.pivot.qvtbase.Transformation#getExtends <em>Extends</em>}</li> |
| * <li>{@link org.eclipse.qvtd.pivot.qvtbase.Transformation#getOwnedContext <em>Owned Context</em>}</li> |
| * </ul> |
| * |
| * @see org.eclipse.qvtd.pivot.qvtbase.QVTbasePackage#getTransformation() |
| * @model |
| * @generated |
| */ |
| public interface Transformation extends org.eclipse.ocl.pivot.Class { |
| /** |
| * Returns the value of the '<em><b>Owned Tag</b></em>' containment reference list. |
| * The list contents are of type {@link org.eclipse.ocl.pivot.Annotation}. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Owned Tag</em>' containment reference list isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @return the value of the '<em>Owned Tag</em>' containment reference list. |
| * @see org.eclipse.qvtd.pivot.qvtbase.QVTbasePackage#getTransformation_OwnedTag() |
| * @model containment="true" ordered="false" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTbase!Transformation!ownedTag'" |
| * @generated |
| */ |
| @NonNull EList<Annotation> getOwnedTag(); |
| |
| /** |
| * Returns the value of the '<em><b>Model Parameter</b></em>' containment reference list. |
| * The list contents are of type {@link org.eclipse.qvtd.pivot.qvtbase.TypedModel}. |
| * It is bidirectional and its opposite is '{@link org.eclipse.qvtd.pivot.qvtbase.TypedModel#getTransformation <em>Transformation</em>}'. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Model Parameter</em>' containment reference list isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @return the value of the '<em>Model Parameter</em>' containment reference list. |
| * @see org.eclipse.qvtd.pivot.qvtbase.QVTbasePackage#getTransformation_ModelParameter() |
| * @see org.eclipse.qvtd.pivot.qvtbase.TypedModel#getTransformation |
| * @model opposite="transformation" containment="true" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTbase!Transformation!modelParameter'" |
| * @generated |
| */ |
| @NonNull EList<TypedModel> getModelParameter(); |
| |
| /** |
| * Returns the value of the '<em><b>Rule</b></em>' containment reference list. |
| * The list contents are of type {@link org.eclipse.qvtd.pivot.qvtbase.Rule}. |
| * It is bidirectional and its opposite is '{@link org.eclipse.qvtd.pivot.qvtbase.Rule#getTransformation <em>Transformation</em>}'. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Rule</em>' containment reference list isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @return the value of the '<em>Rule</em>' containment reference list. |
| * @see org.eclipse.qvtd.pivot.qvtbase.QVTbasePackage#getTransformation_Rule() |
| * @see org.eclipse.qvtd.pivot.qvtbase.Rule#getTransformation |
| * @model opposite="transformation" containment="true" ordered="false" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTbase!Transformation!rule'" |
| * @generated |
| */ |
| @NonNull EList<Rule> getRule(); |
| |
| /** |
| * Returns the value of the '<em><b>Extends</b></em>' reference. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Extends</em>' reference isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @return the value of the '<em>Extends</em>' reference. |
| * @see #setExtends(Transformation) |
| * @see org.eclipse.qvtd.pivot.qvtbase.QVTbasePackage#getTransformation_Extends() |
| * @model annotation="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName body='extendedBy'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTbase!Transformation!extends'" |
| * @generated |
| */ |
| Transformation getExtends(); |
| |
| /** |
| * Sets the value of the '{@link org.eclipse.qvtd.pivot.qvtbase.Transformation#getExtends <em>Extends</em>}' reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param value the new value of the '<em>Extends</em>' reference. |
| * @see #getExtends() |
| * @generated |
| */ |
| void setExtends(Transformation value); |
| |
| /** |
| * Returns the value of the '<em><b>Owned Context</b></em>' containment reference. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Owned Context</em>' containment reference isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @return the value of the '<em>Owned Context</em>' containment reference. |
| * @see #setOwnedContext(Variable) |
| * @see org.eclipse.qvtd.pivot.qvtbase.QVTbasePackage#getTransformation_OwnedContext() |
| * @model containment="true" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTbase!Transformation!ownedContext'" |
| * @generated |
| */ |
| Variable getOwnedContext(); |
| |
| /** |
| * Sets the value of the '{@link org.eclipse.qvtd.pivot.qvtbase.Transformation#getOwnedContext <em>Owned Context</em>}' containment reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param value the new value of the '<em>Owned Context</em>' containment reference. |
| * @see #getOwnedContext() |
| * @generated |
| */ |
| void setOwnedContext(Variable value); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model required="true" nameRequired="true" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTbase!Transformation!getFunction(String)'" |
| * @generated |
| */ |
| Function getFunction(String name); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model required="true" nameRequired="true" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTbase!Transformation!getModelParameter(String)'" |
| * @generated |
| */ |
| TypedModel getModelParameter(String name); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='ContextTypeIsTransformation'" |
| * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='\n\townedContext <> null implies ownedContext.type = self\n\n'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='try {\n\t/**\n\t *\n\t * inv ContextTypeIsTransformation:\n\t * let\n\t * severity : Integer[1] = \'Transformation::ContextTypeIsTransformation\'.getSeverity()\n\t * in\n\t * if severity <= 0\n\t * then true\n\t * else\n\t * let result : Boolean[?] = ownedContext <> null implies ownedContext.type = self\n\t * in\n\t * \'Transformation::ContextTypeIsTransformation\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n\t * endif\n\t \052/\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.utilities.PivotUtil%>.getExecutor(this, context);\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> IntegerValue severity_0 = <%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.STR_Transformation_c_c_ContextTypeIsTransformation);\n\tfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.INT_0).booleanValue();\n\t/*@NonInvalid\052/ boolean symbol_0;\n\tif (le) {\n\t\tsymbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\telse {\n\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> Object CAUGHT_result;\n\t\ttry {\n\t\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.Nullable%> Variable ownedContext = this.getOwnedContext();\n\t\t\tfinal /*@NonInvalid\052/ boolean ne = ownedContext != null;\n\t\t\t/*@Thrown\052/ boolean result;\n\t\t\tif (ne) {\n\t\t\t\tif (ownedContext == null) {\n\t\t\t\t\tthrow new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(\"Null source for \\\'TypedElement::type\\\'\");\n\t\t\t\t}\n\t\t\t\tfinal /*@Thrown\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.Nullable%> Type type = ownedContext.getType();\n\t\t\t\tfinal /*@Thrown\052/ boolean eq = (type != null) ? (type.getTypeId() == this.getTypeId()) : false;\n\t\t\t\tresult = eq;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresult = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t\t}\n\t\t\tCAUGHT_result = result;\n\t\t}\n\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\tCAUGHT_result = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t}\n\t\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.STR_Transformation_c_c_ContextTypeIsTransformation, this, (Object)null, diagnostics, context, (Object)null, severity_0, CAUGHT_result, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.INT_0).booleanValue();\n\t\tsymbol_0 = logDiagnostic;\n\t}\n\treturn Boolean.TRUE == symbol_0;\n}\ncatch (<%java.lang.Throwable%> e) {\n\treturn <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.validationFailedDiagnostic(\"Transformation::ContextTypeIsTransformation\", this, diagnostics, context, e);\n}'" |
| * @generated |
| */ |
| boolean validateContextTypeIsTransformation(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='ExtendedTypedModelIsExtended'" |
| * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='\n\t_extends <> null implies\n\t_extends.modelParameter->forAll(etm |\n\t\tself.modelParameter->select(name = etm.name).usedPackage->includesAll(etm.usedPackage)\n\t)\n\t\n'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='try {\n\t/**\n\t *\n\t * inv ExtendedTypedModelIsExtended:\n\t * let\n\t * severity : Integer[1] = \'Transformation::ExtendedTypedModelIsExtended\'.getSeverity()\n\t * in\n\t * if severity <= 0\n\t * then true\n\t * else\n\t * let result : Boolean[?] = extends <> null implies\n\t * extends.modelParameter->forAll(etm |\n\t * self.modelParameter->select(name = etm.name)\n\t * .usedPackage->includesAll(etm.usedPackage))\n\t * in\n\t * \'Transformation::ExtendedTypedModelIsExtended\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n\t * endif\n\t \052/\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.utilities.PivotUtil%>.getExecutor(this, context);\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.ids.@<%org.eclipse.jdt.annotation.NonNull%> IdResolver idResolver = executor.getIdResolver();\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> IntegerValue severity_0 = <%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.STR_Transformation_c_c_ExtendedTypedModelIsExtended);\n\tfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.INT_0).booleanValue();\n\t/*@NonInvalid\052/ boolean symbol_2;\n\tif (le) {\n\t\tsymbol_2 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\telse {\n\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.Nullable%> Object CAUGHT_result;\n\t\ttry {\n\t\t\tfinal /*@NonInvalid\052/ org.eclipse.qvtd.pivot.qvtbase.@<%org.eclipse.jdt.annotation.Nullable%> Transformation symbol_0 = this.getExtends();\n\t\t\tfinal /*@NonInvalid\052/ boolean ne = symbol_0 != null;\n\t\t\t/*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> Boolean result;\n\t\t\tif (ne) {\n\t\t\t\tif (symbol_0 == null) {\n\t\t\t\t\tthrow new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(\"Null source for \\\'\\\'http://www.eclipse.org/qvt/2015/QVTbase\\\'::Transformation::modelParameter\\\'\");\n\t\t\t\t}\n\t\t\t\tfinal /*@Thrown\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%org.eclipse.qvtd.pivot.qvtbase.TypedModel%>> modelParameter = symbol_0.getModelParameter();\n\t\t\t\tfinal /*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue BOXED_modelParameter = idResolver.createOrderedSetOfAll(<%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.ORD_CLSSid_TypedModel, modelParameter);\n\t\t\t\t/*@Thrown\052/ @<%org.eclipse.jdt.annotation.Nullable%> Object accumulator = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t\t\tjava.util.@<%org.eclipse.jdt.annotation.NonNull%> Iterator<<%java.lang.Object%>> ITERATOR_etm = BOXED_modelParameter.iterator();\n\t\t\t\t/*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> Boolean forAll;\n\t\t\t\twhile (true) {\n\t\t\t\t\tif (!ITERATOR_etm.hasNext()) {\n\t\t\t\t\t\tif (accumulator == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE) {\n\t\t\t\t\t\t\tforAll = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthrow (<%org.eclipse.ocl.pivot.values.InvalidValueException%>)accumulator;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\t/*@NonInvalid\052/ org.eclipse.qvtd.pivot.qvtbase.@<%org.eclipse.jdt.annotation.NonNull%> TypedModel etm = (org.eclipse.qvtd.pivot.qvtbase.@<%org.eclipse.jdt.annotation.NonNull%> TypedModel)ITERATOR_etm.next();\n\t\t\t\t\t/**\n\t\t\t\t\t *\n\t\t\t\t\t * self.modelParameter->select(name = etm.name)\n\t\t\t\t\t * .usedPackage->includesAll(etm.usedPackage)\n\t\t\t\t\t \052/\n\t\t\t\t\tfinal /*@NonInvalid\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%org.eclipse.qvtd.pivot.qvtbase.TypedModel%>> modelParameter_0 = this.getModelParameter();\n\t\t\t\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue BOXED_modelParameter_0 = idResolver.createOrderedSetOfAll(<%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.ORD_CLSSid_TypedModel, modelParameter_0);\n\t\t\t\t\t/*@Thrown\052/ org.eclipse.ocl.pivot.values.OrderedSetValue.@<%org.eclipse.jdt.annotation.NonNull%> Accumulator accumulator_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createOrderedSetAccumulatorValue(<%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.ORD_CLSSid_TypedModel);\n\t\t\t\t\tjava.util.@<%org.eclipse.jdt.annotation.NonNull%> Iterator<<%java.lang.Object%>> ITERATOR__1 = BOXED_modelParameter_0.iterator();\n\t\t\t\t\t/*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue select;\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tif (!ITERATOR__1.hasNext()) {\n\t\t\t\t\t\t\tselect = accumulator_0;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\t\t/*@NonInvalid\052/ org.eclipse.qvtd.pivot.qvtbase.@<%org.eclipse.jdt.annotation.NonNull%> TypedModel _1 = (org.eclipse.qvtd.pivot.qvtbase.@<%org.eclipse.jdt.annotation.NonNull%> TypedModel)ITERATOR__1.next();\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * name = etm.name\n\t\t\t\t\t\t \052/\n\t\t\t\t\t\tfinal /*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name = _1.getName();\n\t\t\t\t\t\tfinal /*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name_0 = etm.getName();\n\t\t\t\t\t\tfinal /*@NonInvalid\052/ boolean eq = (name != null) ? name.equals(name_0) : (name_0 == null);\n\t\t\t\t\t\t//\n\t\t\t\t\t\tif (eq == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE) {\n\t\t\t\t\t\t\taccumulator_0.add(_1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/*@Thrown\052/ org.eclipse.ocl.pivot.values.SequenceValue.@<%org.eclipse.jdt.annotation.NonNull%> Accumulator accumulator_1 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createSequenceAccumulatorValue(<%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.SEQ_CLSSid_Package);\n\t\t\t\t\tjava.util.@<%org.eclipse.jdt.annotation.NonNull%> Iterator<<%java.lang.Object%>> ITERATOR__1_0 = select.iterator();\n\t\t\t\t\t/*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> SequenceValue collect;\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\tif (!ITERATOR__1_0.hasNext()) {\n\t\t\t\t\t\t\tcollect = accumulator_1;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t\t\t/*@NonInvalid\052/ org.eclipse.qvtd.pivot.qvtbase.@<%org.eclipse.jdt.annotation.NonNull%> TypedModel _1_0 = (org.eclipse.qvtd.pivot.qvtbase.@<%org.eclipse.jdt.annotation.NonNull%> TypedModel)ITERATOR__1_0.next();\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * usedPackage\n\t\t\t\t\t\t \052/\n\t\t\t\t\t\tfinal /*@NonInvalid\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%org.eclipse.ocl.pivot.Package%>> usedPackage = _1_0.getUsedPackage();\n\t\t\t\t\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> SetValue BOXED_usedPackage = idResolver.createSetOfAll(<%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.SET_CLSSid_Package, usedPackage);\n\t\t\t\t\t\t//\n\t\t\t\t\t\tfor (Object value : BOXED_usedPackage.flatten().getElements()) {\n\t\t\t\t\t\t\taccumulator_1.add(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfinal /*@NonInvalid\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%org.eclipse.ocl.pivot.Package%>> usedPackage_0 = etm.getUsedPackage();\n\t\t\t\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> SetValue BOXED_usedPackage_0 = idResolver.createSetOfAll(<%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.SET_CLSSid_Package, usedPackage_0);\n\t\t\t\t\tfinal /*@NonInvalid\052/ boolean includesAll = <%org.eclipse.ocl.pivot.library.collection.CollectionIncludesAllOperation%>.INSTANCE.evaluate(collect, BOXED_usedPackage_0).booleanValue();\n\t\t\t\t\t//\n\t\t\t\t\tif (includesAll == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.FALSE_VALUE) {\t\t\t\t\t// Normal unsuccessful body evaluation result\n\t\t\t\t\t\tforAll = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.FALSE_VALUE;\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Stop immediately\n\t\t\t\t\t}\n\t\t\t\t\telse if (includesAll == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE) {\t\t\t\t// Normal successful body evaluation result\n\t\t\t\t\t\t;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Carry on\n\t\t\t\t\t}\n\t\t\t\t\telse {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Impossible badly typed result\n\t\t\t\t\t\taccumulator = new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(<%org.eclipse.ocl.pivot.messages.PivotMessages%>.NonBooleanBody, \"forAll\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult = forAll;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresult = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t\t}\n\t\t\tCAUGHT_result = result;\n\t\t}\n\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\tCAUGHT_result = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t}\n\t\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.STR_Transformation_c_c_ExtendedTypedModelIsExtended, this, (Object)null, diagnostics, context, (Object)null, severity_0, CAUGHT_result, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.INT_0).booleanValue();\n\t\tsymbol_2 = logDiagnostic;\n\t}\n\treturn Boolean.TRUE == symbol_2;\n}\ncatch (<%java.lang.Throwable%> e) {\n\treturn <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.validationFailedDiagnostic(\"Transformation::ExtendedTypedModelIsExtended\", this, diagnostics, context, e);\n}'" |
| * @generated |
| */ |
| boolean validateExtendedTypedModelIsExtended(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='ModelParameterIsUnique'" |
| * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='\n\tmodelParameter->isUnique(name)\n\n'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='try {\n\t/**\n\t *\n\t * inv ModelParameterIsUnique:\n\t * let\n\t * severity : Integer[1] = \'Transformation::ModelParameterIsUnique\'.getSeverity()\n\t * in\n\t * if severity <= 0\n\t * then true\n\t * else\n\t * let result : Boolean[1] = modelParameter->isUnique(name)\n\t * in\n\t * \'Transformation::ModelParameterIsUnique\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n\t * endif\n\t \052/\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.utilities.PivotUtil%>.getExecutor(this, context);\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.ids.@<%org.eclipse.jdt.annotation.NonNull%> IdResolver idResolver = executor.getIdResolver();\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> IntegerValue severity_0 = <%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.STR_Transformation_c_c_ModelParameterIsUnique);\n\tfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.INT_0).booleanValue();\n\t/*@NonInvalid\052/ boolean symbol_0;\n\tif (le) {\n\t\tsymbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\telse {\n\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> Object CAUGHT_result;\n\t\ttry {\n\t\t\tfinal /*@NonInvalid\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%org.eclipse.qvtd.pivot.qvtbase.TypedModel%>> modelParameter = this.getModelParameter();\n\t\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue BOXED_modelParameter = idResolver.createOrderedSetOfAll(<%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.ORD_CLSSid_TypedModel, modelParameter);\n\t\t\t/*@Thrown\052/ org.eclipse.ocl.pivot.values.SetValue.@<%org.eclipse.jdt.annotation.NonNull%> Accumulator accumulator = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createSetAccumulatorValue(<%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.ORD_CLSSid_TypedModel);\n\t\t\tjava.util.@<%org.eclipse.jdt.annotation.NonNull%> Iterator<<%java.lang.Object%>> ITERATOR__1 = BOXED_modelParameter.iterator();\n\t\t\t/*@Thrown\052/ boolean result;\n\t\t\twhile (true) {\n\t\t\t\tif (!ITERATOR__1.hasNext()) {\n\t\t\t\t\tresult = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t@SuppressWarnings(\"null\")\n\t\t\t\t/*@NonInvalid\052/ org.eclipse.qvtd.pivot.qvtbase.@<%org.eclipse.jdt.annotation.NonNull%> TypedModel _1 = (org.eclipse.qvtd.pivot.qvtbase.@<%org.eclipse.jdt.annotation.NonNull%> TypedModel)ITERATOR__1.next();\n\t\t\t\t/**\n\t\t\t\t * name\n\t\t\t\t \052/\n\t\t\t\tfinal /*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name = _1.getName();\n\t\t\t\t//\n\t\t\t\tif (accumulator.includes(name) == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE) {\n\t\t\t\t\tresult = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.FALSE_VALUE;\t\t\t// Abort after second find\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\taccumulator.add(name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tCAUGHT_result = result;\n\t\t}\n\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\tCAUGHT_result = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t}\n\t\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.STR_Transformation_c_c_ModelParameterIsUnique, this, (Object)null, diagnostics, context, (Object)null, severity_0, CAUGHT_result, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.INT_0).booleanValue();\n\t\tsymbol_0 = logDiagnostic;\n\t}\n\treturn Boolean.TRUE == symbol_0;\n}\ncatch (<%java.lang.Throwable%> e) {\n\treturn <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.validationFailedDiagnostic(\"Transformation::ModelParameterIsUnique\", this, diagnostics, context, e);\n}'" |
| * @generated |
| */ |
| boolean validateModelParameterIsUnique(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='NoExtendsCycle'" |
| * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='\n\t_extends->closure(_extends)->excludes(self)\n\n'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='try {\n\t/**\n\t *\n\t * inv NoExtendsCycle:\n\t * let severity : Integer[1] = \'Transformation::NoExtendsCycle\'.getSeverity()\n\t * in\n\t * if severity <= 0\n\t * then true\n\t * else\n\t * let\n\t * result : Boolean[1] = extends->closure(extends)\n\t * ->excludes(self)\n\t * in\n\t * \'Transformation::NoExtendsCycle\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n\t * endif\n\t \052/\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.utilities.PivotUtil%>.getExecutor(this, context);\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.ids.@<%org.eclipse.jdt.annotation.NonNull%> IdResolver idResolver = executor.getIdResolver();\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> StandardLibrary standardLibrary = idResolver.getStandardLibrary();\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> IntegerValue severity_0 = <%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.STR_Transformation_c_c_NoExtendsCycle);\n\tfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.INT_0).booleanValue();\n\t/*@NonInvalid\052/ boolean symbol_3;\n\tif (le) {\n\t\tsymbol_3 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\telse {\n\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> Object CAUGHT_result;\n\t\ttry {\n\t\t\tfinal /*@NonInvalid\052/ org.eclipse.qvtd.pivot.qvtbase.@<%org.eclipse.jdt.annotation.Nullable%> Transformation symbol_0 = this.getExtends();\n\t\t\tfinal /*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> SetValue oclAsSet = <%org.eclipse.ocl.pivot.library.oclany.OclAnyOclAsSetOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.SET_CLSSid_Transformation, symbol_0);\n\t\t\tfinal org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Class TYPE_closure_0 = executor.getStaticTypeOf(oclAsSet);\n\t\t\tfinal org.eclipse.ocl.pivot.library.LibraryIteration.@<%org.eclipse.jdt.annotation.NonNull%> LibraryIterationExtension IMPL_closure_0 = (<%org.eclipse.ocl.pivot.library.LibraryIteration.LibraryIterationExtension%>)TYPE_closure_0.lookupImplementation(standardLibrary, <%org.eclipse.ocl.pivot.oclstdlib.OCLstdlibTables%>.Operations._Set__closure);\n\t\t\tfinal @<%org.eclipse.jdt.annotation.NonNull%> Object ACC_closure_0 = IMPL_closure_0.createAccumulatorValue(executor, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.SET_CLSSid_Transformation, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.CLSSid_Transformation);\n\t\t\t/**\n\t\t\t * Implementation of the iterator body.\n\t\t\t \052/\n\t\t\tfinal org.eclipse.ocl.pivot.library.@<%org.eclipse.jdt.annotation.NonNull%> AbstractBinaryOperation BODY_closure_0 = new <%org.eclipse.ocl.pivot.library.AbstractBinaryOperation%>()\n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * extends\n\t\t\t\t \052/\n\t\t\t\t@Override\n\t\t\t\tpublic @<%org.eclipse.jdt.annotation.Nullable%> Object evaluate(final org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor, final org.eclipse.ocl.pivot.ids.@<%org.eclipse.jdt.annotation.NonNull%> TypeId typeId, final @<%org.eclipse.jdt.annotation.Nullable%> Object oclAsSet, final /*@NonInvalid\052/ @<%org.eclipse.jdt.annotation.Nullable%> Object _1) {\n\t\t\t\t\tfinal /*@NonInvalid\052/ org.eclipse.qvtd.pivot.qvtbase.@<%org.eclipse.jdt.annotation.Nullable%> Transformation symbol_1 = (<%org.eclipse.qvtd.pivot.qvtbase.Transformation%>)_1;\n\t\t\t\t\tif (symbol_1 == null) {\n\t\t\t\t\t\tthrow new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(\"Null source for \\\'\\\'http://www.eclipse.org/qvt/2015/QVTbase\\\'::Transformation::extends\\\'\");\n\t\t\t\t\t}\n\t\t\t\t\tfinal /*@Thrown\052/ org.eclipse.qvtd.pivot.qvtbase.@<%org.eclipse.jdt.annotation.Nullable%> Transformation symbol_2 = symbol_1.getExtends();\n\t\t\t\t\treturn symbol_2;\n\t\t\t\t}\n\t\t\t};\n\t\t\tfinal org.eclipse.ocl.pivot.internal.library.executor.@<%org.eclipse.jdt.annotation.NonNull%> ExecutorSingleIterationManager MGR_closure_0 = new <%org.eclipse.ocl.pivot.internal.library.executor.ExecutorSingleIterationManager%>(executor, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.SET_CLSSid_Transformation, BODY_closure_0, oclAsSet, ACC_closure_0);\n\t\t\tfinal /*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> SetValue closure = (org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> SetValue)IMPL_closure_0.evaluateIteration(MGR_closure_0);\n\t\t\tfinal /*@Thrown\052/ boolean result = <%org.eclipse.ocl.pivot.library.collection.CollectionExcludesOperation%>.INSTANCE.evaluate(closure, this).booleanValue();\n\t\t\tCAUGHT_result = result;\n\t\t}\n\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\tCAUGHT_result = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t}\n\t\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.STR_Transformation_c_c_NoExtendsCycle, this, (Object)null, diagnostics, context, (Object)null, severity_0, CAUGHT_result, <%org.eclipse.qvtd.pivot.qvtbase.QVTbaseTables%>.INT_0).booleanValue();\n\t\tsymbol_3 = logDiagnostic;\n\t}\n\treturn Boolean.TRUE == symbol_3;\n}\ncatch (<%java.lang.Throwable%> e) {\n\treturn <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.validationFailedDiagnostic(\"Transformation::NoExtendsCycle\", this, diagnostics, context, e);\n}'" |
| * @generated |
| */ |
| boolean validateNoExtendsCycle(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| } // Transformation |