Package org.dashbuilder.dataset.impl

Examples of org.dashbuilder.dataset.impl.DataSetImpl


import org.dashbuilder.dataset.impl.DataSetImpl;

public class JsObjectHelper {

    public static DataSet createDataSet(JsDataSet jsDataSet) {
        DataSetImpl dataSet = new DataSetImpl();
        dataSet.setColumns(createDataColumns(jsDataSet.getJsColumns()));
        return dataSet;
    }
View Full Code Here


        }
        return rawValue;
    }

    public DataSet toDataSet() throws ParseException {
        DataSetImpl dataSet = new DataSetImpl();
        for (int i = 0; i < columnIds.length; i++) {
            dataSet.addColumn(columnIds[i], getColumnType(types[i]));
            for (int j = 0; j < data.length; j++) {
                String[] row = data[j];
                Object value = parseValue(row[i], types[i]);
                dataSet.setValueAt(j, i, value);
            }
        }
        return dataSet;
    }
View Full Code Here

* Factory class for building DataSet instances.
*/
public final class DataSetFactory {

    public static DataSet newDataSet() {
        return new DataSetImpl();
    }
View Full Code Here

            }
            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

TOP

Related Classes of org.dashbuilder.dataset.impl.DataSetImpl

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.