Class QueryScriptLibrary
java.lang.Object
ca.phon.query.script.QueryScriptLibrary
- All Implemented Interfaces:
IExtendable
Script library for phon query scripts.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindScriptsWithName(String name) Find scripts with given name in stock and user script locations.findScriptsWithName(String name, Project project) Find scripts with given name in all script locations.<T> TgetExtension(Class<T> cap) Get the requested extension if available.Return all extension types supportedpluginScriptFiles(Project project) projectScriptFiles(Project project) static StringprojectScriptFolder(Project project) Get the script folder for the project, if notProjectResourcesextension is found in the projectnullis returned<T> TputExtension(Class<T> cap, T impl) Add a new extension.<T> TremoveExtension(Class<T> cap) Remove a capability.static voidsaveScriptToFile(QueryScript script, String file) Save given script to the specified file
-
Field Details
-
USER_SCRIPT_FOLDER
User script folder
-
-
Constructor Details
-
QueryScriptLibrary
public QueryScriptLibrary()Constructor
-
-
Method Details
-
projectScriptFolder
Get the script folder for the project, if notProjectResourcesextension is found in the projectnullis returned- Parameters:
project-- Returns:
-
findScriptsWithName
Find scripts with given name in stock and user script locations.- Parameters:
name- name of script (without extension)- Returns:
-
findScriptsWithName
Find scripts with given name in all script locations. Project is optioal.- Parameters:
name- name of script (without extension)project- may benull- Returns:
-
stockScriptFiles
-
userScriptFiles
-
projectScriptFiles
-
pluginScriptFiles
-
saveScriptToFile
Save given script to the specified file- Parameters:
script-file-- Throws:
IOException
-
getExtensions
Description copied from interface:IExtendableReturn all extension types supported- Specified by:
getExtensionsin interfaceIExtendable
-
getExtension
Description copied from interface:IExtendableGet the requested extension if available.- Specified by:
getExtensionin interfaceIExtendable- Returns:
- the capability object or
nullif the cability is not available
-
putExtension
Description copied from interface:IExtendableAdd a new extension.- Specified by:
putExtensionin interfaceIExtendable- Parameters:
cap- the extension to add- Returns:
- the added extension implementation
-
removeExtension
Description copied from interface:IExtendableRemove a capability.- Specified by:
removeExtensionin interfaceIExtendable- Parameters:
cap- the capability to remove
-