Changeset 247


Ignore:
Timestamp:
Mar 27, 2007, 5:19:44 PM (15 years ago)
Author:
Johan Enell
Message:

Added BASEFileAssaySection

Location:
trunk/se/lu/onk/BaseFile/src/basefile
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/se/lu/onk/BaseFile/src/basefile/BASEFileReader.java

    r245 r247  
    134134   * @throws BadFormatException
    135135   * @throws IOException
     136   */
     137  public <R, S> BASEFileSpotSection<R, S> readSpotSection()
     138    throws BadFormatException, IOException
     139  {
     140    while (section != null && !section.isType("spots"))
     141    {
     142      section = readSection(false);
     143    }
     144    return new BASEFileSpotSection<R, S>(section);
     145  }
     146 
     147  /**
     148   * TODO: Write javadoc for readSpotSection()
     149   * @param <R>
     150   * @param <S>
     151   * @return
     152   * @throws BadFormatException
     153   * @throws IOException
    136154   * @throws BadSectionException
    137155   */
    138   @SuppressWarnings("unchecked")
    139   public <R, S> BASEFileSpotSection<R, S>  readSpotSection()
    140     throws BadFormatException, IOException
    141   {
    142     section = new BASEFileSpotSection<R, S>();
    143     while (section != null && !section.isType("spots"))
     156  public BASEFileAssaySection readAssaySection()
     157    throws BASEFileException, IOException
     158  {
     159    while (section != null && !section.isType("assays"))
    144160    {
    145161      section = readSection(false);
    146162    }
    147     return (BASEFileSpotSection<R, S>) section;
     163    return new BASEFileAssaySection(section);
    148164  }
    149165
  • trunk/se/lu/onk/BaseFile/src/basefile/BASEFileSpotSection.java

    r149 r247  
    2929{
    3030
    31   private int height;
    32   private int width;
    33   private ArrayList<S> spotData;
    34   private ArrayList<R> reporterData;
     31  private final int height;
     32  private final int width;
     33  private final ArrayList<S> spotData;
     34  private final ArrayList<R> reporterData;
    3535 
    36   public BASEFileSpotSection()
     36  public BASEFileSpotSection(BASEFileSection bfs)
    3737  {
    38     super();
     38    this.height = bfs.findIntOpt("count");
     39    this.width = bfs.findStringOpts("assayFields").length * bfs.findStringOpts("assays").length + bfs.findStringOpts("columns").length - 1;
     40    this.spotData = new ArrayList<S>(height*width);
     41    this.reporterData = new ArrayList<R>(height);
    3942  }
    40 
    41   public void setDataMatrix(int height, int width)
     43 
     44  @Deprecated
     45  public BASEFileSpotSection(int height, int width)
    4246  {
    4347    this.height = height;
     
    4549    this.spotData = new ArrayList<S>(height*width);
    4650    this.reporterData = new ArrayList<R>(height);
     51  }
     52 
     53  @Deprecated
     54  public final void setDataMatrix(int height, int width)
     55  {
     56   
    4757  }
    4858 
Note: See TracChangeset for help on using the changeset viewer.