org.ow2.weblab.service.gate
Class GateService

java.lang.Object
  extended by 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

Constructor Summary
GateService()
           
GateService(java.io.File defaultGappFile)
           
GateService(java.io.File defaultGappFile, java.io.File pluginsPath)
           
GateService(java.io.File defaultGappFile, java.io.File pluginsPath, GateConverter converter)
           
 
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
 

Constructor Detail

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 used
pluginsPath - 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 used
pluginsPath - The path to the plugin repository
converter - 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
Method Detail

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-2010. All Rights Reserved.