private String getType(BRLActionVariableColumn col, SuggestionCompletionEngine sce) { //If the parameter is not bound to a Fact or FactField use the explicit type. This is (currently) //used when a BRL fragment does not contain any Template Keys and a single BRLActionVariableColumn //is created with type SuggestionCompletionEngine.TYPE_BOOLEAN i.e. Limited Entry if ( col.getFactType() == null && col.getFactField() == null ) { return col.getFieldType(); } //Otherwise lookup from SuggestionCompletionEngine final String factType = col.getFactType(); final String fieldName = col.getFactField(); return getTypeFromSCE( factType, fieldName, sce ); }
public GuidedDTTemplateDataProvider(List<BaseColumn> columns, List<DTCellValue52> rowData) { if ( columns == null ) { throw new NullPointerException( "columns cannot be null" ); } if ( rowData == null ) { throw new NullPointerException( "rowData cannot be null" ); } //rowData does not contain the Analysis column, columns does if ( rowData.size() != columns.size() - 1 ) { throw new IllegalArgumentException( "rowData contains a different number of columns to those provided" ); } //Extract keys and values in constructor rather than on demand for speed for ( int index = 0; index < columns.size(); index++ ) { BaseColumn column = columns.get( index ); if ( column instanceof BRLConditionVariableColumn ) { BRLConditionVariableColumn brlCondition = (BRLConditionVariableColumn) column; templateKeysToValueMap.put( brlCondition.getVarName(), rowData.get( index ) ); } else if ( column instanceof BRLActionVariableColumn ) { BRLActionVariableColumn brlAction = (BRLActionVariableColumn) column; templateKeysToValueMap.put( brlAction.getVarName(), rowData.get( index ) ); } } }
@Override public void setHeader(String header) { super.setHeader( header ); for ( BRLActionVariableColumn variable : this.childColumns ) { variable.setHeader( header ); } }
@Override public void setHideColumn(boolean hideColumn) { super.setHideColumn( hideColumn ); for ( BRLActionVariableColumn variable : this.childColumns ) { variable.setHideColumn( hideColumn ); } }
BRLActionVariableColumn brl1Variable1 = new BRLActionVariableColumn( "", SuggestionCompletionEngine.TYPE_BOOLEAN ); brl1.getChildColumns().add( brl1Variable1 );
@Override public void setHideColumn(boolean hideColumn) { super.setHideColumn( hideColumn ); for ( BRLActionVariableColumn variable : this.childColumns ) { variable.setHideColumn( hideColumn ); } }
BRLActionVariableColumn brl1Variable1 = new BRLActionVariableColumn( "$name", SuggestionCompletionEngine.TYPE_STRING, "Person", "name" ); brl1.getChildColumns().add( brl1Variable1 ); BRLActionVariableColumn brl1Variable2 = new BRLActionVariableColumn( "$age", SuggestionCompletionEngine.TYPE_NUMERIC_INTEGER, "Person",
private String getType(BRLActionVariableColumn col, SuggestionCompletionEngine sce) { //If the parameter is not bound to a Fact or FactField use the explicit type. This is (currently) //used when a BRL fragment does not contain any Template Keys and a single BRLActionVariableColumn //is created with type SuggestionCompletionEngine.TYPE_BOOLEAN i.e. Limited Entry if ( col.getFactType() == null && col.getFactField() == null ) { return col.getFieldType(); } //Otherwise lookup from SuggestionCompletionEngine final String factType = col.getFactType(); final String fieldName = col.getFactField(); return getTypeFromSCE( factType, fieldName, sce ); }
@Override public void setHeader(String header) { super.setHeader( header ); for ( BRLActionVariableColumn variable : this.childColumns ) { variable.setHeader( header ); } }
public GuidedDTTemplateDataProvider(List<BaseColumn> columns, List<DTCellValue52> rowData) { if ( columns == null ) { throw new NullPointerException( "columns cannot be null" ); } if ( rowData == null ) { throw new NullPointerException( "rowData cannot be null" ); } //rowData does not contain the Analysis column, columns does if ( rowData.size() != columns.size() - 1 ) { throw new IllegalArgumentException( "rowData contains a different number of columns to those provided" ); } //Extract keys and values in constructor rather than on demand for speed for ( int index = 0; index < columns.size(); index++ ) { BaseColumn column = columns.get( index ); if ( column instanceof BRLConditionVariableColumn ) { BRLConditionVariableColumn brlCondition = (BRLConditionVariableColumn) column; templateKeysToValueMap.put( brlCondition.getVarName(), rowData.get( index ) ); } else if ( column instanceof BRLActionVariableColumn ) { BRLActionVariableColumn brlAction = (BRLActionVariableColumn) column; templateKeysToValueMap.put( brlAction.getVarName(), rowData.get( index ) ); } } }
BRLActionVariableColumn brl1Variable1 = new BRLActionVariableColumn( "$name", SuggestionCompletionEngine.TYPE_STRING, "Person", "name" ); brl1.getChildColumns().add( brl1Variable1 ); BRLActionVariableColumn brl1Variable2 = new BRLActionVariableColumn( "$age", SuggestionCompletionEngine.TYPE_NUMERIC_INTEGER, "Person",
BRLActionVariableColumn brl1Variable1 = new BRLActionVariableColumn( "$name", SuggestionCompletionEngine.TYPE_STRING, "Person", "name" ); brl1.getChildColumns().add( brl1Variable1 ); BRLActionVariableColumn brl1Variable2 = new BRLActionVariableColumn( "$age", SuggestionCompletionEngine.TYPE_NUMERIC_INTEGER, "Person",