public class SingleMapColumnSchemaBuilder extends Object implements SchemaBuilder, DocumentConverter
SchemaBuilder
that builds a schema consisting of 1
table with 1 column, of type Map
.Constructor and Description |
---|
SingleMapColumnSchemaBuilder(Resource resource,
String columnName) |
SingleMapColumnSchemaBuilder(String schemaName,
String tableName,
String columnName) |
Modifier and Type | Method and Description |
---|---|
MutableSchema |
build()
Builds the
Schema |
Row |
convert(Document document,
DataSetHeader header)
Converts a
Document into a row with the given
DataSetHeader . |
DocumentConverter |
getDocumentConverter(Table table)
Gets a
DocumentConverter for a table in the produced schema |
String |
getSchemaName()
Gets the name of the schema that is built / will be built.
|
void |
offerSources(DocumentSourceProvider documentSourceProvider)
Offers a
DocumentSourceProvider to the SchemaBuilder . |
public SingleMapColumnSchemaBuilder(Resource resource, String columnName)
public void offerSources(DocumentSourceProvider documentSourceProvider)
SchemaBuilder
DocumentSourceProvider
to the SchemaBuilder
. The
SchemaBuilder
may consume the sources to build/detect a schema
based on the observed documents in the sources. It may also choose to
ignore the source, if the it does not need it.offerSources
in interface SchemaBuilder
public String getSchemaName()
SchemaBuilder
getSchemaName
in interface SchemaBuilder
public MutableSchema build()
SchemaBuilder
Schema
build
in interface SchemaBuilder
public DocumentConverter getDocumentConverter(Table table)
SchemaBuilder
DocumentConverter
for a table in the produced schemagetDocumentConverter
in interface SchemaBuilder
public Row convert(Document document, DataSetHeader header)
DocumentConverter
Document
into a row with the given
DataSetHeader
.convert
in interface DocumentConverter
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.