net.sf.eos.trie
Class AbstractTrieLoader<K,V>

java.lang.Object
  extended by net.sf.eos.trie.AbstractTrieLoader<K,V>
All Implemented Interfaces:
TrieLoader<K,V>
Direct Known Subclasses:
XmlTrieLoader

public abstract class AbstractTrieLoader<K,V>
extends Object
implements TrieLoader<K,V>


Field Summary
static String TRIE_LOADER_IMPL_CONFIG_NAME
           
 
Constructor Summary
AbstractTrieLoader()
           
 
Method Summary
abstract  void loadTrie(InputStream trieData, Trie<K,V> trie)
          Creates a <Trie from the InputStream.
static TrieLoader newInstance()
          Default TrieLoader is XmlTrieLoader.
static TrieLoader newInstance(Configuration config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRIE_LOADER_IMPL_CONFIG_NAME

@ConfigurationKey(type=CLASSNAME,
                  description="Configuration key of the trie loader factory.")
public static final String TRIE_LOADER_IMPL_CONFIG_NAME
See Also:
Constant Field Values
Constructor Detail

AbstractTrieLoader

public AbstractTrieLoader()
Method Detail

newInstance

@FactoryMethod(key="net.sf.eos.trie.AbstractTrieLoader.impl",
               implementation=XmlTrieLoader.class)
public static final TrieLoader newInstance()
                                    throws TokenizerException
Default TrieLoader is XmlTrieLoader.

Returns:
a loader
Throws:
TokenizerException

newInstance

@FactoryMethod(key="net.sf.eos.trie.AbstractTrieLoader.impl",
               implementation=XmlTrieLoader.class)
public static final TrieLoader newInstance(Configuration config)
                                    throws TokenizerException
Throws:
TokenizerException

loadTrie

public abstract void loadTrie(InputStream trieData,
                              Trie<K,V> trie)
                       throws Exception
Description copied from interface: TrieLoader
Creates a <Trie from the InputStream.

Specified by:
loadTrie in interface TrieLoader<K,V>
Parameters:
trieData - stream pointing to the trie structure data.
trie - the trie to fill with the trieData
Throws:
Exception - if the builder is unable to create the trie.


Copyright © 2008. All Rights Reserved.