cic.wsd.testing
Class TestSet

java.lang.Object
  extended by cic.wsd.testing.TestSet

public class TestSet
extends java.lang.Object

Class used to run experiments specified in an XML file.

Author:
Francisco Viveros-Jiménez

Constructor Summary
TestSet()
           
 
Method Summary
private static java.util.ArrayList<Condition> getConditions(org.w3c.dom.NodeList nconditions)
          Retrieves the conditions from the XML configuration file.
private static java.util.ArrayList<Pruning> getPruningMethods(java.lang.String senses)
          Retrieves the pruning methods from the XML configuration file.
static void main(java.lang.String[] args)
           
private static java.util.ArrayList<Input> parseInputs(java.lang.String source, java.util.ArrayList<Pruning> pruningList)
          Utility method for creating the Inputs for a source.
static void runTests(java.lang.String XMLfile)
          Loads a configuration file and prepares everything for just running the tests.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestSet

public TestSet()
Method Detail

runTests

public static void runTests(java.lang.String XMLfile)
                     throws java.lang.Exception
Loads a configuration file and prepares everything for just running the tests.

Parameters:
XMLfile - Configuration file.
Throws:
java.lang.Exception

getConditions

private static java.util.ArrayList<Condition> getConditions(org.w3c.dom.NodeList nconditions)
                                                     throws java.lang.Exception
Retrieves the conditions from the XML configuration file.

Parameters:
nconditions - Conditions nodes.
Returns:
The specified conditions.
Throws:
java.lang.Exception

parseInputs

private static java.util.ArrayList<Input> parseInputs(java.lang.String source,
                                                      java.util.ArrayList<Pruning> pruningList)
                                               throws java.lang.Exception
Utility method for creating the Inputs for a source.

Parameters:
source - The folder containing the test files.
pruningList - The pruning methods to be applied.
Returns:
An ArrayList with all the new Input instances.
Throws:
java.lang.Exception

getPruningMethods

private static java.util.ArrayList<Pruning> getPruningMethods(java.lang.String senses)
                                                       throws java.lang.Exception
Retrieves the pruning methods from the XML configuration file.

Parameters:
senses - The senses to be retrieved.
Returns:
the pruning methods
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception