/**
*
*
*
* $Id$
*/
package net.opengis.wfsv.impl;
import java.math.BigInteger;
import java.util.Collection;
import net.opengis.wfs.ResultTypeType;
import net.opengis.wfs.impl.BaseRequestTypeImpl;
import net.opengis.wfsv.DifferenceQueryType;
import net.opengis.wfsv.GetLogType;
import net.opengis.wfsv.WfsvPackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
*
* An implementation of the model object 'Get Log Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.wfsv.impl.GetLogTypeImpl#getDifferenceQuery Difference Query}
* - {@link net.opengis.wfsv.impl.GetLogTypeImpl#getMaxFeatures Max Features}
* - {@link net.opengis.wfsv.impl.GetLogTypeImpl#getOutputFormat Output Format}
* - {@link net.opengis.wfsv.impl.GetLogTypeImpl#getResultType Result Type}
*
*
*
* @generated
*/
public class GetLogTypeImpl extends BaseRequestTypeImpl implements GetLogType {
/**
* The cached value of the '{@link #getDifferenceQuery() Difference Query}' containment reference list.
*
*
* @see #getDifferenceQuery()
* @generated
* @ordered
*/
protected EList differenceQuery;
/**
* The default value of the '{@link #getMaxFeatures() Max Features}' attribute.
*
*
* @see #getMaxFeatures()
* @generated
* @ordered
*/
protected static final BigInteger MAX_FEATURES_EDEFAULT = null;
/**
* The cached value of the '{@link #getMaxFeatures() Max Features}' attribute.
*
*
* @see #getMaxFeatures()
* @generated
* @ordered
*/
protected BigInteger maxFeatures = MAX_FEATURES_EDEFAULT;
/**
* The default value of the '{@link #getOutputFormat() Output Format}' attribute.
*
*
* @see #getOutputFormat()
* @generated
* @ordered
*/
protected static final String OUTPUT_FORMAT_EDEFAULT = "text/xml; subtype=gml/3.1.1";
/**
* 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;
/**
* The default value of the '{@link #getResultType() Result Type}' attribute.
*
*
* @see #getResultType()
* @generated
* @ordered
*/
protected static final ResultTypeType RESULT_TYPE_EDEFAULT = ResultTypeType.RESULTS_LITERAL;
/**
* The cached value of the '{@link #getResultType() Result Type}' attribute.
*
*
* @see #getResultType()
* @generated
* @ordered
*/
protected ResultTypeType resultType = RESULT_TYPE_EDEFAULT;
/**
* This is true if the Result Type attribute has been set.
*
*
* @generated
* @ordered
*/
protected boolean resultTypeESet;
/**
*
*
* @generated
*/
protected GetLogTypeImpl() {
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass() {
return WfsvPackage.Literals.GET_LOG_TYPE;
}
/**
*
*
* @generated
*/
public EList getDifferenceQuery() {
if (differenceQuery == null) {
differenceQuery = new EObjectContainmentEList(DifferenceQueryType.class, this, WfsvPackage.GET_LOG_TYPE__DIFFERENCE_QUERY);
}
return differenceQuery;
}
/**
*
*
* @generated
*/
public BigInteger getMaxFeatures() {
return maxFeatures;
}
/**
*
*
* @generated
*/
public void setMaxFeatures(BigInteger newMaxFeatures) {
BigInteger oldMaxFeatures = maxFeatures;
maxFeatures = newMaxFeatures;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, WfsvPackage.GET_LOG_TYPE__MAX_FEATURES, oldMaxFeatures, maxFeatures));
}
/**
*
*
* @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, WfsvPackage.GET_LOG_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, WfsvPackage.GET_LOG_TYPE__OUTPUT_FORMAT, oldOutputFormat, OUTPUT_FORMAT_EDEFAULT, oldOutputFormatESet));
}
/**
*
*
* @generated
*/
public boolean isSetOutputFormat() {
return outputFormatESet;
}
/**
*
*
* @generated
*/
public ResultTypeType getResultType() {
return resultType;
}
/**
*
*
* @generated
*/
public void setResultType(ResultTypeType newResultType) {
ResultTypeType oldResultType = resultType;
resultType = newResultType == null ? RESULT_TYPE_EDEFAULT : newResultType;
boolean oldResultTypeESet = resultTypeESet;
resultTypeESet = true;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, WfsvPackage.GET_LOG_TYPE__RESULT_TYPE, oldResultType, resultType, !oldResultTypeESet));
}
/**
*
*
* @generated
*/
public void unsetResultType() {
ResultTypeType oldResultType = resultType;
boolean oldResultTypeESet = resultTypeESet;
resultType = RESULT_TYPE_EDEFAULT;
resultTypeESet = false;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.UNSET, WfsvPackage.GET_LOG_TYPE__RESULT_TYPE, oldResultType, RESULT_TYPE_EDEFAULT, oldResultTypeESet));
}
/**
*
*
* @generated
*/
public boolean isSetResultType() {
return resultTypeESet;
}
/**
*
*
* @generated
*/
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case WfsvPackage.GET_LOG_TYPE__DIFFERENCE_QUERY:
return ((InternalEList)getDifferenceQuery()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case WfsvPackage.GET_LOG_TYPE__DIFFERENCE_QUERY:
return getDifferenceQuery();
case WfsvPackage.GET_LOG_TYPE__MAX_FEATURES:
return getMaxFeatures();
case WfsvPackage.GET_LOG_TYPE__OUTPUT_FORMAT:
return getOutputFormat();
case WfsvPackage.GET_LOG_TYPE__RESULT_TYPE:
return getResultType();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case WfsvPackage.GET_LOG_TYPE__DIFFERENCE_QUERY:
getDifferenceQuery().clear();
getDifferenceQuery().addAll((Collection)newValue);
return;
case WfsvPackage.GET_LOG_TYPE__MAX_FEATURES:
setMaxFeatures((BigInteger)newValue);
return;
case WfsvPackage.GET_LOG_TYPE__OUTPUT_FORMAT:
setOutputFormat((String)newValue);
return;
case WfsvPackage.GET_LOG_TYPE__RESULT_TYPE:
setResultType((ResultTypeType)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case WfsvPackage.GET_LOG_TYPE__DIFFERENCE_QUERY:
getDifferenceQuery().clear();
return;
case WfsvPackage.GET_LOG_TYPE__MAX_FEATURES:
setMaxFeatures(MAX_FEATURES_EDEFAULT);
return;
case WfsvPackage.GET_LOG_TYPE__OUTPUT_FORMAT:
unsetOutputFormat();
return;
case WfsvPackage.GET_LOG_TYPE__RESULT_TYPE:
unsetResultType();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case WfsvPackage.GET_LOG_TYPE__DIFFERENCE_QUERY:
return differenceQuery != null && !differenceQuery.isEmpty();
case WfsvPackage.GET_LOG_TYPE__MAX_FEATURES:
return MAX_FEATURES_EDEFAULT == null ? maxFeatures != null : !MAX_FEATURES_EDEFAULT.equals(maxFeatures);
case WfsvPackage.GET_LOG_TYPE__OUTPUT_FORMAT:
return isSetOutputFormat();
case WfsvPackage.GET_LOG_TYPE__RESULT_TYPE:
return isSetResultType();
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (maxFeatures: ");
result.append(maxFeatures);
result.append(", outputFormat: ");
if (outputFormatESet) result.append(outputFormat); else result.append("");
result.append(", resultType: ");
if (resultTypeESet) result.append(resultType); else result.append("");
result.append(')');
return result.toString();
}
} //GetLogTypeImpl