congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
org.dashbuilder.dataset
Code IndexAdd Tabnine to your IDE (free)

How to use org.dashbuilder.dataset

Best Java code snippets using org.dashbuilder.dataset (Showing top 20 results out of 540)

origin: org.dashbuilder/dashbuilder-dataset-api

private int getGroupColumn(DataSetMetadata metatada) {
  for (int i=0; i<metatada.getNumberOfColumns(); i++) {
    ColumnType type = metatada.getColumnType(i);
    if (type.equals(ColumnType.LABEL)) return i;
  }
  for (int i=0; i<metatada.getNumberOfColumns(); i++) {
    ColumnType type = metatada.getColumnType(i);
    if (type.equals(ColumnType.DATE)) return i;
  }
  return -1;
}
origin: org.dashbuilder/dashbuilder-dataset-client

@Override
public DataSet createDataSet(String uuid) {
  DataSet dataSet = DataSetFactory.newEmptyDataSet();
  dataSet.setUUID(uuid);
  return dataSet;
}
origin: org.dashbuilder/dashbuilder-renderer-table

  public String getValue( Integer row ) {
    Object value = dataSet.getValueAt(row, columnNumber);
    return TableDisplayer.this.format(value, column.getId());
  }
};
origin: org.dashbuilder/dashbuilder-dataset-api

private ValidationError checkTypes(DataSet dataSet, ColumnType[] types) {
  for (int i = 0; i < dataSet.getColumns().size(); i++) {
    ColumnType columnType = dataSet.getColumnByIndex(i).getColumnType();
    if (i < types.length && !columnType.equals(types[i])) {
      return createValidationError(ERROR_COLUMN_TYPE, i, types[i], columnType);
    }
  }
  return null;
}
origin: org.dashbuilder/dashbuilder-dataset-core

public DataSet lookupGroupByMonthDynamic(boolean emptyIntervals) throws Exception {
  return dataSetManager.lookupDataSet(
      DataSetLookupFactory.newDataSetLookupBuilder()
          .dataset(EXPENSE_REPORTS)
          .group(COLUMN_DATE).dynamic(99, MONTH, emptyIntervals)
          .column(COLUMN_DATE, "Period")
          .column(COLUMN_EMPLOYEE, "Employee")
          .column(COUNT, "Occurrences")
          .column(COLUMN_AMOUNT, SUM, "totalAmount")
          .buildLookup());
}
origin: org.dashbuilder/dashbuilder-dataset-shared

private DataSet _filterDataSet(DataSet dataSet, List<Integer> rows) {
  DataSet result = DataSetFactory.newEmptyDataSet();
  for (DataColumn column : dataSet.getColumns()) {
    DataColumn sortedColumn = column.cloneEmpty();
    SortedList sortedValues = new SortedList(column.getValues(), rows);
    sortedColumn.setValues(sortedValues);
    result.addColumn(sortedColumn);
  }
  return result;
}
origin: org.dashbuilder/dashbuilder-dataset-api

public DataSet toDataSet() throws ParseException {
  DataSet dataSet = DataSetFactory.newEmptyDataSet();
  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;
}
origin: org.kie.soup/kie-soup-dataset-core

@Override
public DataSet lookupDataSet(DataSetDef def, DataSetLookup lookup) throws Exception {
  return DataSetFactory.newDataSetBuilder()
      .label("name")
      .row("david")
      .row("maciejs")
      .buildDataSet();
}
origin: org.dashbuilder/dashbuilder-dataset-api

/**
 * Check if some data set rows match a given result.
 * @param dataSet The data set to validate.
 * @param expected The expected row values.
 * @param index The starting data set row index where the comparison starts.
 */
public static void assertDataSetValues(DataSet dataSet, String[][] expected, int index) {
  assertDataSetValues(dataSet, new DataSetFormatter(), expected, index);
}
origin: org.dashbuilder/dashbuilder-dataset-core

@Before
public void setUp() throws Exception {
  DataSet dataSet = ExpenseReportsData.INSTANCE.toDataSet();
  dataSet.setUUID(EXPENSE_REPORTS);
  dataSetManager.registerDataSet(dataSet);
}
origin: org.dashbuilder/dashbuilder-dataset-api

