Package uk.ac.starlink.table.formats
Class RowEvaluator
java.lang.Object
uk.ac.starlink.table.formats.RowEvaluator
Examines unknown rows (arrays of strings) to work out what they contain.
By repeatedly calling
submitRow(java.util.List<java.lang.String>)
the evaluator can refine its
idea of what kind of data is represented by each column.- Since:
- 21 Sep 2004
- Author:
- Mark Taylor (Starlink)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Interface for an object that can turn a string into a cell content object.static class
Helper class used to group quantities which describe what the data types found in the columns of a table are. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new RowEvaluator which will work out the number of columns from the data.RowEvaluator
(int ncol) Constructs a new RowEvaluator which will examine rows with a fixed number of columns. -
Method Summary
Modifier and TypeMethodDescriptionReturns information gleaned from previoussubmitRow
calls about the kind of data that appears to be in the columns.void
Looks at a given row (list of strings) and records information about what sort of things it looks like it contains.
-
Field Details
-
ISO8601_REGEX
Regular expression for ISO 8601 dates.
-
-
Constructor Details
-
RowEvaluator
public RowEvaluator()Constructs a new RowEvaluator which will work out the number of columns from the data. -
RowEvaluator
public RowEvaluator(int ncol) Constructs a new RowEvaluator which will examine rows with a fixed number of columns.- Parameters:
ncol
- column count
-
-
Method Details
-
submitRow
Looks at a given row (list of strings) and records information about what sort of things it looks like it contains.- Parameters:
row
-ncol
-element list of strings- Throws:
TableFormatException
- if the number of elements inrow
is not the same as on the first call
-
getMetadata
Returns information gleaned from previoussubmitRow
calls about the kind of data that appears to be in the columns.- Returns:
- metadata
-