Package org.dashbuilder.dataset.engine.index

Examples of org.dashbuilder.dataset.engine.index.DataSetIndexNode


            return result;
        }

        private DataSet _buildDataSet(InternalContext context) {
            DataSetOp lastOp = context.lastOperation;
            DataSetIndexNode index = context.index;
            DataSet dataSet = context.dataSet;

            if (lastOp instanceof DataSetGroup) {
                DataSetGroup gOp = (DataSetGroup) lastOp;
                ColumnGroup columnGroup = gOp.getColumnGroup();
                if (columnGroup == null) {
                    return _buildDataSet(context, gOp.getGroupFunctions());
                } else {
                    if (!gOp.getSelectedIntervalNames().isEmpty() && gOp.getGroupFunctions().isEmpty()) {
                        return dataSet.trim(index.getRows());
                    } else {
                        return _buildDataSet(context, gOp);
                    }
                }
            }
            if (lastOp instanceof DataSetFilter) {
                return dataSet.trim(index.getRows());
            }
            if (lastOp instanceof DataSetSort) {
                DataSetImpl sortedDataSet = new DataSetImpl();
                for (DataColumn column : dataSet.getColumns()) {
                    SortedList sortedValues = new SortedList(column.getValues(), index.getRows());
                    sortedDataSet.addColumn(column.getId(), column.getColumnType(), sortedValues);
                }
                return sortedDataSet;
            }
            return dataSet;
View Full Code Here


            }
            return result;
        }

        private DataSet _buildDataSet(InternalContext context, List<GroupFunction> groupFunctions) {
            DataSetIndexNode index = context.index;
            DataSet dataSet = context.dataSet;

            DataSet result= DataSetFactory.newDataSet();

            for (int i=0; i< groupFunctions.size(); i++) {
View Full Code Here

TOP

Related Classes of org.dashbuilder.dataset.engine.index.DataSetIndexNode

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.