diff options
Diffstat (limited to 'plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/Problem/Problem.java')
-rw-r--r-- | plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/Problem/Problem.java | 320 |
1 files changed, 320 insertions, 0 deletions
diff --git a/plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/Problem/Problem.java b/plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/Problem/Problem.java new file mode 100644 index 00000000..6b728852 --- /dev/null +++ b/plugins/org.eclipse.m2m.atl.common/src/org/eclipse/m2m/atl/common/Problem/Problem.java @@ -0,0 +1,320 @@ +/** + * Copyright (c) 2008, 2012, 2015 Obeo. + * 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: + * Obeo - initial API and implementation + * Dennis Wagelaar (Vrije Universiteit Brussel) + */ +package org.eclipse.m2m.atl.common.Problem; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Problem</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link org.eclipse.m2m.atl.common.Problem.Problem#getSeverity <em>Severity</em>}</li> + * <li>{@link org.eclipse.m2m.atl.common.Problem.Problem#getLocation <em>Location</em>}</li> + * <li>{@link org.eclipse.m2m.atl.common.Problem.Problem#getDescription <em>Description</em>}</li> + * </ul> + * + * @see org.eclipse.m2m.atl.common.Problem.ProblemPackage#getProblem() + * @model kind="class" + * @generated + */ +public class Problem extends MinimalEObjectImpl.Container implements EObject { + /** + * The default value of the '{@link #getSeverity() <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSeverity() + * @generated + * @ordered + */ + protected static final Severity SEVERITY_EDEFAULT = Severity.CRITIC; + + /** + * The cached value of the '{@link #getSeverity() <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSeverity() + * @generated + * @ordered + */ + protected Severity severity = SEVERITY_EDEFAULT; + + /** + * The default value of the '{@link #getLocation() <em>Location</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLocation() + * @generated + * @ordered + */ + protected static final String LOCATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLocation() <em>Location</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLocation() + * @generated + * @ordered + */ + protected String location = LOCATION_EDEFAULT; + + /** + * The default value of the '{@link #getDescription() <em>Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected Problem() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ProblemPackage.Literals.PROBLEM; + } + + /** + * Returns the value of the '<em><b>Severity</b></em>' attribute. + * The literals are from the enumeration {@link org.eclipse.m2m.atl.common.Problem.Severity}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Severity</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Severity</em>' attribute. + * @see org.eclipse.m2m.atl.common.Problem.Severity + * @see #setSeverity(Severity) + * @see org.eclipse.m2m.atl.common.Problem.ProblemPackage#getProblem_Severity() + * @model unique="false" required="true" ordered="false" + * @generated + */ + public Severity getSeverity() { + return severity; + } + + /** + * Sets the value of the '{@link org.eclipse.m2m.atl.common.Problem.Problem#getSeverity <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Severity</em>' attribute. + * @see org.eclipse.m2m.atl.common.Problem.Severity + * @see #getSeverity() + * @generated + */ + public void setSeverity(Severity newSeverity) { + Severity oldSeverity = severity; + severity = newSeverity == null ? SEVERITY_EDEFAULT : newSeverity; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.PROBLEM__SEVERITY, oldSeverity, severity)); + } + + /** + * Returns the value of the '<em><b>Location</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Location</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Location</em>' attribute. + * @see #setLocation(String) + * @see org.eclipse.m2m.atl.common.Problem.ProblemPackage#getProblem_Location() + * @model unique="false" dataType="org.eclipse.m2m.atl.common.Problem.PrimitiveTypes.String" required="true" ordered="false" + * @generated + */ + public String getLocation() { + return location; + } + + /** + * Sets the value of the '{@link org.eclipse.m2m.atl.common.Problem.Problem#getLocation <em>Location</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Location</em>' attribute. + * @see #getLocation() + * @generated + */ + public void setLocation(String newLocation) { + String oldLocation = location; + location = newLocation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.PROBLEM__LOCATION, oldLocation, location)); + } + + /** + * Returns the value of the '<em><b>Description</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Description</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Description</em>' attribute. + * @see #setDescription(String) + * @see org.eclipse.m2m.atl.common.Problem.ProblemPackage#getProblem_Description() + * @model unique="false" dataType="org.eclipse.m2m.atl.common.Problem.PrimitiveTypes.String" required="true" ordered="false" + * @generated + */ + public String getDescription() { + return description; + } + + /** + * Sets the value of the '{@link org.eclipse.m2m.atl.common.Problem.Problem#getDescription <em>Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Description</em>' attribute. + * @see #getDescription() + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.PROBLEM__DESCRIPTION, oldDescription, description)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ProblemPackage.PROBLEM__SEVERITY: + return getSeverity(); + case ProblemPackage.PROBLEM__LOCATION: + return getLocation(); + case ProblemPackage.PROBLEM__DESCRIPTION: + return getDescription(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ProblemPackage.PROBLEM__SEVERITY: + setSeverity((Severity)newValue); + return; + case ProblemPackage.PROBLEM__LOCATION: + setLocation((String)newValue); + return; + case ProblemPackage.PROBLEM__DESCRIPTION: + setDescription((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ProblemPackage.PROBLEM__SEVERITY: + setSeverity(SEVERITY_EDEFAULT); + return; + case ProblemPackage.PROBLEM__LOCATION: + setLocation(LOCATION_EDEFAULT); + return; + case ProblemPackage.PROBLEM__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ProblemPackage.PROBLEM__SEVERITY: + return severity != SEVERITY_EDEFAULT; + case ProblemPackage.PROBLEM__LOCATION: + return LOCATION_EDEFAULT == null ? location != null : !LOCATION_EDEFAULT.equals(location); + case ProblemPackage.PROBLEM__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (severity: "); + result.append(severity); + result.append(", location: "); + result.append(location); + result.append(", description: "); + result.append(description); + result.append(')'); + return result.toString(); + } + +} // Problem |