@Override public void execute() { NbPreferences.forModule(JoinWithSeparator.class).put(SEPARATOR_SAVED_PREFERENCES, separator); Object value; StringBuilder sb; final int rowsCount = rows.length; TimeFormat timeFormat = column.getTable().getGraph().getModel().getTimeFormat(); DateTimeZone timeZone = column.getTable().getGraph().getModel().getTimeZone(); sb = new StringBuilder(); for (int i = 0; i < rows.length; i++) { value = rows[i].getAttribute(column); if (value != null) { sb.append(AttributeUtils.print(value, timeFormat, timeZone)); if (i < rowsCount - 1) { sb.append(separator); } } } result = sb.toString(); }
final int columnsCount = columnsToMerge.length; GraphModel graphModel = table.getGraph().getModel(); TimeFormat timeFormat = graphModel.getTimeFormat(); DateTimeZone timeZone = graphModel.getTimeZone();
@Override public Column createBooleanMatchesColumn(Table table, Column column, String newColumnTitle, Pattern pattern) { if (pattern != null) { Column newColumn = addAttributeColumn(table, newColumnTitle, Boolean.class); if (newColumn == null) { return null; } Matcher matcher; Object value; TimeFormat timeFormat = table.getGraph().getModel().getTimeFormat(); DateTimeZone timeZone = table.getGraph().getModel().getTimeZone(); for (Element row : getTableAttributeRows(table)) { value = row.getAttribute(column); if (value != null) { matcher = pattern.matcher(AttributeUtils.print(value, timeFormat, timeZone)); } else { matcher = pattern.matcher(""); } row.setAttribute(newColumn, matcher.matches()); } return newColumn; } else { return null; } }
if (value != null && !value.getClass().equals(targetType)) { try { GraphModel graphModel = column.getTable().getGraph().getModel();
GraphModel graphModel = column.getTable().getGraph().getModel(); TimeFormat timeFormat = graphModel.getTimeFormat(); DateTimeZone timeZone = graphModel.getTimeZone();