uk.ac.ebi.adfconverter.library
Class ADFConverterLibrary

java.lang.Object
  extended byuk.ac.ebi.adfconverter.library.ADFConverterLibrary

public class ADFConverterLibrary
extends java.lang.Object

This class is a library, it gathers methods to treat data file (MAGE-ML & ADF) It offers tool initialisation methods, data file treatment, ADF checking and conversion, MAGE-ML checking and conversion.

Version:
1 20 August 2004
Author:
Pierre MARGUERITE

Constructor Summary
ADFConverterLibrary(java.lang.String ConfigurationFilePath, java.util.Properties parameters)
          Contructor for the ADFConverterLibrary class Inits the application
 
Method Summary
 boolean adfHandler(java.io.File file, boolean strictMode, boolean stepByStepMode)
          Manages ADF - file or directory For checking only or checking and conversion
 boolean check(java.lang.String filename, boolean strictMode, boolean stepByStepMode, boolean saveCuratecADF, boolean convert)
          Check a file following its name (file extension)
 boolean checkADF(java.io.File ADFFile, boolean strictMode, boolean stepByStepMode, boolean saveCuration, boolean convert)
          Check and convert in MAGE-ML a ADF following its name or its ADF adh file
 boolean checkADFDirectory(java.io.File ADFFile, boolean strictMode, boolean stepByStepMode, boolean saveCuratedADF, boolean convert)
          Check and convert in MAGE-ML a ADF following its name or its ADF adh file
 boolean checkADFFile(java.io.File ADFFile, boolean strictMode, boolean stepByStepMode, boolean saveCuration, boolean convertToMAGE)
          Check and convert in MAGE-ML a ADF following its name or its ADF adh file
 boolean checkAndConvert(java.lang.String filename, boolean strictMode, boolean stepByStepMode, boolean saveCuratecADF)
          Check a file following its name (file extension)
 boolean checkAndConvertADF(java.io.File ADFFile, boolean strictMode, boolean stepByStepMode, boolean saveCuration)
          Check and convert in MAGE-ML a ADF following its name or its ADF adh file
 boolean checkAndConvertADFDirectory(java.io.File ADFFile, boolean strictMode, boolean stepByStepMode, boolean saveCuratedADF)
          Check and convert in MAGE-ML a ADF following its name or its ADF adh file
 boolean checkAndConvertADFFile(java.io.File ADFFile, boolean strictMode, boolean stepByStepMode, boolean saveCuratedADF)
          Check and convert in MAGE-ML a ADF following its name or its ADF adh file
 boolean checkMAGEML(java.io.File file, boolean strictMode, boolean stepByStepMode, boolean convert)
          Check / check & convert a MAGE-ML file
 void clean()
          Cleans th application (memory) Calls garbage collector
 void convertCurrentADF()
          Converts the current checked and correct ADF in MAGEObject.
 void exportCurrentMAGEML()
          export the current checked and correct ADF in MAGE-ML.
 void sortADF(java.lang.String DirectoryName)
          sorts ADF in a directory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ADFConverterLibrary

public ADFConverterLibrary(java.lang.String ConfigurationFilePath,
                           java.util.Properties parameters)
                    throws LibraryException
Contructor for the ADFConverterLibrary class Inits the application

Parameters:
ConfigurationFilePath -
parameters - configuration properties overriding configuration file properties.
Throws:
LibraryException, - if an error occurs during library initialisation
LibraryException
Method Detail

adfHandler

public boolean adfHandler(java.io.File file,
                          boolean strictMode,
                          boolean stepByStepMode)
Manages ADF - file or directory For checking only or checking and conversion

Parameters:
file - The ADF file to treat
strictMode - checking in strictmode
stepByStepMode - checking in step by step mod (stop process at any error)
Returns:
true, if the ADF is correct / correctly converted. false, otherwise

check

public boolean check(java.lang.String filename,
                     boolean strictMode,
                     boolean stepByStepMode,
                     boolean saveCuratecADF,
                     boolean convert)
Check a file following its name (file extension)

Parameters:
filename - the name of a file to check/convert
strictMode - if the checking is executed strictly
stepByStepMode - if the checking is executed step by step/ one error at time
saveCuratecADF - save curated ADF after checking and curation
Returns:
true if the file is correct. false otherwise

checkADF

public boolean checkADF(java.io.File ADFFile,
                        boolean strictMode,
                        boolean stepByStepMode,
                        boolean saveCuration,
                        boolean convert)
Check and convert in MAGE-ML a ADF following its name or its ADF adh file

