@Test public void testLimitedEntryAttributes() { GuidedDecisionTable52 dt = new GuidedDecisionTable52(); dt.setTableFormat( GuidedDecisionTable52.TableFormat.LIMITED_ENTRY ); dt.setTableName( "limited-entry" ); AttributeCol52 attr = new AttributeCol52(); attr.setAttribute( "salience" ); dt.getAttributeCols().add( attr ); dt.setData( DataUtilities.makeDataLists( new String[][]{ new String[]{ "1", "desc", "100" }, new String[]{ "2", "desc", "200" } } ) ); GuidedDTDRLPersistence p = GuidedDTDRLPersistence.getInstance(); String drl = p.marshal( dt ); assertTrue( drl.indexOf( "salience 100" ) > -1 ); assertTrue( drl.indexOf( "salience 200" ) > -1 ); }
dt.getAttributeCols().add( new AttributeCol52() );
rm.attributes ); AttributeCol52 col1 = new AttributeCol52(); col1.setAttribute( "salience" ); AttributeCol52 col2 = new AttributeCol52(); col2.setAttribute( "agenda-group" ); attributeCols.add( col1 );
dt.setTableName( "michael" ); AttributeCol52 attr = new AttributeCol52(); attr.setAttribute( "salience" ); attr.setDefaultValue( new DTCellValue52( "66" ) );
AttributeCol52 attr = new AttributeCol52(); attr.setAttribute( "salience" ); attr.setDefaultValue( new DTCellValue52( "66" ) );
dt.setTableName( "michael" ); AttributeCol52 attr = new AttributeCol52(); attr.setAttribute( "salience" ); attr.setDefaultValue( new DTCellValue52( "66" ) );
dt ); final AttributeCol52 at = new AttributeCol52(); at.setAttribute( "salience" ); final AttributeCol52 at_ = new AttributeCol52(); at_.setAttribute( "enabled" );
dt ); final AttributeCol52 salienceAttribute = new AttributeCol52(); salienceAttribute.setAttribute( "salience" ); final AttributeCol52 enabledAttribute = new AttributeCol52(); enabledAttribute.setAttribute( "enabled" );
mdc.setMetadata( "cheese" ); final AttributeCol52 ac = new AttributeCol52(); ac.setAttribute( "salience" );
r[ 2 ] ); AttributeCol52 at = new AttributeCol52(); at.setAttribute( "no-loop" ); dt.getAttributeCols().add( at );