uk.ac.starlink.topcat.contrib.gavo
Class GavoCSVTableParser.RecursiveDescentParser

java.lang.Object
  extended by uk.ac.starlink.topcat.contrib.gavo.GavoCSVTableParser.RecursiveDescentParser
Enclosing class:
GavoCSVTableParser

public static class GavoCSVTableParser.RecursiveDescentParser
extends Object

Recursive descent parser for parsing a single line


Constructor Summary
GavoCSVTableParser.RecursiveDescentParser()
          Creates a new instance of RecursiveDescentParser
GavoCSVTableParser.RecursiveDescentParser(String line)
          Creates a new instance of RecursiveDescentParser
 
Method Summary
 String getDelimiter()
          Getter for property delimiter.
 String getLine()
          Getter for property line.
 List parse()
          Parses a line previously set
 List parse(String line)
          Parses the given line of text
 void setDelimiter(String delimiter)
          Setter for property delimiter.
 void setLine(String line)
          Setter for property line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GavoCSVTableParser.RecursiveDescentParser

public GavoCSVTableParser.RecursiveDescentParser()
Creates a new instance of RecursiveDescentParser


GavoCSVTableParser.RecursiveDescentParser

public GavoCSVTableParser.RecursiveDescentParser(String line)
Creates a new instance of RecursiveDescentParser

Parameters:
line - the line to parse
Method Detail

setDelimiter

public void setDelimiter(String delimiter)
Setter for property delimiter.

Parameters:
delimiter - New value of property delimiter.

getDelimiter

public String getDelimiter()
Getter for property delimiter.

Returns:
Value of property delimiter.

setLine

public void setLine(String line)
Setter for property line.

Parameters:
line - New value of property line.

getLine

public String getLine()
Getter for property line.

Returns:
Value of property line.

parse

public List parse(String line)
Parses the given line of text

Parameters:
line - a String with delimiters and double quotes
Returns:
a List with the parsed items

parse

public List parse()
Parses a line previously set

Returns:
a List with the parsed items
See Also:
setLine(java.lang.String)


Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.