public class JsonDataContext extends QueryPostprocessDataContext implements DocumentSourceProvider
DataContext
implementation that works on JSON files or
Resource
s.INFORMATION_SCHEMA_NAME
Constructor and Description |
---|
JsonDataContext(File file) |
JsonDataContext(Resource resource) |
JsonDataContext(Resource resource,
SchemaBuilder schemaBuilder) |
Modifier and Type | Method and Description |
---|---|
DocumentSource |
getDocumentSourceForTable(String sourceCollectionName)
Gets a
DocumentSource for a particular source collection. |
protected Schema |
getMainSchema() |
protected String |
getMainSchemaName() |
DocumentSource |
getMixedDocumentSourceForSampling()
Gets a
DocumentSource containing documents of mixed origin and
type. |
protected DataSet |
materializeMainSchemaTable(Table table,
Column[] columns,
int maxRows)
Executes a simple one-table query against a table in the main schema of
the subclasses of this class.
|
addConverter, executeCountQuery, executePrimaryKeyLookupQuery, executeQuery, getDefaultSchemaName, getMainSchemaInternal, getSchemaByNameInternal, getSchemaNamesInternal, isMainSchemaTable, materializeFromItem, materializeMainSchemaTable, materializeMainSchemaTable, materializeTable
compileQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, isQualifiedPathDelim, parseQuery, query, refreshSchemas
public JsonDataContext(File file)
public JsonDataContext(Resource resource)
public JsonDataContext(Resource resource, SchemaBuilder schemaBuilder)
protected Schema getMainSchema() throws MetaModelException
getMainSchema
in class QueryPostprocessDataContext
MetaModelException
protected String getMainSchemaName() throws MetaModelException
getMainSchemaName
in class QueryPostprocessDataContext
MetaModelException
protected DataSet materializeMainSchemaTable(Table table, Column[] columns, int maxRows)
QueryPostprocessDataContext
materializeMainSchemaTable
in class QueryPostprocessDataContext
table
- the table to querycolumns
- the columns of the table to querymaxRows
- the maximum amount of rows needed or -1 if all rows are
wanted.public DocumentSource getMixedDocumentSourceForSampling()
DocumentSourceProvider
DocumentSource
containing documents of mixed origin and
type.getMixedDocumentSourceForSampling
in interface DocumentSourceProvider
public DocumentSource getDocumentSourceForTable(String sourceCollectionName)
DocumentSourceProvider
DocumentSource
for a particular source collection. See
Document.getSourceCollectionName()
.getDocumentSourceForTable
in interface DocumentSourceProvider
Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.