uk.ac.ebi.adfconverter.common.configuration
Class ADFConverterConfiguration

java.lang.Object
  extended byuk.ac.ebi.adfconverter.common.configuration.ADFConverterConfiguration

public class ADFConverterConfiguration
extends java.lang.Object

Allows the configuration of ADFConverter from an external file

All option values admit variable substitution. The syntax of variable substitution is similar to that of Unix shells. The string between an opening "${" and closing "}" is interpreted as a key. The value of the substituted variable can be defined as a system property or in the configuration file itself. The value of the key is first searched in the system properties, and if not found there, it is then searched in the configuration file being parsed. The corresponding value replaces the ${variableName} sequence. For example, if java.home system property is set to /home/xyz, then every occurrence of the sequence ${java.home} will be interpreted as /home/xyz. #ADF MAGEML Tool property file # # This file contains configuration properties for the ADF MAGE-ML Tool. # They set behaviour for the different modules, but most of them can be overridded # by the command-line. # # List of possible properties: # # The common module: # adfconverter.common.loggingLevel : set the logging level for the treatment log (not the global tool log): # DEBUG, INFO, WARN, ERROR, FATAL (log4j level). The global tool log level is set to info. # adfconverter.common.logger.logType : set the type of the application output: console on the standard output, file exporting in a file # adfconverter.common.logger.OUTPUTTYPE.format : for a given output type (console, file), set the format of each output line # ( from log4j) : FORMATTYPE, ASSOCIATEDVALUE (ex: pattern: ,%-5p %x : %m% # adfconverter.common.logger.applicationLogFile : set the file for the application log # (should be rename adfconverter.common.logger.file.filename) # # The Checker module: # adfconverter.checker.AccessionNumberCheckingEnable: set if the database accession number checking is enable (check accession number# against pattern provided in the approved database file # adfconverter.checker.OntologyCheckerEnable: set if the Ontology term checking is enable # (check if a term belong to the MGED Ontology, using the MGED Ontology in DAML+OIL from the MGED web site) # adfconverter.checker.strictMode: set array design strict checking # adfconverter.checker.doCurationToFile: set curated data file saving (save corrected data in a correct structure) # adfconverter.checker.database.linkseparator: inner variable, should not be modified ( should be removed from configuration file) # # adfconverter.checker.stepByStepMode: set step by step array design checking # adfconverter.checker.ApprovedDBFilePath: path to the ArrayExpress approved database file # adfconverter.checker.ApprovedDBFileStructureDescriptionPath: path the file description file # (should be removed from the configuration file) # adfconverter.checker.FileDescriptionDirectory: path to the directory containing file structure description # adfconverter.checker.MGEDOntologyFile: path to the MGED Ontology file ( in DAML+OIL format) # adfconverter.checker.ADFMGEDOntologyLinks: path to the file containing link between ADF name, MGED Ontology category # and MAGE object (MAGE Java class) # adfconverter.checker.ADFMGEDOntologyLinksStructure: path to the file containing the structure description for the link file # adfconverter.checker.duplicateCheckingEnable: set it the duplicate checking is enable (for ADF, checking of duplicate features, # reporters, CompositeSequence. if disabled, the checking should be faster # # The conversion module # //MAGE Identifier generation # The user can generate MAGE identifiers following its own rules: # The user can creatre variable used in generation rules. The user specifies a general rule and can add a rule per MAGE Object type. # adfconverter.converter.identifier.VARIABLENAME : set a rule variable value. # There are several inner variables, which can be used in rules: # #DBName, add the corresponding database tag, # #objectType, add the object type of the current object # #objectTypeInitial, add the first letter of the object type name # #objectNumber, add object number with the same object type # adfconverter.converter.identifier.rule: set the common rule for identifier identifier # adfconverter.converter.identifier.rule.OBJECTTYPE: set a specific rule for the given object type # # adfconverter.converter.assigned_geneTypeValue: set the ontology value corresponding to the ADF assigned gene ( should be removed?) # adfconverter.converter.groupSeparator: set the separator between the groupname and group value # adfconverter.converter.dtdPath: path to the version 1.1 MAGE DTD file # adfconverter.converter.dtdpublicdoctype: set the the public doctype for generated MAGE-ML file # adfconverter.converter.dtdsystemdoctype: set the system public doctype # adfconverter.converter.UnsupportedArrayDesigns: set unsupported identifier prefix list (separator= ',') ( should be removed?) # # # # The Exporter module # adfconverter.exporter.ADFOutputFileFormat: set default output for generated ADF ( can be text or workbook) # # # The network properties # adfconverter.network.proxySet: indicates if a proxy is needed for http connection ( true or false) # adfconverter.network.proxyHost: set http proxy hostname or network address (only use if proxySet sets to true) # adfconverter.network.proxyPort: set http proxy host port (only use if proxySet sets to true) # adfconverter.network.proxyUser: set proxy user, if needed- optional (only use if proxySet sets to true) # adfconverter.network.proxyPassword: set user passwork, if needed - optional (only use if proxySet sets to true) # # adfconverter.network.ftpProxySet: indicates if a proxy is needed for ftp connection ( true or false) # adfconverter.network.ftpProxyHost: set ftp proxy hostname or network address (only use if ftpProxySet sets to true) # adfconverter.network.ftpProxyPort: set ftp proxy host port (only use if ftpProxySet sets to true) TODO have unsaveable properties TODO add and remove properties TODO add mandatory properties

