package org.eclipse.linuxtools.tmf.core.trace;
-import java.util.Collection;
+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;
import org.eclipse.linuxtools.tmf.core.component.ITmfDataProvider;
import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
* @param path the trace path
*
* @return true if trace is valid
+ * @since 2.0
*/
- public boolean validate(IProject project, String path);
+ public IStatus validate(IProject project, String path);
// ------------------------------------------------------------------------
// Basic getters
// ------------------------------------------------------------------------
+ /**
+ * If this trace is used as a container for sub-traces, this can be used to
+ * get the sub-traces themselves. If the trace is stand-alone, this should
+ * return an array with only "this" inside. For this reason, be careful if
+ * calling this recursively.
+ *
+ * This offers a standard way of iterating through compound traces (like
+ * experiments).
+ *
+ * @return The array of sub-traces.
+ * @since 2.0
+ */
+ public ITmfTrace[] getTraces();
+
/**
* @return the trace event type
*/
public ITmfStatistics getStatistics();
/**
- * Retrieve a state system that belongs to this trace
+ * Return the map of state systems associated with this trace.
*
- * @param id
- * The ID of the state system to retrieve.
- * @return The state system that is associated with this trace and ID, or
- * 'null' if such a match doesn't exist.
- * @since 2.0
- */
- public ITmfStateSystem getStateSystem(String id);
-
- /**
- * Return the list of existing state systems registered with this trace.
+ * This view should be read-only (implementations should use
+ * {@link Collections#unmodifiableMap}).
*
- * @return A Collection view of the available state systems. The collection
- * could be empty, but should not be null.
+ * @return The map of state systems
* @since 2.0
*/
- public Collection<String> listStateSystems();
+ public Map<String, ITmfStateSystem> getStateSystems();
/**
* If a state system is not build by the trace itself, it's possible to