| /******************************************************************************* |
| * Copyright (c) 2011, 2017 Willink Transformations and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * E.D.Willink - initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.qvtd.pivot.qvtcore; |
| |
| import java.util.Map; |
| import org.eclipse.emf.common.util.DiagnosticChain; |
| import org.eclipse.emf.common.util.EList; |
| import org.eclipse.qvtd.pivot.qvtbase.Rule; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * A representation of the model object '<em><b>Mapping</b></em>'. |
| * <!-- end-user-doc --> |
| * |
| * <p> |
| * The following features are supported: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.qvtd.pivot.qvtcore.Mapping#getContext <em>Context</em>}</li> |
| * <li>{@link org.eclipse.qvtd.pivot.qvtcore.Mapping#getLocal <em>Local</em>}</li> |
| * <li>{@link org.eclipse.qvtd.pivot.qvtcore.Mapping#getRefinement <em>Refinement</em>}</li> |
| * <li>{@link org.eclipse.qvtd.pivot.qvtcore.Mapping#getSpecification <em>Specification</em>}</li> |
| * </ul> |
| * |
| * @see org.eclipse.qvtd.pivot.qvtcore.QVTcorePackage#getMapping() |
| * @model |
| * @generated |
| */ |
| public interface Mapping extends Rule, Area { |
| /** |
| * Returns the value of the '<em><b>Context</b></em>' container reference. |
| * It is bidirectional and its opposite is '{@link org.eclipse.qvtd.pivot.qvtcore.Mapping#getLocal <em>Local</em>}'. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Context</em>' container reference isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @return the value of the '<em>Context</em>' container reference. |
| * @see #setContext(Mapping) |
| * @see org.eclipse.qvtd.pivot.qvtcore.QVTcorePackage#getMapping_Context() |
| * @see org.eclipse.qvtd.pivot.qvtcore.Mapping#getLocal |
| * @model opposite="local" transient="false" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTcore!Mapping!context'" |
| * @generated |
| */ |
| Mapping getContext(); |
| |
| /** |
| * Sets the value of the '{@link org.eclipse.qvtd.pivot.qvtcore.Mapping#getContext <em>Context</em>}' container reference. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param value the new value of the '<em>Context</em>' container reference. |
| * @see #getContext() |
| * @generated |
| */ |
| void setContext(Mapping value); |
| |
| /** |
| * Returns the value of the '<em><b>Specification</b></em>' reference list. |
| * The list contents are of type {@link org.eclipse.qvtd.pivot.qvtcore.Mapping}. |
| * It is bidirectional and its opposite is '{@link org.eclipse.qvtd.pivot.qvtcore.Mapping#getRefinement <em>Refinement</em>}'. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Specification</em>' reference list isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @return the value of the '<em>Specification</em>' reference list. |
| * @see org.eclipse.qvtd.pivot.qvtcore.QVTcorePackage#getMapping_Specification() |
| * @see org.eclipse.qvtd.pivot.qvtcore.Mapping#getRefinement |
| * @model opposite="refinement" ordered="false" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTcore!Mapping!specification'" |
| * @generated |
| */ |
| EList<Mapping> getSpecification(); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='DomainsAreCoreDomains'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n *\n * inv DomainsAreCoreDomains:\n * let severity : Integer[1] = \'Mapping::DomainsAreCoreDomains\'.getSeverity()\n * in\n * if severity <= 0\n * then true\n * else\n * let\n * result : Boolean[?] = domain->forAll(oclIsKindOf(CoreDomain))\n * in\n * \'Mapping::DomainsAreCoreDomains\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n * endif\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.ids.@<%org.eclipse.jdt.annotation.NonNull%> IdResolver idResolver = executor.getIdResolver();\nfinal /*@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.qvtcore.QVTcoreTables%>.STR_Mapping_c_c_DomainsAreCoreDomains);\nfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.INT_0).booleanValue();\n/*@NonInvalid\052/ boolean symbol_0;\nif (le) {\n\tsymbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n}\nelse {\n\t@SuppressWarnings(\"null\")\n\tfinal /*@NonInvalid\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%org.eclipse.qvtd.pivot.qvtbase.Domain%>> domain = this.getDomain();\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue BOXED_domain = idResolver.createOrderedSetOfAll(<%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.ORD_CLSSid_Domain, domain);\n\t/*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> Object accumulator = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t@<%org.eclipse.jdt.annotation.NonNull%> <%java.util.Iterator%><<%java.lang.Object%>> ITERATOR__1 = BOXED_domain.iterator();\n\t/*@NonInvalid\052/ boolean result;\n\twhile (true) {\n\t\tif (!ITERATOR__1.hasNext()) {\n\t\t\tif (accumulator == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE) {\n\t\t\t\tresult = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow (<%org.eclipse.ocl.pivot.values.InvalidValueException%>)accumulator;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t@SuppressWarnings(\"null\")\n\t\t/*@NonInvalid\052/ org.eclipse.qvtd.pivot.qvtbase.@<%org.eclipse.jdt.annotation.NonNull%> Domain _1 = (<%org.eclipse.qvtd.pivot.qvtbase.Domain%>)ITERATOR__1.next();\n\t\t/**\n\t\t * oclIsKindOf(CoreDomain)\n\t\t \052/\n\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Class TYP_qvtcore_c_c_CoreDomain = idResolver.getClass(<%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.CLSSid_CoreDomain, null);\n\t\tfinal /*@NonInvalid\052/ boolean oclIsKindOf = <%org.eclipse.ocl.pivot.library.oclany.OclAnyOclIsKindOfOperation%>.INSTANCE.evaluate(executor, _1, TYP_qvtcore_c_c_CoreDomain).booleanValue();\n\t\t//\n\t\tif (oclIsKindOf == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.FALSE_VALUE) {\t\t\t\t\t// Normal unsuccessful body evaluation result\n\t\t\tresult = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.FALSE_VALUE;\n\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Stop immediately\n\t\t}\n\t\telse if (oclIsKindOf == <%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// Carry on\n\t\t}\n\t\telse {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Impossible badly typed result\n\t\t\taccumulator = new <%org.eclipse.ocl.pivot.values.InvalidValueException%>(<%org.eclipse.ocl.pivot.messages.PivotMessages%>.NonBooleanBody, \"forAll\");\n\t\t}\n\t}\n\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.qvtcore.QVTcoreTables%>.STR_Mapping_c_c_DomainsAreCoreDomains, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.INT_0).booleanValue();\n\tsymbol_0 = logDiagnostic;\n}\nreturn Boolean.TRUE == symbol_0;'" |
| * @generated |
| */ |
| boolean validateDomainsAreCoreDomains(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='NestedNameIsNull'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n *\n * inv NestedNameIsNull:\n * let severity : Integer[1] = \'Mapping::NestedNameIsNull\'.getSeverity()\n * in\n * if severity <= 0\n * then true\n * else\n * let result : Boolean[?] = context <> null implies name = null\n * in\n * \'Mapping::NestedNameIsNull\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n * endif\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@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.qvtcore.QVTcoreTables%>.STR_Mapping_c_c_NestedNameIsNull);\nfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.INT_0).booleanValue();\n/*@NonInvalid\052/ boolean symbol_0;\nif (le) {\n\tsymbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n}\nelse {\n\tfinal /*@NonInvalid\052/ org.eclipse.qvtd.pivot.qvtcore.@<%org.eclipse.jdt.annotation.Nullable%> Mapping context_0 = this.getContext();\n\tfinal /*@NonInvalid\052/ boolean ne = context_0 != null;\n\t/*@NonInvalid\052/ boolean result;\n\tif (ne) {\n\t\tfinal /*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name = this.getName();\n\t\tfinal /*@NonInvalid\052/ boolean eq = name == null;\n\t\tresult = eq;\n\t}\n\telse {\n\t\tresult = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\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.qvtcore.QVTcoreTables%>.STR_Mapping_c_c_NestedNameIsNull, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.INT_0).booleanValue();\n\tsymbol_0 = logDiagnostic;\n}\nreturn Boolean.TRUE == symbol_0;'" |
| * @generated |
| */ |
| boolean validateNestedNameIsNull(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='RootNameIsNotNull'" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n *\n * inv RootNameIsNotNull:\n * let severity : Integer[1] = \'Mapping::RootNameIsNotNull\'.getSeverity()\n * in\n * if severity <= 0\n * then true\n * else\n * let result : Boolean[?] = transformation <> null implies name <> null\n * in\n * \'Mapping::RootNameIsNotNull\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n * endif\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@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.qvtcore.QVTcoreTables%>.STR_Mapping_c_c_RootNameIsNotNull);\nfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.INT_0).booleanValue();\n/*@NonInvalid\052/ boolean symbol_0;\nif (le) {\n\tsymbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n}\nelse {\n\tfinal /*@NonInvalid\052/ org.eclipse.qvtd.pivot.qvtbase.@<%org.eclipse.jdt.annotation.Nullable%> Transformation transformation = this.getTransformation();\n\tfinal /*@NonInvalid\052/ boolean ne = transformation != null;\n\t/*@NonInvalid\052/ boolean result;\n\tif (ne) {\n\t\tfinal /*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name = this.getName();\n\t\tfinal /*@NonInvalid\052/ boolean ne_0 = name != null;\n\t\tresult = ne_0;\n\t}\n\telse {\n\t\tresult = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\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.qvtcore.QVTcoreTables%>.STR_Mapping_c_c_RootNameIsNotNull, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, <%org.eclipse.qvtd.pivot.qvtcore.QVTcoreTables%>.INT_0).booleanValue();\n\tsymbol_0 = logDiagnostic;\n}\nreturn Boolean.TRUE == symbol_0;'" |
| * @generated |
| */ |
| boolean validateRootNameIsNotNull(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * Returns the value of the '<em><b>Local</b></em>' containment reference list. |
| * The list contents are of type {@link org.eclipse.qvtd.pivot.qvtcore.Mapping}. |
| * It is bidirectional and its opposite is '{@link org.eclipse.qvtd.pivot.qvtcore.Mapping#getContext <em>Context</em>}'. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Local</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>Local</em>' containment reference list. |
| * @see org.eclipse.qvtd.pivot.qvtcore.QVTcorePackage#getMapping_Local() |
| * @see org.eclipse.qvtd.pivot.qvtcore.Mapping#getContext |
| * @model opposite="context" containment="true" ordered="false" |
| * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/qvt/2015/QVTcore!Mapping!local'" |
| * @generated |
| */ |
| EList<Mapping> getLocal(); |
| |
| /** |
| * Returns the value of the '<em><b>Refinement</b></em>' reference list. |
| * The list contents are of type {@link org.eclipse.qvtd.pivot.qvtcore.Mapping}. |
| * It is bidirectional and its opposite is '{@link org.eclipse.qvtd.pivot.qvtcore.Mapping#getSpecification <em>Specification</em>}'. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of the '<em>Refinement</em>' reference list isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @return the value of the '<em>Refinement</em>' reference list. |
| * @see org.eclipse.qvtd.pivot.qvtcore.QVTcorePackage#getMapping_Refinement() |
| * @see org.eclipse.qvtd.pivot.qvtcore.Mapping#getSpecification |
| * @model opposite="specification" ordered="false" |
| */ |
| EList<Mapping> getRefinement(); |
| |
| } // Mapping |