/**
*
*
*
* $Id$
*/
package net.opengis.wfs20.impl;
import java.util.Collection;
import javax.xml.namespace.QName;
import net.opengis.wfs20.DescribeFeatureTypeType;
import net.opengis.wfs20.Wfs20Package;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EDataTypeEList;
/**
*
* An implementation of the model object 'Describe Feature Type Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.wfs20.impl.DescribeFeatureTypeTypeImpl#getTypeName Type Name}
* - {@link net.opengis.wfs20.impl.DescribeFeatureTypeTypeImpl#getOutputFormat Output Format}
*
*
*
* @generated
*/
public class DescribeFeatureTypeTypeImpl extends BaseRequestTypeImpl implements DescribeFeatureTypeType {
/**
* The cached value of the '{@link #getTypeName() Type Name}' attribute list.
*
*
* @see #getTypeName()
* @generated
* @ordered
*/
protected EList typeName;
/**
* The default value of the '{@link #getOutputFormat() Output Format}' attribute.
*
*
* @see #getOutputFormat()
* @generated
* @ordered
*/
protected static final String OUTPUT_FORMAT_EDEFAULT = "application/gml+xml; version=3.2";
/**
* The cached value of the '{@link #getOutputFormat() Output Format}' attribute.
*
*
* @see #getOutputFormat()
* @generated
* @ordered
*/
protected String outputFormat = OUTPUT_FORMAT_EDEFAULT;
/**
* This is true if the Output Format attribute has been set.
*
*
* @generated
* @ordered
*/
protected boolean outputFormatESet;
/**
*
*
* @generated
*/
protected DescribeFeatureTypeTypeImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return Wfs20Package.Literals.DESCRIBE_FEATURE_TYPE_TYPE;
}
/**
*
*
* @generated
*/
public EList getTypeName() {
if (typeName == null) {
typeName = new EDataTypeEList(QName.class, this, Wfs20Package.DESCRIBE_FEATURE_TYPE_TYPE__TYPE_NAME);
}
return typeName;
}
/**
*
*
* @generated
*/
public String getOutputFormat() {
return outputFormat;
}
/**
*
*
* @generated
*/
public void setOutputFormat(String newOutputFormat) {
String oldOutputFormat = outputFormat;
outputFormat = newOutputFormat;
boolean oldOutputFormatESet = outputFormatESet;
outputFormatESet = true;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wfs20Package.DESCRIBE_FEATURE_TYPE_TYPE__OUTPUT_FORMAT, oldOutputFormat, outputFormat, !oldOutputFormatESet));
}
/**
*
*
* @generated
*/
public void unsetOutputFormat() {
String oldOutputFormat = outputFormat;
boolean oldOutputFormatESet = outputFormatESet;
outputFormat = OUTPUT_FORMAT_EDEFAULT;
outputFormatESet = false;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.UNSET, Wfs20Package.DESCRIBE_FEATURE_TYPE_TYPE__OUTPUT_FORMAT, oldOutputFormat, OUTPUT_FORMAT_EDEFAULT, oldOutputFormatESet));
}
/**
*
*
* @generated
*/
public boolean isSetOutputFormat() {
return outputFormatESet;
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Wfs20Package.DESCRIBE_FEATURE_TYPE_TYPE__TYPE_NAME:
return getTypeName();
case Wfs20Package.DESCRIBE_FEATURE_TYPE_TYPE__OUTPUT_FORMAT:
return getOutputFormat();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Wfs20Package.DESCRIBE_FEATURE_TYPE_TYPE__TYPE_NAME:
getTypeName().clear();
getTypeName().addAll((Collection extends QName>)newValue);
return;
case Wfs20Package.DESCRIBE_FEATURE_TYPE_TYPE__OUTPUT_FORMAT:
setOutputFormat((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Wfs20Package.DESCRIBE_FEATURE_TYPE_TYPE__TYPE_NAME:
getTypeName().clear();
return;
case Wfs20Package.DESCRIBE_FEATURE_TYPE_TYPE__OUTPUT_FORMAT:
unsetOutputFormat();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Wfs20Package.DESCRIBE_FEATURE_TYPE_TYPE__TYPE_NAME:
return typeName != null && !typeName.isEmpty();
case Wfs20Package.DESCRIBE_FEATURE_TYPE_TYPE__OUTPUT_FORMAT:
return isSetOutputFormat();
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (typeName: ");
result.append(typeName);
result.append(", outputFormat: ");
if (outputFormatESet) result.append(outputFormat); else result.append("");
result.append(')');
return result.toString();
}
} //DescribeFeatureTypeTypeImpl