private ActionInsertFactCol52 makeNewActionInsertColumn() { switch ( model.getTableFormat() ) { case LIMITED_ENTRY: return new LimitedEntryActionInsertFactCol52(); default: return new ActionInsertFactCol52(); } }
dt.getActionCols().add( new ActionInsertFactCol52() ); ActionSetFieldCol52 set = new ActionSetFieldCol52(); set.setFactField( "foo" );
@Test public void testOnlyDecisionTableColumns() { GuidedDecisionTable52 dt = new GuidedDecisionTable52(); Pattern52 p1 = new Pattern52(); p1.setFactType( "Driver" ); p1.setBoundName( "$p1" ); ConditionCol52 c1 = new ConditionCol52(); c1.setFactField( "name" ); c1.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL ); c1.setBinding( "$c1" ); p1.getChildColumns().add( c1 ); dt.getConditions().add( p1 ); ActionInsertFactCol52 ins = new ActionInsertFactCol52(); ins.setBoundName( "$ins" ); ins.setFactField( "rating" ); ins.setFactType( "Person" ); ins.setType( DataType.TYPE_STRING ); dt.getActionCols().add( ins ); BRLRuleModel model = new BRLRuleModel( dt ); assertNotNull( model.getAllVariables() ); assertEquals( 3, model.getAllVariables().size() ); assertTrue( model.getAllVariables().contains( "$p1" ) ); assertTrue( model.getAllVariables().contains( "$c1" ) ); assertTrue( model.getAllVariables().contains( "$ins" ) ); }
private ActionInsertFactCol52 makeNewActionColumn( final AvailableField f ) { final GuidedDecisionTable52.TableFormat format = presenter.getTableFormat(); if ( format == GuidedDecisionTable52.TableFormat.EXTENDED_ENTRY ) { final ActionInsertFactCol52 a = new ActionInsertFactCol52(); a.setBoundName( chosenPatternsSelection.getBoundName() ); a.setFactType( chosenPatternsSelection.getFactType() ); a.setFactField( f.getName() ); a.setType( f.getType() ); return a; } else { final LimitedEntryActionInsertFactCol52 a = new LimitedEntryActionInsertFactCol52(); a.setBoundName( chosenPatternsSelection.getBoundName() ); a.setFactType( chosenPatternsSelection.getFactType() ); a.setFactField( f.getName() ); a.setType( f.getType() ); return a; } }
dt.getConditions().add( brlCondition ); ActionInsertFactCol52 ins = new ActionInsertFactCol52(); ins.setBoundName( "$ins" ); ins.setFactField( "rating" );
ActionInsertFactCol52 ins = new ActionInsertFactCol52(); ins.setBoundName( "ins" ); ins.setFactType( "Cheese" );
private ActionInsertFactCol52 cloneActionInsertColumn( ActionInsertFactCol52 col ) { ActionInsertFactCol52 clone = null; if ( col instanceof LimitedEntryActionInsertFactCol52 ) { clone = new LimitedEntryActionInsertFactCol52(); DTCellValue52 dcv = cloneLimitedEntryValue( ( (LimitedEntryCol) col ).getValue() ); ( (LimitedEntryCol) clone ).setValue( dcv ); } else { clone = new ActionInsertFactCol52(); } clone.setBoundName( col.getBoundName() ); clone.setType( col.getType() ); clone.setFactField( col.getFactField() ); clone.setFactType( col.getFactType() ); clone.setHeader( col.getHeader() ); clone.setValueList( col.getValueList() ); clone.setDefaultValue( new DTCellValue52( col.getDefaultValue() ) ); clone.setHideColumn( col.isHideColumn() ); clone.setInsertLogical( col.isInsertLogical() ); return clone; }
ActionInsertFactCol52 ins = new ActionInsertFactCol52(); ins.setBoundName( "ins" ); ins.setFactType( "Cheese" );
dt.getConditions().add( brlCondition ); ActionInsertFactCol52 ins = new ActionInsertFactCol52(); ins.setBoundName( "$ins" ); ins.setFactField( "rating" );
ActionInsertFactCol52 ins = new ActionInsertFactCol52(); ins.setBoundName( "ins" ); ins.setFactType( "Cheese" );
dt.getConditions().add( brlCondition ); ActionInsertFactCol52 ins = new ActionInsertFactCol52(); ins.setBoundName( "$ins" ); ins.setFactField( "rating" );
dt.getActionCols().add( a2 ); final ActionInsertFactCol52 ins = new ActionInsertFactCol52(); ins.setBoundName( "x" ); ins.setFactType( "Driver" ); dt.getActionCols().add( ins ); final ActionInsertFactCol52 ins_ = new ActionInsertFactCol52(); ins_.setBoundName( "x" ); ins_.setFactType( "Driver" );
cols.add( ret ); ActionInsertFactCol52 ins1 = new ActionInsertFactCol52(); ins1.setBoundName( "ins" ); ins1.setFactType( "Cheese" ); cols.add( ins1 ); ActionInsertFactCol52 ins2 = new ActionInsertFactCol52(); ins2.setBoundName( "ins" ); ins2.setFactType( "Cheese" );
dt.getActionCols().add( a2 ); final ActionInsertFactCol52 ins = new ActionInsertFactCol52(); ins.setBoundName( "x" ); ins.setFactType( "Driver" ); dt.getActionCols().add( ins ); final ActionInsertFactCol52 ins_ = new ActionInsertFactCol52(); ins_.setBoundName( "x" ); ins_.setFactType( "Driver" );
dt.getConditions().add( p1 ); ActionInsertFactCol52 ins = new ActionInsertFactCol52(); ins.setBoundName( "$ins" ); ins.setFactField( "rating" );
asfc.setFactField( "age" ); final ActionInsertFactCol52 aifc = new ActionInsertFactCol52(); aifc.setBoundName( "d2" ); aifc.setFactType( "Driver" );
dt.getConditions().add( p1 ); ActionInsertFactCol52 ins = new ActionInsertFactCol52(); ins.setBoundName( "$ins" ); ins.setFactField( "rating" ); dt.getActionCols().add( ins ); ActionInsertFactCol52 ins2 = new ActionInsertFactCol52(); ins2.setInsertLogical( true ); ins2.setBoundName( "$ins2" );
ActionInsertFactCol52 ins = new ActionInsertFactCol52(); ins.setBoundName( "$ins" ); ins.setFactField( "rating" );
ActionInsertFactCol52 ins = new ActionInsertFactCol52(); ins.setBoundName( "$ins" ); ins.setFactField( "rating" );
ActionInsertFactCol52 a1 = new ActionInsertFactCol52(); a1.setBoundName( "$b" ); a1.setFactType( "Baddie" );