/**
*
*
*
* $Id$
*/
package net.opengis.wfs20.impl;
import net.opengis.wfs20.MetadataURLType;
import net.opengis.wfs20.Wfs20Package;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.w3.xlink.ActuateType;
import org.w3.xlink.ShowType;
/**
*
* An implementation of the model object 'Metadata URL Type'.
*
*
* The following features are implemented:
*
* - {@link net.opengis.wfs20.impl.MetadataURLTypeImpl#getAbout About}
* - {@link net.opengis.wfs20.impl.MetadataURLTypeImpl#getActuate Actuate}
* - {@link net.opengis.wfs20.impl.MetadataURLTypeImpl#getArcrole Arcrole}
* - {@link net.opengis.wfs20.impl.MetadataURLTypeImpl#getHref Href}
* - {@link net.opengis.wfs20.impl.MetadataURLTypeImpl#getRole Role}
* - {@link net.opengis.wfs20.impl.MetadataURLTypeImpl#getShow Show}
* - {@link net.opengis.wfs20.impl.MetadataURLTypeImpl#getTitle Title}
* - {@link net.opengis.wfs20.impl.MetadataURLTypeImpl#getType Type}
*
*
*
* @generated
*/
public class MetadataURLTypeImpl extends EObjectImpl implements MetadataURLType {
/**
* 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 #getActuate() Actuate}' attribute.
*
*
* @see #getActuate()
* @generated
* @ordered
*/
protected static final ActuateType ACTUATE_EDEFAULT = ActuateType.ON_LOAD_LITERAL;
/**
* The cached value of the '{@link #getActuate() Actuate}' attribute.
*
*
* @see #getActuate()
* @generated
* @ordered
*/
protected ActuateType actuate = ACTUATE_EDEFAULT;
/**
* This is true if the Actuate attribute has been set.
*
*
* @generated
* @ordered
*/
protected boolean actuateESet;
/**
* The default value of the '{@link #getArcrole() Arcrole}' attribute.
*
*
* @see #getArcrole()
* @generated
* @ordered
*/
protected static final String ARCROLE_EDEFAULT = null;
/**
* The cached value of the '{@link #getArcrole() Arcrole}' attribute.
*
*
* @see #getArcrole()
* @generated
* @ordered
*/
protected String arcrole = ARCROLE_EDEFAULT;
/**
* The default value of the '{@link #getHref() Href}' attribute.
*
*
* @see #getHref()
* @generated
* @ordered
*/
protected static final String HREF_EDEFAULT = null;
/**
* The cached value of the '{@link #getHref() Href}' attribute.
*
*
* @see #getHref()
* @generated
* @ordered
*/
protected String href = HREF_EDEFAULT;
/**
* The default value of the '{@link #getRole() Role}' attribute.
*
*
* @see #getRole()
* @generated
* @ordered
*/
protected static final String ROLE_EDEFAULT = null;
/**
* The cached value of the '{@link #getRole() Role}' attribute.
*
*
* @see #getRole()
* @generated
* @ordered
*/
protected String role = ROLE_EDEFAULT;
/**
* The default value of the '{@link #getShow() Show}' attribute.
*
*
* @see #getShow()
* @generated
* @ordered
*/
protected static final ShowType SHOW_EDEFAULT = ShowType.NEW_LITERAL;
/**
* The cached value of the '{@link #getShow() Show}' attribute.
*
*
* @see #getShow()
* @generated
* @ordered
*/
protected ShowType show = SHOW_EDEFAULT;
/**
* This is true if the Show attribute has been set.
*
*
* @generated
* @ordered
*/
protected boolean showESet;
/**
* 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 #getType() Type}' attribute.
*
*
* @see #getType()
* @generated
* @ordered
*/
protected static final String TYPE_EDEFAULT = "simple";
/**
* The cached value of the '{@link #getType() Type}' attribute.
*
*
* @see #getType()
* @generated
* @ordered
*/
protected String type = TYPE_EDEFAULT;
/**
* This is true if the Type attribute has been set.
*
*
* @generated
* @ordered
*/
protected boolean typeESet;
/**
*
*
* @generated
*/
protected MetadataURLTypeImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return Wfs20Package.Literals.METADATA_URL_TYPE;
}
/**
*
*
* @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, Wfs20Package.METADATA_URL_TYPE__ABOUT, oldAbout, about));
}
/**
*
*
* @generated
*/
public ActuateType getActuate() {
return actuate;
}
/**
*
*
* @generated
*/
public void setActuate(ActuateType newActuate) {
ActuateType oldActuate = actuate;
actuate = newActuate == null ? ACTUATE_EDEFAULT : newActuate;
boolean oldActuateESet = actuateESet;
actuateESet = true;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wfs20Package.METADATA_URL_TYPE__ACTUATE, oldActuate, actuate, !oldActuateESet));
}
/**
*
*
* @generated
*/
public void unsetActuate() {
ActuateType oldActuate = actuate;
boolean oldActuateESet = actuateESet;
actuate = ACTUATE_EDEFAULT;
actuateESet = false;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.UNSET, Wfs20Package.METADATA_URL_TYPE__ACTUATE, oldActuate, ACTUATE_EDEFAULT, oldActuateESet));
}
/**
*
*
* @generated
*/
public boolean isSetActuate() {
return actuateESet;
}
/**
*
*
* @generated
*/
public String getArcrole() {
return arcrole;
}
/**
*
*
* @generated
*/
public void setArcrole(String newArcrole) {
String oldArcrole = arcrole;
arcrole = newArcrole;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wfs20Package.METADATA_URL_TYPE__ARCROLE, oldArcrole, arcrole));
}
/**
*
*
* @generated
*/
public String getHref() {
return href;
}
/**
*
*
* @generated
*/
public void setHref(String newHref) {
String oldHref = href;
href = newHref;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wfs20Package.METADATA_URL_TYPE__HREF, oldHref, href));
}
/**
*
*
* @generated
*/
public String getRole() {
return role;
}
/**
*
*
* @generated
*/
public void setRole(String newRole) {
String oldRole = role;
role = newRole;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wfs20Package.METADATA_URL_TYPE__ROLE, oldRole, role));
}
/**
*
*
* @generated
*/
public ShowType getShow() {
return show;
}
/**
*
*
* @generated
*/
public void setShow(ShowType newShow) {
ShowType oldShow = show;
show = newShow == null ? SHOW_EDEFAULT : newShow;
boolean oldShowESet = showESet;
showESet = true;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wfs20Package.METADATA_URL_TYPE__SHOW, oldShow, show, !oldShowESet));
}
/**
*
*
* @generated
*/
public void unsetShow() {
ShowType oldShow = show;
boolean oldShowESet = showESet;
show = SHOW_EDEFAULT;
showESet = false;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.UNSET, Wfs20Package.METADATA_URL_TYPE__SHOW, oldShow, SHOW_EDEFAULT, oldShowESet));
}
/**
*
*
* @generated
*/
public boolean isSetShow() {
return showESet;
}
/**
*
*
* @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, Wfs20Package.METADATA_URL_TYPE__TITLE, oldTitle, title));
}
/**
*
*
* @generated
*/
public String getType() {
return type;
}
/**
*
*
* @generated
*/
public void setType(String newType) {
String oldType = type;
type = newType;
boolean oldTypeESet = typeESet;
typeESet = true;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, Wfs20Package.METADATA_URL_TYPE__TYPE, oldType, type, !oldTypeESet));
}
/**
*
*
* @generated
*/
public void unsetType() {
String oldType = type;
boolean oldTypeESet = typeESet;
type = TYPE_EDEFAULT;
typeESet = false;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.UNSET, Wfs20Package.METADATA_URL_TYPE__TYPE, oldType, TYPE_EDEFAULT, oldTypeESet));
}
/**
*
*
* @generated
*/
public boolean isSetType() {
return typeESet;
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Wfs20Package.METADATA_URL_TYPE__ABOUT:
return getAbout();
case Wfs20Package.METADATA_URL_TYPE__ACTUATE:
return getActuate();
case Wfs20Package.METADATA_URL_TYPE__ARCROLE:
return getArcrole();
case Wfs20Package.METADATA_URL_TYPE__HREF:
return getHref();
case Wfs20Package.METADATA_URL_TYPE__ROLE:
return getRole();
case Wfs20Package.METADATA_URL_TYPE__SHOW:
return getShow();
case Wfs20Package.METADATA_URL_TYPE__TITLE:
return getTitle();
case Wfs20Package.METADATA_URL_TYPE__TYPE:
return getType();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Wfs20Package.METADATA_URL_TYPE__ABOUT:
setAbout((String)newValue);
return;
case Wfs20Package.METADATA_URL_TYPE__ACTUATE:
setActuate((ActuateType)newValue);
return;
case Wfs20Package.METADATA_URL_TYPE__ARCROLE:
setArcrole((String)newValue);
return;
case Wfs20Package.METADATA_URL_TYPE__HREF:
setHref((String)newValue);
return;
case Wfs20Package.METADATA_URL_TYPE__ROLE:
setRole((String)newValue);
return;
case Wfs20Package.METADATA_URL_TYPE__SHOW:
setShow((ShowType)newValue);
return;
case Wfs20Package.METADATA_URL_TYPE__TITLE:
setTitle((String)newValue);
return;
case Wfs20Package.METADATA_URL_TYPE__TYPE:
setType((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Wfs20Package.METADATA_URL_TYPE__ABOUT:
setAbout(ABOUT_EDEFAULT);
return;
case Wfs20Package.METADATA_URL_TYPE__ACTUATE:
unsetActuate();
return;
case Wfs20Package.METADATA_URL_TYPE__ARCROLE:
setArcrole(ARCROLE_EDEFAULT);
return;
case Wfs20Package.METADATA_URL_TYPE__HREF:
setHref(HREF_EDEFAULT);
return;
case Wfs20Package.METADATA_URL_TYPE__ROLE:
setRole(ROLE_EDEFAULT);
return;
case Wfs20Package.METADATA_URL_TYPE__SHOW:
unsetShow();
return;
case Wfs20Package.METADATA_URL_TYPE__TITLE:
setTitle(TITLE_EDEFAULT);
return;
case Wfs20Package.METADATA_URL_TYPE__TYPE:
unsetType();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Wfs20Package.METADATA_URL_TYPE__ABOUT:
return ABOUT_EDEFAULT == null ? about != null : !ABOUT_EDEFAULT.equals(about);
case Wfs20Package.METADATA_URL_TYPE__ACTUATE:
return isSetActuate();
case Wfs20Package.METADATA_URL_TYPE__ARCROLE:
return ARCROLE_EDEFAULT == null ? arcrole != null : !ARCROLE_EDEFAULT.equals(arcrole);
case Wfs20Package.METADATA_URL_TYPE__HREF:
return HREF_EDEFAULT == null ? href != null : !HREF_EDEFAULT.equals(href);
case Wfs20Package.METADATA_URL_TYPE__ROLE:
return ROLE_EDEFAULT == null ? role != null : !ROLE_EDEFAULT.equals(role);
case Wfs20Package.METADATA_URL_TYPE__SHOW:
return isSetShow();
case Wfs20Package.METADATA_URL_TYPE__TITLE:
return TITLE_EDEFAULT == null ? title != null : !TITLE_EDEFAULT.equals(title);
case Wfs20Package.METADATA_URL_TYPE__TYPE:
return isSetType();
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (about: ");
result.append(about);
result.append(", actuate: ");
if (actuateESet) result.append(actuate); else result.append("");
result.append(", arcrole: ");
result.append(arcrole);
result.append(", href: ");
result.append(href);
result.append(", role: ");
result.append(role);
result.append(", show: ");
if (showESet) result.append(show); else result.append("");
result.append(", title: ");
result.append(title);
result.append(", type: ");
if (typeESet) result.append(type); else result.append("");
result.append(')');
return result.toString();
}
} //MetadataURLTypeImpl