org.das2.qds.util.MultiFieldTimeParser

Parse the record by recombining the separated fields, then parsing the combined string. This is to be used with AsciiParser. 2010/03/11: Indeterminate field length is used when one field is in a record. 2010/03/11: The last field, if just one digit type (%S), can contain fractional part.

MultiFieldTimeParser( int firstColumn, String[] timeFormats, org.das2.datum.TimeParser parser, Units units )


create

create( org.das2.qds.util.AsciiParser ap, int firstColumn, String[] timeFormats ) → org.das2.qds.util.MultiFieldTimeParser

configure AsciiParser ap to use this field parser. The parser is registered with each column and the units are set.

Parameters

ap - an AsciiParser
firstColumn - an int
timeFormats - a java.lang.String[]

Returns:

org.das2.qds.util.MultiFieldTimeParser

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getUnits

getUnits( ) → Units

suggest units for unpacking.

Returns:

an Units

[search for examples] [view on GitHub] [view on old javadoc] [view source]


parseField

parseField( String field, int columnIndex ) → double

Either the field is accumulated in a string, and the entire string is parsed for the last field.

Parameters

field - the contents of the field.
columnIndex - the index of the column in the table.

Returns:

0 or the value for the time unit if it's the last field.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


unpack

unpack( QDataSet rank2, Units u ) → QDataSet

Parameters

rank2 - a QDataSet
u - an Units

Returns:

org.das2.qds.QDataSet

[search for examples] [view on GitHub] [view on old javadoc] [view source]