audiojury.domain
Class Test

java.lang.Object
  |
  +--audiojury.domain.Test
All Implemented Interfaces:
java.io.Serializable

public class Test
extends java.lang.Object
implements java.io.Serializable

Representation of a test within a Project.

See Also:
Serialized Form

Field Summary
static int DELETED
           
static int INTER_AUTO
           
static int INTER_INTER
           
static int NEW
           
static int RENAMED
           
static int TMP
           
static int VIRGIN
           
 
Constructor Summary
Test()
          Creates a new Test object.
 
Method Summary
 void addPractice(Judgement judg)
          Adds a Judgement to the list of practice judgements in the test.
 void addReal(Judgement judg)
          Adds a Judgement to the list of real judgements in the test.
 Instruction getInstructions()
          Gets the Instrucion of the Test.
 int getInterMode()
          Gets the interaction mode that the Test is set to use.
 TestMethod getMethod()
          Gets the TestMethod used by the Test.
 java.lang.String getName()
          Gets the name of the Test.
 java.lang.String getOldName()
          Gets the old name of the Test.
 TestOrigin getOrigin()
          Gets the TestOrigin of the Test.
 java.util.Vector getPracticeJudgements()
          Retrieves a list of all the real Judgements in the Test.
 boolean getRandomizeJudgements()
          Checks if the Judgements within the Test should be randomized or not.
 boolean getRandomizePairs()
          Checks if the Sounds within a PairedJudgement should be randomized or not.
 java.util.Vector getRealJudgements()
          Retrieves a list of all the real Judgements in the Test.
 int getStatus()
          Gets the status of the Test.
 java.lang.String getStatusString()
          Gets the status of the Test in form of a String.
 Scale getTestScale()
          Gets the Scale used in the Test.
 void randomJudgements()
          Randomizes the Judgements within the Test.
 void randomPairs()
          Randomizes the order of the Sounds in any PairedJudgements within the Test.
 void removePractice(int index)
          Removes a specific Judgement from the list of pratice judgements.
 void removeReal(int index)
          Removes a specific Judgement from the list of real judgements.
 void setInstructions(Instruction inst)
          Assigns new Instruction to the Test.
 void setInterMode(int imode)
          Sets the interaction mode that the Test will use.
 void setMethod(TestMethod tmethod)
          Sets the TestMethod used by the Test.
 void setName(java.lang.String tname)
          Sets name the for the Test.
 void setOldName(java.lang.String name)
          Sets the old name for the Test.
 void setOrigin(TestOrigin orig)
          Sets the TestOrigin of the Test.
 void setPracticeJudgements(java.util.Vector judgements)
          Sets all the practice Judgements in the Test to a supplied list.
 void setRandomizeJudgements(boolean rnd)
          Sets the randomization of the Judgements within the Test.
 void setRandomizePairs(boolean rnd)
          Sets the randomization of the Sounds within a PairedJudgement.
 void setRealJudgements(java.util.Vector judgements)
          Sets all the real Judgements in the Test to a supplied list.
 void setStatus(int stat)
          Sets the status of the Test.
 void setTestScale(Scale scale)
          Sets the Scale used in the Test.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VIRGIN

public static final int VIRGIN
See Also:
Constant Field Values

NEW

public static final int NEW
See Also:
Constant Field Values

RENAMED

public static final int RENAMED
See Also:
Constant Field Values

DELETED

public static final int DELETED
See Also:
Constant Field Values

TMP

public static final int TMP
See Also:
Constant Field Values

INTER_AUTO

public static final int INTER_AUTO
See Also:
Constant Field Values

INTER_INTER

public static final int INTER_INTER
See Also:
Constant Field Values
Constructor Detail

Test

public Test()
Creates a new Test object.

Method Detail

getName

public java.lang.String getName()
Gets the name of the Test.

Returns:
the name of the test.

setName

public void setName(java.lang.String tname)
Sets name the for the Test.

Parameters:
tname - the new name of the test.

getRandomizePairs

public boolean getRandomizePairs()
Checks if the Sounds within a PairedJudgement should be randomized or not.

Returns:
boolean indicating if the Sounds within a PairedJudgement should be randomized.

getRandomizeJudgements

public boolean getRandomizeJudgements()
Checks if the Judgements within the Test should be randomized or not.

Returns:
boolean indicating if the Judgements within the test should be randomized.

setRandomizePairs

public void setRandomizePairs(boolean rnd)
Sets the randomization of the Sounds within a PairedJudgement.

Parameters:
rnd - True to turn on randomization of pairs, false to turn it of.

