tmf: Support folders in tracing projects
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / trace / ITmfTrace.java
index df9c37fe0c2a3076aa674f4bd3ab69ceb075d3fe..8632c6af6a631dd530d51faf4a1d242585513403 100644 (file)
  *   Francois Chouinard - Updated as per TMF Trace Model 1.0
  *   Geneviève Bastien  - Added timestamp transforms and timestamp
  *                        creation functions
+ *   Patrick Tasse - Add support for folder elements
  *******************************************************************************/
 
 package org.eclipse.linuxtools.tmf.core.trace;
 
-import java.util.Collections;
-import java.util.Map;
-
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.IStatus;
@@ -27,8 +25,6 @@ import org.eclipse.linuxtools.tmf.core.analysis.IAnalysisModule;
 import org.eclipse.linuxtools.tmf.core.component.ITmfEventProvider;
 import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
 import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
-import org.eclipse.linuxtools.tmf.core.statesystem.ITmfAnalysisModuleWithStateSystems;
-import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem;
 import org.eclipse.linuxtools.tmf.core.synchronization.ITmfTimestampTransform;
 import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
 import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
@@ -158,6 +154,27 @@ public interface ITmfTrace extends ITmfEventProvider {
      */
     void initTrace(IResource resource, String path, Class<? extends ITmfEvent> type) throws TmfTraceException;
 
+    /**
+     * Initialize a newly instantiated "empty" trace object. This is used to
+     * properly parameterize an ITmfTrace instantiated with its parameterless
+     * constructor.
+     * <p>
+     * Typically, the parameterless constructor will provide the block size and
+     * its associated parser and indexer.
+     *
+     * @param resource
+     *            the trace resource
+     * @param path
+     *            the trace path
+     * @param type
+     *            the trace event type
+     * @param name
+     *            the trace name
+     * @throws TmfTraceException
+     *             If we couldn't open the trace
+     */
+    void initTrace(IResource resource, String path, Class<? extends ITmfEvent> type, String name) throws TmfTraceException;
+
     /**
      * Validate that the trace is of the correct type. The implementation should
      * return a TraceValidationStatus to indicate success with a certain level
@@ -199,40 +216,6 @@ public interface ITmfTrace extends ITmfEventProvider {
      */
     int getCacheSize();
 
-    /**
-     * Return the map of state systems associated with this trace.
-     *
-     * This view should be read-only (implementations should use
-     * {@link Collections#unmodifiableMap}).
-     *
-     * @return The map of state systems
-     * @since 2.0
-     * @deprecated State systems now should be provided by analysis and use
-     *             {@link ITmfAnalysisModuleWithStateSystems} and retrieve the modules
-     *             with {@link TmfTrace#getAnalysisModules} with Class
-     *             being TmfStateSystemAnalysisModule.class
-     */
-    @Deprecated
-    Map<String, ITmfStateSystem> getStateSystems();
-
-    /**
-     * If a state system is not build by the trace itself, it's possible to
-     * register it if it comes from another source. It will then be accessible
-     * with {@link #getStateSystems} normally.
-     *
-     * @param id
-     *            The unique ID to assign to this state system. In case of
-     *            conflicting ID's, the new one will overwrite the previous one
-     *            (default Map behavior).
-     * @param ss
-     *            The already-built state system
-     * @since 2.0
-     * @deprecated State systems now should be provided by analysis and use
-     *             {@link ITmfAnalysisModuleWithStateSystems}
-     */
-    @Deprecated
-    void registerStateSystem(String id, ITmfStateSystem ss);
-
     /**
      * Index the trace. Depending on the trace type, this could be done at the
      * constructor or initTrace phase too, so this could be implemented as a
This page took 0.025585 seconds and 5 git commands to generate.