net.datacrow.core.migration
Class ItemMigrater

java.lang.Object
  extended by net.datacrow.core.migration.ItemMigrater
Direct Known Subclasses:
ItemExporter, ItemImporter

public abstract class ItemMigrater
extends java.lang.Object


Field Summary
static int _MODE_NON_THREADED
          Runs the parser in a non threaded mode
static int _MODE_THREADED
          Runs the parser in threaded mode
protected  java.io.File file
           
protected  java.lang.String key
           
protected  int mode
           
protected  int moduleIdx
           
protected  DcThread task
           
 
Constructor Summary
ItemMigrater(int moduleIdx, java.lang.String key, int mode)
           
 
Method Summary
 void cancel()
           
 java.io.File getFile()
           
 javax.swing.ImageIcon getIcon()
          The icon used to represent this source reader.
 java.lang.String getKey()
          The unique key used to represent this source reader.
protected  DcModule getModule()
           
abstract  java.lang.String getName()
           
abstract  DcThread getTask()
           
protected abstract  void initialize()
           
 void setFile(java.io.File file)
          Prepares this reader.
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_MODE_THREADED

public static final int _MODE_THREADED
Runs the parser in threaded mode

See Also:
Constant Field Values

_MODE_NON_THREADED

public static final int _MODE_NON_THREADED
Runs the parser in a non threaded mode

See Also:
Constant Field Values

moduleIdx

protected final int moduleIdx

mode

protected final int mode

key

protected java.lang.String key

file

protected java.io.File file

task

protected DcThread task
Constructor Detail

ItemMigrater

public ItemMigrater(int moduleIdx,
                    java.lang.String key,
                    int mode)
             throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getTask

public abstract DcThread getTask()

getName

public abstract java.lang.String getName()

initialize

protected abstract void initialize()
                            throws java.lang.Exception
Throws:
java.lang.Exception

getIcon

public javax.swing.ImageIcon getIcon()
The icon used to represent this source reader.


getKey

public java.lang.String getKey()
The unique key used to represent this source reader.


setFile

public void setFile(java.io.File file)
             throws java.lang.Exception
Prepares this reader. The file is set and initialized.

Parameters:
file -
Throws:
java.lang.Exception

getFile

public java.io.File getFile()

getModule

protected DcModule getModule()

start

public void start()
           throws java.lang.Exception
Throws:
java.lang.Exception

cancel

public void cancel()