org.expasy.jpl.commons.base.io
Class TabFileReader

java.lang.Object
  extended by org.expasy.jpl.commons.base.io.TabFileReader
All Implemented Interfaces:
Parser<File>

public final class TabFileReader
extends Object
implements Parser<File>


Constructor Summary
TabFileReader()
          Constructor
 
Method Summary
 boolean doReadHeader()
          Ask whether header line is read
 ArrayList<String> getColomnNames()
          Get column names.
 String getSeparator()
          Get separator
 ArrayList<ArrayList<Double>> getValues()
          Get values
static TabFileReader newInstance()
          retrieve new instance
 void parse(File file)
          parse the content
 void setReadHeader(boolean readHeader)
          Set flag that defines whether to read heather
 void setSeparator(String separator)
          Set separator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabFileReader

public TabFileReader()
Constructor

Method Detail

newInstance

public static TabFileReader newInstance()
retrieve new instance

Returns:
new instance

parse

public void parse(File file)
           throws ParseException
Description copied from interface: Parser
parse the content

Specified by:
parse in interface Parser<File>
Throws:
ParseException

getColomnNames

public ArrayList<String> getColomnNames()
Get column names. Returns null if no header is read.

Returns:
column names

getValues

public ArrayList<ArrayList<Double>> getValues()
Get values

Returns:
values

setReadHeader

public void setReadHeader(boolean readHeader)
Set flag that defines whether to read heather

Parameters:
readHeader - flag

doReadHeader

public boolean doReadHeader()
Ask whether header line is read

Returns:
readHeader flag

setSeparator

public void setSeparator(String separator)
Set separator

Parameters:
separator - Column separator

getSeparator

public String getSeparator()
Get separator

Returns:
column separator


Copyright (c) 2012 Swiss Institute of Bioinformatics. All rights reserved.