gr.uoa.di.madgik.searchlibrary.operatorlibrary
Class IOHandler

java.lang.Object
  extended by gr.uoa.di.madgik.searchlibrary.operatorlibrary.IOHandler

public class IOHandler
extends Object

Initializes the DataSource and DataSink classes.

Author:
john.gerbesiotis - DI NKUA

Constructor Summary
IOHandler()
           
 
Method Summary
static DataSink getDataSink(URI inLocator, String outputType, String outputValue, Map<String,String> outputParameters, gr.uoa.di.madgik.searchlibrary.operatorlibrary.stats.StatsContainer stats)
          Initializes and returns a DataSink object.
static DataSource getDataSource(String inputType, String inputValue, Map<String,String> inputParameters)
          Initializes and returns a DataSource object.
static void init(String dataHandlersConfigFile)
          Initializes the IOHandler by reading the available data handlers from a configuration file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOHandler

public IOHandler()
Method Detail

init

public static void init(String dataHandlersConfigFile)
                 throws Exception
Initializes the IOHandler by reading the available data handlers from a configuration file.

Parameters:
dataHandlersConfigFile - The configuration file from which the IOHandler will read or null for default config
Throws:
Exception - If initialization fails

getDataSource

public static DataSource getDataSource(String inputType,
                                       String inputValue,
                                       Map<String,String> inputParameters)
                                throws Exception
Initializes and returns a DataSource object.

Parameters:
inputType - The input type
inputValue - The input value
inputParameters - The parameters of the input
Returns:
The DataSource object
Throws:
Exception - If an error occurred in initializing the DataSource

getDataSink

public static DataSink getDataSink(URI inLocator,
                                   String outputType,
                                   String outputValue,
                                   Map<String,String> outputParameters,
                                   gr.uoa.di.madgik.searchlibrary.operatorlibrary.stats.StatsContainer stats)
                            throws Exception
Initializes and returns a DataSink object.

Parameters:
inLocator - The input locator
outputType - The output type
outputValue - The output value
outputParameters - The parameters of the output
stats - The statistics container
Returns:
The DataSink object
Throws:
Exception - If an error occurred in initializing the DataSink


Copyright © 2013. All Rights Reserved.