001/** 002 */ 003package org.nasdanika.html.model.bootstrap.impl; 004 005import java.util.Collection; 006 007import org.eclipse.emf.common.notify.NotificationChain; 008 009import org.eclipse.emf.common.util.EList; 010 011import org.eclipse.emf.ecore.EClass; 012import org.eclipse.emf.ecore.EObject; 013import org.eclipse.emf.ecore.InternalEObject; 014 015import org.eclipse.emf.ecore.util.InternalEList; 016 017import org.nasdanika.html.model.bootstrap.BootstrapPackage; 018import org.nasdanika.html.model.bootstrap.ContentActionGroupItem; 019 020/** 021 * <!-- begin-user-doc --> 022 * An implementation of the model object '<em><b>Content Action Group Item</b></em>'. 023 * <!-- end-user-doc --> 024 * <p> 025 * The following features are implemented: 026 * </p> 027 * <ul> 028 * <li>{@link org.nasdanika.html.model.bootstrap.impl.ContentActionGroupItemImpl#getContent <em>Content</em>}</li> 029 * </ul> 030 * 031 * @generated 032 */ 033public class ContentActionGroupItemImpl extends ActionGroupItemImpl implements ContentActionGroupItem { 034 /** 035 * <!-- begin-user-doc --> 036 * <!-- end-user-doc --> 037 * @generated 038 */ 039 protected ContentActionGroupItemImpl() { 040 super(); 041 } 042 043 /** 044 * <!-- begin-user-doc --> 045 * <!-- end-user-doc --> 046 * @generated 047 */ 048 @Override 049 protected EClass eStaticClass() { 050 return BootstrapPackage.Literals.CONTENT_ACTION_GROUP_ITEM; 051 } 052 053 /** 054 * <!-- begin-user-doc --> 055 * <!-- end-user-doc --> 056 * @generated 057 */ 058 @SuppressWarnings("unchecked") 059 @Override 060 public EList<EObject> getContent() { 061 return (EList<EObject>)eDynamicGet(BootstrapPackage.CONTENT_ACTION_GROUP_ITEM__CONTENT, BootstrapPackage.Literals.CONTENT_ACTION_GROUP_ITEM__CONTENT, true, true); 062 } 063 064 /** 065 * <!-- begin-user-doc --> 066 * <!-- end-user-doc --> 067 * @generated 068 */ 069 @Override 070 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { 071 switch (featureID) { 072 case BootstrapPackage.CONTENT_ACTION_GROUP_ITEM__CONTENT: 073 return ((InternalEList<?>)getContent()).basicRemove(otherEnd, msgs); 074 } 075 return super.eInverseRemove(otherEnd, featureID, msgs); 076 } 077 078 /** 079 * <!-- begin-user-doc --> 080 * <!-- end-user-doc --> 081 * @generated 082 */ 083 @Override 084 public Object eGet(int featureID, boolean resolve, boolean coreType) { 085 switch (featureID) { 086 case BootstrapPackage.CONTENT_ACTION_GROUP_ITEM__CONTENT: 087 return getContent(); 088 } 089 return super.eGet(featureID, resolve, coreType); 090 } 091 092 /** 093 * <!-- begin-user-doc --> 094 * <!-- end-user-doc --> 095 * @generated 096 */ 097 @SuppressWarnings("unchecked") 098 @Override 099 public void eSet(int featureID, Object newValue) { 100 switch (featureID) { 101 case BootstrapPackage.CONTENT_ACTION_GROUP_ITEM__CONTENT: 102 getContent().clear(); 103 getContent().addAll((Collection<? extends EObject>)newValue); 104 return; 105 } 106 super.eSet(featureID, newValue); 107 } 108 109 /** 110 * <!-- begin-user-doc --> 111 * <!-- end-user-doc --> 112 * @generated 113 */ 114 @Override 115 public void eUnset(int featureID) { 116 switch (featureID) { 117 case BootstrapPackage.CONTENT_ACTION_GROUP_ITEM__CONTENT: 118 getContent().clear(); 119 return; 120 } 121 super.eUnset(featureID); 122 } 123 124 /** 125 * <!-- begin-user-doc --> 126 * <!-- end-user-doc --> 127 * @generated 128 */ 129 @Override 130 public boolean eIsSet(int featureID) { 131 switch (featureID) { 132 case BootstrapPackage.CONTENT_ACTION_GROUP_ITEM__CONTENT: 133 return !getContent().isEmpty(); 134 } 135 return super.eIsSet(featureID); 136 } 137 138} //ContentActionGroupItemImpl