1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package com.hammurapi.eventbus.snapshot.impl; |
8 | |
9 | import com.hammurapi.eventbus.snapshot.*; |
10 | |
11 | import org.eclipse.emf.ecore.EClass; |
12 | import org.eclipse.emf.ecore.EObject; |
13 | import org.eclipse.emf.ecore.EPackage; |
14 | |
15 | import org.eclipse.emf.ecore.impl.EFactoryImpl; |
16 | |
17 | import org.eclipse.emf.ecore.plugin.EcorePlugin; |
18 | |
19 | /** |
20 | * <!-- begin-user-doc --> |
21 | * An implementation of the model <b>Factory</b>. |
22 | * <!-- end-user-doc --> |
23 | * @generated |
24 | */ |
25 | public class SnapshotFactoryImpl extends EFactoryImpl implements SnapshotFactory { |
26 | /** |
27 | * Creates the default factory implementation. |
28 | * <!-- begin-user-doc --> |
29 | * <!-- end-user-doc --> |
30 | * @generated |
31 | */ |
32 | public static SnapshotFactory init() { |
33 | try { |
34 | SnapshotFactory theSnapshotFactory = (SnapshotFactory)EPackage.Registry.INSTANCE.getEFactory("http://snapshot/1.0"); |
35 | if (theSnapshotFactory != null) { |
36 | return theSnapshotFactory; |
37 | } |
38 | } |
39 | catch (Exception exception) { |
40 | EcorePlugin.INSTANCE.log(exception); |
41 | } |
42 | return new SnapshotFactoryImpl(); |
43 | } |
44 | |
45 | /** |
46 | * Creates an instance of the factory. |
47 | * <!-- begin-user-doc --> |
48 | * <!-- end-user-doc --> |
49 | * @generated |
50 | */ |
51 | public SnapshotFactoryImpl() { |
52 | super(); |
53 | } |
54 | |
55 | /** |
56 | * <!-- begin-user-doc --> |
57 | * <!-- end-user-doc --> |
58 | * @generated |
59 | */ |
60 | @Override |
61 | public EObject create(EClass eClass) { |
62 | switch (eClass.getClassifierID()) { |
63 | case SnapshotPackage.SNAPSHOT: return createSnapshot(); |
64 | case SnapshotPackage.HANDLER: return createHandler(); |
65 | case SnapshotPackage.DERIVATION: return createDerivation(); |
66 | case SnapshotPackage.EVENT: return createEvent(); |
67 | case SnapshotPackage.PREDICATE_NODE: return createPredicateNode(); |
68 | case SnapshotPackage.JOIN_INPUT: return createJoinInput(); |
69 | case SnapshotPackage.JOIN_NODE: return createJoinNode(); |
70 | case SnapshotPackage.JOIN_INPUT_COLLECTOR: return createJoinInputCollector(); |
71 | case SnapshotPackage.JOIN_ENTRY: return createJoinEntry(); |
72 | case SnapshotPackage.EXTRACTOR: return createExtractor(); |
73 | case SnapshotPackage.PREDICATE: return createPredicate(); |
74 | case SnapshotPackage.COMPOSITE_EVENT: return createCompositeEvent(); |
75 | default: |
76 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
77 | } |
78 | } |
79 | |
80 | /** |
81 | * <!-- begin-user-doc --> |
82 | * <!-- end-user-doc --> |
83 | * @generated |
84 | */ |
85 | public Snapshot createSnapshot() { |
86 | SnapshotImpl snapshot = new SnapshotImpl(); |
87 | return snapshot; |
88 | } |
89 | |
90 | /** |
91 | * <!-- begin-user-doc --> |
92 | * <!-- end-user-doc --> |
93 | * @generated |
94 | */ |
95 | public Handler createHandler() { |
96 | HandlerImpl handler = new HandlerImpl(); |
97 | return handler; |
98 | } |
99 | |
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 |