summaryrefslogtreecommitdiff
path: root/test/traffic-incidents-service/feed/org.genivi.trafficinfo.tpegfwktypes-model/src/main/java/org/genivi/trafficinfo/tpeg/tpegfwktypes/impl/TransportFrameTemplateImpl.java
blob: b5603068bdb442d3625cd7fc7238dcab18e24521 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
/**
 * Copyright (C) 2013 TomTom International B.V.
 * 
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package org.genivi.trafficinfo.tpeg.tpegfwktypes.impl;


import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.genivi.trafficinfo.tpeg.tpegfwktypes.TpegfwktypesPackage;
import org.genivi.trafficinfo.tpeg.tpegfwktypes.TransportFrameTemplate;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Transport Frame Template</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.genivi.trafficinfo.tpeg.tpegfwktypes.impl.TransportFrameTemplateImpl#getMetaInformationTODO <em>Meta Information TODO</em>}</li>
 *   <li>{@link org.genivi.trafficinfo.tpeg.tpegfwktypes.impl.TransportFrameTemplateImpl#getSyncWord <em>Sync Word</em>}</li>
 *   <li>{@link org.genivi.trafficinfo.tpeg.tpegfwktypes.impl.TransportFrameTemplateImpl#getFieldLength <em>Field Length</em>}</li>
 *   <li>{@link org.genivi.trafficinfo.tpeg.tpegfwktypes.impl.TransportFrameTemplateImpl#getHeaderCRC <em>Header CRC</em>}</li>
 *   <li>{@link org.genivi.trafficinfo.tpeg.tpegfwktypes.impl.TransportFrameTemplateImpl#getFrameType <em>Frame Type</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class TransportFrameTemplateImpl extends EObjectImpl implements TransportFrameTemplate {
  /**
   * The default value of the '{@link #getMetaInformationTODO() <em>Meta Information TODO</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getMetaInformationTODO()
   * @generated
   * @ordered
   */
  protected static final String META_INFORMATION_TODO_EDEFAULT = null;

  /**
   * The cached value of the '{@link #getMetaInformationTODO() <em>Meta Information TODO</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getMetaInformationTODO()
   * @generated
   * @ordered
   */
  protected String metaInformationTODO = META_INFORMATION_TODO_EDEFAULT;

  /**
   * The default value of the '{@link #getSyncWord() <em>Sync Word</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getSyncWord()
   * @generated
   * @ordered
   */
  protected static final int SYNC_WORD_EDEFAULT = 0;

  /**
   * The cached value of the '{@link #getSyncWord() <em>Sync Word</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getSyncWord()
   * @generated
   * @ordered
   */
  protected int syncWord = SYNC_WORD_EDEFAULT;

  /**
   * The default value of the '{@link #getFieldLength() <em>Field Length</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getFieldLength()
   * @generated
   * @ordered
   */
  protected static final int FIELD_LENGTH_EDEFAULT = 0;

  /**
   * The cached value of the '{@link #getFieldLength() <em>Field Length</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getFieldLength()
   * @generated
   * @ordered
   */
  protected int fieldLength = FIELD_LENGTH_EDEFAULT;

  /**
   * The default value of the '{@link #getHeaderCRC() <em>Header CRC</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getHeaderCRC()
   * @generated
   * @ordered
   */
  protected static final int HEADER_CRC_EDEFAULT = 0;

  /**
   * The cached value of the '{@link #getHeaderCRC() <em>Header CRC</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getHeaderCRC()
   * @generated
   * @ordered
   */
  protected int headerCRC = HEADER_CRC_EDEFAULT;

  /**
   * The default value of the '{@link #getFrameType() <em>Frame Type</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getFrameType()
   * @generated
   * @ordered
   */
  protected static final int FRAME_TYPE_EDEFAULT = 0;

  /**
   * The cached value of the '{@link #getFrameType() <em>Frame Type</em>}' attribute.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getFrameType()
   * @generated
   * @ordered
   */
  protected int frameType = FRAME_TYPE_EDEFAULT;

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

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  protected EClass eStaticClass() {
    return TpegfwktypesPackage.Literals.TRANSPORT_FRAME_TEMPLATE;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public String getMetaInformationTODO() {
    return metaInformationTODO;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setMetaInformationTODO(String newMetaInformationTODO) {
    String oldMetaInformationTODO = metaInformationTODO;
    metaInformationTODO = newMetaInformationTODO;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__META_INFORMATION_TODO, oldMetaInformationTODO, metaInformationTODO));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public int getSyncWord() {
    return syncWord;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setSyncWord(int newSyncWord) {
    int oldSyncWord = syncWord;
    syncWord = newSyncWord;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__SYNC_WORD, oldSyncWord, syncWord));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public int getFieldLength() {
    return fieldLength;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setFieldLength(int newFieldLength) {
    int oldFieldLength = fieldLength;
    fieldLength = newFieldLength;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__FIELD_LENGTH, oldFieldLength, fieldLength));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public int getHeaderCRC() {
    return headerCRC;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setHeaderCRC(int newHeaderCRC) {
    int oldHeaderCRC = headerCRC;
    headerCRC = newHeaderCRC;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__HEADER_CRC, oldHeaderCRC, headerCRC));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public int getFrameType() {
    return frameType;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setFrameType(int newFrameType) {
    int oldFrameType = frameType;
    frameType = newFrameType;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__FRAME_TYPE, oldFrameType, frameType));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public Object eGet(int featureID, boolean resolve, boolean coreType) {
    switch (featureID) {
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__META_INFORMATION_TODO:
        return getMetaInformationTODO();
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__SYNC_WORD:
        return getSyncWord();
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__FIELD_LENGTH:
        return getFieldLength();
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__HEADER_CRC:
        return getHeaderCRC();
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__FRAME_TYPE:
        return getFrameType();
    }
    return super.eGet(featureID, resolve, coreType);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eSet(int featureID, Object newValue) {
    switch (featureID) {
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__META_INFORMATION_TODO:
        setMetaInformationTODO((String)newValue);
        return;
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__SYNC_WORD:
        setSyncWord((Integer)newValue);
        return;
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__FIELD_LENGTH:
        setFieldLength((Integer)newValue);
        return;
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__HEADER_CRC:
        setHeaderCRC((Integer)newValue);
        return;
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__FRAME_TYPE:
        setFrameType((Integer)newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eUnset(int featureID) {
    switch (featureID) {
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__META_INFORMATION_TODO:
        setMetaInformationTODO(META_INFORMATION_TODO_EDEFAULT);
        return;
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__SYNC_WORD:
        setSyncWord(SYNC_WORD_EDEFAULT);
        return;
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__FIELD_LENGTH:
        setFieldLength(FIELD_LENGTH_EDEFAULT);
        return;
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__HEADER_CRC:
        setHeaderCRC(HEADER_CRC_EDEFAULT);
        return;
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__FRAME_TYPE:
        setFrameType(FRAME_TYPE_EDEFAULT);
        return;
    }
    super.eUnset(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID) {
    switch (featureID) {
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__META_INFORMATION_TODO:
        return META_INFORMATION_TODO_EDEFAULT == null ? metaInformationTODO != null : !META_INFORMATION_TODO_EDEFAULT.equals(metaInformationTODO);
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__SYNC_WORD:
        return syncWord != SYNC_WORD_EDEFAULT;
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__FIELD_LENGTH:
        return fieldLength != FIELD_LENGTH_EDEFAULT;
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__HEADER_CRC:
        return headerCRC != HEADER_CRC_EDEFAULT;
      case TpegfwktypesPackage.TRANSPORT_FRAME_TEMPLATE__FRAME_TYPE:
        return frameType != FRAME_TYPE_EDEFAULT;
    }
    return super.eIsSet(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public String toString() {
    if (eIsProxy()) return super.toString();

    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (metaInformationTODO: ");
    result.append(metaInformationTODO);
    result.append(", syncWord: ");
    result.append(syncWord);
    result.append(", fieldLength: ");
    result.append(fieldLength);
    result.append(", headerCRC: ");
    result.append(headerCRC);
    result.append(", frameType: ");
    result.append(frameType);
    result.append(')');
    return result.toString();
  }

} //TransportFrameTemplateImpl