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; }
public AttributeColumnDetails(final AttributeCol52 column) { super( column ); this.attribute = column.getAttribute(); }
AttributeCol52 attr = new AttributeCol52(); attr.setAttribute( "salience" ); attr.setDefaultValue( new DTCellValue52( "66" ) ); dt.getAttributeCols().add( attr );
@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 ); }
tsdt.getAttributeCols().size() ); assertEquals( "salience", tsdt.getAttributeCols().get( 0 ).getAttribute() ); assertEquals( "66", tsdt.getAttributeCols().get( 0 ).getDefaultValue().getStringValue() );
dt.getAttributeCols().add( new AttributeCol52() );
dt.setTableName( "michael" ); AttributeCol52 attr = new AttributeCol52(); attr.setAttribute( "salience" ); attr.setDefaultValue( new DTCellValue52( "66" ) ); dt.getAttributeCols().add( attr );
rm.attributes ); AttributeCol52 col1 = new AttributeCol52(); col1.setAttribute( "salience" ); AttributeCol52 col2 = new AttributeCol52(); col2.setAttribute( "agenda-group" ); attributeCols.add( col1 ); attributeCols.add( col2 );
tsdt.getAttributeCols().size() ); assertEquals( "salience", tsdt.getAttributeCols().get( 0 ).getAttribute() ); assertEquals( "66", tsdt.getAttributeCols().get( 0 ).getDefaultValue().getStringValue() );
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; }
dt.setTableName( "michael" ); AttributeCol52 attr = new AttributeCol52(); attr.setAttribute( "salience" ); attr.setDefaultValue( new DTCellValue52( "66" ) ); dt.getAttributeCols().add( attr );
AttributeCol52 at = new AttributeCol52(); at.setAttribute( "salience" ); AttributeCol52 at_ = new AttributeCol52(); at_.setAttribute( "enabled" );
public AttributeColumnDetails(final AttributeCol52 column) { super( column ); this.attribute = column.getAttribute(); }
AttributeCol52 salienceAttribute = new AttributeCol52(); salienceAttribute.setAttribute( "salience" ); AttributeCol52 enabledAttribute = new AttributeCol52(); enabledAttribute.setAttribute( "enabled" );
public boolean hasValueList(AttributeCol52 col) { if ( "no-loop".equals( col.getAttribute() ) || "enabled".equals( col.getAttribute() ) ) { return true; } return false; }
mdc.setMetadata( "cheese" ); AttributeCol52 ac = new AttributeCol52(); ac.setAttribute( "salience" );
public boolean hasValueList(AttributeCol52 col) { if ( "no-loop".equals( col.getAttribute() ) || "enabled".equals( col.getAttribute() ) ) { return true; } return false; }
r[2] ); AttributeCol52 at = new AttributeCol52(); at.setAttribute( "no-loop" ); dt.getAttributeCols().add( at ); r[1] ); at.setAttribute( "enabled" ); assertEquals( 2, dt.getValueList( at ).length ); at.setAttribute( "salience" ); assertEquals( 0, dt.getValueList( at ).length );
private String[] getValueList(AttributeCol52 col) { if ( "no-loop".equals( col.getAttribute() ) || "enabled".equals( col.getAttribute() ) ) { return new String[]{"true", "false"}; } return new String[0]; }
private String[] getValueList(AttributeCol52 col) { if ( "no-loop".equals( col.getAttribute() ) || "enabled".equals( col.getAttribute() ) ) { return new String[]{"true", "false"}; } return new String[0]; }