/*******************************************************************************
- * Copyright (c) 2014 Ericsson
+ * Copyright (c) 2014, 2016 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
*******************************************************************************/
package org.eclipse.tracecompass.tmf.core.parsers.custom;
+import org.eclipse.tracecompass.tmf.core.parsers.custom.CustomTraceDefinition.Tag;
+
/**
* Wrapper for XML element attributes
*/
/** Name of the XML attribute */
private final String fAttributeName;
+ /** Input tag */
+ private final Tag fInputTag;
+
/** Input name */
private final String fInputName;
* Input action
* @param inputFormat
* Input format
+ * @deprecated Use
+ * {@link #CustomXmlInputAttribute(String, Tag, String, int, String)}
+ * instead.
*/
+ @Deprecated
public CustomXmlInputAttribute(String attributeName, String inputName,
int inputAction, String inputFormat) {
fAttributeName = attributeName;
+ fInputTag = Tag.IGNORE;
+ fInputName = inputName;
+ fInputAction = inputAction;
+ fInputFormat = inputFormat;
+ }
+
+ /**
+ * Constructor
+ *
+ * @param attributeName
+ * Name of the XML attribute
+ * @param inputTag
+ * Input tag
+ * @param inputName
+ * Input name
+ * @param inputAction
+ * Input action
+ * @param inputFormat
+ * Input format
+ * @since 2.1
+ */
+ public CustomXmlInputAttribute(String attributeName, Tag inputTag,
+ String inputName, int inputAction, String inputFormat) {
+ fAttributeName = attributeName;
+ fInputTag = inputTag;
fInputName = inputName;
fInputAction = inputAction;
fInputFormat = inputFormat;
return fAttributeName;
}
+ /**
+ * @return the inputTag
+ * @since 2.1
+ */
+ public Tag getInputTag() {
+ return fInputTag;
+ }
+
/**
* @return the inputName
*/