Package app.babylon.table.io
Interface HeaderStrategy
- All Known Implementing Classes:
HeaderStrategyAuto,HeaderStrategyExpectedHeaders,HeaderStrategyExplicitRow,HeaderStrategyNoHeaders,HeaderStrategyWidestNonEmptyRow
public interface HeaderStrategy
Detects header rows and selected columns for an input stream according to a
specific header interpretation strategy.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault number of rows to scan when inferring headers. -
Method Summary
Modifier and TypeMethodDescriptiondefault HeaderDetectiondetect(RowStreamMarkable rowStream, Set<ColumnName> selectedColumns) Detects headers and optional selected columns from a markable row stream.detectFoundHeaders(RowStreamMarkable rowStream, Set<ColumnName> selectedColumns) Detects the raw headers present in the source.default intReturns the maximum number of rows to scan during header detection.static ColumnName[]
-
Field Details
-
DEFAULT_SCAN_LIMIT
static final int DEFAULT_SCAN_LIMITDefault number of rows to scan when inferring headers.- See Also:
-
-
Method Details
-
getScanLimit
default int getScanLimit()Returns the maximum number of rows to scan during header detection.- Returns:
- scan limit
-
detect
default HeaderDetection detect(RowStreamMarkable rowStream, Set<ColumnName> selectedColumns) throws IOException Detects headers and optional selected columns from a markable row stream.- Parameters:
rowStream- row stream to inspectselectedColumns- requested selected columns- Returns:
- detected header information
- Throws:
IOException- if stream inspection fails
-
detectFoundHeaders
HeaderDetection detectFoundHeaders(RowStreamMarkable rowStream, Set<ColumnName> selectedColumns) throws IOException Detects the raw headers present in the source.- Parameters:
rowStream- row stream to inspectselectedColumns- requested selected columns- Returns:
- detected raw header information
- Throws:
IOException- if stream inspection fails
-
toColumnNames
-