org.ow2.weblab.service.gate
Class Configuration

java.lang.Object
  extended by org.ow2.weblab.service.gate.Configuration

public final class Configuration
extends java.lang.Object

This class is a singleton to be used to let the configurable and the analyser service communicate. It holds the mapping between usageContext and gapp file path, and also usageContext and corpuscontroller.

Author:
ymombrun
Date:
2010-08-31

Method Summary
 gate.CorpusController getController(java.lang.String usageContext)
           
 java.lang.String getGappFilePath(java.lang.String usageContext)
           
static Configuration getInstance()
           
 void resetConfiguration()
          Removes every mappings in this object ; moreover it deletes the singleton.
 void resetConfiguration(java.lang.String usageContext)
          Remove entries in the two map that where associated with this usageContext.
 void setController(java.lang.String usageContext, gate.CorpusController pipeline)
           
 void setGateApplicationStateFileName(java.lang.String usageContext, java.lang.String filePath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Configuration getInstance()
Returns:
The singleton instance of Configuration

getGappFilePath

public java.lang.String getGappFilePath(java.lang.String usageContext)
Parameters:
usageContext - The usageContext that shall not be null.
Returns:
The gapp file path

setGateApplicationStateFileName

public void setGateApplicationStateFileName(java.lang.String usageContext,
                                            java.lang.String filePath)
Parameters:
usageContext - The usageContext tha shall not be null
filePath - The gapp file path

getController

public gate.CorpusController getController(java.lang.String usageContext)
Parameters:
usageContext - The usageContext that shall not be null
Returns:
The controller is one has been set for this usageContext

setController

public void setController(java.lang.String usageContext,
                          gate.CorpusController pipeline)
Parameters:
usageContext - The usageContext that shall not be null
pipeline - The controller

resetConfiguration

public void resetConfiguration(java.lang.String usageContext)
Remove entries in the two map that where associated with this usageContext.

Parameters:
usageContext - The usageContext that shall not be null

resetConfiguration

public void resetConfiguration()
Removes every mappings in this object ; moreover it deletes the singleton.



Copyright © 2004-2012. All Rights Reserved.