Since:
06 07 04
Version:
1
Author:
Pierre MARGUERITE

Field Summary
static java.lang.String CheckerPREFIX
          Definition of the adfconverter property name sub prefix for the checker module: checker.
static java.lang.String commonPREFIX
          Definition of the adfconverter property name sub prefix for the common module: common.
static java.lang.String conversionPREFIX
          Definition of the adfconverter property name sub prefix for the conversion module: converter.
static java.lang.String exporterPREFIX
          Definition of the adfconverter property name sub prefix for exporter module: exporter.
static java.lang.String identifierPREFIX
          Definition of the adfconverter property name sub prefix for the identifier submodule (for identifier generation): identifier.
static java.lang.String loggerPREFIX
          Definition of the adfconverter property name sub prefix for logging module: logger.
static java.lang.String networkPREFIX
          Definition of the adfconverter property name sub prefix for network module: network.
static java.lang.String PREFIX
          Definition of the adfconverter property name prefix: adfconverter.
static java.lang.String rulePREFIX
          Definition of the adfconverter property name sub prefix for identifier generation rules: rule.
 
Constructor Summary
ADFConverterConfiguration()
          Constructor of the ADFConverterConfiguration init list of mandatory properties
 
Method Summary
static void addProperty(java.lang.String name, java.lang.String value)
          Adds a property to the configuration
static void doConfigure(java.util.Properties props)
          Read configuration options from properties.
static void doConfigure(java.lang.String configFileName, boolean useDefaultConfiguration)
          Read configuration from a file.
static void doConfigure(java.net.URL configURL)
          Read configuration options from url configURL.
static java.lang.String getCheckerProperty(java.lang.String name)
          Retrieves a Checker configuration property value
static java.lang.String getCommonProperty(java.lang.String name)
          Retrieves a commom configuration property value
static java.util.Properties getConversionProperties()
          Retrieves all properties for the converter
static java.lang.String getConversionProperty(java.lang.String name)
          Retrieves a Conversion configuration property value
static java.util.Properties getExporterProperties()
          Retrieves the properties corresponding to the exporter module
static java.util.Properties getIdentifierProperties()
          Retrieves all properties of the identifier generation
static java.util.Properties getLoggerProperties()
          Retrieves all properties corresponding to the logging module
static java.lang.String getNetworkProperty(java.lang.String name)
          Retrieves a Conversion configuration property value
static java.lang.String getProperty(java.lang.String name)
          Retrieves a configuration property value
static void removeProperty(java.lang.String name)
          Removes a property from configuration property list
static void WriteConfiguration()
          Writes the current configuration in the configuration file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CheckerPREFIX

public static final java.lang.String CheckerPREFIX
Definition of the adfconverter property name sub prefix for the checker module: checker.

See Also:
Constant Field Values

commonPREFIX

public static final java.lang.String commonPREFIX
Definition of the adfconverter property name sub prefix for the common module: common.

See Also:
Constant Field Values

conversionPREFIX

public static final java.lang.String conversionPREFIX
Definition of the adfconverter property name sub prefix for the conversion module: converter.

See Also:
Constant Field Values

exporterPREFIX

