net.sf.dc.processes.cdimport
Class ImportCDProcess

java.lang.Object
  extended byjava.lang.Thread
      extended bynet.sf.dc.processes.cdimport.ImportCDProcess
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
ImportMovieCD, ImportMusicFilesCD, ImportSoftwareCD

public abstract class ImportCDProcess
extends java.lang.Thread

Imports data from a CD (or harddisk) location into the insert table of the owner module

Since:
1.3
Version:
1.00
Author:
Robert-Jan van der Waals

Field Summary
protected  java.lang.String cdName
           
protected  boolean confirmEachDir
           
protected  java.lang.String sourceDir
           
protected static WorkFlow wf
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ImportCDProcess(ImportCDDialog ui, java.lang.String sourceDir, boolean confirmEachDir, java.lang.String cdName)
          Initializes (but does not run) the CD import process
 
Method Summary
 void cancel()
           
abstract  java.lang.String[] getExtensions()
           
protected abstract  int getModule()
          The UI class which will be updated with the results of the import
protected abstract  DCObject parseInformation(java.lang.String sFilename)
          Parses the file for its information.
 void run()
          Starts the CD Import process
 void writeOutput(java.util.Vector filenames)
          Parses the source files for information and adds the parsed information to the insert table of the owner module.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

wf

protected static final WorkFlow wf

sourceDir

protected java.lang.String sourceDir

confirmEachDir

protected boolean confirmEachDir

cdName

protected java.lang.String cdName
Constructor Detail

ImportCDProcess

public ImportCDProcess(ImportCDDialog ui,
                       java.lang.String sourceDir,
                       boolean confirmEachDir,
                       java.lang.String cdName)
Initializes (but does not run) the CD import process

Parameters:
ui - used for displaying the progress
sourceDir - directory which is used as source for the import
confirmEachDir - indicates whether for each directory confirmation should be asked if the underlying data of this directory should be read or not.
Method Detail

run

public void run()
Starts the CD Import process


getExtensions

public abstract java.lang.String[] getExtensions()

cancel

public void cancel()

writeOutput

public void writeOutput(java.util.Vector filenames)
Parses the source files for information and adds the parsed information to the insert table of the owner module.

Parameters:
filenames - files to be parsed

parseInformation

protected abstract DCObject parseInformation(java.lang.String sFilename)
Parses the file for its information. Needs to be implemented by the extending classes

Parameters:
sFilename - file to be parsed

getModule

protected abstract int getModule()
The UI class which will be updated with the results of the import