/** | |
* Copyright (c) 2010-2012 ISBAN S.L | |
* | |
* 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: | |
* Ruben De Dios (ISBAN S.L) | |
* Andrez Alvarez Mattos (ISBAN S.L) | |
*/ | |
package org.eclipse.gmf.tooling.simplemap.simplemappings.impl; | |
import org.eclipse.emf.common.util.EList; | |
import org.eclipse.emf.ecore.EClass; | |
import org.eclipse.gmf.tooling.simplemap.simplemappings.SimpleChildNode; | |
import org.eclipse.gmf.tooling.simplemap.simplemappings.SimpleLinkMapping; | |
import org.eclipse.gmf.tooling.simplemap.simplemappings.SimpleParentNode; | |
import org.eclipse.gmf.tooling.simplemap.simplemappings.SimpleTopNode; | |
import org.eclipse.gmf.tooling.simplemap.simplemappings.SimplemappingsPackage; | |
/** | |
* <!-- begin-user-doc --> | |
* An implementation of the model object '<em><b>Simple Top Node</b></em>'. | |
* <!-- end-user-doc --> | |
* <p> | |
* The following features are implemented: | |
* <ul> | |
* <li>{@link org.eclipse.gmf.tooling.simplemap.simplemappings.impl.SimpleTopNodeImpl#getChildren <em>Children</em>}</li> | |
* <li>{@link org.eclipse.gmf.tooling.simplemap.simplemappings.impl.SimpleTopNodeImpl#getLinks <em>Links</em>}</li> | |
* </ul> | |
* </p> | |
* | |
* @generated | |
*/ | |
public class SimpleTopNodeImpl extends SimpleNodeImpl implements SimpleTopNode { | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected SimpleTopNodeImpl() { | |
super(); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
protected EClass eStaticClass() { | |
return SimplemappingsPackage.Literals.SIMPLE_TOP_NODE; | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@SuppressWarnings("unchecked") | |
public EList<SimpleChildNode> getChildren() { | |
return (EList<SimpleChildNode>) eGet(SimplemappingsPackage.Literals.SIMPLE_PARENT_NODE__CHILDREN, true); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@SuppressWarnings("unchecked") | |
public EList<SimpleLinkMapping> getLinks() { | |
return (EList<SimpleLinkMapping>) eGet(SimplemappingsPackage.Literals.SIMPLE_TOP_NODE__LINKS, true); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { | |
if (baseClass == SimpleParentNode.class) { | |
switch (derivedFeatureID) { | |
case SimplemappingsPackage.SIMPLE_TOP_NODE__CHILDREN: | |
return SimplemappingsPackage.SIMPLE_PARENT_NODE__CHILDREN; | |
default: | |
return -1; | |
} | |
} | |
return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); | |
} | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { | |
if (baseClass == SimpleParentNode.class) { | |
switch (baseFeatureID) { | |
case SimplemappingsPackage.SIMPLE_PARENT_NODE__CHILDREN: | |
return SimplemappingsPackage.SIMPLE_TOP_NODE__CHILDREN; | |
default: | |
return -1; | |
} | |
} | |
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); | |
} | |
} //SimpleTopNodeImpl |