public static final java.lang.String exporterPREFIX
Definition of the adfconverter property name sub prefix for exporter module: exporter.

See Also:
Constant Field Values

identifierPREFIX

public static final java.lang.String identifierPREFIX
Definition of the adfconverter property name sub prefix for the identifier submodule (for identifier generation): identifier.

See Also:
Constant Field Values

loggerPREFIX

public static final java.lang.String loggerPREFIX
Definition of the adfconverter property name sub prefix for logging module: logger.

See Also:
Constant Field Values

networkPREFIX

public static final java.lang.String networkPREFIX
Definition of the adfconverter property name sub prefix for network module: network.

See Also:
Constant Field Values

PREFIX

public static final java.lang.String PREFIX
Definition of the adfconverter property name prefix: adfconverter.

See Also:
Constant Field Values

rulePREFIX

public static final java.lang.String rulePREFIX
Definition of the adfconverter property name sub prefix for identifier generation rules: rule.

See Also:
Constant Field Values
Constructor Detail

ADFConverterConfiguration

public ADFConverterConfiguration()
Constructor of the ADFConverterConfiguration init list of mandatory properties

Method Detail

addProperty

public static void addProperty(java.lang.String name,
                               java.lang.String value)
Adds a property to the configuration

Parameters:
name - the property name
value - the value associated to the property name

doConfigure

public static void doConfigure(java.util.Properties props)
                        throws ConfigurationMissingConfException
Read configuration options from properties.

Parameters:
props - the application properties to set
Throws:
ConfigurationMissingConfException - if an error occurs during runtime

doConfigure

public static void doConfigure(java.lang.String configFileName,
                               boolean useDefaultConfiguration)
                        throws ConfigurationMissingConfException
Read configuration from a file. The existing configuration is not cleared nor reset.

The configuration file consists of statements in the format key=value. The syntax of different configuration elements are discussed below.

Use the # or ! characters at the beginning of a line for comments.

Parameters:
configFileName - The name of the configuration file where the configuration information is stored.
useDefaultConfiguration - indicates if the default configuration must be used
Throws:
ConfigurationMissingConfException - - if an error occurred when reading from the input stream.
java.lang.IllegalArgumentException - - if the input stream contains a malformed Unicode escape sequence.

doConfigure

public static void doConfigure(java.net.URL configURL)
                        throws ConfigurationMissingConfException
Read configuration options from url configURL.

Parameters:
configURL - the url of the config file
Throws:
ConfigurationMissingConfException - if an error occurs during runtime

getCheckerProperty

public static java.lang.String getCheckerProperty(java.lang.String name)
Retrieves a Checker configuration property value

Parameters:
name - the name of the property to retrieve
Returns:
the value of the property

getCommonProperty

public static java.lang.String getCommonProperty(java.lang.String name)
Retrieves a commom configuration property value

Parameters:
name - the name of the property to retrieve
Returns:
the value of the property

getConversionProperties

public static java.util.Properties getConversionProperties()
Retrieves all properties for the converter

Returns:
the Property set, if foud. Null otherwise

getConversionProperty

public static java.lang.String getConversionProperty(java.lang.String name)
Retrieves a Conversion configuration property value

Parameters:
name - the name of the property to retrieve
Returns:
the value of the property

getExporterProperties

public static java.util.Properties getExporterProperties()
Retrieves the properties corresponding to the exporter module

Returns:
all associated properties

getIdentifierProperties

public static java.util.Properties getIdentifierProperties()
Retrieves all properties of the identifier generation

Returns:
the Property set, if foud. Null otherwise

getLoggerProperties

public static java.util.Properties getLoggerProperties()
Retrieves all properties corresponding to the logging module

Returns:
all associated properties

getNetworkProperty

public static java.lang.String getNetworkProperty(java.lang.String name)
Retrieves a Conversion configuration property value

Parameters:
name - the name of the property to retrieve
Returns:
the value of the property

getProperty

public static java.lang.String getProperty(java.lang.String name)
Retrieves a configuration property value

Parameters:
name - the name of the property to retrieve
Returns:
the value of the property

removeProperty

public static void removeProperty(java.lang.String name)
Removes a property from configuration property list

Parameters:
name - the name of the property to remove

WriteConfiguration

public static void WriteConfiguration()
Writes the current configuration in the configuration file



European Bioinformatics InstituteMicroarray Informatics Team