/*******************************************************************************
* Copyright (c) 2006-2012
* Software Technology Group, Dresden University of Technology
* DevBoost GmbH, Berlin, Amtsgericht Charlottenburg, HRB 140026
*
* 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:
* Software Technology Group - TU Dresden, Germany;
* DevBoost GmbH - Berlin, Germany
* - initial API and implementation
******************************************************************************/
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.oasisopen.names.tc.opendocument.xmlns.form.impl;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.oasisopen.names.tc.opendocument.xmlns.form.FormPackage;
import org.oasisopen.names.tc.opendocument.xmlns.form.HiddenType;
import org.oasisopen.names.tc.opendocument.xmlns.text.impl.CommonFormControlContentImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Hidden Type</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.oasisopen.names.tc.opendocument.xmlns.form.impl.HiddenTypeImpl#getBind <em>Bind</em>}</li>
* <li>{@link org.oasisopen.names.tc.opendocument.xmlns.form.impl.HiddenTypeImpl#getControlImplementation <em>Control Implementation</em>}</li>
* <li>{@link org.oasisopen.names.tc.opendocument.xmlns.form.impl.HiddenTypeImpl#getId <em>Id</em>}</li>
* <li>{@link org.oasisopen.names.tc.opendocument.xmlns.form.impl.HiddenTypeImpl#getName <em>Name</em>}</li>
* <li>{@link org.oasisopen.names.tc.opendocument.xmlns.form.impl.HiddenTypeImpl#getValue <em>Value</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class HiddenTypeImpl extends CommonFormControlContentImpl implements HiddenType {
/**
* The default value of the '{@link #getBind() <em>Bind</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getBind()
* @generated
* @ordered
*/
protected static final String BIND_EDEFAULT = null;
/**
* The cached value of the '{@link #getBind() <em>Bind</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getBind()
* @generated
* @ordered
*/
protected String bind = BIND_EDEFAULT;
/**
* The default value of the '{@link #getControlImplementation() <em>Control Implementation</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getControlImplementation()
* @generated
* @ordered
*/
protected static final String CONTROL_IMPLEMENTATION_EDEFAULT = null;
/**
* The cached value of the '{@link #getControlImplementation() <em>Control Implementation</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getControlImplementation()
* @generated
* @ordered
*/
protected String controlImplementation = CONTROL_IMPLEMENTATION_EDEFAULT;
/**
* The default value of the '{@link #getId() <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getId()
* @generated
* @ordered
*/
protected static final String ID_EDEFAULT = null;
/**
* The cached value of the '{@link #getId() <em>Id</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getId()
* @generated
* @ordered
*/
protected String id = ID_EDEFAULT;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* The default value of the '{@link #getValue() <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected static final String VALUE_EDEFAULT = null;
/**
* The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected String value = VALUE_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected HiddenTypeImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FormPackage.eINSTANCE.getHiddenType();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getBind() {
return bind;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setBind(String newBind) {
String oldBind = bind;
bind = newBind;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FormPackage.HIDDEN_TYPE__BIND, oldBind, bind));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getControlImplementation() {
return controlImplementation;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setControlImplementation(String newControlImplementation) {
String oldControlImplementation = controlImplementation;
controlImplementation = newControlImplementation;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FormPackage.HIDDEN_TYPE__CONTROL_IMPLEMENTATION, oldControlImplementation, controlImplementation));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getId() {
return id;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setId(String newId) {
String oldId = id;
id = newId;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FormPackage.HIDDEN_TYPE__ID, oldId, id));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FormPackage.HIDDEN_TYPE__NAME, oldName, name));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValue(String newValue) {
String oldValue = value;
value = newValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FormPackage.HIDDEN_TYPE__VALUE, oldValue, value));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FormPackage.HIDDEN_TYPE__BIND:
return getBind();
case FormPackage.HIDDEN_TYPE__CONTROL_IMPLEMENTATION:
return getControlImplementation();
case FormPackage.HIDDEN_TYPE__ID:
return getId();
case FormPackage.HIDDEN_TYPE__NAME:
return getName();
case FormPackage.HIDDEN_TYPE__VALUE:
return getValue();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case FormPackage.HIDDEN_TYPE__BIND:
setBind((String)newValue);
return;
case FormPackage.HIDDEN_TYPE__CONTROL_IMPLEMENTATION:
setControlImplementation((String)newValue);
return;
case FormPackage.HIDDEN_TYPE__ID:
setId((String)newValue);
return;
case FormPackage.HIDDEN_TYPE__NAME:
setName((String)newValue);
return;
case FormPackage.HIDDEN_TYPE__VALUE:
setValue((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FormPackage.HIDDEN_TYPE__BIND:
setBind(BIND_EDEFAULT);
return;
case FormPackage.HIDDEN_TYPE__CONTROL_IMPLEMENTATION:
setControlImplementation(CONTROL_IMPLEMENTATION_EDEFAULT);
return;
case FormPackage.HIDDEN_TYPE__ID:
setId(ID_EDEFAULT);
return;
case FormPackage.HIDDEN_TYPE__NAME:
setName(NAME_EDEFAULT);
return;
case FormPackage.HIDDEN_TYPE__VALUE:
setValue(VALUE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FormPackage.HIDDEN_TYPE__BIND:
return BIND_EDEFAULT == null ? bind != null : !BIND_EDEFAULT.equals(bind);
case FormPackage.HIDDEN_TYPE__CONTROL_IMPLEMENTATION:
return CONTROL_IMPLEMENTATION_EDEFAULT == null ? controlImplementation != null : !CONTROL_IMPLEMENTATION_EDEFAULT.equals(controlImplementation);
case FormPackage.HIDDEN_TYPE__ID:
return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id);
case FormPackage.HIDDEN_TYPE__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
case FormPackage.HIDDEN_TYPE__VALUE:
return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
}
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(" (bind: ");
result.append(bind);
result.append(", controlImplementation: ");
result.append(controlImplementation);
result.append(", id: ");
result.append(id);
result.append(", name: ");
result.append(name);
result.append(", value: ");
result.append(value);
result.append(')');
return result.toString();
}
} //HiddenTypeImpl