Changeset 737


Ignore:
Timestamp:
Aug 7, 2008, 9:07:42 AM (13 years ago)
Author:
Martin Svensson
Message:

Fixes #121 BGX-importer should 0-pad Array_Address_ID if the BGX-file doesn't have done that already.
Also changed some version-tags to hold the correct number.

Location:
plugins/base2/net.sf.basedb.illumina/trunk/src/net/sf/basedb/illumina
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/base2/net.sf.basedb.illumina/trunk/src/net/sf/basedb/illumina/Illumina.java

    r686 r737  
    3636    The current version of this plug-in package.
    3737  */
    38   public static final String VERSION = "pre1.1";
     38  public static final String VERSION = "pre1.2";
    3939 
    4040  /**
  • plugins/base2/net.sf.basedb.illumina/trunk/src/net/sf/basedb/illumina/plugins/BgxFeatureImporter.java

    r646 r737  
    4343import net.sf.basedb.util.InputStreamTracker;
    4444import net.sf.basedb.util.parser.FlatFileParser;
     45import net.sf.basedb.util.parser.Mapper;
    4546import net.sf.basedb.util.parser.WrappedConfigureByExample;
    4647import net.sf.basedb.util.parser.FlatFileParser.Line;
     
    6364 
    6465  @author Martin, Nicklas
    65   @version 2.6
     66  @version 1.0
    6667
    6768*/
     
    187188  }
    188189 
     190 
     191 
     192  /**
     193    This method returns a ZeroPadMapper if the mapp-expression is equal to '\\Array_Address_Id\\',
     194    otherwise the object from it's super class will be returned.
     195    @see net.sf.basedb.plugins.AbstractFlatFileImporter#getMapper()
     196    @see net.sf.basedb.illumina.plugins.ZeroPadMapper
     197    @since 1.2
     198   */
     199  @Override
     200  protected Mapper getMapper(FlatFileParser ffp, String mapExpression, Integer maxStringLength, Mapper defaultMapper)
     201  {
     202    Mapper mapper = super.getMapper(ffp, mapExpression, maxStringLength, defaultMapper);
     203   
     204    if (mapExpression != null && mapExpression.equals("\\Array_Address_Id\\"))
     205    {
     206      mapper = new ZeroPadMapper(mapper, 10);
     207    }
     208    return mapper;
     209  }
    189210  /*
    190211    Enum to hold the sections in a BGX file.
Note: See TracChangeset for help on using the changeset viewer.