001 /**
002 * <copyright>
003 * </copyright>
004 *
005 * $Id$
006 */
007 package com.hammurapi.eventbus.snapshot.impl;
008
009 import com.hammurapi.eventbus.snapshot.*;
010
011 import org.eclipse.emf.ecore.EClass;
012 import org.eclipse.emf.ecore.EObject;
013 import org.eclipse.emf.ecore.EPackage;
014
015 import org.eclipse.emf.ecore.impl.EFactoryImpl;
016
017 import org.eclipse.emf.ecore.plugin.EcorePlugin;
018
019 /**
020 * <!-- begin-user-doc -->
021 * An implementation of the model <b>Factory</b>.
022 * <!-- end-user-doc -->
023 * @generated
024 */
025 public class SnapshotFactoryImpl extends EFactoryImpl implements SnapshotFactory {
026 /**
027 * Creates the default factory implementation.
028 * <!-- begin-user-doc -->
029 * <!-- end-user-doc -->
030 * @generated
031 */
032 public static SnapshotFactory init() {
033 try {
034 SnapshotFactory theSnapshotFactory = (SnapshotFactory)EPackage.Registry.INSTANCE.getEFactory("http://snapshot/1.0");
035 if (theSnapshotFactory != null) {
036 return theSnapshotFactory;
037 }
038 }
039 catch (Exception exception) {
040 EcorePlugin.INSTANCE.log(exception);
041 }
042 return new SnapshotFactoryImpl();
043 }
044
045 /**
046 * Creates an instance of the factory.
047 * <!-- begin-user-doc -->
048 * <!-- end-user-doc -->
049 * @generated
050 */
051 public SnapshotFactoryImpl() {
052 super();
053 }
054
055 /**
056 * <!-- begin-user-doc -->
057 * <!-- end-user-doc -->
058 * @generated
059 */
060 @Override
061 public EObject create(EClass eClass) {
062 switch (eClass.getClassifierID()) {
063 case SnapshotPackage.SNAPSHOT: return createSnapshot();
064 case SnapshotPackage.HANDLER: return createHandler();
065 case SnapshotPackage.DERIVATION: return createDerivation();
066 case SnapshotPackage.EVENT: return createEvent();
067 case SnapshotPackage.PREDICATE_NODE: return createPredicateNode();
068 case SnapshotPackage.JOIN_INPUT: return createJoinInput();
069 case SnapshotPackage.JOIN_NODE: return createJoinNode();
070 case SnapshotPackage.JOIN_INPUT_COLLECTOR: return createJoinInputCollector();
071 case SnapshotPackage.JOIN_ENTRY: return createJoinEntry();
072 case SnapshotPackage.EXTRACTOR: return createExtractor();
073 case SnapshotPackage.PREDICATE: return createPredicate();
074 case SnapshotPackage.COMPOSITE_EVENT: return createCompositeEvent();
075 default:
076 throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
077 }
078 }
079
080 /**
081 * <!-- begin-user-doc -->
082 * <!-- end-user-doc -->
083 * @generated
084 */
085 public Snapshot createSnapshot() {
086 SnapshotImpl snapshot = new SnapshotImpl();
087 return snapshot;
088 }
089
090 /**
091 * <!-- begin-user-doc -->
092 * <!-- end-user-doc -->
093 * @generated
094 */
095 public Handler createHandler() {
096 HandlerImpl handler = new HandlerImpl();
097 return handler;
098 }
099
100 /**
101 * <!-- begin-user-doc -->
102 * <!-- end-user-doc -->
103 * @generated
104 */
105 public Derivation createDerivation() {
106 DerivationImpl derivation = new DerivationImpl();
107 return derivation;
108 }
109
110 /**
111 * <!-- begin-user-doc -->
112 * <!-- end-user-doc -->
113 * @generated
114 */
115 public Event createEvent() {
116 EventImpl event = new EventImpl();
117 return event;
118 }
119
120 /**
121 * <!-- begin-user-doc -->
122 * <!-- end-user-doc -->
123 * @generated
124 */
125 public PredicateNode createPredicateNode() {
126 PredicateNodeImpl predicateNode = new PredicateNodeImpl();
127 return predicateNode;
128 }
129
130 /**
131 * <!-- begin-user-doc -->
132 * <!-- end-user-doc -->
133 * @generated
134 */
135 public JoinInput createJoinInput() {
136 JoinInputImpl joinInput = new JoinInputImpl();
137 return joinInput;
138 }
139
140 /**
141 * <!-- begin-user-doc -->
142 * <!-- end-user-doc -->
143 * @generated
144 */
145 public JoinNode createJoinNode() {
146 JoinNodeImpl joinNode = new JoinNodeImpl();
147 return joinNode;
148 }
149
150 /**
151 * <!-- begin-user-doc -->
152 * <!-- end-user-doc -->
153 * @generated
154 */
155 public JoinInputCollector createJoinInputCollector() {
156 JoinInputCollectorImpl joinInputCollector = new JoinInputCollectorImpl();
157 return joinInputCollector;
158 }
159
160 /**
161 * <!-- begin-user-doc -->
162 * <!-- end-user-doc -->
163 * @generated
164 */
165 public JoinEntry createJoinEntry() {
166 JoinEntryImpl joinEntry = new JoinEntryImpl();
167 return joinEntry;
168 }
169
170 /**
171 * <!-- begin-user-doc -->
172 * <!-- end-user-doc -->
173 * @generated
174 */
175 public Extractor createExtractor() {
176 ExtractorImpl extractor = new ExtractorImpl();
177 return extractor;
178 }
179
180 /**
181 * <!-- begin-user-doc -->
182 * <!-- end-user-doc -->
183 * @generated
184 */
185 public Predicate createPredicate() {
186 PredicateImpl predicate = new PredicateImpl();
187 return predicate;
188 }
189
190 /**
191 * <!-- begin-user-doc -->
192 * <!-- end-user-doc -->
193 * @generated
194 */
195 public CompositeEvent createCompositeEvent() {
196 CompositeEventImpl compositeEvent = new CompositeEventImpl();
197 return compositeEvent;
198 }
199
200 /**
201 * <!-- begin-user-doc -->
202 * <!-- end-user-doc -->
203 * @generated
204 */
205 public SnapshotPackage getSnapshotPackage() {
206 return (SnapshotPackage)getEPackage();
207 }
208
209 /**
210 * <!-- begin-user-doc -->
211 * <!-- end-user-doc -->
212 * @deprecated
213 * @generated
214 */
215 @Deprecated
216 public static SnapshotPackage getPackage() {
217 return SnapshotPackage.eINSTANCE;
218 }
219
220 } //SnapshotFactoryImpl