uk.ac.ebi.adfconverter.tools.checker
Class ADFChecker

java.lang.Object
  extended byuk.ac.ebi.adfconverter.tools.checker.FileChecker
      extended byuk.ac.ebi.adfconverter.tools.checker.ADFChecker

public class ADFChecker
extends FileChecker

Class for file strcuture checking will check file structure and data contained in a file

Since:
04 August 2004 # -are any unacceptable column headers used . # # -are any unacceptable database codes used . # # -are all the mandatory column headers included . # # -are the first 4 columns in the format MetaColumn, MetaRow, Column, Row . # # -are there any duplicate features . # # -do any blocks contain the wrong number of features (not no.of columns x no.of rows)# ============//TODO wrong number of features # -which features are missing from these blocks ?? #==== # -are there any duplicate reporter name (eg. one ID refers to more than one name). -are there any duplicate composite sequence name . # # -are all BioSequence Types from MGED ontology . # # -are all BioSequence Polymer types DNA, RNA or protein . # # -do embl, refseq, go, blocks, ensembl, locus, pfam, interpro and trembl IDs use the # # format described for these databases . # # -are all features listed as control or experimental . # TODO test with an hashtable to avoid read several time the same file
Version:
1 04 August 2004
Author:
Pierre MARGUERITE

Constructor Summary
ADFChecker()
          Default Constructor of FileChecker inits sub tables
ADFChecker(java.io.File _fileStructureFileDirectory)
          Constructor of FileChecker
 
Method Summary
 boolean check(java.io.File _ADFFile, boolean strictMode, boolean stepByStepMode)
          Check an ADF.
 ADFJava checkAndCurateADF(java.io.File _ADFFile, boolean strictMode, boolean stepByStepMode)
          Check if an ADF is correct and retrieves the ADFJava object
 boolean CheckTables(DataTable headerTable, DataTable featureReporterTable, DataTable compositeSequenceTable, boolean strictMode, boolean stepByStepMode)
          Check an ADF.
 void clear()
          clear the object / memory
 void createCompositeSequence(ADFReporter reporter)
          In case of simple microarray layout, create the composite sequence associated to the reporter Data, are simply copy from reporter to compositeSequence
 
Methods inherited from class uk.ac.ebi.adfconverter.tools.checker.FileChecker
checkCurrentRowFieldDependance, checkDataTable, checkFile, checkFileAndCurate, checkTableAndCurate, convert2Regex, getCuratedTable, getFileStructure, getHeaderStructure
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ADFChecker

public ADFChecker()
Default Constructor of FileChecker inits sub tables


ADFChecker

public ADFChecker(java.io.File _fileStructureFileDirectory)
           throws IncorrectADFCheckerInitException
Constructor of FileChecker

Parameters:
_fileStructureFileDirectory - the path to the directory containing xml stucture files (describying structure of afile)
Throws:
IncorrectADFCheckerInitException - if an error occurs during ADFChecker initialisation
Method Detail

check

public boolean check(java.io.File _ADFFile,
                     boolean strictMode,
                     boolean stepByStepMode)
              throws IncorrectDataFile,
                     IncorrectFile,
                     IncorrectFileStructure,
                     java.lang.Exception
Check an ADF. An ADF is composed of three files or one Microsoft ExcelWorkbook And file structure of Feature/Reporter and CompositeSequence files depends of the microarray application found in the header file

Parameters:
_ADFFile - path to the ADF workbook or ADF header file
strictMode - if the checking is in strict mode(ADF must strictly match the ADF specification
stepByStepMode - if the checking is in step by step mode (stop after any error)
Returns:
true, if the ADf is correct (following the specified mode). false, otherwise
Throws:
IncorrectDataFile - if the ADF file is incorrect
IncorrectFile
IncorrectFileStructure
java.lang.Exception

checkAndCurateADF

public ADFJava checkAndCurateADF(java.io.File _ADFFile,
                                 boolean strictMode,
                                 boolean stepByStepMode)
                          throws IncorrectDataFile,
                                 IncorrectFile,
                                 IncorrectFileStructure,
                                 java.lang.Exception
Check if an ADF is correct and retrieves the ADFJava object

Parameters:
_ADFFile - the file containing the header data
strictMode - indicates if the data must strictly match the specification
stepByStepMode - if the checking is done step by step. Stop when an error is found
Returns:
an ADFJAva object if the ADF is correct. null, otherwise
Throws:
IncorrectDataFile
IncorrectFile
IncorrectFileStructure
java.lang.Exception

CheckTables

public boolean CheckTables(DataTable headerTable,
                           DataTable featureReporterTable,
                           DataTable compositeSequenceTable,
                           boolean strictMode,
                           boolean stepByStepMode)
                    throws ErrorInitLog,
                           IncorrectFile,
                           IncorrectFileStructure,
                           java.io.IOException,
                           IncorrectDataTableException,
                           IncorrectDataFile,
                           UnknownStructure,
                           java.lang.Exception
Check an ADF. Checks table part of the file. (from xml structure) An ADF is composed of three files or one Microsoft ExcelWorkbook And file structure of Feature/Reporter and CompositeSequence files depends of the microarray application found in the header file TODO update the method

Parameters:
headerTable - the table containing ADF header part data
featureReporterTable - the table containing ADF Feature/Reporter part data
compositeSequenceTable - the table containing ADF CompositeSequence part data
Returns:
Throws:
ErrorInitLog
IncorrectFile
IncorrectFileStructure
java.io.IOException
IncorrectDataTableException
IncorrectDataFile
UnknownStructure
java.lang.Exception

clear

public void clear()
clear the object / memory


createCompositeSequence

public void createCompositeSequence(ADFReporter reporter)
In case of simple microarray layout, create the composite sequence associated to the reporter Data, are simply copy from reporter to compositeSequence

Parameters:
reporter - the ADFreporter which is associated the created compositesequence


European Bioinformatics InstituteMicroarray Informatics Team