/**
*
*
*
* $Id$
*/
package net.opengis.ows11.impl;
import net.opengis.ows11.MetadataType;
import net.opengis.ows11.Ows11Package;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
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.BasicFeatureMap;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.InternalEList;
/**
*
* An implementation of the model object 'Metadata Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.ows11.impl.MetadataTypeImpl#getAbstractMetaDataGroup Abstract Meta Data Group}
* - {@link net.opengis.ows11.impl.MetadataTypeImpl#getAbstractMetaData Abstract Meta Data}
* - {@link net.opengis.ows11.impl.MetadataTypeImpl#getAbout About}
* - {@link net.opengis.ows11.impl.MetadataTypeImpl#getTitle Title}
*
*
*
* @generated
*/
public class MetadataTypeImpl extends EObjectImpl implements MetadataType {
/**
* The cached value of the '{@link #getAbstractMetaDataGroup() Abstract Meta Data Group}' attribute list.
*
*
* @see #getAbstractMetaDataGroup()
* @generated
* @ordered
*/
protected FeatureMap abstractMetaDataGroup;
/**
* The default value of the '{@link #getAbout() About}' attribute.
*
*
* @see #getAbout()
* @generated
* @ordered
*/
protected static final String ABOUT_EDEFAULT = null;
/**
* The cached value of the '{@link #getAbout() About}' attribute.
*
*
* @see #getAbout()
* @generated
* @ordered
*/
protected String about = ABOUT_EDEFAULT;
/**
* 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;
/**
*
*
* @generated
*/
protected MetadataTypeImpl() {
super();
}
/**
*
*
* @generated
*/
protected EClass eStaticClass() {
return Ows11Package.Literals.METADATA_TYPE;
}
/**
*
*
* @generated
*/
public FeatureMap getAbstractMetaDataGroup() {
if (abstractMetaDataGroup == null) {
abstractMetaDataGroup = new BasicFeatureMap(this, Ows11Package.METADATA_TYPE__ABSTRACT_META_DATA_GROUP);
}
return abstractMetaDataGroup;
}
/**
*
*
* @generated
*/
public EObject getAbstractMetaData() {
return (EObject)getAbstractMetaDataGroup().get(Ows11Package.Literals.METADATA_TYPE__ABSTRACT_META_DATA, true);
}
/**
*
*
* @generated
*/
public NotificationChain basicSetAbstractMetaData(EObject newAbstractMetaData, NotificationChain msgs) {
return ((FeatureMap.Internal)getAbstractMetaDataGroup()).basicAdd(Ows11Package.Literals.METADATA_TYPE__ABSTRACT_META_DATA, newAbstractMetaData, msgs);
}
/**
*
*
* @generated
*/
public String getAbout() {
return about;
}
/**
*
*
* @generated
*/
public void setAbout(String newAbout) {
String oldAbout = about;
about = newAbout;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Ows11Package.METADATA_TYPE__ABOUT, oldAbout, about));
}
/**
*
*
* @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, Ows11Package.METADATA_TYPE__TITLE, oldTitle, title));
}
/**
*
*
* @generated
*/
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Ows11Package.METADATA_TYPE__ABSTRACT_META_DATA_GROUP:
return ((InternalEList)getAbstractMetaDataGroup()).basicRemove(otherEnd, msgs);
case Ows11Package.METADATA_TYPE__ABSTRACT_META_DATA:
return basicSetAbstractMetaData(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Ows11Package.METADATA_TYPE__ABSTRACT_META_DATA_GROUP:
if (coreType) return getAbstractMetaDataGroup();
return ((FeatureMap.Internal)getAbstractMetaDataGroup()).getWrapper();
case Ows11Package.METADATA_TYPE__ABSTRACT_META_DATA:
return getAbstractMetaData();
case Ows11Package.METADATA_TYPE__ABOUT:
return getAbout();
case Ows11Package.METADATA_TYPE__TITLE:
return getTitle();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Ows11Package.METADATA_TYPE__ABSTRACT_META_DATA_GROUP:
((FeatureMap.Internal)getAbstractMetaDataGroup()).set(newValue);
return;
case Ows11Package.METADATA_TYPE__ABOUT:
setAbout((String)newValue);
return;
case Ows11Package.METADATA_TYPE__TITLE:
setTitle((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case Ows11Package.METADATA_TYPE__ABSTRACT_META_DATA_GROUP:
getAbstractMetaDataGroup().clear();
return;
case Ows11Package.METADATA_TYPE__ABOUT:
setAbout(ABOUT_EDEFAULT);
return;
case Ows11Package.METADATA_TYPE__TITLE:
setTitle(TITLE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case Ows11Package.METADATA_TYPE__ABSTRACT_META_DATA_GROUP:
return abstractMetaDataGroup != null && !abstractMetaDataGroup.isEmpty();
case Ows11Package.METADATA_TYPE__ABSTRACT_META_DATA:
return getAbstractMetaData() != null;
case Ows11Package.METADATA_TYPE__ABOUT:
return ABOUT_EDEFAULT == null ? about != null : !ABOUT_EDEFAULT.equals(about);
case Ows11Package.METADATA_TYPE__TITLE:
return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (abstractMetaDataGroup: ");
result.append(abstractMetaDataGroup);
result.append(", about: ");
result.append(about);
result.append(", title: ");
result.append(title);
result.append(')');
return result.toString();
}
} //MetadataTypeImpl