| /** |
| * <copyright> |
| * |
| * Copyright (c) 2012, 2012 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: |
| * Benjamin Schmeling - initial API, implementation and documentation for Bug 367483 |
| * |
| * </copyright> |
| */ |
| package org.eclipse.graphiti.mm.pictograms.impl; |
| |
| import java.util.Collection; |
| |
| import org.eclipse.emf.common.util.EList; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.util.EObjectResolvingEList; |
| import org.eclipse.graphiti.mm.pictograms.CompositeConnection; |
| import org.eclipse.graphiti.mm.pictograms.CurvedConnection; |
| import org.eclipse.graphiti.mm.pictograms.PictogramsPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Composite Connection</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.graphiti.mm.pictograms.impl.CompositeConnectionImpl#getChildren <em>Children</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class CompositeConnectionImpl extends ConnectionImpl implements CompositeConnection { |
| /** |
| * The cached value of the '{@link #getChildren() <em>Children</em>}' reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getChildren() |
| * @generated |
| * @ordered |
| */ |
| protected EList<CurvedConnection> children; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected CompositeConnectionImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return PictogramsPackage.Literals.COMPOSITE_CONNECTION; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<CurvedConnection> getChildren() { |
| if (children == null) { |
| children = new EObjectResolvingEList<CurvedConnection>(CurvedConnection.class, this, PictogramsPackage.COMPOSITE_CONNECTION__CHILDREN); |
| } |
| return children; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case PictogramsPackage.COMPOSITE_CONNECTION__CHILDREN: |
| return getChildren(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @SuppressWarnings("unchecked") |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case PictogramsPackage.COMPOSITE_CONNECTION__CHILDREN: |
| getChildren().clear(); |
| getChildren().addAll((Collection<? extends CurvedConnection>)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case PictogramsPackage.COMPOSITE_CONNECTION__CHILDREN: |
| getChildren().clear(); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case PictogramsPackage.COMPOSITE_CONNECTION__CHILDREN: |
| return children != null && !children.isEmpty(); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //CompositeConnectionImpl |