diff options
Diffstat (limited to 'plugins/org.eclipse.qvtd.xml/emf-gen/org/eclipse/qvtd/xml/impl/ElementImpl.java')
-rw-r--r-- | plugins/org.eclipse.qvtd.xml/emf-gen/org/eclipse/qvtd/xml/impl/ElementImpl.java | 267 |
1 files changed, 267 insertions, 0 deletions
diff --git a/plugins/org.eclipse.qvtd.xml/emf-gen/org/eclipse/qvtd/xml/impl/ElementImpl.java b/plugins/org.eclipse.qvtd.xml/emf-gen/org/eclipse/qvtd/xml/impl/ElementImpl.java new file mode 100644 index 000000000..e1b50559a --- /dev/null +++ b/plugins/org.eclipse.qvtd.xml/emf-gen/org/eclipse/qvtd/xml/impl/ElementImpl.java @@ -0,0 +1,267 @@ +/** + * <copyright> + * + * Copyright (c) 2018 Willink Transformations and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * E.D.Willink - Initial API and implementation + * + * </copyright> + */ +package org.eclipse.qvtd.xml.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.qvtd.xml.Element; +import org.eclipse.qvtd.xml.XMLmodelPackage; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Element</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.qvtd.xml.impl.ElementImpl#getLocalName <em>Local Name</em>}</li> + * <li>{@link org.eclipse.qvtd.xml.impl.ElementImpl#getQName <em>QName</em>}</li> + * <li>{@link org.eclipse.qvtd.xml.impl.ElementImpl#getUri <em>Uri</em>}</li> + * </ul> + * + * @generated + */ +public class ElementImpl extends NodeImpl implements Element { + /** + * The default value of the '{@link #getLocalName() <em>Local Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLocalName() + * @generated + * @ordered + */ + protected static final String LOCAL_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLocalName() <em>Local Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLocalName() + * @generated + * @ordered + */ + protected String localName = LOCAL_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getQName() <em>QName</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getQName() + * @generated + * @ordered + */ + protected static final String QNAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getQName() <em>QName</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getQName() + * @generated + * @ordered + */ + protected String qName = QNAME_EDEFAULT; + + /** + * The default value of the '{@link #getUri() <em>Uri</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUri() + * @generated + * @ordered + */ + protected static final String URI_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUri() <em>Uri</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUri() + * @generated + * @ordered + */ + protected String uri = URI_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ElementImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return XMLmodelPackage.Literals.ELEMENT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLocalName() { + return localName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setLocalName(String newLocalName) { + String oldLocalName = localName; + localName = newLocalName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, XMLmodelPackage.ELEMENT__LOCAL_NAME, oldLocalName, localName)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getQName() { + return qName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setQName(String newQName) { + String oldQName = qName; + qName = newQName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, XMLmodelPackage.ELEMENT__QNAME, oldQName, qName)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getUri() { + return uri; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setUri(String newUri) { + String oldUri = uri; + uri = newUri; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, XMLmodelPackage.ELEMENT__URI, oldUri, uri)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case XMLmodelPackage.ELEMENT__LOCAL_NAME: + return getLocalName(); + case XMLmodelPackage.ELEMENT__QNAME: + return getQName(); + case XMLmodelPackage.ELEMENT__URI: + return getUri(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case XMLmodelPackage.ELEMENT__LOCAL_NAME: + setLocalName((String)newValue); + return; + case XMLmodelPackage.ELEMENT__QNAME: + setQName((String)newValue); + return; + case XMLmodelPackage.ELEMENT__URI: + setUri((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case XMLmodelPackage.ELEMENT__LOCAL_NAME: + setLocalName(LOCAL_NAME_EDEFAULT); + return; + case XMLmodelPackage.ELEMENT__QNAME: + setQName(QNAME_EDEFAULT); + return; + case XMLmodelPackage.ELEMENT__URI: + setUri(URI_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case XMLmodelPackage.ELEMENT__LOCAL_NAME: + return LOCAL_NAME_EDEFAULT == null ? localName != null : !LOCAL_NAME_EDEFAULT.equals(localName); + case XMLmodelPackage.ELEMENT__QNAME: + return QNAME_EDEFAULT == null ? qName != null : !QNAME_EDEFAULT.equals(qName); + case XMLmodelPackage.ELEMENT__URI: + return URI_EDEFAULT == null ? uri != null : !URI_EDEFAULT.equals(uri); + } + return super.eIsSet(featureID); + } + + @Override + public String toString() { + return "<" + qName + " ... />"; + } + +} //ElementImpl |