edu.mit.jwi
Class RAMDictionary.DataLoader

java.lang.Object
  extended by edu.mit.jwi.RAMDictionary.DataLoader
All Implemented Interfaces:
java.util.concurrent.Callable<RAMDictionary.DictionaryData>
Enclosing class:
RAMDictionary

public static class RAMDictionary.DataLoader
extends java.lang.Object
implements java.util.concurrent.Callable<RAMDictionary.DictionaryData>

A Callable that creates a dictionary data from a specified dictionary. The data loader does not change the open state of the dictionary; the dictionary for the loader must be open for the loader to function without throwing an exception. The loader may be called multiple times (in a thread-safe manner) as long as the dictionary is open.

Since:
JWI 2.2.0
Author:
Mark A. Finlayson

Constructor Summary
RAMDictionary.DataLoader(IDictionary source)
          Constructs a new data loader object, that uses the specified dictionary to load its data.
 
Method Summary
 RAMDictionary.DictionaryData call()
           
protected  ISenseEntry makeSenseEntry(ISenseKey key, ISenseEntry old)
          Creates a new sense entry that replicates the specified sense entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RAMDictionary.DataLoader

public RAMDictionary.DataLoader(IDictionary source)
Constructs a new data loader object, that uses the specified dictionary to load its data.

Throws:
java.lang.NullPointerException - if the specified dictionary is null
Since:
JWI 2.2.0
Method Detail

call

public RAMDictionary.DictionaryData call()
                                  throws java.lang.Exception
Specified by:
call in interface java.util.concurrent.Callable<RAMDictionary.DictionaryData>
Throws:
java.lang.Exception

makeSenseEntry

protected ISenseEntry makeSenseEntry(ISenseKey key,
                                     ISenseEntry old)
Creates a new sense entry that replicates the specified sense entry. The new sense entry replaces it's internal sense key with the specified sense key thus removing a redundant object.

Parameters:
key - the sense key to be used
old - the sense entry to be replicated
Returns:
the new sense entry object
Throws:
java.lang.NullPointerException - if either argument is null
Since:
JWI 2.2.0


Copyright © 2007-2013 Massachusetts Institute of Technology. All Rights Reserved.