/**
* Copyright (c) 2011-2012 Obeo.
* 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:
* Obeo - initial API and implementation
*
*/
package org.obeonetwork.dsl.togaf.contentfwk.contentfwk.impl;
import java.util.Collection;
import java.util.Date;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.util.InternalEList;
import org.obeonetwork.dsl.togaf.contentfwk.contentfwk.Actor;
import org.obeonetwork.dsl.togaf.contentfwk.contentfwk.ContentfwkPackage;
import org.obeonetwork.dsl.togaf.contentfwk.contentfwk.Contract;
import org.obeonetwork.dsl.togaf.contentfwk.contentfwk.DataEntity;
import org.obeonetwork.dsl.togaf.contentfwk.contentfwk.Event;
import org.obeonetwork.dsl.togaf.contentfwk.contentfwk.Function;
import org.obeonetwork.dsl.togaf.contentfwk.contentfwk.LogicalApplicationComponent;
import org.obeonetwork.dsl.togaf.contentfwk.contentfwk.LogicalTechnologyComponent;
import org.obeonetwork.dsl.togaf.contentfwk.contentfwk.Measure;
import org.obeonetwork.dsl.togaf.contentfwk.contentfwk.OrganizationUnit;
import org.obeonetwork.dsl.togaf.contentfwk.contentfwk.PlatformService;
import org.obeonetwork.dsl.togaf.contentfwk.contentfwk.Service;
import org.obeonetwork.dsl.togaf.contentfwk.contentfwk.ServiceQuality;
import org.obeonetwork.dsl.togaf.contentfwk.contentfwk.Standard;
import org.obeonetwork.dsl.togaf.contentfwk.contentfwk.StandardsClass;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Platform Service</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.obeonetwork.dsl.togaf.contentfwk.contentfwk.impl.PlatformServiceImpl#getIsSuppliedByLogicalTechnologyComponents <em>Is Supplied By Logical Technology Components</em>}</li>
* <li>{@link org.obeonetwork.dsl.togaf.contentfwk.contentfwk.impl.PlatformServiceImpl#getCategoryTRM <em>Category TRM</em>}</li>
* <li>{@link org.obeonetwork.dsl.togaf.contentfwk.contentfwk.impl.PlatformServiceImpl#getStandardClass <em>Standard Class</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class PlatformServiceImpl extends ElementImpl implements PlatformService {
/**
* The default value of the '{@link #getCategoryTRM() <em>Category TRM</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCategoryTRM()
* @generated
* @ordered
*/
protected static final String CATEGORY_TRM_EDEFAULT = null;
/**
* The default value of the '{@link #getStandardClass() <em>Standard Class</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getStandardClass()
* @generated
* @ordered
*/
protected static final StandardsClass STANDARD_CLASS_EDEFAULT = StandardsClass.NON_STANDARD;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PlatformServiceImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return ContentfwkPackage.Literals.PLATFORM_SERVICE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public StandardsClass getStandardClass() {
return (StandardsClass)eDynamicGet(ContentfwkPackage.PLATFORM_SERVICE__STANDARD_CLASS, ContentfwkPackage.Literals.PLATFORM_SERVICE__STANDARD_CLASS, true, true);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setStandardClass(StandardsClass newStandardClass) {
eDynamicSet(ContentfwkPackage.PLATFORM_SERVICE__STANDARD_CLASS, ContentfwkPackage.Literals.PLATFORM_SERVICE__STANDARD_CLASS, newStandardClass);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
public EList<LogicalTechnologyComponent> getIsSuppliedByLogicalTechnologyComponents() {
return (EList<LogicalTechnologyComponent>)eDynamicGet(ContentfwkPackage.PLATFORM_SERVICE__IS_SUPPLIED_BY_LOGICAL_TECHNOLOGY_COMPONENTS, ContentfwkPackage.Literals.PLATFORM_SERVICE__IS_SUPPLIED_BY_LOGICAL_TECHNOLOGY_COMPONENTS, true, true);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getCategoryTRM() {
return (String)eDynamicGet(ContentfwkPackage.PLATFORM_SERVICE__CATEGORY_TRM, ContentfwkPackage.Literals.PLATFORM_SERVICE__CATEGORY_TRM, true, true);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setCategoryTRM(String newCategoryTRM) {
eDynamicSet(ContentfwkPackage.PLATFORM_SERVICE__CATEGORY_TRM, ContentfwkPackage.Literals.PLATFORM_SERVICE__CATEGORY_TRM, newCategoryTRM);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case ContentfwkPackage.PLATFORM_SERVICE__IS_SUPPLIED_BY_LOGICAL_TECHNOLOGY_COMPONENTS:
return ((InternalEList<InternalEObject>)(InternalEList<?>)getIsSuppliedByLogicalTechnologyComponents()).basicAdd(otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case ContentfwkPackage.PLATFORM_SERVICE__IS_SUPPLIED_BY_LOGICAL_TECHNOLOGY_COMPONENTS:
return ((InternalEList<?>)getIsSuppliedByLogicalTechnologyComponents()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ContentfwkPackage.PLATFORM_SERVICE__IS_SUPPLIED_BY_LOGICAL_TECHNOLOGY_COMPONENTS:
return getIsSuppliedByLogicalTechnologyComponents();
case ContentfwkPackage.PLATFORM_SERVICE__CATEGORY_TRM:
return getCategoryTRM();
case ContentfwkPackage.PLATFORM_SERVICE__STANDARD_CLASS:
return getStandardClass();
}
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 ContentfwkPackage.PLATFORM_SERVICE__IS_SUPPLIED_BY_LOGICAL_TECHNOLOGY_COMPONENTS:
getIsSuppliedByLogicalTechnologyComponents().clear();
getIsSuppliedByLogicalTechnologyComponents().addAll((Collection<? extends LogicalTechnologyComponent>)newValue);
return;
case ContentfwkPackage.PLATFORM_SERVICE__CATEGORY_TRM:
setCategoryTRM((String)newValue);
return;
case ContentfwkPackage.PLATFORM_SERVICE__STANDARD_CLASS:
setStandardClass((StandardsClass)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case ContentfwkPackage.PLATFORM_SERVICE__IS_SUPPLIED_BY_LOGICAL_TECHNOLOGY_COMPONENTS:
getIsSuppliedByLogicalTechnologyComponents().clear();
return;
case ContentfwkPackage.PLATFORM_SERVICE__CATEGORY_TRM:
setCategoryTRM(CATEGORY_TRM_EDEFAULT);
return;
case ContentfwkPackage.PLATFORM_SERVICE__STANDARD_CLASS:
setStandardClass(STANDARD_CLASS_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case ContentfwkPackage.PLATFORM_SERVICE__IS_SUPPLIED_BY_LOGICAL_TECHNOLOGY_COMPONENTS:
return !getIsSuppliedByLogicalTechnologyComponents().isEmpty();
case ContentfwkPackage.PLATFORM_SERVICE__CATEGORY_TRM:
return CATEGORY_TRM_EDEFAULT == null ? getCategoryTRM() != null : !CATEGORY_TRM_EDEFAULT.equals(getCategoryTRM());
case ContentfwkPackage.PLATFORM_SERVICE__STANDARD_CLASS:
return getStandardClass() != STANDARD_CLASS_EDEFAULT;
}
return super.eIsSet(featureID);
}
} //PlatformServiceImpl