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.Slide; 019 020/** 021 * <!-- begin-user-doc --> 022 * An implementation of the model object '<em><b>Slide</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.SlideImpl#getInterval <em>Interval</em>}</li> 029 * <li>{@link org.nasdanika.html.model.bootstrap.impl.SlideImpl#getCaptions <em>Captions</em>}</li> 030 * </ul> 031 * 032 * @generated 033 */ 034public class SlideImpl extends DivImpl implements Slide { 035 /** 036 * The default value of the '{@link #getInterval() <em>Interval</em>}' attribute. 037 * <!-- begin-user-doc --> 038 * <!-- end-user-doc --> 039 * @see #getInterval() 040 * @generated 041 * @ordered 042 */ 043 protected static final Integer INTERVAL_EDEFAULT = null; 044 045 /** 046 * <!-- begin-user-doc --> 047 * <!-- end-user-doc --> 048 * @generated 049 */ 050 protected SlideImpl() { 051 super(); 052 } 053 054 /** 055 * <!-- begin-user-doc --> 056 * <!-- end-user-doc --> 057 * @generated 058 */ 059 @Override 060 protected EClass eStaticClass() { 061 return BootstrapPackage.Literals.SLIDE; 062 } 063 064 /** 065 * <!-- begin-user-doc --> 066 * <!-- end-user-doc --> 067 * @generated 068 */ 069 @Override 070 public Integer getInterval() { 071 return (Integer)eDynamicGet(BootstrapPackage.SLIDE__INTERVAL, BootstrapPackage.Literals.SLIDE__INTERVAL, true, true); 072 } 073 074 /** 075 * <!-- begin-user-doc --> 076 * <!-- end-user-doc --> 077 * @generated 078 */ 079 @Override 080 public void setInterval(Integer newInterval) { 081 eDynamicSet(BootstrapPackage.SLIDE__INTERVAL, BootstrapPackage.Literals.SLIDE__INTERVAL, newInterval); 082 } 083 084 /** 085 * <!-- begin-user-doc --> 086 * <!-- end-user-doc --> 087 * @generated 088 */ 089 @SuppressWarnings("unchecked") 090 @Override 091 public EList<EObject> getCaptions() { 092 return (EList<EObject>)eDynamicGet(BootstrapPackage.SLIDE__CAPTIONS, BootstrapPackage.Literals.SLIDE__CAPTIONS, true, true); 093 } 094 095 /** 096 * <!-- begin-user-doc --> 097 * <!-- end-user-doc --> 098 * @generated 099 */ 100 @Override 101 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { 102 switch (featureID) { 103 case BootstrapPackage.SLIDE__CAPTIONS: 104 return ((InternalEList<?>)getCaptions()).basicRemove(otherEnd, msgs); 105 } 106 return super.eInverseRemove(otherEnd, featureID, msgs); 107 } 108 109 /** 110 * <!-- begin-user-doc --> 111 * <!-- end-user-doc --> 112 * @generated 113 */ 114 @Override 115 public Object eGet(int featureID, boolean resolve, boolean coreType) { 116 switch (featureID) { 117 case BootstrapPackage.SLIDE__INTERVAL: 118 return getInterval(); 119 case BootstrapPackage.SLIDE__CAPTIONS: 120 return getCaptions(); 121 } 122 return super.eGet(featureID, resolve, coreType); 123 } 124 125 /** 126 * <!-- begin-user-doc --> 127 * <!-- end-user-doc --> 128 * @generated 129 */ 130 @SuppressWarnings("unchecked") 131 @Override 132 public void eSet(int featureID, Object newValue) { 133 switch (featureID) { 134 case BootstrapPackage.SLIDE__INTERVAL: 135 setInterval((Integer)newValue); 136 return; 137 case BootstrapPackage.SLIDE__CAPTIONS: 138 getCaptions().clear(); 139 getCaptions().addAll((Collection<? extends EObject>)newValue); 140 return; 141 } 142 super.eSet(featureID, newValue); 143 } 144 145 /** 146 * <!-- begin-user-doc --> 147 * <!-- end-user-doc --> 148 * @generated 149 */ 150 @Override 151 public void eUnset(int featureID) { 152 switch (featureID) { 153 case BootstrapPackage.SLIDE__INTERVAL: 154 setInterval(INTERVAL_EDEFAULT); 155 return; 156 case BootstrapPackage.SLIDE__CAPTIONS: 157 getCaptions().clear(); 158 return; 159 } 160 super.eUnset(featureID); 161 } 162 163 /** 164 * <!-- begin-user-doc --> 165 * <!-- end-user-doc --> 166 * @generated 167 */ 168 @Override 169 public boolean eIsSet(int featureID) { 170 switch (featureID) { 171 case BootstrapPackage.SLIDE__INTERVAL: 172 return INTERVAL_EDEFAULT == null ? getInterval() != null : !INTERVAL_EDEFAULT.equals(getInterval()); 173 case BootstrapPackage.SLIDE__CAPTIONS: 174 return !getCaptions().isEmpty(); 175 } 176 return super.eIsSet(featureID); 177 } 178 179} //SlideImpl