setRandomizeJudgements

public void setRandomizeJudgements(boolean rnd)
Sets the randomization of the Judgements within the Test.

Parameters:
rnd - True to turn on randomization of judgements, false to turn it of.

getInterMode

public int getInterMode()
Gets the interaction mode that the Test is set to use. It can either be INTER_AUTO or INTER_INTER, both are public static final integers defined in this class.

Returns:
integer corresponding to the current interaction mode.

setInterMode

public void setInterMode(int imode)
Sets the interaction mode that the Test will use. It can either be INTER_AUTO or INTER_INTER, both are public static final integers defined in this class.

Parameters:
imode - integer corresponding to the new interaction mode.

getInstructions

public Instruction getInstructions()
Gets the Instrucion of the Test.

Returns:
the Instrucion that the test is set to use.

setInstructions

public void setInstructions(Instruction inst)
Assigns new Instruction to the Test.

Parameters:
inst - the new Instrucion for the test.

addReal

public void addReal(Judgement judg)
Adds a Judgement to the list of real judgements in the test.

Parameters:
judg - the Judgement to add to the list.

removeReal

public void removeReal(int index)
Removes a specific Judgement from the list of real judgements. Selection of which jugement to remove is based on the supplied index integer.

Parameters:
index - index to select which Judgement to remove.

getRealJudgements

public java.util.Vector getRealJudgements()
Retrieves a list of all the real Judgements in the Test.

Returns:
Vector containing all the real Judgements in the test.

setRealJudgements

public void setRealJudgements(java.util.Vector judgements)
Sets all the real Judgements in the Test to a supplied list. Note, this will remove all the previous defined real judgements from this test.

Parameters:
judgements - Vector containing the new Judgements to use.

addPractice

public void addPractice(Judgement judg)
Adds a Judgement to the list of practice judgements in the test.

Parameters:
judg - the Judgement to add to the list.

removePractice

public void removePractice(int index)
Removes a specific Judgement from the list of pratice judgements. Selection of which jugement to remove is based on the supplied index integer.

Parameters:
index - index to select which Judgement to remove.

getPracticeJudgements

public java.util.Vector getPracticeJudgements()
Retrieves a list of all the real Judgements in the Test.

Returns:
Vector containing all the practice Judgements in the test.

setPracticeJudgements

public void setPracticeJudgements(java.util.Vector judgements)
Sets all the practice Judgements in the Test to a supplied list. Note, this will remove all the previous defined practice judgements from this test.

Parameters:
judgements - Vector containing the new Judgements to use.

getStatus

public int getStatus()
Gets the status of the Test. The different statuses are defined in this class as public static final integers, and theay are called "VIRGIN", "TMP", "NEW", "RENAMED" and "DELETED".

Returns:
integer corresponding to the status of the test.

getStatusString

public java.lang.String getStatusString()
Gets the status of the Test in form of a String.

Returns:
String representing the status of the test.

setStatus

public void setStatus(int stat)
Sets the status of the Test. The different statuses are defined in this class as public static final integers, and theay are called "VIRGIN", "TMP", "NEW", "RENAMED" and "DELETED".

Parameters:
stat - integer corresponding to the status of the test.

getTestScale

public Scale getTestScale()
Gets the Scale used in the Test.

Returns:
the Scale used in the test.

setTestScale

public void setTestScale(Scale scale)
Sets the Scale used in the Test.

Parameters:
scale - the Scale used in the test.

getMethod

public TestMethod getMethod()
Gets the TestMethod used by the Test.

Returns:
TestMethod used by the test.

setMethod

public void setMethod(TestMethod tmethod)
Sets the TestMethod used by the Test.

Parameters:
tmethod - TestMethod that the test will use.

getOrigin

public TestOrigin getOrigin()
Gets the TestOrigin of the Test.

Returns:
the TestOrigin of the test.

setOrigin

public void setOrigin(TestOrigin orig)
Sets the TestOrigin of the Test.

Parameters:
orig - the TestOrigin for the test.

getOldName

public java.lang.String getOldName()
Gets the old name of the Test.

Returns:
String with the old name of the test.

setOldName

public void setOldName(java.lang.String name)
Sets the old name for the Test.

Parameters:
name - String with the old name.

randomJudgements

public void randomJudgements()
Randomizes the Judgements within the Test. Both the set of practice and real judgements are randomized, but not mixed.


randomPairs

public void randomPairs()
Randomizes the order of the Sounds in any PairedJudgements within the Test. Both the set of practice and real judgements are affected.