From 3f5aaab5025b8eb243f414b1c789085327df04f4 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Wed, 20 Mar 2019 16:09:09 +0100 Subject: Fault tree transformation for partial models WIP --- .../impl/ThresholdEntryImpl.java | 240 +++++++++++++++++++++ 1 file changed, 240 insertions(+) create mode 100644 Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/impl/ThresholdEntryImpl.java (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/impl/ThresholdEntryImpl.java') diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/impl/ThresholdEntryImpl.java b/Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/impl/ThresholdEntryImpl.java new file mode 100644 index 00000000..ea1050df --- /dev/null +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/impl/ThresholdEntryImpl.java @@ -0,0 +1,240 @@ +/** + * generated by Xtext 2.16.0 + */ +package hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl; + +import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage; +import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ComparisonOperator; +import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ThresholdEntry; + +import java.math.BigDecimal; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Threshold Entry'. + * + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public class ThresholdEntryImpl extends ObjectiveEntryImpl implements ThresholdEntry +{ + /** + * The default value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected static final ComparisonOperator OPERATOR_EDEFAULT = ComparisonOperator.LESS_EQUALS; + + /** + * The cached value of the '{@link #getOperator() Operator}' attribute. + * + * + * @see #getOperator() + * @generated + * @ordered + */ + protected ComparisonOperator operator = OPERATOR_EDEFAULT; + + /** + * The default value of the '{@link #getThreshold() Threshold}' attribute. + * + * + * @see #getThreshold() + * @generated + * @ordered + */ + protected static final BigDecimal THRESHOLD_EDEFAULT = null; + + /** + * The cached value of the '{@link #getThreshold() Threshold}' attribute. + * + * + * @see #getThreshold() + * @generated + * @ordered + */ + protected BigDecimal threshold = THRESHOLD_EDEFAULT; + + /** + * + * + * @generated + */ + protected ThresholdEntryImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return ApplicationConfigurationPackage.Literals.THRESHOLD_ENTRY; + } + + /** + * + * + * @generated + */ + @Override + public ComparisonOperator getOperator() + { + return operator; + } + + /** + * + * + * @generated + */ + @Override + public void setOperator(ComparisonOperator newOperator) + { + ComparisonOperator oldOperator = operator; + operator = newOperator == null ? OPERATOR_EDEFAULT : newOperator; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.THRESHOLD_ENTRY__OPERATOR, oldOperator, operator)); + } + + /** + * + * + * @generated + */ + @Override + public BigDecimal getThreshold() + { + return threshold; + } + + /** + * + * + * @generated + */ + @Override + public void setThreshold(BigDecimal newThreshold) + { + BigDecimal oldThreshold = threshold; + threshold = newThreshold; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.THRESHOLD_ENTRY__THRESHOLD, oldThreshold, threshold)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case ApplicationConfigurationPackage.THRESHOLD_ENTRY__OPERATOR: + return getOperator(); + case ApplicationConfigurationPackage.THRESHOLD_ENTRY__THRESHOLD: + return getThreshold(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case ApplicationConfigurationPackage.THRESHOLD_ENTRY__OPERATOR: + setOperator((ComparisonOperator)newValue); + return; + case ApplicationConfigurationPackage.THRESHOLD_ENTRY__THRESHOLD: + setThreshold((BigDecimal)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case ApplicationConfigurationPackage.THRESHOLD_ENTRY__OPERATOR: + setOperator(OPERATOR_EDEFAULT); + return; + case ApplicationConfigurationPackage.THRESHOLD_ENTRY__THRESHOLD: + setThreshold(THRESHOLD_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case ApplicationConfigurationPackage.THRESHOLD_ENTRY__OPERATOR: + return operator != OPERATOR_EDEFAULT; + case ApplicationConfigurationPackage.THRESHOLD_ENTRY__THRESHOLD: + return THRESHOLD_EDEFAULT == null ? threshold != null : !THRESHOLD_EDEFAULT.equals(threshold); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (operator: "); + result.append(operator); + result.append(", threshold: "); + result.append(threshold); + result.append(')'); + return result.toString(); + } + +} //ThresholdEntryImpl -- cgit v1.2.3-70-g09d2