| 1 | /******************************************************************************* |
| 2 | * Copyright (c) 2009 Ericsson |
| 3 | * |
| 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 |
| 8 | * |
| 9 | * Contributors: |
| 10 | * William Bourque (wbourque@gmail.com) - Initial API and implementation |
| 11 | *******************************************************************************/ |
| 12 | |
| 13 | package org.eclipse.linuxtools.lttng.event; |
| 14 | |
| 15 | import org.eclipse.linuxtools.tmf.event.*; |
| 16 | |
| 17 | /** |
| 18 | * <b><u>LttngEventSource</u></b><p> |
| 19 | * |
| 20 | * Lttng specific implementation of the TmfEventSource |
| 21 | */ |
| 22 | public class LttngEventSource extends TmfEventSource { |
| 23 | |
| 24 | /** |
| 25 | * Default Constructor.<p> |
| 26 | * |
| 27 | */ |
| 28 | public LttngEventSource() { |
| 29 | super(); |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * Copy Constructor.<p> |
| 34 | * |
| 35 | * @param newSource Source of the event as string. |
| 36 | */ |
| 37 | public LttngEventSource(String newSource) { |
| 38 | super(newSource); |
| 39 | } |
| 40 | |
| 41 | |
| 42 | /** |
| 43 | * Copy Constructor.<p> |
| 44 | * |
| 45 | * @param oldSource LttngEventSource to copy from. |
| 46 | */ |
| 47 | public LttngEventSource(LttngEventSource oldSource) { |
| 48 | this( (String)oldSource.getSourceId() ); |
| 49 | } |
| 50 | |
| 51 | |
| 52 | @Override |
| 53 | public String getSourceId() { |
| 54 | return (String)fSourceId; |
| 55 | } |
| 56 | |
| 57 | public void setSourceId(String newSource) { |
| 58 | fSourceId = newSource; |
| 59 | } |
| 60 | |
| 61 | @Override |
| 62 | public String toString() { |
| 63 | return fSourceId.toString(); |
| 64 | } |
| 65 | |
| 66 | @Override |
| 67 | public LttngEventSource clone() { |
| 68 | LttngEventSource clone = (LttngEventSource) super.clone(); |
| 69 | clone.fSourceId = new String((String) fSourceId); |
| 70 | return clone; |
| 71 | } |
| 72 | } |