All Packages Class Hierarchy This Package Previous Next Index
Class guinea.logic.Test
java.lang.Object
|
+----guinea.logic.Test
- public class Test
- extends Object
- implements PropertyLoader, Runnable, Cloneable, ExpandPathHook
Variable Index
- ·
currentItem
- The current test item.
- ·
currentItemIndex
- Index of current item.
- ·
defaultPlayer
- The default sound player to use if specific player is wanted.
- ·
defaultPlayerClassName
- Default class name of the sound player.
- ·
defaultPlayerName
- Name of default player.
- ·
defaultSubjectUI
- The default subject UI block used for testing.
- ·
disableWhenDone
- Disable subject UI when subject is done with item or timeout
has expired.
- ·
doneCond
- Used to wait until all subject are done.
- ·
enableDoneWhenAnswers
- Enable DONE-button only after answers to all questions has
been given.
- ·
enableQuestionsAfterPlaying
- Answering to questions is allowed only after all samples have
been listened to.
- ·
envProperties
-
- ·
expPath
-
- ·
FILETYPE_PROPERTIES
- Save data using textual property files.
Deprecated.
- ·
FILETYPE_SERIALIZED
- Save data using java's serialization system.
- ·
isChildSession
-
- ·
isDisposed
-
- ·
items
- List of all test items in the 'test items' file.
- ·
itemsFile
- The file that contains item properties.
- ·
itemsFilename
- The name of the file that contains item properties.
- ·
itemsProps
- The properties used to contruct the item objects.
- ·
itemStartTime
- Starting time of processing current test item.
- ·
itemTemplates
- A table of test items to use as the templates when loading
test items.
- ·
itemTimeout
- The timeout of item in milliseconds.
- ·
itemWarningTimeout
- If the time to answer is limited, a warning is given before
the time expires.
- ·
listenedSamples
- During an item, set to true when all item samples (or sample
sequence) has been played.
- ·
log
-
- ·
MCLL
- MCLL level of test.
- ·
MCLLmax
- Maximum MCLL that subject can set.
- ·
MCLLmin
- Minimum MCLL that subject can set.
- ·
numSwitches
-
- ·
parentTest
- The parent of this test.
- ·
playerProps
- The properties that contain the parameters of the player.
- ·
playersInitialized
-
- ·
playerTable
- A list of players and virtual players that are available in
this test.
- ·
playlist
- The playlist as a vector.
- ·
playlistFile
- The file that contains the playlist.
- ·
playlistFilename
- The name of the file that contains the play list.
- ·
progressStatusMonitorID
- The monitor object ID of the test progress monitor object.
- ·
requireAllAnswers
- Requires that answer gives answers to all questions.
- ·
resultsFile
- The results file.
- ·
resultsFilename
- The file name of results file.
- ·
resultsFileType
- File type of saving files.
- ·
resultsSaved
- Shows whether result file has already been written out.
- ·
samples
- List of samples for this test.
- ·
sampleSequence
- The fixed sample sequence to play to subjects if fixed
sequence type selected.
- ·
samplesFile
- The file that contains sample information.
- ·
samplesFilename
- The name of the file that contains sample information.
- ·
samplesProps
- The properties used to contruct the sample objects.
- ·
sampleSwitching
- The sample switching type.
- ·
SEQUENCE_FIXED
- Sample sequence is fixed.
- ·
SEQUENCE_FORCED
- Sample sequence is forced (same as fixed).
Deprecated.
- ·
SEQUENCE_FREE
- Subject can play samples freely.
- ·
sequenceType
- Type of sequence, free or fixed.
- ·
SESSION_INDEPENDENT_PARALLEL
-
- ·
SESSION_PARALLEL
-
- ·
SESSION_SOLO
-
- ·
SESSION_TEMPLATE
-
- ·
sessionID
- ID of the current session.
- ·
sessionItems
- Test items presented in this session in playlist order.
- ·
sessionLog
-
- ·
sessionSubjectItems
-
- ·
sessionSubjects
- Group of subjects participating in this test session.
- ·
sessionType
-
- ·
showProgressStatus
- Whether to show test progress status information to the
subjects.
- ·
subjectSetsMCLL
- If set to true, the subject sets the MCL level before
proceeding to the actual items.
- ·
SWITCHING_NORMAL
-
- ·
SWITCHING_PARALLEL
-
- ·
testDirectory
- The directory of the test.
- ·
testInProgress
- Is the test in progress right now.
- ·
testThread
- The thread that runs the test.
- ·
timeoutOccured
- Used in the test to indicate that at least one of subject's
answering time has expired.
- ·
TIMINGSTART_AFTER_ITEMRUN
- Item duration timing start after the item/sequence has been
run.
- ·
TIMINGSTART_BEFORE_ITEMRUN
- Item duration timing start before the item/sequence is run.
- ·
trainingMode
- Is training mode on (true), results are not saved.
- ·
uiFile
- The file that contains UI properties.
- ·
uiFilename
- The name of the file that contains UI properties.
- ·
uiProps
- The properties used to contruct an UI interface object.
- ·
whenTimingStarts
- Tells when to start the timing of the duration of item.
Constructor Index
- ·
Test()
-
Method Index
- ·
addSubject()
- Create a new test session subject and add it to the session's
subject group.
- ·
addSubject(SessionSubject)
- Add a new subject to the test session.
- ·
addSubject(String)
- Create a new test session subject with specified subject ID
and add it to the session's subject group.
- ·
addSubject(String, SubjectUI)
- Create a new test session subject with specified subject ID
and UI, and add it to the session's subject group.
- ·
clone()
- Creates a new object of the same class as this object.
- ·
controlPerformed(ControlEvent, SessionSubject)
-
- ·
createNewSession()
-
- ·
dispose()
-
- ·
doneItem(ControlEvent, SessionSubject)
-
- ·
endItem()
- Finish current item.
- ·
endItemSamples()
- Unload and remove sample objects that were needed with this
item.
- ·
endItemUI()
-
- ·
endPlayer()
- Close down players.
- ·
endTest()
-
- ·
expandPath(String)
-
- ·
expandVariableValue(String, Dictionary, ExpandPath)
-
- ·
getAllItems()
-
- ·
getDefaultExpandPath()
-
- ·
getDefaultItemTemplate()
- Get or construct a default test item template for use with
this test.
- ·
getDefaultPlayer()
-
- ·
getDefaultPlayerClassName()
- Get default class-name for sound player.
- ·
getItemClassName()
- Get the default class name of the test item used by this test.
- ·
getItemsFile()
-
- ·
getItemsFilename()
-
- ·
getItemTemplates()
- Get a table (dictionary) of test item templates that are used
in the test.
- ·
getItemTimeout()
- Get the current value of item timeout
- ·
getItemWarningTimeout()
- Get the current value of warning timeout
- ·
getNewSessionSubject()
- Create a new session subject.
- ·
getNumSessionItems()
- Get the number of test items that are to be presented in this
session.
- ·
getParentTest()
- Get parent test of this child.
- ·
getPlayer(String)
- Get a player from session's player list.
- ·
getPlayers()
-
- ·
getPlaylistFile()
-
- ·
getPlaylistFilename()
- Get the name of the playlist file.
- ·
getProgressStatusInfo()
- Get the test progress status info to show to the subject.
- ·
getResultsFile()
-
- ·
getResultsFilename()
-
- ·
getSample(String)
- Get a sample from test samples list.
- ·
getSampleSequence()
- Get the fixed sample sequence.
- ·
getSamplesFile()
-
- ·
getSamplesFilename()
-
- ·
getSampleSwitching()
- Get the sample switching type.
- ·
getSequenceType()
- Get the type of the sample sequence.
- ·
getSessionID()
- Get the session ID of this session.
- ·
getSessionItem(int)
- Get a test item that is tested in this session.
- ·
getSessionItem(int, SessionSubject)
-
- ·
getSessionItems(SessionSubject)
- Get an array of session items for a subject.
- ·
getSessionSubjects()
- Get the session subject group for this session.
- ·
getTestDirectory()
- Get the test directory of this test.
- ·
getTestDirectoryName()
- Get the test directory of this test.
- ·
getUIFile()
-
- ·
getUIFilename()
-
- ·
initItem()
- Initialize current item.
- ·
initItemSamples()
- Load and create sample objects for playing.
- ·
initItemUI()
-
- ·
initPlayer()
- Initialize the sound player.
- ·
initPlayerNew(String, Properties)
- Initialize the sound player.
- ·
initPlayerOld(Properties)
- Initialize the sound player.
- ·
initSessionItems()
-
- ·
initTest()
-
- ·
isChildSession()
- Is this test is child of another test object.
- ·
loadItems()
- Load test items from files to the test.
- ·
loadSamples()
-
- ·
loadUI()
-
- ·
loadUIProperties()
-
- ·
makeSessionItems()
- Create the array of test items that are presented during this
session.
- ·
makeSessionItems(BindingVector, Vector)
- Create an array of test items for a session from all test's
items.
- ·
progressCheck()
-
- ·
progressCheck(String)
-
- ·
propertyLoad(Properties, String)
-
- ·
putPlayer(String, Player)
- Put a player in player list.
- ·
removeSubject(SessionSubject)
- Remove a subject from session's subject group.
- ·
resetSession()
-
- ·
run()
-
- ·
runItem()
-
- ·
runSequence()
-
- ·
runTest()
- Start the test and run it in the current thread.
- ·
saveItemResults()
-
- ·
saveTestResults()
-
- ·
serializeResults(String)
- Save session log in serialized format into session results
file.
- ·
setConfigFile(String)
-
- ·
setDefaultPlayer(Player)
-
- ·
setDefaultPlayer(String)
- Set name of default player.
- ·
setItemsFilename(String)
-
- ·
setItemTimeout(double)
- Set the item timeout.
- ·
setItemWarningTimeout(double)
- Set the warning timeout.
- ·
setPlaylistFilename(String)
- Set the file name of the playlist file.
- ·
setQuestionsEnabled(boolean)
- Enable or disable the question (answer) components for all
subjects.
- ·
setResultsFilename(String)
-
- ·
setSampleSequence(Sequence)
- Set the fixed sample sequence.
- ·
setSamplesFilename(String)
-
- ·
setSampleSwitching(int)
- Set the sample switching type.
- ·
setSequenceType(int)
- Set the type of the sample sequence.
- ·
setSessionID(String)
- Set the session ID for this session.
- ·
setSessionItem(int, SessionSubject, Item)
-
- ·
setTestDirectory(File)
- Set the test directory.
- ·
setTestDirectory(String)
- Set the test directory.
- ·
setUIFilename(String)
-
- ·
setWarningIndicators(double, double)
- Used internally to set the timeout and warning indicators for
all activesubjects.
- ·
setWarningIndicators(int, int)
- Used internally to set up the timeout and warning indicators
for all active subjects.
- ·
showProgressStatus(SubjectUI, Object)
- Show test progress status to the subject.
- ·
startTest()
- Start the test and run it in a new thread.
- ·
startTestModules()
-
- ·
startWarningIndicators()
-
Variables
·
SEQUENCE_FIXED
public static final int SEQUENCE_FIXED
- Sample sequence is fixed.
·
SEQUENCE_FORCED
public static final int SEQUENCE_FORCED
- Note: SEQUENCE_FORCED is deprecated.
use SEQUENCE_FIXED instead.
- Sample sequence is forced (same as fixed).
·
SEQUENCE_FREE
public static final int SEQUENCE_FREE
- Subject can play samples freely.
·
sequenceType
protected int sequenceType
- Type of sequence, free or fixed. The default is
SEQUENCE_FREE.
- See Also:
- SEQUENCE_FREE, SEQUENCE_FIXED
·
sampleSequence
protected Sequence sampleSequence
- The fixed sample sequence to play to subjects if fixed
sequence type selected.
- See Also:
- sequenceType, getSampleSequence, setSampleSequence
·
SWITCHING_NORMAL
public static final int SWITCHING_NORMAL
·
SWITCHING_PARALLEL
public static final int SWITCHING_PARALLEL
·
sampleSwitching
protected int sampleSwitching
- The sample switching type.
- See Also:
- getSampleSwitching, setSampleSwitching, SWITCHING_NORMAL, SWITCHING_PARALLEL
·
numSwitches
protected transient int numSwitches
·
sessionID
protected String sessionID
- ID of the current session. If no session ID is given, an
automatically generated ID is used instead (is will be a
string 'S' and the difference, measured in minutes, between
the current time and midnight, January 1, 1970 UTC).
·
sessionSubjects
protected SessionSubjectGroup sessionSubjects
- Group of subjects participating in this test session.
·
items
protected BindingVector items
- List of all test items in the 'test items' file.
·
sessionItems
protected Item sessionItems[]
- Test items presented in this session in playlist order.
·
sessionSubjectItems
protected Hashtable sessionSubjectItems
·
itemsFilename
protected String itemsFilename
- The name of the file that contains item properties.
·
itemsFile
protected File itemsFile
- The file that contains item properties.
·
itemsProps
protected Properties itemsProps
- The properties used to contruct the item objects.
·
itemTemplates
protected Hashtable itemTemplates
- A table of test items to use as the templates when loading
test items.
·
playlistFilename
protected String playlistFilename
- The name of the file that contains the play list.
·
playlistFile
protected File playlistFile
- The file that contains the playlist.
·
playlist
protected Vector playlist
- The playlist as a vector. It contains the names (IDs) of
items that are to be played in this order.
·
samplesFilename
protected String samplesFilename
- The name of the file that contains sample information.
·
samplesFile
protected File samplesFile
- The file that contains sample information.
·
samplesProps
protected Properties samplesProps
- The properties used to contruct the sample objects.
·
samples
protected BindingVector samples
- List of samples for this test.
·
disableWhenDone
protected boolean disableWhenDone
- Disable subject UI when subject is done with item or timeout
has expired. Also used to prevent subject to change answers
after he/she has decided being done.
·
requireAllAnswers
protected boolean requireAllAnswers
- Requires that answer gives answers to all questions. If
false, some answers can be left unanswered.
·
enableDoneWhenAnswers
protected boolean enableDoneWhenAnswers
- Enable DONE-button only after answers to all questions has
been given. If false, DONE-button can be used even that all
questions haven't been answered.
·
enableQuestionsAfterPlaying
protected boolean enableQuestionsAfterPlaying
- Answering to questions is allowed only after all samples have
been listened to. If false, questions can be answered even if
subject hasn't listened to all samples in the item.
·
trainingMode
protected boolean trainingMode
- Is training mode on (true), results are not saved. Otherwise,
the test is for real and results are saved.
·
uiFilename
protected String uiFilename
- The name of the file that contains UI properties.
·
uiFile
protected File uiFile
- The file that contains UI properties.
·
uiProps
protected Properties uiProps
- The properties used to contruct an UI interface object.
·
defaultSubjectUI
protected SubjectUI defaultSubjectUI
- The default subject UI block used for testing. It is loaded
from the file 'uiFilename'.
·
defaultPlayer
protected Player defaultPlayer
- The default sound player to use if specific player is wanted.
·
playerProps
protected Properties playerProps
- The properties that contain the parameters of the player.
·
defaultPlayerClassName
protected String defaultPlayerClassName
- Default class name of the sound player. The default is
guinea.player.SoundPlayer. The class name should be
generally queried with the
getDefaultPlayerClassName()
method.
- See Also:
- getDefaultPlayerClassName
·
defaultPlayerName
protected String defaultPlayerName
- Name of default player.
- See Also:
- playerTable
·
playerTable
protected Hashtable playerTable
- A list of players and virtual players that are available in
this test. In the table, player names are keys and values are
Player-objects.
- See Also:
- Player, getPlayer, putPlayer
·
itemTimeout
protected long itemTimeout
- The timeout of item in milliseconds. The subject has that
much time to give answers. It it is 0, there is no time limit
to answer.
·
itemWarningTimeout
protected long itemWarningTimeout
- If the time to answer is limited, a warning is given before
the time expires. This is milliseconds before the time ends.
·
resultsFilename
protected String resultsFilename
- The file name of results file. If null, a name will be
created.
·
resultsFile
protected File resultsFile
- The results file. If null, a name will be created.
·
FILETYPE_SERIALIZED
public static final int FILETYPE_SERIALIZED
- Save data using java's serialization system.
·
FILETYPE_PROPERTIES
public static final int FILETYPE_PROPERTIES
- Note: FILETYPE_PROPERTIES is deprecated.
Saving in properties-format is no longer
supported. Serialized format is used.
- Save data using textual property files.
·
resultsFileType
protected int resultsFileType
- File type of saving files.
·
resultsSaved
protected boolean resultsSaved
- Shows whether result file has already been written out.
·
sessionLog
protected SessionLog sessionLog
·
TIMINGSTART_BEFORE_ITEMRUN
public static final int TIMINGSTART_BEFORE_ITEMRUN
- Item duration timing start before the item/sequence is run.
·
TIMINGSTART_AFTER_ITEMRUN
public static final int TIMINGSTART_AFTER_ITEMRUN
- Item duration timing start after the item/sequence has been
run.
·
whenTimingStarts
public int whenTimingStarts
- Tells when to start the timing of the duration of item.
·
subjectSetsMCLL
protected boolean subjectSetsMCLL
- If set to true, the subject sets the MCL level before
proceeding to the actual items.
·
MCLLmin
protected Volume MCLLmin
- Minimum MCLL that subject can set.
·
MCLLmax
protected Volume MCLLmax
- Maximum MCLL that subject can set.
·
MCLL
protected Volume MCLL
- MCLL level of test. Before test starts, this is also set to
default inital value.
·
showProgressStatus
protected boolean showProgressStatus
- Whether to show test progress status information to the
subjects.
·
progressStatusMonitorID
protected String progressStatusMonitorID
- The monitor object ID of the test progress monitor object.
·
testDirectory
protected File testDirectory
- The directory of the test. All pathnames are relative to this
directory.
·
log
protected Logger log
·
SESSION_TEMPLATE
public static final int SESSION_TEMPLATE
·
SESSION_SOLO
public static final int SESSION_SOLO
·
SESSION_PARALLEL
public static final int SESSION_PARALLEL
·
SESSION_INDEPENDENT_PARALLEL
public static final int SESSION_INDEPENDENT_PARALLEL
·
sessionType
protected int sessionType
·
parentTest
protected Test parentTest
- The parent of this test. When parallel independent test is
used, this variable contains the test object this session is
cloned from.
·
isChildSession
protected transient boolean isChildSession
·
currentItemIndex
protected transient int currentItemIndex
- Index of current item.
·
currentItem
protected transient Item currentItem
- The current test item.
·
itemStartTime
protected transient long itemStartTime
- Starting time of processing current test item.
·
testInProgress
protected transient boolean testInProgress
- Is the test in progress right now.
·
listenedSamples
protected transient boolean listenedSamples
- During an item, set to true when all item samples (or sample
sequence) has been played.
·
testThread
protected transient Thread testThread
- The thread that runs the test.
·
timeoutOccured
protected transient boolean timeoutOccured
- Used in the test to indicate that at least one of subject's
answering time has expired.
·
doneCond
protected transient KeyCounter doneCond
- Used to wait until all subject are done.
·
envProperties
protected Properties envProperties
·
expPath
protected ExpandPath expPath
·
playersInitialized
protected transient boolean playersInitialized
·
isDisposed
protected transient boolean isDisposed
Constructors
·
Test
public Test()
Methods
·
getAllItems
public BindingVector getAllItems()
·
getNumSessionItems
public int getNumSessionItems()
- Get the number of test items that are to be presented in this
session. If a playlist is used, the number is the number of
items specified in the playlist. If playlist is not used, the
number of items is the number of all test items.
- Returns:
- The number of test items in this session.
- See Also:
- sessionItems
·
initSessionItems
public void initSessionItems()
·
getSessionItems
protected Item[] getSessionItems(SessionSubject s)
- Get an array of session items for a subject. The array
contains subject's answers for the corresponding session item
in sessionItems table.
- Parameters:
- s - Session subject whose items to get.
- Returns:
- An array of test items.
·
getSessionItem
public Item getSessionItem(int index)
- Get a test item that is tested in this session.
- Parameters:
- index - Index of item that is wanted.
- Returns:
- A test item.
·
getSessionItem
public Item getSessionItem(int index,
SessionSubject s)
·
setSessionItem
public Item setSessionItem(int index,
SessionSubject s,
Item item)
·
getNewSessionSubject
public SessionSubject getNewSessionSubject()
- Create a new session subject. This test is set as its test.
No other variables of the subject are set and the subject is
not added to session subject group.
- Returns:
- A new session subject.
·
addSubject
public SessionSubject addSubject()
- Create a new test session subject and add it to the session's
subject group. A new subject ID is generated for the subject.
- Returns:
- A new session subject.
·
addSubject
public SessionSubject addSubject(String subjID)
- Create a new test session subject with specified subject ID
and add it to the session's subject group.
- Parameters:
- subjID - Subject ID for new subject.
- Returns:
- A new session subject.
·
addSubject
public SessionSubject addSubject(SessionSubject subj)
- Add a new subject to the test session. If the subject hasn't
yet a subject ID, one is generated.
- Parameters:
- subj - A subject to add. If
null
, a new
subject is created with getNewSessionSubject().
- Returns:
- The subject given as parameter subj or a new
subject if no was provided.
- See Also:
- getNewSessionSubject
·
addSubject
public SessionSubject addSubject(String subjID,
SubjectUI ui)
- Create a new test session subject with specified subject ID
and UI, and add it to the session's subject group.
- Parameters:
- subjID - Subject ID for new subject. If
null
, a new ID is generated.
- ui - The subject UI panel to use for the new subject.
- Returns:
- A new SessionSubject object.
·
removeSubject
public boolean removeSubject(SessionSubject s)
- Remove a subject from session's subject group.
- Parameters:
- s - The subject to remove from group.
- Returns:
-
False
if the subject was not included in
the group, otherwise true
is returned.
·
getSessionSubjects
public SessionSubjectGroup getSessionSubjects()
- Get the session subject group for this session.
- Returns:
- A subject group object.
·
loadUI
public SubjectUI loadUI() throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException
·
loadUIProperties
public Properties loadUIProperties() throws IOException
·
startTest
public Thread startTest()
- Start the test and run it in a new thread. If the test is
already running, the test's thread is returned. This method
returns immediately. You can use thread's join()
method to wait for the end of test.
- Returns:
- The thread that runs the test.
·
runTest
public void runTest()
- Start the test and run it in the current thread. This method
returns when the test has been run.
·
run
public void run()
·
startTestModules
public void startTestModules() throws Exception
·
initTest
public void initTest() throws Exception
·
initItemUI
protected void initItemUI()
·
getProgressStatusInfo
protected Object getProgressStatusInfo()
- Get the test progress status info to show to the subject.
When test is running, the information shows how many items
have been done out of total number of items in this session.
- Returns:
- When test is running, a progress status info object
(guinea.ui.TestProgressMonitorObject). May also return a
status information as a string.
- See Also:
- TestProgressMonitorObject
·
showProgressStatus
protected void showProgressStatus(SubjectUI ui,
Object info)
- Show test progress status to the subject.
- Parameters:
- ui - The subject UI that shows the info.
- info - An object containing status info about the test.
If
null
, no status info is shown.
·
runItem
protected void runItem() throws InterruptedException
·
runSequence
protected void runSequence() throws InterruptedException
·
saveItemResults
protected void saveItemResults()
·
endItemUI
protected void endItemUI()
·
endTest
public void endTest()
·
initItem
protected void initItem() throws Exception
- Initialize current item. Loads samples, reset answers, init
gui.
- Throws: Exception
- an exception is thrown if item
initialization fails for some reason.
·
endItem
protected void endItem()
- Finish current item. Unload samples, setup GUI, record
answers.
·
initItemSamples
protected void initItemSamples() throws Exception
- Load and create sample objects for playing. Information about
samples are read from the information about the current item.
- Throws: Exception
- initialization of samples may throw an
exception if something went wrong.
·
endItemSamples
protected void endItemSamples()
- Unload and remove sample objects that were needed with this
item.
·
getDefaultExpandPath
public ExpandPath getDefaultExpandPath()
·
expandVariableValue
public String expandVariableValue(String varName,
Dictionary vars,
ExpandPath expander)
·
getDefaultPlayerClassName
public String getDefaultPlayerClassName()
- Get default class-name for sound player.
- Returns:
- A fully-qualified Java class name. This method
returns the value of the
defaultPlayerClassName
parameter.
- See Also:
- defaultPlayerClassName
·
setDefaultPlayer
public void setDefaultPlayer(String pName)
- Set name of default player. This should be used when setting
the default player for a specific session in a
multiple-parellel independent sessions test.
- Parameters:
- pName - Name of player.
- See Also:
- defaultPlayerName
·
setDefaultPlayer
public void setDefaultPlayer(Player defPlayer)
·
getPlayer
public Player getPlayer(String name)
- Get a player from session's player list. If this test object
is a child session, players are looked for first from child's
own list and then from parent's list if if it was not no found
in child's list.
- Parameters:
- name - Name of the player to get.
- Returns:
- A player object or
null
if no player with
that name was found.
- See Also:
- playerTable, putPlayer
·
getPlayers
public Dictionary getPlayers()
·
getDefaultPlayer
public Player getDefaultPlayer()
·
putPlayer
public void putPlayer(String name,
Player player)
- Put a player in player list. If this session is a child
session, the player is put into the child's list. The new
player replaces an old player with the same name in table.
- Parameters:
- name - Name of the player.
- player - A player.
- See Also:
- getPlayer, playerTable
·
initPlayer
protected void initPlayer() throws Exception
- Initialize the sound player.
- Throws: Exception
- an exception is thrown if player
initialization fails for some reason.
·
initPlayerNew
protected void initPlayerNew(String names,
Properties playerProps) throws Exception
- Initialize the sound player. This version initializes players
configured in the new player config system (allows multiple
players and virtual players.
- Parameters:
- names - A comma-separated list of player names.
- playerProps - A properties object that contains
properties of players.
- Throws: Exception
- an exception is thrown if player
initialization fails for some reason.
·
initPlayerOld
protected void initPlayerOld(Properties playerProps) throws Exception
- Initialize the sound player. This method is using the old
sound player configuration system. This will probably
disappear in the future so update the config files to new
system.
- Throws: Exception
- an exception is thrown if player
initialization fails for some reason.
·
endPlayer
protected void endPlayer()
- Close down players. If this test session is a child session,
only child's private players are closed. If only parent's
players are used, they are not touched. Parent closes them
when it quits.
·
saveTestResults
public void saveTestResults() throws Exception
·
serializeResults
protected void serializeResults(String resultsFilename) throws IOException
- Save session log in serialized format into session results
file.
- Parameters:
- resultsFilename - Name of the file where to save the
session log. If
null
, results are not saved.
- Throws: IOException
- If an IO exception occurs.
·
getSampleSequence
public Sequence getSampleSequence()
- Get the fixed sample sequence.
- Returns:
- The fixed sample sequence that is to play to subjects.
Returns null if sequence has not been set.
- See Also:
- sampleSequence, setSampleSequence
·
setSampleSequence
public void setSampleSequence(Sequence seq)
- Set the fixed sample sequence.
- Parameters:
- seq - The sequence to be used in the test or
null to remove fixed sequence.
- See Also:
- sampleSequence, getSampleSequence
·
getSequenceType
public int getSequenceType()
- Get the type of the sample sequence.
- Returns:
- SEQUENCE_FREE for free sequence or SEQUENCE_FIXED for
fixed sequence.
- See Also:
- setSequenceType, sequenceType, SEQUENCE_FREE, SEQUENCE_FIXED
·
setSequenceType
public void setSequenceType(int type)
- Set the type of the sample sequence.
- Parameters:
- type - SEQUENCE_FREE for free sequence or SEQUENCE_FIXED
for fixed sequence.
- See Also:
- getSequenceType, sequenceType, SEQUENCE_FREE, SEQUENCE_FIXED
·
getSampleSwitching
public int getSampleSwitching()
- Get the sample switching type.
- Returns:
- Either SWITCHING_PARALLEL or SWITCHING_NORMAL
- See Also:
- setSampleSwitching, sampleSwitching, SWITCHING_NORMAL, SWITCHING_PARALLEL
·
setSampleSwitching
public void setSampleSwitching(int type)
- Set the sample switching type.
- Parameters:
- type - SWITCHING_PARALLEL or SWITCHING_NORMAL
- See Also:
- getSampleSwitching, sampleSwitching, SWITCHING_NORMAL, SWITCHING_PARALLEL
·
setItemTimeout
public void setItemTimeout(double seconds)
- Set the item timeout. It is the time the subject has
available to give his/hers answers.
- Parameters:
- secondstimeout - in seconds
- See Also:
- itemTimeout, setItemWarningTimeout, getItemTimeout
·
getItemTimeout
public double getItemTimeout()
- Get the current value of item timeout
- Returns:
- timeout in seconds.
- See Also:
- itemTimeout, setItemTimeout, getItemWarningTimeout
·
setItemWarningTimeout
public void setItemWarningTimeout(double seconds)
- Set the warning timeout. It is the time before actual timeout
when the warning indicator is lit.
- Parameters:
- seconds - seconds before the timeout to show the warning.
- See Also:
- itemWarningTimeout, setItemTimeout, getItemWarningTimeout
·
getItemWarningTimeout
public double getItemWarningTimeout()
- Get the current value of warning timeout
- Returns:
- warning timeout in seconds.
- See Also:
- itemWarningTimeout, setItemTimeout, setItemWarningTimeout
·
setWarningIndicators
protected void setWarningIndicators(int timeout,
int warning)
- Used internally to set up the timeout and warning indicators
for all active subjects.
- Parameters:
- timeout - Timeout in milliseconds.
- warning - Warning time in milliseconds.
·
setWarningIndicators
protected void setWarningIndicators(double timeout,
double warning)
- Used internally to set the timeout and warning indicators for
all activesubjects.
- Parameters:
- timeout - timeout in seconds
- warning - warning time in seconds
·
startWarningIndicators
protected void startWarningIndicators()
·
setSessionID
public void setSessionID(String sessionID)
- Set the session ID for this session.
- Parameters:
- sessionID - The session ID for the session.
- See Also:
- getSessionID, sessionID
·
getSessionID
public String getSessionID()
- Get the session ID of this session.
- Returns:
- The session ID of this test session.
- See Also:
- setSessionID, sessionID
·
setConfigFile
public void setConfigFile(String filename)
·
getTestDirectory
public File getTestDirectory()
- Get the test directory of this test.
- Returns:
- The test directory.
·
getTestDirectoryName
public String getTestDirectoryName()
- Get the test directory of this test.
- Returns:
- The directory name.
·
setTestDirectory
public void setTestDirectory(String dir)
- Set the test directory.
- Parameters:
- dir - The test directory. If it is a file, its parent
directory will be used.
·
setTestDirectory
public void setTestDirectory(File dir)
- Set the test directory.
- Parameters:
- dir - The test directory. If it is a file, its parent
directory will be used.
·
progressCheck
protected void progressCheck(String error)
·
progressCheck
protected void progressCheck()
·
loadItems
public void loadItems() throws Exception
- Load test items from files to the test.
- Throws: Exception
- if something goes wrong in loading.
·
makeSessionItems
public void makeSessionItems()
- Create the array of test items that are presented during this
session. If a playlist has been loaded, it is used to select
which items to include and in which order. If no playlist has
been defined, all items in the list of all items are included
in the order they appear in the list.
The loadItems method calls this to create session
items after items and optional playlist have been loaded.
This method can also be called later again to update the list
of session items if session's playlist has been changed. In
that case, also the
initSessionItems() should be
called also.
- See Also:
- loadItems, sessionItems, initSessionItems
·
makeSessionItems
public Item[] makeSessionItems(BindingVector allItems,
Vector names)
- Create an array of test items for a session from all test's
items. Optionally, select and order the items specified in a
playlist. The original lists are not changed, references to
items are copied to the new array.
- Parameters:
- allItems - A list of all test items defined for this
test.
- names - A playlist that specifies which of all test items
are to be included in the session's items and their order. If
null
all items in the allItems list are included
in the order they appear in the list of all items.
- Returns:
- An array of test items to be presented in this
session.
·
loadSamples
public void loadSamples() throws Exception
·
getSample
public Sample getSample(String sampleID)
- Get a sample from test samples list.
- Parameters:
- sampleID - The sample ID of the sample.
- Returns:
- A copy of the sample.
·
controlPerformed
public void controlPerformed(ControlEvent e,
SessionSubject subj)
·
doneItem
public void doneItem(ControlEvent e,
SessionSubject subj)
·
setQuestionsEnabled
protected void setQuestionsEnabled(boolean enabled)
- Enable or disable the question (answer) components for all
subjects.
- Parameters:
- enabled - Whether to enable or disable.
·
getItemClassName
public String getItemClassName()
- Get the default class name of the test item used by this test.
- Returns:
- A class name of test item.
·
getDefaultItemTemplate
public Item getDefaultItemTemplate()
- Get or construct a default test item template for use with
this test. The default implementation creates a template by
creating an instance of the default item class got from
getItemClassName(). Subclasses may also
override this with their own.
- Returns:
- A test item template or
null
if class not
specified or instantiation failed.
- See Also:
- getItemClassName
·
getItemTemplates
public Dictionary getItemTemplates()
- Get a table (dictionary) of test item templates that are used
in the test. The table generally contains at least the
'default' template.
- Returns:
- A dictionary of test item templates. The Item IDs are
the keys of the template items.
·
expandPath
public String expandPath(String path)
·
setItemsFilename
public void setItemsFilename(String filename)
·
getItemsFilename
public String getItemsFilename()
·
getItemsFile
public File getItemsFile()
·
setUIFilename
public void setUIFilename(String filename)
·
getUIFilename
public String getUIFilename()
·
getUIFile
public File getUIFile()
·
setSamplesFilename
public void setSamplesFilename(String filename)
·
getSamplesFilename
public String getSamplesFilename()
·
getSamplesFile
public File getSamplesFile()
·
setResultsFilename
public void setResultsFilename(String filename)
·
getResultsFilename
public String getResultsFilename()
·
getResultsFile
public File getResultsFile()
·
setPlaylistFilename
public void setPlaylistFilename(String filename)
- Set the file name of the playlist file.
- Parameters:
- playlist - Name of the playlist file.
·
getPlaylistFilename
public String getPlaylistFilename()
- Get the name of the playlist file.
- Returns:
- The file name of the playlist or
null
if
no playlist has been set.
·
getPlaylistFile
public File getPlaylistFile()
·
isChildSession
public boolean isChildSession()
- Is this test is child of another test object. Children are
used when running a multiple independent parallel sessions.
- Returns:
-
True
if this test object is a child.
- See Also:
- getParentTest
·
getParentTest
public Test getParentTest()
- Get parent test of this child.
- Returns:
- The parent test of this child or
null
if
this object doesn't have a parent (this isn't a child).
·
createNewSession
public Test createNewSession()
·
clone
protected Object clone()
- Creates a new object of the same class as this object.
- Overrides:
- clone in class Object
·
resetSession
public void resetSession()
·
dispose
public void dispose()
·
propertyLoad
public void propertyLoad(Properties p,
String name) throws IllegalArgumentException
All Packages Class Hierarchy This Package Previous Next Index