pl.edu.agh.cast.importer.base.tokenizer.fixedwidth
Class AbstractFixedWidthFilesHelper

java.lang.Object
  extended by pl.edu.agh.cast.importer.base.tokenizer.fixedwidth.AbstractFixedWidthFilesHelper

public abstract class AbstractFixedWidthFilesHelper
extends Object

Analysis utility for fixed width files.

Author:
AGH CAST Team

Constructor Summary
AbstractFixedWidthFilesHelper()
           
 
Method Summary
static List<Integer> getLineCutPoints(List<String> lines)
          Retrieves line cut points, which are analogous to lines with a large number of spaces.
static RawDataRow readRow(String line, List<Integer> cutIndexes, int rowIndex)
          Cuts line in indexes defined in cutIndexes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractFixedWidthFilesHelper

public AbstractFixedWidthFilesHelper()
Method Detail

getLineCutPoints

public static List<Integer> getLineCutPoints(List<String> lines)
Retrieves line cut points, which are analogous to lines with a large number of spaces.

Parameters:
lines - lines from which the cut points are to be retrieved
Returns:
list containing indexes of line cut points

readRow

public static RawDataRow readRow(String line,
                                 List<Integer> cutIndexes,
                                 int rowIndex)
Cuts line in indexes defined in cutIndexes.

Parameters:
line - line to parse
cutIndexes - indexes with cut point
rowIndex - index of actual row
Returns:
divided raw of data


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.