Changeset 5243


Ignore:
Timestamp:
Feb 12, 2010, 9:22:15 AM (12 years ago)
Author:
Nicklas Nordborg
Message:

References #1446: Use the core "Reporter importer" without a file format configuration

This should make the plug-in less sensitive to programs that use it with file parsing parameters in the configuration instead of in the job.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plugins/core/net/sf/basedb/plugins/ReporterFlatFileImporter.java

    r5242 r5243  
    493493    // Mapper that always return null
    494494    Mapper nullMapper = new ConstantMapper((String)null);
    495     idMapper = getMapper(ffp, (String)job.getValue("reporterIdColumnMapping"),
     495    idMapper = getMapper(ffp, (String)getJobOrConfigurationValue("reporterIdColumnMapping"),
    496496      cropStrings ? ReporterData.MAX_EXTERNAL_ID_LENGTH : null, nullMapper);
    497497    if (!deleteMode)
    498498    {
    499       nameMapper = getMapper(ffp, (String)job.getValue("nameColumnMapping"),
     499      nameMapper = getMapper(ffp, (String)getJobOrConfigurationValue("nameColumnMapping"),
    500500        cropStrings ? ReporterData.MAX_NAME_LENGTH : null, null);
    501       symbolMapper = getMapper(ffp, (String)job.getValue("symbolColumnMapping"),
     501      symbolMapper = getMapper(ffp, (String)getJobOrConfigurationValue("symbolColumnMapping"),
    502502        cropStrings ? ReporterData.MAX_SYMBOL_LENGTH : null, null);
    503       descriptionMapper = getMapper(ffp, (String)job.getValue("descriptionColumnMapping"),
     503      descriptionMapper = getMapper(ffp, (String)getJobOrConfigurationValue("descriptionColumnMapping"),
    504504        cropStrings ? ReporterData.MAX_DESCRIPTION_LENGTH : null, null);
    505       reporterTypeMapper = getMapper(ffp, (String)job.getValue("reporterTypeColumnMapping"),
     505      reporterTypeMapper = getMapper(ffp, (String)getJobOrConfigurationValue("reporterTypeColumnMapping"),
    506506        cropStrings ? ReporterType.MAX_NAME_LENGTH : null, null);
    507       scoreMapper = getMapper(ffp, (String)job.getValue("scoreColumnMapping"), null, null);
     507      scoreMapper = getMapper(ffp, (String)getJobOrConfigurationValue("scoreColumnMapping"), null, null);
    508508     
    509509      reporterTypes = new HashMap<String, ReporterType>();
     
    515515        {
    516516          String name = "extendedColumnMapping." + ep.getName();
    517           Mapper m = getMapper(ffp, (String)job.getValue(name),
     517          Mapper m = getMapper(ffp, (String)getJobOrConfigurationValue(name),
    518518            cropStrings && ep.getLength() > 0 ? ep.getLength() : null, null);
    519519          if (m != null) extendedMappers.put(ep, m);
Note: See TracChangeset for help on using the changeset viewer.