1 /*******************************************************************************
2 * Copyright (c) 2010, 2012 Ericsson
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
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.ui
.project
.model
;
16 import java
.util
.List
;
18 import org
.eclipse
.core
.resources
.IResource
;
19 import org
.eclipse
.core
.runtime
.IPath
;
22 * The TMF project model interface.
24 * The TMF tracing project is integrated in the Common Navigator framework.
25 * Each tracing tree element has to implement this interface to be visible in the
29 * @author Francois Chouinard
31 public interface ITmfProjectModelElement
{
34 * Returns the name of the project model element.
35 * @return the name of the project element.
37 public String
getName();
39 * Returns the resource associated with the project model element.
40 * @return the model resource.
42 public IResource
getResource();
44 * Returns the path of the project model resource.
45 * @return the resource path.
47 public IPath
getPath();
49 * Returns the URI (location) of the resource.
50 * @return the resource URI.
52 public URI
getLocation();
54 * Returns the project model element.
55 * @return the project model element.
57 public TmfProjectElement
getProject();
59 * Returns the parent of this model element.
60 * @return the parent of this model element.
62 public ITmfProjectModelElement
getParent();
64 * Returns whether this model element has children or not.
65 * @return <code>true</code> if this model has children else <code>false</code>
67 public boolean hasChildren();
69 * Returns a list of children model elements.
70 * @return a list of children model elements.
72 public List
<ITmfProjectModelElement
> getChildren();
74 * Method to add a child to the model element.
75 * @param child A child element to add.
77 public void addChild(ITmfProjectModelElement child
);
79 * Method to remove a child from the model element.
80 * @param child A child element to remove
82 public void removeChild(ITmfProjectModelElement child
);
84 * Method to request to refresh the project.
86 public void refresh();