Commit | Line | Data |
---|---|---|
5179fc01 | 1 | /******************************************************************************* |
11252342 | 2 | * Copyright (c) 2012, 2013 Ericsson |
568007fa | 3 | * |
5179fc01 FC |
4 | * All rights reserved. This program and the accompanying materials are |
5 | * made available under the terms of the Eclipse Public License v1.0 which | |
6 | * accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
568007fa | 8 | * |
5179fc01 FC |
9 | * Contributors: |
10 | * Francois Chouinard - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.tmf.core.event; | |
14 | ||
15 | /** | |
f7703ed6 | 16 | * The generic event type in TMF. It contains a reference to the full field structure |
4c564a2d FC |
17 | * for that event type. |
18 | * <p> | |
19 | * Types are unique within their context space. | |
568007fa | 20 | * |
b9e37ffd FC |
21 | * @version 1.0 |
22 | * @author Francois Chouinard | |
568007fa | 23 | * |
b9e37ffd | 24 | * @see ITmfEvent |
f7703ed6 | 25 | * @see ITmfEventField |
5179fc01 | 26 | */ |
0316808c | 27 | public interface ITmfEventType { |
5179fc01 | 28 | |
a4115405 FC |
29 | // ------------------------------------------------------------------------ |
30 | // Constants | |
31 | // ------------------------------------------------------------------------ | |
32 | ||
4c564a2d | 33 | /** |
085d898f | 34 | * The default event type content |
4c564a2d FC |
35 | */ |
36 | public static final String DEFAULT_CONTEXT_ID = "TmfContext"; //$NON-NLS-1$ | |
37 | ||
38 | /** | |
085d898f | 39 | * The default event type name |
4c564a2d FC |
40 | */ |
41 | public static final String DEFAULT_TYPE_ID = "TmfType"; //$NON-NLS-1$ | |
085d898f | 42 | |
a4115405 FC |
43 | // ------------------------------------------------------------------------ |
44 | // Getters | |
45 | // ------------------------------------------------------------------------ | |
46 | ||
5179fc01 FC |
47 | /** |
48 | * @return the event type context | |
49 | */ | |
57a2a5ca | 50 | String getContext(); |
5179fc01 FC |
51 | |
52 | /** | |
cbbcc354 | 53 | * @return the event type ID |
5179fc01 | 54 | */ |
57a2a5ca | 55 | String getName(); |
5179fc01 | 56 | |
5d3e8747 | 57 | /** |
4c564a2d | 58 | * @return the event type root field |
5d3e8747 | 59 | */ |
57a2a5ca | 60 | ITmfEventField getRootField(); |
5d3e8747 | 61 | |
5179fc01 | 62 | /** |
4c564a2d | 63 | * @return the event field names (labels) |
5179fc01 | 64 | */ |
57a2a5ca | 65 | String[] getFieldNames(); |
cbbcc354 | 66 | |
67 | /** | |
68 | * @param index the event field index | |
69 | * @return the corresponding event field label | |
70 | */ | |
57a2a5ca | 71 | String getFieldName(int index); |
5179fc01 | 72 | } |