org.tigris.mbt
Class Util

java.lang.Object
  extended by org.tigris.mbt.Util

public class Util
extends Object

This class has some utility functionality used by org.tigris.mbt The functionality is:
* Getting names with extra info for vertices and edges
* Setting up the logger for classes


Constructor Summary
Util()
           
 
Method Summary
static void AbortIf(boolean bool, String message)
           
static DirectedSparseEdge addEdgeToGraph(SparseGraph graph, DirectedSparseVertex vertexFrom, DirectedSparseVertex vertexTo, String strLabel, String strParameter, String strGuard, String strAction)
           
static DirectedSparseVertex addVertexToGraph(SparseGraph graph, String strLabel)
           
static String getCompleteEdgeName(DirectedSparseEdge edge)
          Retries information regarding an edge, and returns it as a String.
static String getCompleteVertexName(DirectedSparseVertex vertex)
          Retries information regarding a vertex, and returns it as a String.
static StopCondition getCondition(int conditionType, String conditionValue)
           
static PathGenerator getGenerator(int generatorType)
           
static char getInput()
           
static ModelBasedTesting loadMbtFromXml(String fileName)
           
static String readFile(String fileName)
           
static boolean RunTest(Object ref, Logger log, String method)
          Deprecated. use execute from ModelBasedTesting instead.
static Logger setupLogger(Class classParam)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util()
Method Detail

getCompleteEdgeName

public static String getCompleteEdgeName(DirectedSparseEdge edge)
Retries information regarding an edge, and returns it as a String. This method is for logging purposes.

Parameters:
edge - The edge about which information shall be retrieved.
Returns:
Returns a String with information regarding the edge, including the source and destination vertices. The format is:
'<EDGE LABEL>', INDEX=x ('<SOURCE VERTEX LABEL>', INDEX=y -> '<DEST VERTEX LABEL>', INDEX=z)
Where x, y and n are the unique indexes for the edge, the source vertex and the destination vertex.
Please note that the label of an edge can be either null, or empty ("");

getCompleteVertexName

public static String getCompleteVertexName(DirectedSparseVertex vertex)
Retries information regarding a vertex, and returns it as a String. This method is for logging purposes.

Parameters:
vertex - The vertex about which information shall be retrieved.
Returns:
Returns a String with information regarding the vertex. The format is:
'<VERTEX LABEL>', INDEX=n
Where is the unique index for the vertex.

AbortIf

public static void AbortIf(boolean bool,
                           String message)

setupLogger

public static Logger setupLogger(Class classParam)

addVertexToGraph

public static DirectedSparseVertex addVertexToGraph(SparseGraph graph,
                                                    String strLabel)

addEdgeToGraph

public static DirectedSparseEdge addEdgeToGraph(SparseGraph graph,
                                                DirectedSparseVertex vertexFrom,
                                                DirectedSparseVertex vertexTo,
                                                String strLabel,
                                                String strParameter,
                                                String strGuard,
                                                String strAction)

RunTest

public static boolean RunTest(Object ref,
                              Logger log,
                              String method)
Deprecated. use execute from ModelBasedTesting instead.


getCondition

public static StopCondition getCondition(int conditionType,
                                         String conditionValue)

getGenerator

public static PathGenerator getGenerator(int generatorType)

loadMbtFromXml

public static ModelBasedTesting loadMbtFromXml(String fileName)
Parameters:
fileName - The XML settings file

readFile

public static String readFile(String fileName)

getInput

public static char getInput()