Commit 57dc92e6 authored by Martti Käärik's avatar Martti Käärik
Browse files

Updated TRI.

parent f3d70678
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -15,6 +15,11 @@ public class Argument<T, V> extends Data<T, V> {
		this.parameterName = parameterName;
	}

	public Argument(Data<T, V> data, String parameterName) {
		super(data.getType(), data.getValue());
		this.parameterName = parameterName;
	}

	public String getParameterName() {
		return parameterName;
	}
+5 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ public class Element {
	/**
	 * The name of the element as specified in TDL model.
	 */
	public String name;
	protected String name;

	/**
	 * The annotations assigned to the element as specified in TDL model.
@@ -27,4 +27,8 @@ public class Element {
	public Element(String name) {
		this.name = name;
	}
	
	public String getName() {
		return name;
	}
}
+59 −0
Original line number Diff line number Diff line
package org.etsi.mts.tdl.execution.java.tri;

/**
 * Representation of a TDL model element of class <i>DataResourceMapping</i>,
 * <i>DataElementMapping</i> or <i>ParameterMapping</i>.
 */
public abstract class Mapping extends Element {
	/**
	 * Get the name applied to the associated <i>DataResourceMapping</i> element
	 * using the predefined <i>MappingName</i> annotation.
	 * 
	 * @return A distinctive name for this mapping.
	 */
	public abstract String getMappingName();

	/**
	 * If this is a resource mapping.
	 * 
	 * @return <b>true</b> if this type represents a <i>DataResourceMapping</i>
	 *         element.
	 */
	public abstract boolean isResource();

	/**
	 * If this is a parameter mapping.
	 * 
	 * @return <b>true</b> if this type represents a <i>ParameterMapping</i>
	 *         element.
	 */
	public abstract boolean isParameter();

	/**
	 * Get the type-sepcific URI for this mapping.
	 * 
	 * @return The URI of this mapping as specified in corresponding model element.
	 */
	public abstract String getUri();

	/**
	 * Get the resource mapping for this data mapping.
	 * 
	 * @return The <code>Mapping</code> representing the <i>DataResourceMapping</i>
	 *         element referenced by the associated <i>DataElementMapping</i>
	 *         element.
	 */
	public abstract Mapping getResource();

	/**
	 * Get the parameter mappings of this data mapping.
	 * 
	 * @param parameterName Name of the parameter as returned by
	 *                      {@link Type#getParameters() Type.getParameters()} or
	 *                      {@link Value#getParameters() Value.getParameters()}.
	 * @return A <code>Mapping</code> representing a <i>ParameterMapping</i>
	 *         element.
	 */
	public abstract Mapping getParameter(String parameterName);

}
+5 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ public class NamedElement extends Element {
	/**
	 * The qualified name of the element as specified in TDL model.
	 */
	public String qualifiedName;
	protected String qualifiedName;

	public NamedElement() {
	}
@@ -18,4 +18,8 @@ public class NamedElement extends Element {
		super(name);
		this.qualifiedName = qualifiedName;
	}
	
	public String getQualifiedName() {
		return qualifiedName;
	}
}
+10 −0
Original line number Diff line number Diff line
package org.etsi.mts.tdl.execution.java.tri;

/**
 * Designates a sub-class of <i>SpecialValueUse</i>.
 */
public enum SpecialValue {
	AnyValue,
	AnyValueOrOmit,
	OmitValue
}
Loading