water.parser
Class CustomParser

java.lang.Object
  extended by water.Iced
      extended by water.parser.CustomParser
All Implemented Interfaces:
java.lang.Cloneable, Freezable
Direct Known Subclasses:
CsvParser, SVMLightParser, XlsParser, XlsxParser

public abstract class CustomParser
extends Iced


Nested Class Summary
protected static class CustomParser.CustomInspectDataOut
           
static interface CustomParser.DataIn
           
static interface CustomParser.DataOut
           
static class CustomParser.ParserSetup
           
static class CustomParser.ParserType
           
static class CustomParser.PSetupGuess
           
static class CustomParser.StreamData
           
static interface CustomParser.StreamDataOut
           
 
Field Summary
 CustomParser.ParserSetup _setup
           
static byte CHAR_COMMA
           
static byte CHAR_CR
           
static byte CHAR_DOUBLE_QUOTE
           
static byte CHAR_FF
           
static byte CHAR_LF
           
static byte CHAR_NULL
           
static byte CHAR_SINGLE_QUOTE
           
static byte CHAR_SPACE
           
static byte CHAR_TAB
           
static byte CHAR_VT
           
static int MAX_PREVIEW_COLS
           
static int MAX_PREVIEW_LINES
           
 
Constructor Summary
CustomParser(CustomParser.ParserSetup setup)
           
 
Method Summary
abstract  CustomParser clone()
           
 java.lang.String[] headers()
           
 boolean isCompatible(CustomParser p)
           
protected static boolean isEOL(byte c)
           
protected static boolean isWhitespace(byte c)
           
 CustomParser.DataOut parallelParse(int cidx, CustomParser.DataIn din, CustomParser.DataOut dout)
           
 boolean parallelParseSupported()
           
 CustomParser.DataOut streamParse(java.io.InputStream is, CustomParser.DataOut dout)
           
 CustomParser.DataOut streamParse(java.io.InputStream is, CustomParser.StreamDataOut dout, ParseDataset2.ParseProgressMonitor pmon)
           
 
Methods inherited from class water.Iced
frozenType, init, newInstance, read, toDocField, write, writeJSON, writeJSONFields
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHAR_TAB

public static final byte CHAR_TAB
See Also:
Constant Field Values

CHAR_LF

public static final byte CHAR_LF
See Also:
Constant Field Values

CHAR_SPACE

public static final byte CHAR_SPACE
See Also:
Constant Field Values

CHAR_CR

public static final byte CHAR_CR
See Also:
Constant Field Values

CHAR_VT

public static final byte CHAR_VT
See Also:
Constant Field Values

CHAR_FF

public static final byte CHAR_FF
See Also:
Constant Field Values

CHAR_DOUBLE_QUOTE

public static final byte CHAR_DOUBLE_QUOTE
See Also:
Constant Field Values

CHAR_SINGLE_QUOTE

public static final byte CHAR_SINGLE_QUOTE
See Also:
Constant Field Values

CHAR_NULL

public static final byte CHAR_NULL
See Also:
Constant Field Values

CHAR_COMMA

public static final byte CHAR_COMMA
See Also:
Constant Field Values

MAX_PREVIEW_COLS

public static final int MAX_PREVIEW_COLS
See Also:
Constant Field Values

MAX_PREVIEW_LINES

public static final int MAX_PREVIEW_LINES
See Also:
Constant Field Values

_setup

public final CustomParser.ParserSetup _setup
Constructor Detail

CustomParser

public CustomParser(CustomParser.ParserSetup setup)
Method Detail

isCompatible

public boolean isCompatible(CustomParser p)

parallelParse

public CustomParser.DataOut parallelParse(int cidx,
                                          CustomParser.DataIn din,
                                          CustomParser.DataOut dout)

parallelParseSupported

public boolean parallelParseSupported()

streamParse

public CustomParser.DataOut streamParse(java.io.InputStream is,
                                        CustomParser.DataOut dout)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

streamParse

public CustomParser.DataOut streamParse(java.io.InputStream is,
                                        CustomParser.StreamDataOut dout,
                                        ParseDataset2.ParseProgressMonitor pmon)
                                 throws java.io.IOException
Throws:
java.io.IOException

isWhitespace

protected static final boolean isWhitespace(byte c)

isEOL

protected static final boolean isEOL(byte c)

clone

public abstract CustomParser clone()
Overrides:
clone in class Iced

headers

public java.lang.String[] headers()