net.sf.eos.analyzer
Class TokenizerSupplier

java.lang.Object
  extended by net.sf.eos.config.Configured
      extended by net.sf.eos.analyzer.TokenizerSupplier
All Implemented Interfaces:
Configurable, Supplier<ResettableTokenizer>
Direct Known Subclasses:
MedlineTokenizerSupplier

public abstract class TokenizerSupplier
extends Configured
implements Supplier<ResettableTokenizer>

Support class for ResettableTokenizer.

Author:
Sascha Kohlmann
See Also:
ResettableTokenFilter

Field Summary
static String TOKENIZER_PROVIDER_IMPL_CONFIG_NAME
          The configuration key name for the classname of the provider.
 
Constructor Summary
TokenizerSupplier()
           
 
Method Summary
abstract  ResettableTokenizer get()
          Creates a new instance.
static TokenizerSupplier newInstance(Configuration config)
          Creates a new instance.
 
Methods inherited from class net.sf.eos.config.Configured
configure, getConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOKENIZER_PROVIDER_IMPL_CONFIG_NAME

@ConfigurationKey(type=CLASSNAME,
                  description="Provider supports the creation of stacked \nTokenizers following the decoration pattern.")
public static final String TOKENIZER_PROVIDER_IMPL_CONFIG_NAME
The configuration key name for the classname of the provider.

See Also:
newInstance(Configuration), Constant Field Values
Constructor Detail

TokenizerSupplier

public TokenizerSupplier()
Method Detail

newInstance

@FactoryMethod(key="net.sf.eos.analyzer.TokenizerProvider.impl",
               implementation=MedlineTokenizerSupplier.class)
public static final TokenizerSupplier newInstance(Configuration config)
                                           throws TokenizerException
Creates a new instance. The Configuration must contain a key TOKENIZER_PROVIDER_IMPL_CONFIG_NAME of a provider implementation. There is no default implementation.

Parameters:
config - the configuration
Returns:
a new instance
Throws:
TokenizerException - if it is not possible to instantiate an instance

get

public abstract ResettableTokenizer get()
Creates a new instance.

Specified by:
get in interface Supplier<ResettableTokenizer>
Returns:
a new instance
Throws:
TokenizerException - if an error occurs


Copyright © 2008. All Rights Reserved.