Package org.apache.metamodel.data

Examples of org.apache.metamodel.data.DocumentSource


        _tableBuilders = new ConcurrentHashMap<String, InferentialTableBuilder>();
    }

    @Override
    public void offerSources(DocumentSourceProvider documentSourceProvider) {
        final DocumentSource documentSource = documentSourceProvider.getMixedDocumentSourceForSampling();
        try {
            while (true) {
                final Document document = documentSource.next();
                if (document == null) {
                    break;
                }
                final String tableName = determineTable(document);
                addObservation(tableName, document);
            }
        } finally {
            documentSource.close();
        }
    }
View Full Code Here


        _tableName = tableName;
    }

    @Override
    public void offerSources(DocumentSourceProvider documentSourceProvider) {
        final DocumentSource documentSource = documentSourceProvider.getMixedDocumentSourceForSampling();
        getTableBuilder(_tableName).offerSource(documentSource);
    }
View Full Code Here

    public void offerSources(DocumentSourceProvider documentSourceProvider) {
        if (_databaseNames == null) {
            super.offerSources(documentSourceProvider);
        } else {
            for (String databaseName : _databaseNames) {
                final DocumentSource documentSource = documentSourceProvider.getDocumentSourceForTable(databaseName);
                offerDocumentSource(documentSource);
            }
        }
    }
View Full Code Here

    @Override
    protected DataSet materializeMainSchemaTable(Table table, Column[] columns, int maxRows) {
        final DocumentConverter documentConverter = _schemaBuilder.getDocumentConverter(table);
        final SelectItem[] selectItems = MetaModelHelper.createSelectItems(columns);
        final DataSetHeader header = new CachingDataSetHeader(selectItems);
        final DocumentSource documentSource = getDocumentSourceForTable(table.getName());

        DataSet dataSet = new DocumentSourceDataSet(header, documentSource, documentConverter);

        if (maxRows > 0) {
            dataSet = new MaxRowsDataSet(dataSet, maxRows);
View Full Code Here

TOP

Related Classes of org.apache.metamodel.data.DocumentSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.