ss: Move plugins to Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / event / ITmfEvent.java
index 2b6be5ebab55fc27ae58e9a19c9990cc9af364b3..807552e565023a5a1978a89ecc8a4be0a6f16650 100644 (file)
@@ -1,49 +1,74 @@
 /*******************************************************************************
- * Copyright (c) 2012 Ericsson
- * 
+ * Copyright (c) 2012, 2013 Ericsson
+ *
  * All rights reserved. This program and the accompanying materials are
  * made available under the terms of the Eclipse Public License v1.0 which
  * accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  * Contributors:
  *   Francois Chouinard - Initial API and implementation
  *******************************************************************************/
 
 package org.eclipse.linuxtools.tmf.core.event;
 
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
 
 /**
- * <b><u>ITmfEvent</u></b>
- * <p>
- * The basic event structure in TMF. In its canonical form, a data item has:
+ * The generic event structure in TMF. In its canonical form, an event has:
  * <ul>
- * <li> a parent trace
- * <li> a rank (order within the trace)
- * <li> a timestamp
- * <li> a source (reporting component)
- * <li> a type
- * <li> a content (payload)
+ * <li>a parent trace
+ * <li>a rank (order within the trace)
+ * <li>a timestamp
+ * <li>a source (reporting component)
+ * <li>a type
+ * <li>a content (payload)
  * </ul>
  * For convenience, a free-form reference field is also provided. It could be
  * used as e.g. a location marker (filename:lineno) to indicate where the event
  * was generated.
+ *
+ * @version 1.0
+ * @author Francois Chouinard
+ *
+ * @see ITmfTimestamp
+ * @see ITmfEventType
+ * @see ITmfEventField
+ * @see TmfEvent
  */
-public interface ITmfEvent extends Cloneable {
+public interface ITmfEvent extends IAdaptable {
 
     // ------------------------------------------------------------------------
     // Constants
     // ------------------------------------------------------------------------
 
     /**
-     * Pre-defined event attributes
+     * Pre-defined event timestamp attribute (for searching &filtering purposes)
      */
-    public static final String EVENT_FIELD_TIMESTAMP = ":timestamp:"; //$NON-NLS-1$
-    public static final String EVENT_FIELD_SOURCE    = ":source:";    //$NON-NLS-1$
-    public static final String EVENT_FIELD_TYPE      = ":type:";      //$NON-NLS-1$
-    public static final String EVENT_FIELD_CONTENT   = ":content:";   //$NON-NLS-1$
-    public static final String EVENT_FIELD_REFERENCE = ":reference:"; //$NON-NLS-1$
+    public static final @NonNull String EVENT_FIELD_TIMESTAMP = ":timestamp:"; //$NON-NLS-1$
+
+    /**
+     * Pre-defined event source attribute (for searching &filtering purposes)
+     */
+    public static final @NonNull String EVENT_FIELD_SOURCE = ":source:"; //$NON-NLS-1$
+
+    /**
+     * Pre-defined event type attribute (for searching &filtering purposes)
+     */
+    public static final @NonNull String EVENT_FIELD_TYPE = ":type:"; //$NON-NLS-1$
+
+    /**
+     * Pre-defined event content attribute (for searching &filtering purposes)
+     */
+    public static final @NonNull String EVENT_FIELD_CONTENT = ":content:"; //$NON-NLS-1$
+
+    /**
+     * Pre-defined event reference attribute (for searching &filtering purposes)
+     */
+    public static final @NonNull String EVENT_FIELD_REFERENCE = ":reference:"; //$NON-NLS-1$
 
     // ------------------------------------------------------------------------
     // Getters
@@ -52,45 +77,37 @@ public interface ITmfEvent extends Cloneable {
     /**
      * @return the trace that 'owns' the event
      */
-    public ITmfTrace<?> getTrace();
+    ITmfTrace getTrace();
 
     /**
      * @return the event rank within the parent trace
      */
-    public long getRank();
+    long getRank();
 
     /**
      * @return the event timestamp
+     * @since 2.0
      */
-    public ITmfTimestamp getTimestamp();
+    ITmfTimestamp getTimestamp();
 
     /**
      * @return the event source
      */
-    public String getSource();
+    String getSource();
 
     /**
      * @return the event type
      */
-    public ITmfEventType getType();
+    ITmfEventType getType();
 
     /**
      * @return the event content
      */
-    public ITmfEventField getContent();
+    ITmfEventField getContent();
 
     /**
      * @return the event reference
      */
-    public String getReference();
-
-    // ------------------------------------------------------------------------
-    // Cloneable
-    // ------------------------------------------------------------------------
-
-    /**
-     * @return a clone of the event
-     */
-    public ITmfEvent clone();
+    String getReference();
 
 }
This page took 0.026914 seconds and 5 git commands to generate.