Commit | Line | Data |
---|---|---|
5179fc01 FC |
1 | /******************************************************************************* |
2 | * Copyright (c) 2012 Ericsson | |
3 | * | |
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 | |
8 | * | |
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. | |
b9e37ffd FC |
20 | * |
21 | * @since 1.0 | |
22 | * @version 1.0 | |
23 | * @author Francois Chouinard | |
f7703ed6 | 24 | * |
b9e37ffd | 25 | * @see ITmfEvent |
f7703ed6 | 26 | * @see ITmfEventField |
5179fc01 FC |
27 | */ |
28 | public interface ITmfEventType extends Cloneable { | |
29 | ||
a4115405 FC |
30 | // ------------------------------------------------------------------------ |
31 | // Constants | |
32 | // ------------------------------------------------------------------------ | |
33 | ||
4c564a2d | 34 | /** |
085d898f | 35 | * The default event type content |
4c564a2d FC |
36 | */ |
37 | public static final String DEFAULT_CONTEXT_ID = "TmfContext"; //$NON-NLS-1$ | |
38 | ||
39 | /** | |
085d898f | 40 | * The default event type name |
4c564a2d FC |
41 | */ |
42 | public static final String DEFAULT_TYPE_ID = "TmfType"; //$NON-NLS-1$ | |
085d898f | 43 | |
a4115405 FC |
44 | // ------------------------------------------------------------------------ |
45 | // Getters | |
46 | // ------------------------------------------------------------------------ | |
47 | ||
5179fc01 FC |
48 | /** |
49 | * @return the event type context | |
50 | */ | |
51 | public String getContext(); | |
52 | ||
53 | /** | |
cbbcc354 | 54 | * @return the event type ID |
5179fc01 | 55 | */ |
4c564a2d | 56 | public String getName(); |
5179fc01 | 57 | |
5d3e8747 | 58 | /** |
4c564a2d | 59 | * @return the event type root field |
5d3e8747 | 60 | */ |
4c564a2d | 61 | public ITmfEventField getRootField(); |
5d3e8747 | 62 | |
5179fc01 | 63 | /** |
4c564a2d | 64 | * @return the event field names (labels) |
5179fc01 | 65 | */ |
4c564a2d | 66 | public String[] getFieldNames(); |
cbbcc354 | 67 | |
68 | /** | |
69 | * @param index the event field index | |
70 | * @return the corresponding event field label | |
71 | */ | |
4c564a2d | 72 | public String getFieldName(int index); |
5179fc01 | 73 | |
a4115405 FC |
74 | // ------------------------------------------------------------------------ |
75 | // Cloneable | |
76 | // ------------------------------------------------------------------------ | |
77 | ||
5179fc01 | 78 | /** |
f7703ed6 | 79 | * @return a clone of the event type |
5179fc01 FC |
80 | */ |
81 | public ITmfEventType clone(); | |
82 | ||
83 | } |