Parameters:
ADFFile - the name of the ADF or the adh file name
strictMode - if the checking is executed strictly
stepByStepMode - if the checking is executed step by step/ one error at time
saveCuration - save curated ADF after checking and curation
Returns:
true if the ADF is correct. false otherwise

checkADFDirectory

public boolean checkADFDirectory(java.io.File ADFFile,
                                 boolean strictMode,
                                 boolean stepByStepMode,
                                 boolean saveCuratedADF,
                                 boolean convert)
Check and convert in MAGE-ML a ADF following its name or its ADF adh file

Parameters:
ADFFile - the ADF name file or the adh file
strictMode - if the checking is executed strictly
stepByStepMode - if the checking is executed step by step/ one error at time
saveCuratedADF - true, if curated ADF will be saved after checking and curation
Returns:
true if the ADF is correct. false otherwise

checkADFFile

public boolean checkADFFile(java.io.File ADFFile,
                            boolean strictMode,
                            boolean stepByStepMode,
                            boolean saveCuration,
                            boolean convertToMAGE)
Check and convert in MAGE-ML a ADF following its name or its ADF adh file

Parameters:
ADFFile - the file object of the ADF or of the adh file
strictMode - if the checking is executed strictly
stepByStepMode - if the checking is executed step by step/ one error at time
Returns:
true if the ADF is correct. false otherwise

checkAndConvert

public boolean checkAndConvert(java.lang.String filename,
                               boolean strictMode,
                               boolean stepByStepMode,
                               boolean saveCuratecADF)
Check a file following its name (file extension)

Parameters:
filename - the name of a file to check/convert
strictMode - if the checking is executed strictly
stepByStepMode - if the checking is executed step by step/ one error at time
saveCuratecADF - if the curated ADF will be saved aftercheckinhg
Returns:
true if the file is correct. false otherwise

checkAndConvertADF

public boolean checkAndConvertADF(java.io.File ADFFile,
                                  boolean strictMode,
                                  boolean stepByStepMode,
                                  boolean saveCuration)
Check and convert in MAGE-ML a ADF following its name or its ADF adh file

Parameters:
ADFFile - the file representing the ADF or the adh file name
strictMode - if the checking is executed strictly
stepByStepMode - if the checking is executed step by step/ one error at time
saveCuration - save curated ADF after checking and curation
Returns:
true if the ADF is correct. false otherwise

checkAndConvertADFDirectory

public boolean checkAndConvertADFDirectory(java.io.File ADFFile,
                                           boolean strictMode,
                                           boolean stepByStepMode,
                                           boolean saveCuratedADF)
Check and convert in MAGE-ML a ADF following its name or its ADF adh file

Parameters:
ADFFile - the ADF name file or the adh file
strictMode - if the checking is executed strictly
stepByStepMode - if the checking is executed step by step/ one error at time
saveCuratedADF - true, if curated ADF will be saved after checking and curation
Returns:
true if the ADF is correct. false otherwise

checkAndConvertADFFile

public boolean checkAndConvertADFFile(java.io.File ADFFile,
                                      boolean strictMode,
                                      boolean stepByStepMode,
                                      boolean saveCuratedADF)
Check and convert in MAGE-ML a ADF following its name or its ADF adh file

Parameters:
ADFFile - the file object of the ADF or the adh file name
strictMode - if the checking is executed strictly
stepByStepMode - if the checking is executed step by step/ one error at time
Returns:
true if the ADF is correct. false otherwis

checkMAGEML

public boolean checkMAGEML(java.io.File file,
                           boolean strictMode,
                           boolean stepByStepMode,
                           boolean convert)
Check / check & convert a MAGE-ML file

Parameters:
file - the MAGE-Ml file
strictMode - if the checking is strict or relax
stepByStepMode - if th checking is done step by step (stop after each error)
convert - if the the file will be convert after the checking
Returns:
true, if the file is correct,

clean

public void clean()
Cleans th application (memory) Calls garbage collector


convertCurrentADF

public void convertCurrentADF()
Converts the current checked and correct ADF in MAGEObject.


exportCurrentMAGEML

public void exportCurrentMAGEML()
export the current checked and correct ADF in MAGE-ML. The MAGE-ML file is named ADFName + xml


sortADF

public void sortADF(java.lang.String DirectoryName)
sorts ADF in a directory. Create a directory for each ADF called by the name of the ADF, and move the ADF (adh, adr ,adc ) in the directory

Parameters:
DirectoryName - directory path to sort.


European Bioinformatics InstituteMicroarray Informatics Team