org.ow2.weblab.service.gate
Class GateService
java.lang.Object
org.ow2.weblab.service.gate.GateService
- All Implemented Interfaces:
- org.weblab_project.services.analyser.Analyser
public class GateService
- extends java.lang.Object
- implements org.weblab_project.services.analyser.Analyser
This class is a WebService calling Gate with different configurations.
It initialises gate once with a gapp configuration and implements a corpus pipeline.
Most of the parameters are set in the converter.
- Author:
- khelif, ymombrun
- See Also:
GateConverter
|
Method Summary |
protected java.util.List<org.weblab_project.core.model.text.Text> |
checkParameters(org.weblab_project.services.analyser.types.ProcessArgs args)
|
org.weblab_project.services.analyser.types.ProcessReturn |
process(org.weblab_project.services.analyser.types.ProcessArgs args)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GateService
public GateService()
throws java.io.IOException
- Throws:
java.io.IOException - If the default gapp file cannot be found in classpath resources or If Gate home cannot be found in
classpath resource
GateService
public GateService(java.io.File defaultGappFile)
throws java.io.IOException
- Parameters:
defaultGappFile - The default Gapp file to be used
- Throws:
java.io.IOException - If Gate home cannot be found in classpath resource
GateService
public GateService(java.io.File defaultGappFile,
java.io.File pluginsPath)
throws java.io.IOException
- Parameters:
defaultGappFile - The default Gapp file to be usedpluginsPath - The path to the plugin repository
- Throws:
java.io.IOException - If Gate home cannot be found in classpath resource
GateService
public GateService(java.io.File defaultGappFile,
java.io.File pluginsPath,
GateConverter converter)
throws java.io.IOException
- Parameters:
defaultGappFile - The default Gapp file to be usedpluginsPath - The path to the plugin repositoryconverter - The GateConverter in charge of reading Gate documents and annotate WebLab texts
- Throws:
java.io.IOException - If Gate home cannot be found in classpath resource
process
public org.weblab_project.services.analyser.types.ProcessReturn process(org.weblab_project.services.analyser.types.ProcessArgs args)
throws org.weblab_project.services.analyser.ProcessException
- Specified by:
process in interface org.weblab_project.services.analyser.Analyser
- Throws:
org.weblab_project.services.analyser.ProcessException
checkParameters
protected java.util.List<org.weblab_project.core.model.text.Text> checkParameters(org.weblab_project.services.analyser.types.ProcessArgs args)
throws org.weblab_project.services.analyser.ProcessException
- Parameters:
args - The ProcessArgs
- Returns:
- The list of Text contained by the Resource in args.
- Throws:
org.weblab_project.services.analyser.ProcessException - For any reason preventing the retrieval of text unit to be done.
Copyright © 2004-2011. All Rights Reserved.