Textractor API textractor-720 (20091120123250)

textractor.chain
Class TextractorContext

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by org.apache.commons.chain.impl.ContextBase
              extended by textractor.chain.TextractorContext
All Implemented Interfaces:
Serializable, Cloneable, Map, Context

public class TextractorContext
extends ContextBase

Defines a Context used in a chain of sentence processing commands.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
TextractorContext()
          Create a new Context.
 
Method Summary
 ExecutorService getThreadPool()
          An ExecutorService that can be used to start new threads.
 BlockingQueue<ArticleSentencesPair> getWorkQueue(Command command)
          Get the queue to process work from.
 List<Future<Boolean>> getWorkThreads()
           
 void setThreadPool(ExecutorService pool)
          Define the ExecutorService that can be used to start new threads.
 void setWorkQueue(Command command, BlockingQueue<ArticleSentencesPair> queue)
          Set the queue to process work from.
 void setWorkThreads(List<Future<Boolean>> threads)
           
 
Methods inherited from class org.apache.commons.chain.impl.ContextBase
clear, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, values
 
Methods inherited from class java.util.HashMap
clone, containsKey, size
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, equals, hashCode, size
 

Constructor Detail

TextractorContext

public TextractorContext()
Create a new Context.

Method Detail

getWorkQueue

public final BlockingQueue<ArticleSentencesPair> getWorkQueue(Command command)
Get the queue to process work from.

Parameters:
command - Command to get the queue for
Returns:
A queue of ArticleSentencesPair objects.

setWorkQueue

public final void setWorkQueue(Command command,
                               BlockingQueue<ArticleSentencesPair> queue)
Set the queue to process work from.

Parameters:
command - Command to set the queue for
queue - the queue to set

getWorkThreads

public List<Future<Boolean>> getWorkThreads()
Returns:
the workThreads

setWorkThreads

public void setWorkThreads(List<Future<Boolean>> threads)
Parameters:
threads - the workThreads to set

getThreadPool

public final ExecutorService getThreadPool()
An ExecutorService that can be used to start new threads.

Returns:
The thread pool for this chain.

setThreadPool

public final void setThreadPool(ExecutorService pool)
Define the ExecutorService that can be used to start new threads.

Parameters:
pool - The thread pool for this chain.

Textractor API textractor-720 (20091120123250)

Copyright © 2003-2008 Institute for Computational Biomedicine, All Rights Reserved.