5bbb8848a8e3116844dcf5f3031cb38f48264c2f
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.core / src / org / eclipse / tracecompass / tmf / core / parsers / custom / CustomXmlInputAttribute.java
1 /*******************************************************************************
2 * Copyright (c) 2014, 2016 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 * Patrick Tasse - Initial API and implementation
11 * Matthew Khouzam - Pulled out class
12 *******************************************************************************/
13 package org.eclipse.tracecompass.tmf.core.parsers.custom;
14
15 import org.eclipse.tracecompass.tmf.core.parsers.custom.CustomTraceDefinition.Tag;
16
17 /**
18 * Wrapper for XML element attributes
19 */
20 public final class CustomXmlInputAttribute {
21
22 /** Name of the XML attribute */
23 private final String fAttributeName;
24
25 /** Input tag */
26 private final Tag fInputTag;
27
28 /** Input name */
29 private final String fInputName;
30
31 /** Input action */
32 private final int fInputAction;
33
34 /** Input format */
35 private final String fInputFormat;
36
37 /**
38 * Constructor
39 *
40 * @param attributeName
41 * Name of the XML attribute
42 * @param inputName
43 * Input name
44 * @param inputAction
45 * Input action
46 * @param inputFormat
47 * Input format
48 * @deprecated Use
49 * {@link #CustomXmlInputAttribute(String, Tag, String, int, String)}
50 * instead.
51 */
52 @Deprecated
53 public CustomXmlInputAttribute(String attributeName, String inputName,
54 int inputAction, String inputFormat) {
55 fAttributeName = attributeName;
56 fInputTag = Tag.IGNORE;
57 fInputName = inputName;
58 fInputAction = inputAction;
59 fInputFormat = inputFormat;
60 }
61
62 /**
63 * Constructor
64 *
65 * @param attributeName
66 * Name of the XML attribute
67 * @param inputTag
68 * Input tag
69 * @param inputName
70 * Input name
71 * @param inputAction
72 * Input action
73 * @param inputFormat
74 * Input format
75 * @since 2.1
76 */
77 public CustomXmlInputAttribute(String attributeName, Tag inputTag,
78 String inputName, int inputAction, String inputFormat) {
79 fAttributeName = attributeName;
80 fInputTag = inputTag;
81 fInputName = inputName;
82 fInputAction = inputAction;
83 fInputFormat = inputFormat;
84 }
85
86 /**
87 * @return the attributeName
88 */
89 public String getAttributeName() {
90 return fAttributeName;
91 }
92
93 /**
94 * @return the inputTag
95 * @since 2.1
96 */
97 public Tag getInputTag() {
98 return fInputTag;
99 }
100
101 /**
102 * @return the inputName
103 */
104 public String getInputName() {
105 return fInputName;
106 }
107
108 /**
109 * @return the inputAction
110 */
111 public int getInputAction() {
112 return fInputAction;
113 }
114
115 /**
116 * @return the inputFormat
117 */
118 public String getInputFormat() {
119 return fInputFormat;
120 }
121
122 }
This page took 0.034835 seconds and 4 git commands to generate.