use of org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 in project drools-wb by kiegroup.
the class GuidedDecisionTableMetadataBuilder method populateDecisionTable.
@Override
public void populateDecisionTable(final GuidedDecisionTable52 dtable, final int maxRowCount) {
final MetadataCol52 column = new MetadataCol52();
final String value = this.definitions.get(headerCol);
column.setHideColumn(true);
column.setMetadata(value);
dtable.getMetadataCols().add(column);
if (this.values.size() < maxRowCount) {
for (int iRow = this.values.size(); iRow < maxRowCount; iRow++) {
this.values.add(new DTCellValue52(""));
}
}
addColumnData(dtable, column);
}
use of org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 in project drools-wb by kiegroup.
the class GuidedDecisionTableNoLoopBuilder method addCellValue.
@Override
public void addCellValue(final int row, final int column, final String value) {
final DTCellValue52 dcv = new DTCellValue52(RuleSheetParserUtil.isStringMeaningTrue(value));
this.values.add(dcv);
}
use of org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 in project drools-wb by kiegroup.
the class GuidedDecisionTableRuleflowGroupBuilder method addCellValue.
@Override
public void addCellValue(final int row, final int column, final String value) {
final DTCellValue52 dcv = new DTCellValue52(value);
this.values.add(dcv);
}
use of org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 in project drools-wb by kiegroup.
the class GuidedDecisionTableRuleflowGroupBuilder method populateDecisionTable.
@Override
public void populateDecisionTable(final GuidedDecisionTable52 dtable, final int maxRowCount) {
final AttributeCol52 column = new AttributeCol52();
column.setAttribute(GuidedDecisionTable52.RULEFLOW_GROUP_ATTR);
dtable.getAttributeCols().add(column);
if (this.values.size() < maxRowCount) {
for (int iRow = this.values.size(); iRow < maxRowCount; iRow++) {
this.values.add(new DTCellValue52(""));
}
}
addColumnData(dtable, column);
}
use of org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 in project drools-wb by kiegroup.
the class GuidedDecisionTableSalienceBuilder method addCellValue.
@Override
public void addCellValue(final int row, final int column, final String content) {
String value = content;
if (value.startsWith("(") && value.endsWith(")")) {
value = value.substring(1, value.lastIndexOf(")") - 1);
}
final DTCellValue52 dcv = new DTCellValue52(0);
try {
dcv.setNumericValue(Integer.valueOf(value));
} catch (NumberFormatException nfe) {
final String message = "Priority is not an integer literal, in cell " + RuleSheetParserUtil.rc2name(row, column);
this.conversionResult.addMessage(message, ConversionMessageType.WARNING);
}
this.values.add(dcv);
}
Aggregations