gr.uoa.di.madgik.searchlibrary.operatorlibrary.datasource
Class DataSource

java.lang.Object
  extended by java.lang.Thread
      extended by gr.uoa.di.madgik.searchlibrary.operatorlibrary.datasource.DataSource
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
FTPDataSource, JDBCDataSource, PathDataSource, TMDataSource

public abstract class DataSource
extends Thread

The DataSource abstract class is extended by all classes that will be used as a data source.

Author:
john.gerbesiotis - DI NKUA

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  gr.uoa.di.madgik.grs.record.field.FieldDefinition[] fieldDefs
          The field definition of the writer
protected  String filterMask
          The filter mask that will be applied.
protected  String input
          Input value of the DataSource
protected  Map<String,String> inputParameters
          Input parameters of the DataSource
protected  long timeout
           
protected static long TimeoutDef
          The default timeout used by the IRecordWriter.
protected  TimeUnit timeUnit
           
protected static TimeUnit TimeUnitDef
          The default timeout unit used by the RecordWriter.
protected  gr.uoa.di.madgik.grs.writer.IRecordWriter<gr.uoa.di.madgik.grs.record.Record> writer
          The writer to use
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DataSource(String input, Map<String,String> inputParameters)
          Constructor of the abstract class.
 
Method Summary
abstract  URI getLocator()
          Abstract method used to retrieve URI locator of the gRS2
 void setTimeout(long timeout)
           
 void setTimeUnit(TimeUnit timeUnit)
           
 
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, run, 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
 

Field Detail

input

protected String input
Input value of the DataSource


inputParameters

protected Map<String,String> inputParameters
Input parameters of the DataSource


writer

protected gr.uoa.di.madgik.grs.writer.IRecordWriter<gr.uoa.di.madgik.grs.record.Record> writer
The writer to use


fieldDefs

protected gr.uoa.di.madgik.grs.record.field.FieldDefinition[] fieldDefs
The field definition of the writer


filterMask

protected String filterMask
The filter mask that will be applied. If null all available fields will be used.


TimeoutDef

protected static final long TimeoutDef
The default timeout used by the IRecordWriter. Currently set to 60.

See Also:
Constant Field Values

TimeUnitDef

protected static final TimeUnit TimeUnitDef
The default timeout unit used by the RecordWriter. The current default unit is seconds.


timeout

protected long timeout

timeUnit

protected TimeUnit timeUnit
Constructor Detail

DataSource

public DataSource(String input,
                  Map<String,String> inputParameters)
           throws Exception
Constructor of the abstract class. Used for initialization.

Parameters:
input - input value of the DataSource
inputParameters - input parameters of the DataSource
Throws:
Exception - If the initialization of the DataSource fails
Method Detail

getLocator

public abstract URI getLocator()
Abstract method used to retrieve URI locator of the gRS2

Returns:
A URI locator of the gRS2

setTimeout

public void setTimeout(long timeout)
Parameters:
timeout - the timeout to set

setTimeUnit

public void setTimeUnit(TimeUnit timeUnit)
Parameters:
timeUnit - the timeUnit to set


Copyright © 2013. All Rights Reserved.