All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.dd.dc.impl.DocumentRootImpl Maven / Gradle / Ivy

There is a newer version: 7.54.0.Final
Show newest version
/**
 * 
 * 
 * Copyright (c) 2010 SAP AG.
 * 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:
 *    Reiner Hille-Doering (SAP AG) - initial API and implementation and/or initial documentation
 * 
 * 
 */
package org.eclipse.dd.dc.impl;

import com.google.gwt.user.client.rpc.GwtTransient;

import org.eclipse.dd.dc.Bounds;
import org.eclipse.dd.dc.DcPackage;
import org.eclipse.dd.dc.DocumentRoot;
import org.eclipse.dd.dc.Font;
import org.eclipse.dd.dc.Point;

import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EMap;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl;

import org.eclipse.emf.ecore.util.BasicFeatureMap;
import org.eclipse.emf.ecore.util.EcoreEMap;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.InternalEList;

/**
 * 
 * An implementation of the model object 'Document Root'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.eclipse.dd.dc.impl.DocumentRootImpl#getMixed Mixed}
  • *
  • {@link org.eclipse.dd.dc.impl.DocumentRootImpl#getXMLNSPrefixMap XMLNS Prefix Map}
  • *
  • {@link org.eclipse.dd.dc.impl.DocumentRootImpl#getXSISchemaLocation XSI Schema Location}
  • *
  • {@link org.eclipse.dd.dc.impl.DocumentRootImpl#getBounds Bounds}
  • *
  • {@link org.eclipse.dd.dc.impl.DocumentRootImpl#getFont Font}
  • *
  • {@link org.eclipse.dd.dc.impl.DocumentRootImpl#getPoint Point}
  • *
* * @generated */ public class DocumentRootImpl extends EObjectImpl implements DocumentRoot { /** * The cached value of the '{@link #getMixed() Mixed}' attribute list. * * * @see #getMixed() * @generated * @ordered */ @GwtTransient protected FeatureMap mixed; /** * The cached value of the '{@link #getXMLNSPrefixMap() XMLNS Prefix Map}' map. * * * @see #getXMLNSPrefixMap() * @generated * @ordered */ @GwtTransient protected EMap xMLNSPrefixMap; /** * The cached value of the '{@link #getXSISchemaLocation() XSI Schema Location}' map. * * * @see #getXSISchemaLocation() * @generated * @ordered */ @GwtTransient protected EMap xSISchemaLocation; /** * * * @generated */ protected DocumentRootImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return DcPackage.Literals.DOCUMENT_ROOT; } /** * * * @generated */ @Override public FeatureMap getMixed() { if (mixed == null) { mixed = new BasicFeatureMap(this, DcPackage.DOCUMENT_ROOT__MIXED); } return mixed; } /** * * * @generated */ @Override public EMap getXMLNSPrefixMap() { if (xMLNSPrefixMap == null) { xMLNSPrefixMap = new EcoreEMap(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, DcPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP); } return xMLNSPrefixMap; } /** * * * @generated */ @Override public EMap getXSISchemaLocation() { if (xSISchemaLocation == null) { xSISchemaLocation = new EcoreEMap(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, DcPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION); } return xSISchemaLocation; } /** * * * @generated */ @Override public Bounds getBounds() { return (Bounds) getMixed().get(DcPackage.Literals.DOCUMENT_ROOT__BOUNDS, true); } /** * * * @generated */ public NotificationChain basicSetBounds(Bounds newBounds, NotificationChain msgs) { return ((FeatureMap.Internal) getMixed()).basicAdd(DcPackage.Literals.DOCUMENT_ROOT__BOUNDS, newBounds, msgs); } /** * * * @generated */ @Override public void setBounds(Bounds newBounds) { ((FeatureMap.Internal) getMixed()).set(DcPackage.Literals.DOCUMENT_ROOT__BOUNDS, newBounds); } /** * * * @generated */ @Override public Font getFont() { return (Font) getMixed().get(DcPackage.Literals.DOCUMENT_ROOT__FONT, true); } /** * * * @generated */ public NotificationChain basicSetFont(Font newFont, NotificationChain msgs) { return ((FeatureMap.Internal) getMixed()).basicAdd(DcPackage.Literals.DOCUMENT_ROOT__FONT, newFont, msgs); } /** * * * @generated */ @Override public void setFont(Font newFont) { ((FeatureMap.Internal) getMixed()).set(DcPackage.Literals.DOCUMENT_ROOT__FONT, newFont); } /** * * * @generated */ @Override public Point getPoint() { return (Point) getMixed().get(DcPackage.Literals.DOCUMENT_ROOT__POINT, true); } /** * * * @generated */ public NotificationChain basicSetPoint(Point newPoint, NotificationChain msgs) { return ((FeatureMap.Internal) getMixed()).basicAdd(DcPackage.Literals.DOCUMENT_ROOT__POINT, newPoint, msgs); } /** * * * @generated */ @Override public void setPoint(Point newPoint) { ((FeatureMap.Internal) getMixed()).set(DcPackage.Literals.DOCUMENT_ROOT__POINT, newPoint); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case DcPackage.DOCUMENT_ROOT__MIXED: return ((InternalEList) getMixed()).basicRemove(otherEnd, msgs); case DcPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: return ((InternalEList) getXMLNSPrefixMap()).basicRemove(otherEnd, msgs); case DcPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: return ((InternalEList) getXSISchemaLocation()).basicRemove(otherEnd, msgs); case DcPackage.DOCUMENT_ROOT__BOUNDS: return basicSetBounds(null, msgs); case DcPackage.DOCUMENT_ROOT__FONT: return basicSetFont(null, msgs); case DcPackage.DOCUMENT_ROOT__POINT: return basicSetPoint(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case DcPackage.DOCUMENT_ROOT__MIXED: if (coreType) return getMixed(); return ((FeatureMap.Internal) getMixed()).getWrapper(); case DcPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: if (coreType) return getXMLNSPrefixMap(); else return getXMLNSPrefixMap().map(); case DcPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: if (coreType) return getXSISchemaLocation(); else return getXSISchemaLocation().map(); case DcPackage.DOCUMENT_ROOT__BOUNDS: return getBounds(); case DcPackage.DOCUMENT_ROOT__FONT: return getFont(); case DcPackage.DOCUMENT_ROOT__POINT: return getPoint(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case DcPackage.DOCUMENT_ROOT__MIXED: ((FeatureMap.Internal) getMixed()).set(newValue); return; case DcPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: ((EStructuralFeature.Setting) getXMLNSPrefixMap()).set(newValue); return; case DcPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: ((EStructuralFeature.Setting) getXSISchemaLocation()).set(newValue); return; case DcPackage.DOCUMENT_ROOT__BOUNDS: setBounds((Bounds) newValue); return; case DcPackage.DOCUMENT_ROOT__FONT: setFont((Font) newValue); return; case DcPackage.DOCUMENT_ROOT__POINT: setPoint((Point) newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DcPackage.DOCUMENT_ROOT__MIXED: getMixed().clear(); return; case DcPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: getXMLNSPrefixMap().clear(); return; case DcPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: getXSISchemaLocation().clear(); return; case DcPackage.DOCUMENT_ROOT__BOUNDS: setBounds((Bounds) null); return; case DcPackage.DOCUMENT_ROOT__FONT: setFont((Font) null); return; case DcPackage.DOCUMENT_ROOT__POINT: setPoint((Point) null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DcPackage.DOCUMENT_ROOT__MIXED: return mixed != null && !mixed.isEmpty(); case DcPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP: return xMLNSPrefixMap != null && !xMLNSPrefixMap.isEmpty(); case DcPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: return xSISchemaLocation != null && !xSISchemaLocation.isEmpty(); case DcPackage.DOCUMENT_ROOT__BOUNDS: return getBounds() != null; case DcPackage.DOCUMENT_ROOT__FONT: return getFont() != null; case DcPackage.DOCUMENT_ROOT__POINT: return getPoint() != null; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (mixed: "); result.append(mixed); result.append(')'); return result.toString(); } } //DocumentRootImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy