public class RecScriptManager
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static int |
AUTOMATIC |
|
static int |
ERROR_MSG_MAX_ITEMS |
|
static int |
MANUAL |
|
static int |
RANDOM |
|
static java.lang.String |
RECORDED_COL_ID |
|
static int |
SEQUENTIAL |
Constructor | Description |
---|---|
RecScriptManager() |
RecScriptManager loads the recording script and organizes the sequence of
recordings.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addRecscriptManagerListener(RecscriptManagerListener acl) |
Add listener.
|
void |
analyzeScriptResources() |
|
void |
createDTDFileIfRequired() |
|
void |
doClose() |
resets the manager to the initial state
|
protected void |
fireRecscriptManagerUpdate(RecscriptManagerEvent event) |
|
java.net.URL |
getContext() |
Get the workspace project context.
|
Section.Mode |
getDefaultMode() |
|
int |
getDefaultPostDelay() |
|
int |
getDefaultPreDelay() |
|
java.util.Set<java.lang.String> |
getExistingCodes() |
|
java.util.logging.Logger |
getLogger() |
|
int |
getMaxIndex() |
returns the number of items in the recording script.
|
Section |
getRecSectionForItem(int itemIndex) |
returns the recording section corresponding to a given
recording item index
|
Script |
getScript() |
Get currently used script.
|
java.lang.String |
getScriptID() |
|
java.net.URL |
getScriptURL() |
|
IntegerSequenceGenerator |
getSequenceGenerator() |
|
java.lang.String |
getSystemId() |
|
java.lang.String |
getSystemIdBase() |
|
boolean |
isDefaultAutomaticPromptPlay() |
|
boolean |
isDefaultSpeakerDisplay() |
|
boolean |
isNewVersionOfDTDFileRequired() |
|
boolean |
isProgresToNextUnrecorded() |
|
boolean |
isScriptSaved() |
|
boolean |
isSetIndexActionsEnabled() |
|
void |
load(java.net.URL promptURL) |
Loads a recording script from a URL.
|
void |
load(java.net.URL promptURL,
boolean force) |
Loads a recording script from a URL.
|
void |
loadWithoutDTD(java.net.URL promptURL) |
loads a recording script from a URL.
|
Script |
readRecScriptXMLFile(java.net.URL recScriptURL) |
reads recording and prompting instructions from an XML-Document.
|
Script |
readRecScriptXMLFile(java.net.URL recScriptURL,
boolean force) |
reads recording and prompting instructions from an XML-Document.
|
Script |
readRecScriptXMLFileWithoutDTD(java.net.URL recScriptURL) |
reads recording and prompting instructions from an XML-Document.
|
void |
removeRecscriptManagerListener(RecscriptManagerListener acl) |
Remove listener.
|
void |
setContext(java.net.URL context) |
Set the URL context (usually the project directory in the workspace).
|
void |
setDefaultAutomaticPromptPlay(boolean automaticPromptPlayDefault) |
|
void |
setDefaultMode(Section.Mode defaultMode) |
|
void |
setDefaultPostDelay(int defaultPostDelay) |
|
void |
setDefaultPreDelay(int defaultPreDelay) |
|
void |
setDefaultSpeakerDisplay(boolean defaultSpeakerDisplay) |
|
void |
setProgresToNextUnrecorded(boolean progresToNextUnrecorded) |
|
void |
setScript(Script script) |
Set the script to use.
|
void |
setScriptSaved(boolean scriptSaved) |
|
void |
setSequenceGenerator(IntegerSequenceGenerator sequenceGenerator) |
|
void |
setSetIndexActionsEnabled(boolean setIndexActionsEnabled) |
|
void |
setSystemId(java.lang.String scriptDTD) |
|
void |
setSystemIdBase(java.lang.String string) |
|
PromptItem |
shuffledPromptItem(int promptIndex) |
returns the (possibly shuffled) prompt item corresponding to the given recording index
|
void |
shuffleItems() |
|
void |
storeToFile(java.io.File scriptFile) |
public static final int AUTOMATIC
public static final int MANUAL
public static final int SEQUENTIAL
public static final int RANDOM
public static final java.lang.String RECORDED_COL_ID
public static final int ERROR_MSG_MAX_ITEMS
public RecScriptManager()
public java.net.URL getScriptURL()
public void setSequenceGenerator(IntegerSequenceGenerator sequenceGenerator)
public IntegerSequenceGenerator getSequenceGenerator()
public java.util.Set<java.lang.String> getExistingCodes()
public boolean isNewVersionOfDTDFileRequired() throws java.net.MalformedURLException
java.net.MalformedURLException
public void createDTDFileIfRequired() throws java.io.IOException
java.io.IOException
public Script getScript()
public void setScript(Script script)
script
- StorageManagerException
public void shuffleItems()
public void load(java.net.URL promptURL) throws RecscriptManagerException
promptURL
- The location of the recording scriptjava.io.IOException
DOMConverterException
java.net.URISyntaxException
StorageManagerException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
RecscriptManagerException
public void load(java.net.URL promptURL, boolean force) throws RecscriptManagerException
promptURL
- The location of the recording scriptforce
- if true forces loading script even if its has a newer DTD schema versionjava.io.IOException
DOMConverterException
java.net.URISyntaxException
StorageManagerException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
RecscriptManagerException
public void loadWithoutDTD(java.net.URL promptURL) throws RecscriptManagerException
scriptURL
- The location of the recording scriptjava.io.IOException
DOMConverterException
java.net.URISyntaxException
StorageManagerException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
RecscriptManagerException
public void storeToFile(java.io.File scriptFile) throws java.io.IOException
java.io.IOException
public Script readRecScriptXMLFile(java.net.URL recScriptURL) throws RecscriptManagerException
getRecSections()
.recScriptURL
- URLRecScriptManagerException
RecscriptManagerException
public Script readRecScriptXMLFile(java.net.URL recScriptURL, boolean force) throws RecscriptManagerException
getRecSections()
.recScriptURL
- URLforce
- if true forces loading script even if its has a newer DTD schema versionRecScriptManagerException
RecscriptManagerException
public Script readRecScriptXMLFileWithoutDTD(java.net.URL recScriptURL) throws RecscriptManagerException
getRecSections()
.recScriptURL
- URLRecScriptManagerException
RecscriptManagerException
public Section getRecSectionForItem(int itemIndex)
itemIndex
- recording index in the range of 0 and (number of items - 1)public PromptItem shuffledPromptItem(int promptIndex)
promptIndex
- public void analyzeScriptResources()
public int getMaxIndex()
public java.lang.String getSystemIdBase()
public void setSystemIdBase(java.lang.String string)
public java.lang.String getScriptID()
public void setContext(java.net.URL context)
context
- public java.net.URL getContext()
public java.util.logging.Logger getLogger()
public void doClose()
public boolean isDefaultSpeakerDisplay()
public void setDefaultSpeakerDisplay(boolean defaultSpeakerDisplay)
public Section.Mode getDefaultMode()
public void setDefaultMode(Section.Mode defaultMode)
public int getDefaultPreDelay()
public void setDefaultPreDelay(int defaultPreDelay)
public int getDefaultPostDelay()
public void setDefaultPostDelay(int defaultPostDelay)
public void addRecscriptManagerListener(RecscriptManagerListener acl)
acl
- new listenerpublic void removeRecscriptManagerListener(RecscriptManagerListener acl)
acl
- listener to removeprotected void fireRecscriptManagerUpdate(RecscriptManagerEvent event)
public boolean isScriptSaved()
public void setScriptSaved(boolean scriptSaved)
public boolean isSetIndexActionsEnabled()
public void setSetIndexActionsEnabled(boolean setIndexActionsEnabled)
public boolean isDefaultAutomaticPromptPlay()
public void setDefaultAutomaticPromptPlay(boolean automaticPromptPlayDefault)
public java.lang.String getSystemId()
public void setSystemId(java.lang.String scriptDTD)
public boolean isProgresToNextUnrecorded()
public void setProgresToNextUnrecorded(boolean progresToNextUnrecorded)