Package org.dashbuilder.dataset

Examples of org.dashbuilder.dataset.DataSet


@ApplicationScoped
public class BackendIntervalBuilderDynamicDate implements IntervalBuilder {

    public IntervalList build(DataSetHandler handler, ColumnGroup columnGroup) {
        IntervalDateRangeList results = new IntervalDateRangeList(columnGroup);
        DataSet dataSet = handler.getDataSet();
        List values = dataSet.getColumnById(columnGroup.getSourceId()).getValues();
        if (values.isEmpty()) {
            return results;
        }

        // Sort the column dates.
View Full Code Here


    /**
     * Same as lookupDataSet but only retrieves the metadata of the resulting data set.
     * @return A DataSetMetadata instance containing general information about the data set.
     */
    public DataSetMetadata lookupDataSetMetadata(DataSetLookup lookup) throws Exception {
        DataSet dataSet = dataSetManager.lookupDataSet(lookup);
        if (dataSet == null) return null;
        return dataSet.getMetadata();
    }
View Full Code Here

    @Inject
    private Event<DataSetBackendRemovedEvent> dataSetRemovedEvent;

    public DataSet createDataSet(String uuid) {
        DataSet dataSet = DataSetFactory.newDataSet();
        dataSet.setUUID(uuid);
        return dataSet;
    }
View Full Code Here

        return index.getDataSet();
    }

    public DataSetMetadata getDataSetMetadata(String uuid) {
        DataSet dataSet = getDataSet(uuid);
        if (dataSet == null) return null;

        return dataSet.getMetadata();
    }
View Full Code Here

    public DataSet removeDataSet(String uuid) {
        DataSetIndex index = dataSetOpEngine.getIndexRegistry().remove(uuid);
        if (index == null) return null;

        // Fire an event before return.
        DataSet dataSet = index.getDataSet();
        dataSetRemovedEvent.fire(new DataSetBackendRemovedEvent(dataSet.getMetadata()));
        return dataSet;

    }
View Full Code Here

        if (StringUtils.isEmpty(uuid)) return null;

        // Get the target data set
        DataSetIndex dataSetIndex = fetchDataSet(uuid);
        if (dataSetIndex == null) return null;
        DataSet dataSet = dataSetIndex.getDataSet();

        // Apply the list of operations specified (if any).
        if (!lookup.getOperationList().isEmpty()) {
            dataSet = dataSetOpEngine.execute(dataSetIndex.getDataSet(), lookup.getOperationList());
        }

        // Trim the data set as requested.
        dataSet = dataSet.trim(lookup.getRowOffset(), lookup.getNumberOfRows());
        return dataSet;
    }
View Full Code Here

        }
        return result;
    }

    public DataSetMetadata lookupDataSetMetadata(DataSetLookup lookup) {
        DataSet dataSet = lookupDataSet(lookup);
        if (dataSet == null) return null;

        return dataSet.getMetadata();
    }
View Full Code Here

TOP

Related Classes of org.dashbuilder.dataset.DataSet

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.