@Override
protected List<BRLActionVariableColumn> convertInterpolationVariables( Map<InterpolationVariable, Integer> ivs ) {
//If there are no variables add a boolean column to specify whether the fragment should apply
if ( ivs.size() == 0 ) {
BRLActionVariableColumn variable = new BRLActionVariableColumn( "",
DataType.TYPE_BOOLEAN );
variable.setHeader( editingCol.getHeader() );
variable.setHideColumn( editingCol.isHideColumn() );
List<BRLActionVariableColumn> variables = new ArrayList<BRLActionVariableColumn>();
variables.add( variable );
return variables;
}
//Convert to columns for use in the Decision Table
BRLActionVariableColumn[] variables = new BRLActionVariableColumn[ ivs.size() ];
for ( Map.Entry<InterpolationVariable, Integer> me : ivs.entrySet() ) {
InterpolationVariable iv = me.getKey();
int index = me.getValue();
BRLActionVariableColumn variable = new BRLActionVariableColumn( iv.getVarName(),
iv.getDataType(),
iv.getFactType(),
iv.getFactField() );
variable.setHeader( editingCol.getHeader() );
variable.setHideColumn( editingCol.isHideColumn() );
variables[ index ] = variable;
}
//Convert the array into a mutable list (Arrays.toList provides an immutable list)
List<BRLActionVariableColumn> variableList = new ArrayList<BRLActionVariableColumn>();