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

TDL execution TRI classes.

parent 70cde046
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
package org.etsi.mts.tdl.execution.java.tri;

public class Argument<T, V> extends Data<T, V> {
	private String parameterName;
	public Argument(T type, V value, String parameterName) {
		super(type, value);
		this.parameterName = parameterName;
	}
	public String getParameterName() {
		return parameterName;
	}
}
+6 −0
Original line number Diff line number Diff line
package org.etsi.mts.tdl.execution.java.tri;

public enum ComponentInstanceRole {
	SUT,
	Tester
}
+19 −0
Original line number Diff line number Diff line
package org.etsi.mts.tdl.execution.java.tri;

public class Connection extends Element {

	public final GateReference[] endPoints = new GateReference[2];

	public Connection(String name, GateReference sourceGate, GateReference targetGate) {
		super(name);
		endPoints[0] = sourceGate;
		endPoints[1] = targetGate;
	}
	
	@Override
	public String toString() {
		if (name != null)
			return name;
		return endPoints[0].toString() + " :: " + endPoints[1].toString();
	}
}
+31 −0
Original line number Diff line number Diff line
package org.etsi.mts.tdl.execution.java.tri;

/**
 * Encapsulation of type and value.
 */
public class Data<T, V> {
	private T type;
	private V value;
	
	public Data(T type, V value) {
		this.type = type;
		this.value = value;
	}

	/**
	 * The decoded value of the data that matches the type. Usually a POJO.
	 * @return Decoded value.
	 */
	public V getValue() {
		return value;
	}

	/**
	 * The type information that can be used to decode incoming data. For example, an annotated class.
	 * @return Type information in environment specific form.
	 */
	public T getType() {
		return type;
	}

}
+17 −0
Original line number Diff line number Diff line
package org.etsi.mts.tdl.execution.java.tri;

import java.util.ArrayList;
import java.util.List;

public class Element {
	public String name;
	// XXX
	public String id;
	public List<ElementAnnotation> annotations = new ArrayList<ElementAnnotation>();

	public Element() {}

	public Element(String name) {
		this.name = name;
	}
}
Loading