private AttributeCol52 makeNewColumn(AttributeCol c) { AttributeCol52 nc = new AttributeCol52(); nc.setAttribute( c.attr ); nc.setDefaultValue( new DTCellValue52( c.defaultValue ) ); nc.setHideColumn( c.hideColumn ); nc.setReverseOrder( c.reverseOrder ); nc.setUseRowNumber( c.useRowNumber ); nc.setWidth( c.width ); return nc; }
private AttributeCol52 makeNewColumn(AttributeCol c) { AttributeCol52 nc = new AttributeCol52(); nc.setAttribute( c.attr ); nc.setDefaultValue( new DTCellValue52( c.defaultValue ) ); nc.setHideColumn( c.hideColumn ); nc.setReverseOrder( c.reverseOrder ); nc.setUseRowNumber( c.useRowNumber ); nc.setWidth( c.width ); return nc; }
@Test public void testLimitedEntryAttributes() { GuidedDecisionTable52 dt = new GuidedDecisionTable52(); dt.setTableFormat( TableFormat.LIMITED_ENTRY ); dt.setTableName( "limited-entry" ); AttributeCol52 attr = new AttributeCol52(); attr.setAttribute( "salience" ); dt.getAttributeCols().add( attr ); dt.setData( upgrader.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 ); }
rm.attributes ); AttributeCol52 col1 = new AttributeCol52(); col1.setAttribute( "salience" ); AttributeCol52 col2 = new AttributeCol52(); col2.setAttribute( "agenda-group" ); attributeCols.add( col1 );
dt.getAttributeCols().add( new AttributeCol52() );
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" ) );
AttributeCol52 at = new AttributeCol52(); at.setAttribute( "salience" ); AttributeCol52 at_ = new AttributeCol52(); at_.setAttribute( "enabled" );
dt.setTableName( "michael" ); AttributeCol52 attr = new AttributeCol52(); attr.setAttribute( "salience" ); attr.setDefaultValue( new DTCellValue52( "66" ) );
AttributeCol52 salienceAttribute = new AttributeCol52(); salienceAttribute.setAttribute( "salience" ); AttributeCol52 enabledAttribute = new AttributeCol52(); enabledAttribute.setAttribute( "enabled" );
mdc.setMetadata( "cheese" ); AttributeCol52 ac = new AttributeCol52(); ac.setAttribute( "salience" );
r[2] ); AttributeCol52 at = new AttributeCol52(); at.setAttribute( "no-loop" ); dt.getAttributeCols().add( at );