Implement the new TMF Event Model
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / event / ITmfEventField.java
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 /**
16 * <b><u>ITmfEventField</u></b>
17 * <p>
18 * The TMF event payload structure. Each field can be either a terminal or
19 * further decomposed into subfields.
20 */
21 public interface ITmfEventField extends Cloneable {
22
23 /**
24 * The root field id (the main container)
25 */
26 public static final String ROOT_ID = ":root:"; //$NON-NLS-1$
27
28 /**
29 * @return the field ID
30 */
31 public String getName();
32
33 /**
34 * @return the field value
35 */
36 public Object getValue();
37
38 /**
39 * @return the list of subfield names (empty array if none)
40 */
41 public String[] getFieldNames();
42
43 /**
44 * @return the nth field name (null if absent or inexistent)
45 */
46 public String getFieldName(int index);
47
48 /**
49 * @return the list of subfields (empty array if none)
50 */
51 public ITmfEventField[] getFields();
52
53 /**
54 * @return a specific subfield by name (null if absent or inexistent)
55 */
56 public ITmfEventField getField(String name);
57
58 /**
59 * @return a specific subfield by index (null if absent or inexistent)
60 */
61 public ITmfEventField getField(int index);
62
63 /**
64 * @return a clone of the event type
65 */
66 public ITmfEventField clone();
67
68 }
This page took 0.03158 seconds and 5 git commands to generate.