1 /*******************************************************************************
2 * Copyright (c) 2009 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 * William Bourque (wbourque@gmail.com) - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.lttng
.event
;
15 import org
.eclipse
.linuxtools
.tmf
.event
.*;
18 * <b><u>LttngEventReference</u></b><p>
20 * Lttng specific implementation of the TmfEventReference
22 public class LttngEventReference
extends TmfEventReference
{
24 private String tracename
= "";
27 * Constructor with parameters.<p>
29 * @param newTraceName Trace name
31 public LttngEventReference(String newTraceName
) {
33 tracename
= newTraceName
;
37 * Constructor with parameters with optional tracefile path.<p>
39 * @param newTracefilePath Complete tracefile path
40 * @param newTraceName Trace name
42 public LttngEventReference(String newTracefilePath
, String newTraceName
) {
43 super(newTracefilePath
);
45 // Save the name of the trace
46 tracename
= newTraceName
;
50 * Copy Constructor.<p>
52 * @param oldReference LttngEventReference to copy from.
54 public LttngEventReference(LttngEventReference oldReference
) {
55 this( oldReference
.getValue().toString(), oldReference
.getTracepath() );
59 public String
getTracepath() {
63 public void setTracepath(String tracename
) {
64 this.tracename
= tracename
;
67 public String
getValue() {
68 return (String
)fReference
;
71 public void setValue(String newReference
) {
72 fReference
= newReference
;
76 * toString() method.<p>
78 * We return only tracename, as it will be used directly in the eventsView.
79 * Returning only tracename gives a better output.
81 * @return tracename as String
84 public String
toString() {