/**
 * <copyright>
 * </copyright>
 *

 */
package org.xtext.example.mydsl3.myDsl.impl;

import java.util.Collection;

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.impl.MinimalEObjectImpl;

import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

import org.xtext.example.mydsl3.myDsl.AgentInternalViewpoint;
import org.xtext.example.mydsl3.myDsl.AgentState;
import org.xtext.example.mydsl3.myDsl.AgentType;
import org.xtext.example.mydsl3.myDsl.Behaviour;
import org.xtext.example.mydsl3.myDsl.Belief;
import org.xtext.example.mydsl3.myDsl.Capabilities;
import org.xtext.example.mydsl3.myDsl.Goal;
import org.xtext.example.mydsl3.myDsl.MyDslPackage;
import org.xtext.example.mydsl3.myDsl.Plan;
import org.xtext.example.mydsl3.myDsl.Role;
import org.xtext.example.mydsl3.myDsl.SemanticWebAgent;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Agent Internal Viewpoint</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.xtext.example.mydsl3.myDsl.impl.AgentInternalViewpointImpl#getSemanticwebagent <em>Semanticwebagent</em>}</li>
 *   <li>{@link org.xtext.example.mydsl3.myDsl.impl.AgentInternalViewpointImpl#getCapabilities <em>Capabilities</em>}</li>
 *   <li>{@link org.xtext.example.mydsl3.myDsl.impl.AgentInternalViewpointImpl#getBelief <em>Belief</em>}</li>
 *   <li>{@link org.xtext.example.mydsl3.myDsl.impl.AgentInternalViewpointImpl#getGoal <em>Goal</em>}</li>
 *   <li>{@link org.xtext.example.mydsl3.myDsl.impl.AgentInternalViewpointImpl#getAgentstate <em>Agentstate</em>}</li>
 *   <li>{@link org.xtext.example.mydsl3.myDsl.impl.AgentInternalViewpointImpl#getRole <em>Role</em>}</li>
 *   <li>{@link org.xtext.example.mydsl3.myDsl.impl.AgentInternalViewpointImpl#getPlan <em>Plan</em>}</li>
 *   <li>{@link org.xtext.example.mydsl3.myDsl.impl.AgentInternalViewpointImpl#getAgenttype <em>Agenttype</em>}</li>
 *   <li>{@link org.xtext.example.mydsl3.myDsl.impl.AgentInternalViewpointImpl#getBehaviour <em>Behaviour</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class AgentInternalViewpointImpl extends MinimalEObjectImpl.Container implements AgentInternalViewpoint
{
  /**
   * The cached value of the '{@link #getSemanticwebagent() <em>Semanticwebagent</em>}' containment reference list.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getSemanticwebagent()
   * @generated
   * @ordered
   */
  protected EList<SemanticWebAgent> semanticwebagent;

  /**
   * The cached value of the '{@link #getCapabilities() <em>Capabilities</em>}' containment reference list.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getCapabilities()
   * @generated
   * @ordered
   */
  protected EList<Capabilities> capabilities;

  /**
   * The cached value of the '{@link #getBelief() <em>Belief</em>}' containment reference list.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getBelief()
   * @generated
   * @ordered
   */
  protected EList<Belief> belief;

  /**
   * The cached value of the '{@link #getGoal() <em>Goal</em>}' containment reference list.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getGoal()
   * @generated
   * @ordered
   */
  protected EList<Goal> goal;

  /**
   * The cached value of the '{@link #getAgentstate() <em>Agentstate</em>}' containment reference list.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getAgentstate()
   * @generated
   * @ordered
   */
  protected EList<AgentState> agentstate;

  /**
   * The cached value of the '{@link #getRole() <em>Role</em>}' containment reference list.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getRole()
   * @generated
   * @ordered
   */
  protected EList<Role> role;

  /**
   * The cached value of the '{@link #getPlan() <em>Plan</em>}' containment reference list.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getPlan()
   * @generated
   * @ordered
   */
  protected EList<Plan> plan;

  /**
   * The cached value of the '{@link #getAgenttype() <em>Agenttype</em>}' containment reference list.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getAgenttype()
   * @generated
   * @ordered
   */
  protected EList<AgentType> agenttype;

  /**
   * The cached value of the '{@link #getBehaviour() <em>Behaviour</em>}' containment reference list.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getBehaviour()
   * @generated
   * @ordered
   */
  protected EList<Behaviour> behaviour;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  protected AgentInternalViewpointImpl()
  {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  protected EClass eStaticClass()
  {
    return MyDslPackage.Literals.AGENT_INTERNAL_VİEWPOİNT;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EList<SemanticWebAgent> getSemanticwebagent()
  {
    if (semanticwebagent == null)
    {
      semanticwebagent = new EObjectContainmentEList<SemanticWebAgent>(SemanticWebAgent.class, this, MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__SEMANTİCWEBAGENT);
    }
    return semanticwebagent;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EList<Capabilities> getCapabilities()
  {
    if (capabilities == null)
    {
      capabilities = new EObjectContainmentEList<Capabilities>(Capabilities.class, this, MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__CAPABİLİTİES);
    }
    return capabilities;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EList<Belief> getBelief()
  {
    if (belief == null)
    {
      belief = new EObjectContainmentEList<Belief>(Belief.class, this, MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__BELİEF);
    }
    return belief;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EList<Goal> getGoal()
  {
    if (goal == null)
    {
      goal = new EObjectContainmentEList<Goal>(Goal.class, this, MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__GOAL);
    }
    return goal;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EList<AgentState> getAgentstate()
  {
    if (agentstate == null)
    {
      agentstate = new EObjectContainmentEList<AgentState>(AgentState.class, this, MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__AGENTSTATE);
    }
    return agentstate;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EList<Role> getRole()
  {
    if (role == null)
    {
      role = new EObjectContainmentEList<Role>(Role.class, this, MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__ROLE);
    }
    return role;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EList<Plan> getPlan()
  {
    if (plan == null)
    {
      plan = new EObjectContainmentEList<Plan>(Plan.class, this, MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__PLAN);
    }
    return plan;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EList<AgentType> getAgenttype()
  {
    if (agenttype == null)
    {
      agenttype = new EObjectContainmentEList<AgentType>(AgentType.class, this, MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__AGENTTYPE);
    }
    return agenttype;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EList<Behaviour> getBehaviour()
  {
    if (behaviour == null)
    {
      behaviour = new EObjectContainmentEList<Behaviour>(Behaviour.class, this, MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__BEHAVİOUR);
    }
    return behaviour;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
  {
    switch (featureID)
    {
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__SEMANTİCWEBAGENT:
        return ((InternalEList<?>)getSemanticwebagent()).basicRemove(otherEnd, msgs);
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__CAPABİLİTİES:
        return ((InternalEList<?>)getCapabilities()).basicRemove(otherEnd, msgs);
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__BELİEF:
        return ((InternalEList<?>)getBelief()).basicRemove(otherEnd, msgs);
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__GOAL:
        return ((InternalEList<?>)getGoal()).basicRemove(otherEnd, msgs);
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__AGENTSTATE:
        return ((InternalEList<?>)getAgentstate()).basicRemove(otherEnd, msgs);
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__ROLE:
        return ((InternalEList<?>)getRole()).basicRemove(otherEnd, msgs);
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__PLAN:
        return ((InternalEList<?>)getPlan()).basicRemove(otherEnd, msgs);
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__AGENTTYPE:
        return ((InternalEList<?>)getAgenttype()).basicRemove(otherEnd, msgs);
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__BEHAVİOUR:
        return ((InternalEList<?>)getBehaviour()).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 MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__SEMANTİCWEBAGENT:
        return getSemanticwebagent();
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__CAPABİLİTİES:
        return getCapabilities();
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__BELİEF:
        return getBelief();
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__GOAL:
        return getGoal();
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__AGENTSTATE:
        return getAgentstate();
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__ROLE:
        return getRole();
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__PLAN:
        return getPlan();
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__AGENTTYPE:
        return getAgenttype();
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__BEHAVİOUR:
        return getBehaviour();
    }
    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 MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__SEMANTİCWEBAGENT:
        getSemanticwebagent().clear();
        getSemanticwebagent().addAll((Collection<? extends SemanticWebAgent>)newValue);
        return;
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__CAPABİLİTİES:
        getCapabilities().clear();
        getCapabilities().addAll((Collection<? extends Capabilities>)newValue);
        return;
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__BELİEF:
        getBelief().clear();
        getBelief().addAll((Collection<? extends Belief>)newValue);
        return;
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__GOAL:
        getGoal().clear();
        getGoal().addAll((Collection<? extends Goal>)newValue);
        return;
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__AGENTSTATE:
        getAgentstate().clear();
        getAgentstate().addAll((Collection<? extends AgentState>)newValue);
        return;
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__ROLE:
        getRole().clear();
        getRole().addAll((Collection<? extends Role>)newValue);
        return;
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__PLAN:
        getPlan().clear();
        getPlan().addAll((Collection<? extends Plan>)newValue);
        return;
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__AGENTTYPE:
        getAgenttype().clear();
        getAgenttype().addAll((Collection<? extends AgentType>)newValue);
        return;
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__BEHAVİOUR:
        getBehaviour().clear();
        getBehaviour().addAll((Collection<? extends Behaviour>)newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__SEMANTİCWEBAGENT:
        getSemanticwebagent().clear();
        return;
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__CAPABİLİTİES:
        getCapabilities().clear();
        return;
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__BELİEF:
        getBelief().clear();
        return;
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__GOAL:
        getGoal().clear();
        return;
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__AGENTSTATE:
        getAgentstate().clear();
        return;
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__ROLE:
        getRole().clear();
        return;
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__PLAN:
        getPlan().clear();
        return;
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__AGENTTYPE:
        getAgenttype().clear();
        return;
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__BEHAVİOUR:
        getBehaviour().clear();
        return;
    }
    super.eUnset(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__SEMANTİCWEBAGENT:
        return semanticwebagent != null && !semanticwebagent.isEmpty();
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__CAPABİLİTİES:
        return capabilities != null && !capabilities.isEmpty();
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__BELİEF:
        return belief != null && !belief.isEmpty();
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__GOAL:
        return goal != null && !goal.isEmpty();
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__AGENTSTATE:
        return agentstate != null && !agentstate.isEmpty();
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__ROLE:
        return role != null && !role.isEmpty();
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__PLAN:
        return plan != null && !plan.isEmpty();
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__AGENTTYPE:
        return agenttype != null && !agenttype.isEmpty();
      case MyDslPackage.AGENT_INTERNAL_VİEWPOİNT__BEHAVİOUR:
        return behaviour != null && !behaviour.isEmpty();
    }
    return super.eIsSet(featureID);
  }

} //AgentInternalViewpointImpl
