Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/RelationalExpressionImpl.java')
-rw-r--r--plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/RelationalExpressionImpl.java323
1 files changed, 323 insertions, 0 deletions
diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/RelationalExpressionImpl.java b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/RelationalExpressionImpl.java
new file mode 100644
index 00000000000..4481ea10553
--- /dev/null
+++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/RelationalExpressionImpl.java
@@ -0,0 +1,323 @@
+/**
+ */
+package org.eclipse.papyrus.uml.alf.impl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.math.BigInteger;
+import java.util.Map;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.emf.ecore.util.EObjectValidator;
+import org.eclipse.papyrus.uml.alf.AlfPackage;
+import org.eclipse.papyrus.uml.alf.ElementReference;
+import org.eclipse.papyrus.uml.alf.RelationalExpression;
+import org.eclipse.papyrus.uml.alf.util.AlfValidator;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Relational Expression</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.alf.impl.RelationalExpressionImpl#isIsUnlimitedNatural <em>Is Unlimited Natural</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class RelationalExpressionImpl extends BinaryExpressionImpl implements RelationalExpression {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RelationalExpressionImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return AlfPackage.eINSTANCE.getRelationalExpression();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean isIsUnlimitedNatural() {
+ return (Boolean) eGet(AlfPackage.eINSTANCE.getRelationalExpression_IsUnlimitedNatural(), true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setIsUnlimitedNatural(boolean newIsUnlimitedNatural) {
+ eSet(AlfPackage.eINSTANCE.getRelationalExpression_IsUnlimitedNatural(), newIsUnlimitedNatural);
+ }
+
+ /**
+ * The cached invocation delegate for the '{@link #type() <em>Type</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #type()
+ * @generated
+ * @ordered
+ */
+ protected static final EOperation.Internal.InvocationDelegate TYPE__EINVOCATION_DELEGATE = ((EOperation.Internal) AlfPackage.eINSTANCE.getRelationalExpression__Type()).getInvocationDelegate();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ElementReference type() {
+ try {
+ return (ElementReference) TYPE__EINVOCATION_DELEGATE.dynamicInvoke(this, null);
+ } catch (InvocationTargetException ite) {
+ throw new WrappedException(ite);
+ }
+ }
+
+ /**
+ * The cached invocation delegate for the '{@link #lower() <em>Lower</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #lower()
+ * @generated
+ * @ordered
+ */
+ protected static final EOperation.Internal.InvocationDelegate LOWER__EINVOCATION_DELEGATE = ((EOperation.Internal) AlfPackage.eINSTANCE.getRelationalExpression__Lower()).getInvocationDelegate();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BigInteger lower() {
+ try {
+ return (BigInteger) LOWER__EINVOCATION_DELEGATE.dynamicInvoke(this, null);
+ } catch (InvocationTargetException ite) {
+ throw new WrappedException(ite);
+ }
+ }
+
+ /**
+ * The cached invocation delegate for the '{@link #upper() <em>Upper</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #upper()
+ * @generated
+ * @ordered
+ */
+ protected static final EOperation.Internal.InvocationDelegate UPPER__EINVOCATION_DELEGATE = ((EOperation.Internal) AlfPackage.eINSTANCE.getRelationalExpression__Upper()).getInvocationDelegate();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public BigInteger upper() {
+ try {
+ return (BigInteger) UPPER__EINVOCATION_DELEGATE.dynamicInvoke(this, null);
+ } catch (InvocationTargetException ite) {
+ throw new WrappedException(ite);
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean relationalExpressionIsUnlimitedNaturalDerivation(DiagnosticChain diagnostics, Map<Object, Object> context) {
+ // TODO: implement this method
+ // -> specify the condition that violates the invariant
+ // -> verify the details of the diagnostic, including severity and message
+ // Ensure that you remove @generated or mark it @generated NOT
+ if (false) {
+ if (diagnostics != null) {
+ diagnostics.add
+ (new BasicDiagnostic
+ (Diagnostic.ERROR,
+ AlfValidator.DIAGNOSTIC_SOURCE,
+ AlfValidator.RELATIONAL_EXPRESSION__RELATIONAL_EXPRESSION_IS_UNLIMITED_NATURAL_DERIVATION,
+ EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "relationalExpressionIsUnlimitedNaturalDerivation", EObjectValidator.getObjectLabel(this, context) }),
+ new Object[] { this }));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean relationalExpressionTypeDerivation(DiagnosticChain diagnostics, Map<Object, Object> context) {
+ // TODO: implement this method
+ // -> specify the condition that violates the invariant
+ // -> verify the details of the diagnostic, including severity and message
+ // Ensure that you remove @generated or mark it @generated NOT
+ if (false) {
+ if (diagnostics != null) {
+ diagnostics.add
+ (new BasicDiagnostic
+ (Diagnostic.ERROR,
+ AlfValidator.DIAGNOSTIC_SOURCE,
+ AlfValidator.RELATIONAL_EXPRESSION__RELATIONAL_EXPRESSION_TYPE_DERIVATION,
+ EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "relationalExpressionTypeDerivation", EObjectValidator.getObjectLabel(this, context) }),
+ new Object[] { this }));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean relationalExpressionLowerDerivation(DiagnosticChain diagnostics, Map<Object, Object> context) {
+ // TODO: implement this method
+ // -> specify the condition that violates the invariant
+ // -> verify the details of the diagnostic, including severity and message
+ // Ensure that you remove @generated or mark it @generated NOT
+ if (false) {
+ if (diagnostics != null) {
+ diagnostics.add
+ (new BasicDiagnostic
+ (Diagnostic.ERROR,
+ AlfValidator.DIAGNOSTIC_SOURCE,
+ AlfValidator.RELATIONAL_EXPRESSION__RELATIONAL_EXPRESSION_LOWER_DERIVATION,
+ EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "relationalExpressionLowerDerivation", EObjectValidator.getObjectLabel(this, context) }),
+ new Object[] { this }));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean relationalExpressionUpperDerivation(DiagnosticChain diagnostics, Map<Object, Object> context) {
+ // TODO: implement this method
+ // -> specify the condition that violates the invariant
+ // -> verify the details of the diagnostic, including severity and message
+ // Ensure that you remove @generated or mark it @generated NOT
+ if (false) {
+ if (diagnostics != null) {
+ diagnostics.add
+ (new BasicDiagnostic
+ (Diagnostic.ERROR,
+ AlfValidator.DIAGNOSTIC_SOURCE,
+ AlfValidator.RELATIONAL_EXPRESSION__RELATIONAL_EXPRESSION_UPPER_DERIVATION,
+ EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "relationalExpressionUpperDerivation", EObjectValidator.getObjectLabel(this, context) }),
+ new Object[] { this }));
+ }
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * The cached validation expression for the '{@link #relationalExpressionOperandTypes(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>Relational Expression Operand Types</em>}' invariant operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #relationalExpressionOperandTypes(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
+ * @generated
+ * @ordered
+ */
+ protected static final String RELATIONAL_EXPRESSION_OPERAND_TYPES_DIAGNOSTIC_CHAIN_MAP__EEXPRESSION = "\n" +
+ " let type1 = self.operand1.type in\n" +
+ " let type2 = self.operand2.type in\n" +
+ " self.isNaturalType(type1) and self.isNumericType(type2) or\n" +
+ " self.isIntegerType(type1) and self.isIntegerType(type2) or\n" +
+ " self.isUnlimitedNaturalType(type1) and self.isUnlimitedNaturalType(type2)";
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean relationalExpressionOperandTypes(DiagnosticChain diagnostics, Map<Object, Object> context) {
+ return AlfValidator.validate
+ (AlfPackage.eINSTANCE.getRelationalExpression(),
+ this,
+ diagnostics,
+ context,
+ "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
+ AlfPackage.eINSTANCE.getRelationalExpression__RelationalExpressionOperandTypes__DiagnosticChain_Map(),
+ RELATIONAL_EXPRESSION_OPERAND_TYPES_DIAGNOSTIC_CHAIN_MAP__EEXPRESSION,
+ Diagnostic.ERROR,
+ AlfValidator.DIAGNOSTIC_SOURCE,
+ AlfValidator.RELATIONAL_EXPRESSION__RELATIONAL_EXPRESSION_OPERAND_TYPES);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case AlfPackage.RELATIONAL_EXPRESSION___TYPE:
+ return type();
+ case AlfPackage.RELATIONAL_EXPRESSION___LOWER:
+ return lower();
+ case AlfPackage.RELATIONAL_EXPRESSION___UPPER:
+ return upper();
+ case AlfPackage.RELATIONAL_EXPRESSION___RELATIONAL_EXPRESSION_IS_UNLIMITED_NATURAL_DERIVATION__DIAGNOSTICCHAIN_MAP:
+ return relationalExpressionIsUnlimitedNaturalDerivation((DiagnosticChain) arguments.get(0), (Map<Object, Object>) arguments.get(1));
+ case AlfPackage.RELATIONAL_EXPRESSION___RELATIONAL_EXPRESSION_TYPE_DERIVATION__DIAGNOSTICCHAIN_MAP:
+ return relationalExpressionTypeDerivation((DiagnosticChain) arguments.get(0), (Map<Object, Object>) arguments.get(1));
+ case AlfPackage.RELATIONAL_EXPRESSION___RELATIONAL_EXPRESSION_LOWER_DERIVATION__DIAGNOSTICCHAIN_MAP:
+ return relationalExpressionLowerDerivation((DiagnosticChain) arguments.get(0), (Map<Object, Object>) arguments.get(1));
+ case AlfPackage.RELATIONAL_EXPRESSION___RELATIONAL_EXPRESSION_UPPER_DERIVATION__DIAGNOSTICCHAIN_MAP:
+ return relationalExpressionUpperDerivation((DiagnosticChain) arguments.get(0), (Map<Object, Object>) arguments.get(1));
+ case AlfPackage.RELATIONAL_EXPRESSION___RELATIONAL_EXPRESSION_OPERAND_TYPES__DIAGNOSTICCHAIN_MAP:
+ return relationalExpressionOperandTypes((DiagnosticChain) arguments.get(0), (Map<Object, Object>) arguments.get(1));
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+} // RelationalExpressionImpl

Back to the top