/** | |
* Copyright (c) 2017 CEA LIST. | |
* | |
* 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: | |
* Arnault Lapitre (CEA LIST) arnault.lapitre@cea.fr | |
* - Initial API and Implementation | |
*/ | |
package org.eclipse.efm.execution.core.workflow.common.impl; | |
import org.eclipse.efm.execution.core.workflow.common.CommonPackage; | |
import org.eclipse.efm.execution.core.workflow.common.Location; | |
import org.eclipse.emf.common.notify.Notification; | |
import org.eclipse.emf.ecore.EClass; | |
import org.eclipse.emf.ecore.impl.ENotificationImpl; | |
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model object '<em><b>Location</b></em>'. | |
* <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* </p> | |
* <ul> | |
* <li>{@link org.eclipse.efm.execution.core.workflow.common.impl.LocationImpl#getRoot <em>Root</em>}</li> | |
* <li>{@link org.eclipse.efm.execution.core.workflow.common.impl.LocationImpl#getOutput <em>Output</em>}</li> | |
* <li>{@link org.eclipse.efm.execution.core.workflow.common.impl.LocationImpl#getLog <em>Log</em>}</li> | |
* <li>{@link org.eclipse.efm.execution.core.workflow.common.impl.LocationImpl#getDebug <em>Debug</em>}</li> | |
* </ul> | |
* | |
* @generated | |
*/ | |
public class LocationImpl extends MinimalEObjectImpl.Container implements Location { | |
/** | |
* The default value of the '{@link #getRoot() <em>Root</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getRoot() | |
* @generated | |
* @ordered | |
*/ | |
protected static final String ROOT_EDEFAULT = null; | |
/** | |
* The cached value of the '{@link #getRoot() <em>Root</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getRoot() | |
* @generated | |
* @ordered | |
*/ | |
protected String root = ROOT_EDEFAULT; | |
/** | |
* The default value of the '{@link #getOutput() <em>Output</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getOutput() | |
* @generated | |
* @ordered | |
*/ | |
protected static final String OUTPUT_EDEFAULT = "output"; | |
/** | |
* The cached value of the '{@link #getOutput() <em>Output</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getOutput() | |
* @generated | |
* @ordered | |
*/ | |
protected String output = OUTPUT_EDEFAULT; | |
/** | |
* The default value of the '{@link #getLog() <em>Log</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getLog() | |
* @generated | |
* @ordered | |
*/ | |
protected static final String LOG_EDEFAULT = "log"; | |
/** | |
* The cached value of the '{@link #getLog() <em>Log</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getLog() | |
* @generated | |
* @ordered | |
*/ | |
protected String log = LOG_EDEFAULT; | |
/** | |
* The default value of the '{@link #getDebug() <em>Debug</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getDebug() | |
* @generated | |
* @ordered | |
*/ | |
protected static final String DEBUG_EDEFAULT = "debug"; | |
/** | |
* The cached value of the '{@link #getDebug() <em>Debug</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #getDebug() | |
* @generated | |
* @ordered | |
*/ | |
protected String debug = DEBUG_EDEFAULT; | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected LocationImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return CommonPackage.Literals.LOCATION; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public String getRoot() { | |
return root; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public void setRoot(String newRoot) { | |
String oldRoot = root; | |
root = newRoot; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.LOCATION__ROOT, oldRoot, root)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public String getOutput() { | |
return output; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public void setOutput(String newOutput) { | |
String oldOutput = output; | |
output = newOutput; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.LOCATION__OUTPUT, oldOutput, output)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public String getLog() { | |
return log; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public void setLog(String newLog) { | |
String oldLog = log; | |
log = newLog; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.LOCATION__LOG, oldLog, log)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public String getDebug() { | |
return debug; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public void setDebug(String newDebug) { | |
String oldDebug = debug; | |
debug = newDebug; | |
if (eNotificationRequired()) | |
eNotify(new ENotificationImpl(this, Notification.SET, CommonPackage.LOCATION__DEBUG, oldDebug, debug)); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Object eGet(int featureID, boolean resolve, boolean coreType) { | |
switch (featureID) { | |
case CommonPackage.LOCATION__ROOT: | |
return getRoot(); | |
case CommonPackage.LOCATION__OUTPUT: | |
return getOutput(); | |
case CommonPackage.LOCATION__LOG: | |
return getLog(); | |
case CommonPackage.LOCATION__DEBUG: | |
return getDebug(); | |
} | |
return super.eGet(featureID, resolve, coreType); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eSet(int featureID, Object newValue) { | |
switch (featureID) { | |
case CommonPackage.LOCATION__ROOT: | |
setRoot((String)newValue); | |
return; | |
case CommonPackage.LOCATION__OUTPUT: | |
setOutput((String)newValue); | |
return; | |
case CommonPackage.LOCATION__LOG: | |
setLog((String)newValue); | |
return; | |
case CommonPackage.LOCATION__DEBUG: | |
setDebug((String)newValue); | |
return; | |
} | |
super.eSet(featureID, newValue); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public void eUnset(int featureID) { | |
switch (featureID) { | |
case CommonPackage.LOCATION__ROOT: | |
setRoot(ROOT_EDEFAULT); | |
return; | |
case CommonPackage.LOCATION__OUTPUT: | |
setOutput(OUTPUT_EDEFAULT); | |
return; | |
case CommonPackage.LOCATION__LOG: | |
setLog(LOG_EDEFAULT); | |
return; | |
case CommonPackage.LOCATION__DEBUG: | |
setDebug(DEBUG_EDEFAULT); | |
return; | |
} | |
super.eUnset(featureID); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public boolean eIsSet(int featureID) { | |
switch (featureID) { | |
case CommonPackage.LOCATION__ROOT: | |
return ROOT_EDEFAULT == null ? root != null : !ROOT_EDEFAULT.equals(root); | |
case CommonPackage.LOCATION__OUTPUT: | |
return OUTPUT_EDEFAULT == null ? output != null : !OUTPUT_EDEFAULT.equals(output); | |
case CommonPackage.LOCATION__LOG: | |
return LOG_EDEFAULT == null ? log != null : !LOG_EDEFAULT.equals(log); | |
case CommonPackage.LOCATION__DEBUG: | |
return DEBUG_EDEFAULT == null ? debug != null : !DEBUG_EDEFAULT.equals(debug); | |
} | |
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(" (root: "); | |
result.append(root); | |
result.append(", output: "); | |
result.append(output); | |
result.append(", log: "); | |
result.append(log); | |
result.append(", debug: "); | |
result.append(debug); | |
result.append(')'); | |
return result.toString(); | |
} | |
} //LocationImpl |