String desc = row.get( 1 ).getStringValue(); BRLRuleModel rm = new BRLRuleModel( dt ); rm.name = getName( dt.getTableName(), num );
String desc = row.get( 1 ).getStringValue(); BRLRuleModel rm = new BRLRuleModel( dt ); rm.name = getName( dt.getTableName(), num );
@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( SuggestionCompletionEngine.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" ) ); }
dt.getActionCols().add( ins ); BRLRuleModel model = new BRLRuleModel( dt );
dt.getActionCols().add( brlAction ); BRLRuleModel model = new BRLRuleModel( dt );
dt.getActionCols().add( ins ); BRLRuleModel model = new BRLRuleModel( dt );
dt.getActionCols().add( ins ); BRLRuleModel model = new BRLRuleModel( dt );
BRLRuleModel model = new BRLRuleModel( dt ); ActionInsertFact aif2 = new ActionInsertFact( "Person" ); aif2.setBoundName( "$aif" );
BRLRuleModel model = new BRLRuleModel( dt ); ActionInsertFact aif = new ActionInsertFact( "Person" ); aif.setBoundName( "$aif" );
BRLRuleModel model = new BRLRuleModel( dt ); FactPattern fp = new FactPattern( "Driver" ); fp.setBoundName( "$brl1" );
dt.getActionCols().add( brlAction ); BRLRuleModel model = new BRLRuleModel( dt );
BRLRuleModel model = new BRLRuleModel( dt ); FactPattern fp2 = new FactPattern( "Driver" ); fp2.setBoundName( "$brl1" );