org.eclipse.bpmn2.di.impl.DocumentRootImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kie-wb-common-stunner-bpmn-emf Show documentation
Show all versions of kie-wb-common-stunner-bpmn-emf Show documentation
Kie Workbench - Common - Stunner - BPMN Definition Set - GWT Support for Eclipse EMF/XMI
/**
*
*
* 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.bpmn2.di.impl;
import com.google.gwt.user.client.rpc.GwtTransient;
import org.eclipse.bpmn2.di.BPMNDiagram;
import org.eclipse.bpmn2.di.BPMNEdge;
import org.eclipse.bpmn2.di.BPMNLabel;
import org.eclipse.bpmn2.di.BPMNLabelStyle;
import org.eclipse.bpmn2.di.BPMNPlane;
import org.eclipse.bpmn2.di.BPMNShape;
import org.eclipse.bpmn2.di.BpmnDiPackage;
import org.eclipse.bpmn2.di.DocumentRoot;
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.bpmn2.di.impl.DocumentRootImpl#getMixed Mixed}
* - {@link org.eclipse.bpmn2.di.impl.DocumentRootImpl#getXMLNSPrefixMap XMLNS Prefix Map}
* - {@link org.eclipse.bpmn2.di.impl.DocumentRootImpl#getXSISchemaLocation XSI Schema Location}
* - {@link org.eclipse.bpmn2.di.impl.DocumentRootImpl#getBPMNDiagram BPMN Diagram}
* - {@link org.eclipse.bpmn2.di.impl.DocumentRootImpl#getBPMNEdge BPMN Edge}
* - {@link org.eclipse.bpmn2.di.impl.DocumentRootImpl#getBPMNLabel BPMN Label}
* - {@link org.eclipse.bpmn2.di.impl.DocumentRootImpl#getBPMNLabelStyle BPMN Label Style}
* - {@link org.eclipse.bpmn2.di.impl.DocumentRootImpl#getBPMNPlane BPMN Plane}
* - {@link org.eclipse.bpmn2.di.impl.DocumentRootImpl#getBPMNShape BPMN Shape}
*
*
* @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 BpmnDiPackage.Literals.DOCUMENT_ROOT;
}
/**
*
*
* @generated
*/
@Override
public FeatureMap getMixed() {
if (mixed == null) {
mixed = new BasicFeatureMap(this, BpmnDiPackage.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, BpmnDiPackage.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, BpmnDiPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
}
return xSISchemaLocation;
}
/**
*
*
* @generated
*/
@Override
public BPMNDiagram getBPMNDiagram() {
return (BPMNDiagram) getMixed().get(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_DIAGRAM, true);
}
/**
*
*
* @generated
*/
public NotificationChain basicSetBPMNDiagram(BPMNDiagram newBPMNDiagram, NotificationChain msgs) {
return ((FeatureMap.Internal) getMixed()).basicAdd(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_DIAGRAM,
newBPMNDiagram, msgs);
}
/**
*
*
* @generated
*/
@Override
public void setBPMNDiagram(BPMNDiagram newBPMNDiagram) {
((FeatureMap.Internal) getMixed()).set(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_DIAGRAM, newBPMNDiagram);
}
/**
*
*
* @generated
*/
@Override
public BPMNEdge getBPMNEdge() {
return (BPMNEdge) getMixed().get(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_EDGE, true);
}
/**
*
*
* @generated
*/
public NotificationChain basicSetBPMNEdge(BPMNEdge newBPMNEdge, NotificationChain msgs) {
return ((FeatureMap.Internal) getMixed()).basicAdd(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_EDGE, newBPMNEdge,
msgs);
}
/**
*
*
* @generated
*/
@Override
public void setBPMNEdge(BPMNEdge newBPMNEdge) {
((FeatureMap.Internal) getMixed()).set(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_EDGE, newBPMNEdge);
}
/**
*
*
* @generated
*/
@Override
public BPMNLabel getBPMNLabel() {
return (BPMNLabel) getMixed().get(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_LABEL, true);
}
/**
*
*
* @generated
*/
public NotificationChain basicSetBPMNLabel(BPMNLabel newBPMNLabel, NotificationChain msgs) {
return ((FeatureMap.Internal) getMixed()).basicAdd(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_LABEL,
newBPMNLabel, msgs);
}
/**
*
*
* @generated
*/
@Override
public void setBPMNLabel(BPMNLabel newBPMNLabel) {
((FeatureMap.Internal) getMixed()).set(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_LABEL, newBPMNLabel);
}
/**
*
*
* @generated
*/
@Override
public BPMNLabelStyle getBPMNLabelStyle() {
return (BPMNLabelStyle) getMixed().get(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_LABEL_STYLE, true);
}
/**
*
*
* @generated
*/
public NotificationChain basicSetBPMNLabelStyle(BPMNLabelStyle newBPMNLabelStyle, NotificationChain msgs) {
return ((FeatureMap.Internal) getMixed()).basicAdd(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_LABEL_STYLE,
newBPMNLabelStyle, msgs);
}
/**
*
*
* @generated
*/
@Override
public void setBPMNLabelStyle(BPMNLabelStyle newBPMNLabelStyle) {
((FeatureMap.Internal) getMixed()).set(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_LABEL_STYLE,
newBPMNLabelStyle);
}
/**
*
*
* @generated
*/
@Override
public BPMNPlane getBPMNPlane() {
return (BPMNPlane) getMixed().get(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_PLANE, true);
}
/**
*
*
* @generated
*/
public NotificationChain basicSetBPMNPlane(BPMNPlane newBPMNPlane, NotificationChain msgs) {
return ((FeatureMap.Internal) getMixed()).basicAdd(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_PLANE,
newBPMNPlane, msgs);
}
/**
*
*
* @generated
*/
@Override
public void setBPMNPlane(BPMNPlane newBPMNPlane) {
((FeatureMap.Internal) getMixed()).set(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_PLANE, newBPMNPlane);
}
/**
*
*
* @generated
*/
@Override
public BPMNShape getBPMNShape() {
return (BPMNShape) getMixed().get(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_SHAPE, true);
}
/**
*
*
* @generated
*/
public NotificationChain basicSetBPMNShape(BPMNShape newBPMNShape, NotificationChain msgs) {
return ((FeatureMap.Internal) getMixed()).basicAdd(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_SHAPE,
newBPMNShape, msgs);
}
/**
*
*
* @generated
*/
@Override
public void setBPMNShape(BPMNShape newBPMNShape) {
((FeatureMap.Internal) getMixed()).set(BpmnDiPackage.Literals.DOCUMENT_ROOT__BPMN_SHAPE, newBPMNShape);
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case BpmnDiPackage.DOCUMENT_ROOT__MIXED:
return ((InternalEList>) getMixed()).basicRemove(otherEnd, msgs);
case BpmnDiPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
return ((InternalEList>) getXMLNSPrefixMap()).basicRemove(otherEnd, msgs);
case BpmnDiPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
return ((InternalEList>) getXSISchemaLocation()).basicRemove(otherEnd, msgs);
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_DIAGRAM:
return basicSetBPMNDiagram(null, msgs);
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_EDGE:
return basicSetBPMNEdge(null, msgs);
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_LABEL:
return basicSetBPMNLabel(null, msgs);
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_LABEL_STYLE:
return basicSetBPMNLabelStyle(null, msgs);
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_PLANE:
return basicSetBPMNPlane(null, msgs);
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_SHAPE:
return basicSetBPMNShape(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BpmnDiPackage.DOCUMENT_ROOT__MIXED:
if (coreType)
return getMixed();
return ((FeatureMap.Internal) getMixed()).getWrapper();
case BpmnDiPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
if (coreType)
return getXMLNSPrefixMap();
else
return getXMLNSPrefixMap().map();
case BpmnDiPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
if (coreType)
return getXSISchemaLocation();
else
return getXSISchemaLocation().map();
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_DIAGRAM:
return getBPMNDiagram();
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_EDGE:
return getBPMNEdge();
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_LABEL:
return getBPMNLabel();
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_LABEL_STYLE:
return getBPMNLabelStyle();
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_PLANE:
return getBPMNPlane();
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_SHAPE:
return getBPMNShape();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BpmnDiPackage.DOCUMENT_ROOT__MIXED:
((FeatureMap.Internal) getMixed()).set(newValue);
return;
case BpmnDiPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
((EStructuralFeature.Setting) getXMLNSPrefixMap()).set(newValue);
return;
case BpmnDiPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
((EStructuralFeature.Setting) getXSISchemaLocation()).set(newValue);
return;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_DIAGRAM:
setBPMNDiagram((BPMNDiagram) newValue);
return;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_EDGE:
setBPMNEdge((BPMNEdge) newValue);
return;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_LABEL:
setBPMNLabel((BPMNLabel) newValue);
return;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_LABEL_STYLE:
setBPMNLabelStyle((BPMNLabelStyle) newValue);
return;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_PLANE:
setBPMNPlane((BPMNPlane) newValue);
return;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_SHAPE:
setBPMNShape((BPMNShape) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BpmnDiPackage.DOCUMENT_ROOT__MIXED:
getMixed().clear();
return;
case BpmnDiPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
getXMLNSPrefixMap().clear();
return;
case BpmnDiPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
getXSISchemaLocation().clear();
return;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_DIAGRAM:
setBPMNDiagram((BPMNDiagram) null);
return;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_EDGE:
setBPMNEdge((BPMNEdge) null);
return;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_LABEL:
setBPMNLabel((BPMNLabel) null);
return;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_LABEL_STYLE:
setBPMNLabelStyle((BPMNLabelStyle) null);
return;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_PLANE:
setBPMNPlane((BPMNPlane) null);
return;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_SHAPE:
setBPMNShape((BPMNShape) null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BpmnDiPackage.DOCUMENT_ROOT__MIXED:
return mixed != null && !mixed.isEmpty();
case BpmnDiPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
return xMLNSPrefixMap != null && !xMLNSPrefixMap.isEmpty();
case BpmnDiPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
return xSISchemaLocation != null && !xSISchemaLocation.isEmpty();
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_DIAGRAM:
return getBPMNDiagram() != null;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_EDGE:
return getBPMNEdge() != null;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_LABEL:
return getBPMNLabel() != null;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_LABEL_STYLE:
return getBPMNLabelStyle() != null;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_PLANE:
return getBPMNPlane() != null;
case BpmnDiPackage.DOCUMENT_ROOT__BPMN_SHAPE:
return getBPMNShape() != 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