eu.bootstrep.Utilities
Class IOMethods

java.lang.Object
  extended by eu.bootstrep.Utilities.IOMethods

public class IOMethods
extends java.lang.Object

This Class contains several input/output methods.


Field Summary
(package private)  DateTime dTime
          An instance for DateTime class
(package private)  Logger Logger
          An instance of Logger Class.
(package private)  Logger xmlLog
          An instance of Logger Class.
 
Constructor Summary
IOMethods()
          Creates a new instance of IOMethods
 
Method Summary
 java.lang.Boolean checkForInputFile(PropertyBean PB, MainBean MB, MessageBean mesBn)
          This method searches for the XML input file.
 java.lang.String loadGenericTable(PropertyBean PB, MessageBean mesBn, MainBean MB, ListBean LB, java.lang.String fileName)
          This is an old version of writeAndLoadLogFile.
 java.lang.String readPropFile(java.io.PrintStream out, java.lang.String propName, java.lang.String propFile, MessageBean mesBn)
          This method retrieves property values from property file.
log level is set to 3, that is the higher level.
 java.lang.String writeAndLoadLogFile(PropertyBean PB, MessageBean mesBn, MainBean MB, ListBean LB, java.lang.String fileName)
          This method writes down log information about the XML input file.
 void writeGeneralFile(PropertyBean PB, MessageBean mesBn, MainBean MB, java.util.ArrayList list, java.lang.String fileName)
          This is an utility method.
 void writeInputFiles(PropertyBean PB, MessageBean mesBn, MainBean MB, ListBean LB, java.lang.Integer when)
          This method writes down input data into files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Logger

Logger Logger
An instance of Logger Class.


xmlLog

Logger xmlLog
An instance of Logger Class.


dTime

DateTime dTime
An instance for DateTime class

Constructor Detail

IOMethods

public IOMethods()
Creates a new instance of IOMethods

Method Detail

readPropFile

public java.lang.String readPropFile(java.io.PrintStream out,
                                     java.lang.String propName,
                                     java.lang.String propFile,
                                     MessageBean mesBn)
This method retrieves property values from property file.
log level is set to 3, that is the higher level. This log level allows software to detail each performed operation.
Messages displayed to users are retrieved from the MessageBean input parameter.

Parameters:
out - Output PrintStream
propName - The property to read from file.
propFile - The property file
mesBn - The messageBean.
Returns:
Returns the value of property

checkForInputFile

public java.lang.Boolean checkForInputFile(PropertyBean PB,
                                           MainBean MB,
                                           MessageBean mesBn)
This method searches for the XML input file. Steps performed are the following: This method returns true if the input file exists.

Parameters:
PB - The PropertyBean
MB - The MainBean
mesBn - The MessageBean
Returns:
True if input file exixsts, false otherwise

writeInputFiles

public void writeInputFiles(PropertyBean PB,
                            MessageBean mesBn,
                            MainBean MB,
                            ListBean LB,
                            java.lang.Integer when)
This method writes down input data into files. This method behaves differently depending on the when parameter. If when is 0, staging tables are managed: In both cases, this method reads the list containing data and writes these data to files. Lists are retrieved from the TheElement bean.
For target frame tables, lists are retrieved from the hashTable getData2Write() of the MainBean. However, steps performed are the same as before.

Parameters:
PB - The PropertyBean
mesBn - The MessageBean
MB - The MainBean
LB - The ListBean
when - An integer to select table type

writeAndLoadLogFile

public java.lang.String writeAndLoadLogFile(PropertyBean PB,
                                            MessageBean mesBn,
                                            MainBean MB,
                                            ListBean LB,
                                            java.lang.String fileName)
This method writes down log information about the XML input file.
This method extracts log information by executing the getMainLog() method of the ListBean input parameter

Parameters:
PB - The PropertyBean
mesBn - The MessageBean
MB - The MainBean
LB - The ListBean
fileName - input empty file. This file will contain list data
Returns:
An SQL load instruction

writeGeneralFile

public void writeGeneralFile(PropertyBean PB,
                             MessageBean mesBn,
                             MainBean MB,
                             java.util.ArrayList list,
                             java.lang.String fileName)
This is an utility method. This method reads the input list and writes down its content onto fileName.

Parameters:
PB - The PropertyBean
mesBn - The MessageBean
MB - The MainBean
list - input list
fileName - input empty file. This file will contain list data

loadGenericTable

public java.lang.String loadGenericTable(PropertyBean PB,
                                         MessageBean mesBn,
                                         MainBean MB,
                                         ListBean LB,
                                         java.lang.String fileName)
This is an old version of writeAndLoadLogFile. This method along with writeGenericFile were used to load log file.

Parameters:
PB - The PropertyBean
mesBn - The MessageBean
MB - The ListBean
LB - The ListBean
fileName - input empty file. This file will contain list data
Returns:
An SQL load instruction