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 ParamHistoryTypes.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEvent typesstatic classstatic interface -
Constructor Summary
ConstructorsConstructorDescriptionParamHistoryManager(ParamHistoryType paramHistory) ParamHistoryManager(File paramHistoryFile) ParamHistoryManager(InputStream inputStream) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddParamSet(ParamSetType paramSet) Add the given param set.addParamSet(ScriptParameters params) addParamSet(PhonScript script) voidvoidfireParamSetAdded(ParamSetType paramSet) voidfireParamSetRemoved(ParamSetType paramSet) voidfireParamSetRenamed(ParamSetType paramSet) voidfixHashes(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) intintindexOfName(String name) static ParamHistoryTypeloadParamHistoryFromFile(File paramHistoryFile) static ParamHistoryTypeloadParamHistoryFromStream(InputStream inputStream) nameParamSet(String name, ScriptParameters params) nameParamSet(String name, PhonScript script) nameParamSet(String name, String hash) Name a param set which already exists.voidvoidremoveParamSet(int idx) removeParamSet(String hash) voidstatic voidsaveParamHistory(ParamHistoryType paramHistory, File paramHistoryFile) static voidsaveParamHistory(ParamHistoryType paramHistory, OutputStream outputStream) intsize()
-
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
-