comirva.io
Class MetaDataFileLoaderThread

java.lang.Object
  extended by java.lang.Thread
      extended by comirva.io.MetaDataFileLoaderThread
All Implemented Interfaces:
Runnable

public class MetaDataFileLoaderThread
extends Thread

This class implements a thread for loading meta-data files (e.g. SOM-labels). The meta-data files must contain ASCII-characters only.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MetaDataFileLoaderThread(File f)
          Creates a MetaDataFileLoaderThread for loading meta-data from File f.
MetaDataFileLoaderThread(File f, Vector ml)
          Creates a MetaDataFileLoaderThread for loading meta-data from File f.
MetaDataFileLoaderThread(File f, Vector ml, JLabel jl, DefaultListModel lm)
          Creates a MetaDataFileLoaderThread for loading meta-data from File f.
 
Method Summary
 Vector getMetaDataFromFile()
          Opens the file and loads its content into a Vector-instance which is returned thereafter.
 Vector getMetaDataVector()
          Returns the Vector-instance into which the file content is loaded.
 void run()
          This method is called when the thread is started.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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
 

Constructor Detail

MetaDataFileLoaderThread

public MetaDataFileLoaderThread(File f,
                                Vector ml,
                                JLabel jl,
                                DefaultListModel lm)
Creates a MetaDataFileLoaderThread for loading meta-data from File f.

Parameters:
f - the File which contains the matrix data (exported from Matlab)
ml - the Vector to which the name of the DataMatrix should be added after it has been loaded
jl - the JLabel representing the status bar (for writing current loading progress)
lm - the DefaultListModel to add the name of the matrix to the UI

MetaDataFileLoaderThread

public MetaDataFileLoaderThread(File f,
                                Vector ml)
Creates a MetaDataFileLoaderThread for loading meta-data from File f.

Parameters:
f - the File which contains the matrix data (exported from Matlab)
ml - the Vector to which the name of the DataMatrix should be added after it has been loaded

MetaDataFileLoaderThread

public MetaDataFileLoaderThread(File f)
Creates a MetaDataFileLoaderThread for loading meta-data from File f.

Parameters:
f - the File which contains the matrix data (exported from Matlab)
Method Detail

run

public void run()
This method is called when the thread is started. The file is opened, the data read and extracted.

Specified by:
run in interface Runnable
Overrides:
run in class Thread
See Also:
Runnable.run()

getMetaDataFromFile

public Vector getMetaDataFromFile()
Opens the file and loads its content into a Vector-instance which is returned thereafter.

Returns:
a Vector containing the loaded meta-data as Strings

getMetaDataVector

public Vector getMetaDataVector()
Returns the Vector-instance into which the file content is loaded.

Returns:
the Vector containing the loaded meta-data