Package ca.phon.script.params.history
Class ParamHistoryManager
java.lang.Object
ca.phon.script.params.history.ParamHistoryManager
- Direct Known Subclasses:
QueryHistoryManager
Manager for
ParamHistoryType
objects. This method provides the application
logic for the generated JAXB classes. Methods in this class should be used for
manipulating ParamHistoryType
s.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Event typesstatic class
static interface
-
Constructor Summary
ConstructorDescriptionParamHistoryManager
(ParamHistoryType paramHistory) ParamHistoryManager
(File paramHistoryFile) ParamHistoryManager
(InputStream inputStream) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addParamSet
(ParamSetType paramSet) Add the given param set.addParamSet
(ScriptParameters params) addParamSet
(PhonScript script) void
void
fireParamSetAdded
(ParamSetType paramSet) void
fireParamSetRemoved
(ParamSetType paramSet) void
fireParamSetRenamed
(ParamSetType paramSet) void
fixHashes
(PhonScript script) Update hash values of all entries using provided script.getParamSet
(int idx) getParamSet
(PhonScript script) getParamSet
(String hash) getParamSetByName
(String name) getScriptParameters
(PhonScript script) int
int
indexOfName
(String name) static ParamHistoryType
loadParamHistoryFromFile
(File paramHistoryFile) static ParamHistoryType
loadParamHistoryFromStream
(InputStream inputStream) nameParamSet
(String name, ScriptParameters params) nameParamSet
(String name, PhonScript script) nameParamSet
(String name, String hash) Name a param set which already exists.void
void
removeParamSet
(int idx) removeParamSet
(String hash) void
static void
saveParamHistory
(ParamHistoryType paramHistory, File paramHistoryFile) static void
saveParamHistory
(ParamHistoryType paramHistory, OutputStream outputStream) int
size()
-
Constructor Details
-
ParamHistoryManager
-
ParamHistoryManager
- Throws:
IOException
-
ParamHistoryManager
- Throws:
IOException
-
-
Method Details
-
loadParamHistoryFromFile
- Throws:
IOException
-
loadParamHistoryFromStream
public static ParamHistoryType loadParamHistoryFromStream(InputStream inputStream) throws IOException - Throws:
IOException
-
saveParamHistory
public static void saveParamHistory(ParamHistoryType paramHistory, File paramHistoryFile) throws IOException - Throws:
IOException
-
saveParamHistory
public static void saveParamHistory(ParamHistoryType paramHistory, OutputStream outputStream) throws IOException - Throws:
IOException
-
getParamHistory
-
size
public int size() -
indexOf
-
indexOfName
-
getParamSetByName
-
getParamSet
- Throws:
PhonScriptException
-
getParamSet
-
getParamSet
-
removeParamSet
-
removeParamSet
-
getUnnamedParamSets
-
getNamedParamSets
-
nameParamSet
- Throws:
PhonScriptException
-
nameParamSet
-
nameParamSet
Name a param set which already exists.- Parameters:
name
-hash
-- Returns:
-
getScriptParameters
- Throws:
PhonScriptException
-
addParamSet
- Throws:
PhonScriptException
-
addParamSet
-
addParamSet
Add the given param set. If these parameters already exist in the file, the old reference is moved to the end of the list and date is updated.- Parameters:
paramSet
-- Returns:
- the paramSet modified by this method (could be different than the param)
-
save
- Throws:
IOException
-
removeAll
public void removeAll() -
removeAllUnnamedParamSets
-
fixHashes
Update hash values of all entries using provided script. (used for stock param sets after loading)- Parameters:
script
-- Throws:
PhonScriptException
-
fireParamSetAdded
-
fireParamSetRemoved
-
fireParamSetRenamed
-
fireParamHistoryEvent
-
addParamHistoryListener
-
removeParamHistoryListener
-