Example usage for org.apache.commons.configuration ConfigurationException ConfigurationException

List of usage examples for org.apache.commons.configuration ConfigurationException ConfigurationException

Introduction

In this page you can find the example usage for org.apache.commons.configuration ConfigurationException ConfigurationException.

Prototype

public ConfigurationException(Throwable cause) 

Source Link

Document

Constructs a new ConfigurationException with specified nested Throwable.

Usage

From source file:ubic.gemma.core.loader.expression.arrayExpress.SDRFFetcher.java

@Override
protected void initConfig() {
    localBasePath = Settings.getString("arrayExpress.local.datafile.basepath");
    remoteBaseDir = Settings.getString("arrayExpress.experiments.baseDir");

    if (localBasePath == null || localBasePath.length() == 0)
        throw new RuntimeException(new ConfigurationException("localBasePath was null or empty"));
    if (remoteBaseDir == null || remoteBaseDir.length() == 0)
        throw new RuntimeException(new ConfigurationException("baseDir was null or empty"));

}

From source file:ubic.gemma.core.loader.expression.geo.fetcher.PlatformFetcher.java

@Override
protected void initConfig() {
    this.localBasePath = Settings.getString("geo.local.datafile.basepath");
    this.remoteBaseDir = Settings.getString("geo.remote.platformDir");
    if (StringUtils.isBlank(remoteBaseDir)) {
        throw new RuntimeException(
                new ConfigurationException("geo.remote.platformDir was not defined in resource bundle"));
    }/* w  w w  .j av  a 2s.  c  om*/

}

From source file:ubic.gemma.core.loader.expression.geo.fetcher.RawDataFetcher.java

@Override
public void initConfig() {
    localBasePath = Settings.getString("geo.local.datafile.basepath");
    remoteBaseDir = Settings.getString("geo.remote.rawDataDir");

    if (localBasePath == null || localBasePath.length() == 0)
        throw new RuntimeException(new ConfigurationException("localBasePath was null or empty"));
    if (remoteBaseDir == null || remoteBaseDir.length() == 0)
        throw new RuntimeException(new ConfigurationException("baseDir was null or empty"));

}

From source file:ubic.gemma.core.loader.genome.gene.ncbi.homology.HomologeneFetcher.java

@Override
protected void initConfig() {

    localBasePath = Settings.getString("ncbi.local.homologene.basepath");
    remoteBaseDir = Settings.getString("ncbi.remote.homologene.basedir");

    if (localBasePath == null || localBasePath.length() == 0)
        throw new RuntimeException(new ConfigurationException("localBasePath was null or empty"));
    if (remoteBaseDir == null || remoteBaseDir.length() == 0)
        throw new RuntimeException(new ConfigurationException("baseDir was null or empty"));

}

From source file:ubic.gemma.core.loader.genome.gene.ncbi.NCBIGeneFileFetcher.java

@Override
public void initConfig() {
    this.localBasePath = Settings.getString("ncbi.local.datafile.basepath");
    this.remoteBaseDir = Settings.getString("ncbi.remote.gene.basedir");

    if (remoteBaseDir == null)
        throw new RuntimeException(new ConfigurationException("Failed to get basedir"));
    if (localBasePath == null)
        throw new RuntimeException(new ConfigurationException("Failed to get localBasePath"));

}

From source file:ubic.gemma.core.loader.genome.taxon.TaxonFetcher.java

@Override
public void initConfig() {
    this.localBasePath = Settings.getString("ncbi.local.datafile.basepath");
    this.remoteBaseDir = Settings.getString("ncbi.remote.taxon.basedir");

    if (remoteBaseDir == null)
        throw new RuntimeException(new ConfigurationException("Failed to get basedir"));
    if (localBasePath == null)
        throw new RuntimeException(new ConfigurationException("Failed to get localBasePath"));
}

From source file:ubic.gemma.core.loader.protein.biomart.BiomartEnsemblNcbiFetcher.java

/**
 * Configure the URL for biomart//from   w  w  w  .j  a  v  a 2 s .c om
 *
 * @throws RuntimeException (ConfigurationException) one of the file download paths in the properties file was not configured
 *                          correctly.
 */
private void initConfig() {

    urlBiomartService = Settings.getString(BIOMARTPATH);
    if (urlBiomartService == null || urlBiomartService.length() == 0)
        throw new RuntimeException(new ConfigurationException(BIOMARTPATH + " was null or empty"));
}

From source file:ubic.gemma.core.loader.protein.string.StringProteinFileFetcher.java

/**
 * Sets the paths of the remote files to download as set in the project properties files
 *
 * @throws RuntimeException (ConfigurationException) one of the file download paths in the properties file was not configured
 *                          correctly./*from   www  .ja  v  a 2s .  c  o  m*/
 */
@SuppressWarnings({ "unused", "WeakerAccess" }) // Possible external use
@Override
public void initConfig() {
    stringProteinFileName = Settings.getString(StringProteinFileFetcher.INTERACTION);
    if (stringProteinFileName == null || stringProteinFileName.length() == 0)
        throw new RuntimeException(
                new ConfigurationException(StringProteinFileFetcher.INTERACTION + " was null or empty"));
}

From source file:ubic.gemma.core.loader.protein.StringProteinProteinInteractionConverter.java

/**
 * @param ensembl2ncbi Map of ensembl peptide ids to entrez/ncbi id genes.
 *//*from  w  w w .ja  v a 2s . c o m*/
public StringProteinProteinInteractionConverter(Map<String, Ensembl2NcbiValueObject> ensembl2ncbi) {
    this.ensembl2ncbi = ensembl2ncbi;

    StringProteinProteinInteractionConverter.stringVersion = Settings.getString("protein.string.version");
    StringProteinProteinInteractionConverter.stringUrl = Settings.getString("protein.string.linksurl");
    if (StringProteinProteinInteractionConverter.stringUrl == null
            || StringProteinProteinInteractionConverter.stringUrl.length() == 0)
        throw new RuntimeException(new ConfigurationException("stringUrl was null or empty"));
    if (StringProteinProteinInteractionConverter.stringVersion == null
            || StringProteinProteinInteractionConverter.stringVersion.length() == 0)
        throw new RuntimeException(new ConfigurationException("stringVersion was null or empty"));
}

From source file:ubic.gemma.loader.expression.arrayExpress.DataFileFetcher.java

/**
 * @throws ConfigurationException//from  w w  w  .j  a v  a 2s  . co  m
 */
@Override
public void initConfig() {

    localBasePath = ConfigUtils.getString("arrayExpress.local.datafile.basepath");
    remoteBaseDir = ConfigUtils.getString("arrayExpress.experiments.baseDir");

    if (localBasePath == null || localBasePath.length() == 0)
        throw new RuntimeException(new ConfigurationException("localBasePath was null or empty"));
    if (remoteBaseDir == null || remoteBaseDir.length() == 0)
        throw new RuntimeException(new ConfigurationException("baseDir was null or empty"));

}