/**
*
*
*
* $Id$
*/
package net.opengis.ows10.impl;
import java.util.Collection;
import net.opengis.ows10.DescriptionType;
import net.opengis.ows10.KeywordsType;
import net.opengis.ows10.Ows10Package;
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.impl.EObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
*
* An implementation of the model object 'Description Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.ows10.impl.DescriptionTypeImpl#getTitle Title}
* - {@link net.opengis.ows10.impl.DescriptionTypeImpl#getAbstract Abstract}
* - {@link net.opengis.ows10.impl.DescriptionTypeImpl#getKeywords Keywords}
*
*
*
* @generated
*/
public class DescriptionTypeImpl extends EObjectImpl implements DescriptionType {
/**
* The default value of the '{@link #getTitle() Title}' attribute.
*
*
* @see #getTitle()
* @generated
* @ordered
*/
protected static final String TITLE_EDEFAULT = null;
/**
* The cached value of the '{@link #getTitle() Title}' attribute.
*
*
* @see #getTitle()
* @generated
* @ordered
*/
protected String title = TITLE_EDEFAULT;
/**
* The default value of the '{@link #getAbstract() Abstract}' attribute.
*
*
* @see #getAbstract()
* @generated
* @ordered
*/
protected static final String ABSTRACT_EDEFAULT = null;
/**
* The cached value of the '{@link #getAbstract() Abstract}' attribute.
*
*
* @see #getAbstract()
* @generated
* @ordered
*/
protected String abstract_ = ABSTRACT_EDEFAULT;
/**
* The cached value of the '{@link #getKeywords() Keywords}' containment reference list.
*
*
* @see #getKeywords()
* @generated
* @ordered
*/
protected EList keywords;
/**
*
*
* @generated
*/
protected DescriptionTypeImpl() {
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass() {
return Ows10Package.eINSTANCE.getDescriptionType();
}
/**
*
*
* @generated
*/
public String getTitle() {
return title;
}
/**
*
*
* @generated
*/
public void setTitle(String newTitle) {
String oldTitle = title;
title = newTitle;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Ows10Package.DESCRIPTION_TYPE__TITLE, oldTitle, title));
}
/**
*
*
* @generated
*/
public String getAbstract() {
return abstract_;
}
/**
*
*
* @generated
*/
public void setAbstract(String newAbstract) {
String oldAbstract = abstract_;
abstract_ = newAbstract;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Ows10Package.DESCRIPTION_TYPE__ABSTRACT, oldAbstract, abstract_));
}
/**
*
*
* @generated
*/
public EList getKeywords() {
if (keywords == null) {
keywords = new EObjectContainmentEList(KeywordsType.class, this, Ows10Package.DESCRIPTION_TYPE__KEYWORDS);
}
return keywords;
}
/**
*
*
* @generated
*/
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Ows10Package.DESCRIPTION_TYPE__KEYWORDS:
return ((InternalEList)getKeywords()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Ows10Package.DESCRIPTION_TYPE__TITLE:
return getTitle();
case Ows10Package.DESCRIPTION_TYPE__ABSTRACT:
return getAbstract();
case Ows10Package.DESCRIPTION_TYPE__KEYWORDS:
return getKeywords();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Ows10Package.DESCRIPTION_TYPE__TITLE:
setTitle((String)newValue);
return;
case Ows10Package.DESCRIPTION_TYPE__ABSTRACT:
setAbstract((String)newValue);
return;
case Ows10Package.DESCRIPTION_TYPE__KEYWORDS:
getKeywords().clear();
getKeywords().addAll((Collection)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case Ows10Package.DESCRIPTION_TYPE__TITLE:
setTitle(TITLE_EDEFAULT);
return;
case Ows10Package.DESCRIPTION_TYPE__ABSTRACT:
setAbstract(ABSTRACT_EDEFAULT);
return;
case Ows10Package.DESCRIPTION_TYPE__KEYWORDS:
getKeywords().clear();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case Ows10Package.DESCRIPTION_TYPE__TITLE:
return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title);
case Ows10Package.DESCRIPTION_TYPE__ABSTRACT:
return ABSTRACT_EDEFAULT == null ? abstract_ != null : !ABSTRACT_EDEFAULT.equals(abstract_);
case Ows10Package.DESCRIPTION_TYPE__KEYWORDS:
return keywords != null && !keywords.isEmpty();
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (title: ");
result.append(title);
result.append(", abstract: ");
result.append(abstract_);
result.append(')');
return result.toString();
}
} //DescriptionTypeImpl