/**
 * Check if some data set rows match a given result.
 * @param dataSet The data set to validate.
 * @param x The x position of the cell to check (starting at 0).
 * @param y The y position of the cell to check (starting at 0).
 * @param expected The expected value in the given cell.
 */
public static void assertDataSetValue(DataSet dataSet, int x, int y, String expected) {
  assertDataSetValue(dataSet, new DataSetFormatter(), x, y, expected);
}
origin: org.kie.soup/kie-soup-dataset-api

private ValidationError checkTypes(DataSet dataSet, ColumnType[] types) {
  for (int i = 0; i < dataSet.getColumns().size(); i++) {
    ColumnType columnType = dataSet.getColumnByIndex(i).getColumnType();
    if (i < types.length && !columnType.equals(types[i])) {
      return createValidationError(ERROR_COLUMN_TYPE, i, types[i], columnType);
    }
  }
  return null;
}
origin: org.dashbuilder/dashbuilder-renderer-table

  public String getValue( Integer row ) {
    Object value = dataSet.getValueAt(row, columnNumber);
    return TableDisplayer.this.format(value, column.getId());
  }
};
origin: org.kie.soup/kie-soup-dataset-api

private int getGroupColumn(DataSetMetadata metatada) {
  for (int i=0; i<metatada.getNumberOfColumns(); i++) {
    ColumnType type = metatada.getColumnType(i);
    if (type.equals(ColumnType.LABEL)) return i;
  }
  for (int i=0; i<metatada.getNumberOfColumns(); i++) {
    ColumnType type = metatada.getColumnType(i);
    if (type.equals(ColumnType.DATE)) return i;
  }
  return -1;
}
origin: org.kie.soup/kie-soup-dataset-core

public DataSet createDataSet(String uuid) {
  DataSet dataSet = DataSetFactory.newEmptyDataSet();
  dataSet.setUUID(uuid);
  return dataSet;
}
origin: org.kie.soup/kie-soup-dataset-api

public DataSet toDataSet() throws ParseException {
  DataSet dataSet = DataSetFactory.newEmptyDataSet();
  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;
}
origin: org.dashbuilder/dashbuilder-dataset-core

@Override
public DataSet lookupDataSet(DataSetDef def, DataSetLookup lookup) throws Exception {
  return DataSetFactory.newDataSetBuilder()
      .label("name")
      .row("david")
      .row("maciejs")
      .buildDataSet();
}
origin: org.kie.soup/kie-soup-dataset-api

/**
 * Check if some data set rows match a given result.
 * @param dataSet The data set to validate.
 * @param expected The expected row values.
 * @param index The starting data set row index where the comparison starts.
 */
public static void assertDataSetValues(DataSet dataSet, String[][] expected, int index) {
  assertDataSetValues(dataSet, new DataSetFormatter(), expected, index);
}
origin: org.kie.soup/kie-soup-dataset-api

/**
 * Check if some data set rows match a given result.
 * @param dataSet The data set to validate.
 * @param x The x position of the cell to check (starting at 0).
 * @param y The y position of the cell to check (starting at 0).
 * @param expected The expected value in the given cell.
 */
public static void assertDataSetValue(DataSet dataSet, int x, int y, String expected) {
  assertDataSetValue(dataSet, new DataSetFormatter(), x, y, expected);
}
origin: kiegroup/appformer

@Override
public DataSet createDataSet(String uuid) {
  DataSet dataSet = DataSetFactory.newEmptyDataSet();
  dataSet.setUUID(uuid);
  return dataSet;
}
org.dashbuilder.dataset

Most used classes

  • DataSet
  • DataSetDef
    This class is used to define the origin, structure and runtime behaviour of a data set instance.
  • DataSetLookup
    A data set look up request.
  • FilterFactory
    A factory of filter functions
  • DataColumn
    A data set is a matrix of values composed by a fixed number of columns.
  • DataSetDefRegistry,
  • DataSetFactory,
  • DataSetLookupBuilder,
  • SQLDataSetDef,
  • ColumnGroup,
  • DataSetGroup,
  • DataSetLookupBuilderImpl,
  • CoreFunctionFilter,
  • DataColumnDef,
  • ColumnType,
  • GroupFunction,
  • Interval,
  • DataSetLookupConstraints,
  • DataSetMetadata
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now