Package org.drools.ide.common.client.modeldriven.dt

Examples of org.drools.ide.common.client.modeldriven.dt.AttributeCol


        MetadataCol md = new MetadataCol();
        md.attr = "legacy";
        md.defaultValue = "yes";
        dt.getMetadataCols().add( md );

        AttributeCol attr = new AttributeCol();
        attr.attr = "salience";
        attr.defaultValue = "66";
        dt.attributeCols.add( attr );

        ConditionCol con = new ConditionCol();
View Full Code Here


        MetadataCol md = new MetadataCol();
        md.attr = "legacy";
        md.defaultValue = "yes";
        dt.getMetadataCols().add( md );

        AttributeCol attr = new AttributeCol();
        attr.attr = "salience";
        attr.defaultValue = "66";
        dt.attributeCols.add( attr );

        ConditionCol con = new ConditionCol();
View Full Code Here

        assertEquals( "two",
                      r[1] );
        assertEquals( "three",
                      r[2] );

        AttributeCol at = new AttributeCol();
        at.setAttribute( "no-loop" );
        dt.getAttributeCols().add( at );

        r = dt.getValueList( at,
                             sce );
        assertEquals( 2,
                      r.length );
        assertEquals( "true",
                      r[0] );
        assertEquals( "false",
                      r[1] );

        at.setAttribute( "enabled" );
        assertEquals( 2,
                      dt.getValueList( at,
                                       sce ).length );

        at.setAttribute( "salience" );
        assertEquals( 0,
                      dt.getValueList( at,
                                       sce ).length );

    }
View Full Code Here

            }
        } );

        GuidedDecisionTable dt = new GuidedDecisionTable();

        AttributeCol at = new AttributeCol();
        at.setAttribute( "salience" );
        AttributeCol at_ = new AttributeCol();
        at_.setAttribute( "enabled" );

        dt.getAttributeCols().add( at );
        dt.getAttributeCols().add( at_ );

        ConditionCol c1 = new ConditionCol();
View Full Code Here

            }
        } );

        GuidedDecisionTable dt = new GuidedDecisionTable();

        AttributeCol salienceAttribute = new AttributeCol();
        salienceAttribute.setAttribute( "salience" );
        AttributeCol enabledAttribute = new AttributeCol();
        enabledAttribute.setAttribute( "enabled" );

        dt.getAttributeCols().add( salienceAttribute );
        dt.getAttributeCols().add( enabledAttribute );

        ConditionCol conditionColName = new ConditionCol();
View Full Code Here

        DescriptionCol dc = new DescriptionCol();

        MetadataCol mdc = new MetadataCol();
        mdc.setMetadata( "cheese" );

        AttributeCol ac = new AttributeCol();
        ac.setAttribute( "salience" );

        ActionSetFieldCol asfc = new ActionSetFieldCol();
        asfc.setBoundName( "d1" );
        asfc.setFactField( "age" );
View Full Code Here

  }

  void doAttribs(int numOfMeta, List<AttributeCol> attributeCols, String[] row, RuleModel rm) {
    List<RuleAttribute> attribs = new ArrayList<RuleAttribute>();
    for (int j = 0; j < attributeCols.size(); j++) {
      AttributeCol at = attributeCols.get(j);
      String cell = row[j + GuidedDecisionTable.INTERNAL_ELEMENTS + numOfMeta];
      if (validCell(cell)) {
        attribs.add(new RuleAttribute(at.attr, cell));
      } else if (at.defaultValue != null) {
                attribs.add(new RuleAttribute(at.attr, at.defaultValue));               
View Full Code Here

  }

  void doAttribs(int numOfMeta, List<AttributeCol> attributeCols, String[] row, RuleModel rm) {
    List<RuleAttribute> attribs = new ArrayList<RuleAttribute>();
    for (int j = 0; j < attributeCols.size(); j++) {
      AttributeCol at = attributeCols.get(j);
      String cell = row[j + GuidedDecisionTable.INTERNAL_ELEMENTS + numOfMeta];
      if (validCell(cell)) {
        attribs.add(new RuleAttribute(at.attr, cell));
      } else if (at.defaultValue != null) {
                attribs.add(new RuleAttribute(at.attr, at.defaultValue));               
View Full Code Here

    set.setFactField( "foo" );
    dt.getActionCols().add(set);

    dt.getMetadataCols().add(new MetadataCol());

    dt.getAttributeCols().add(new AttributeCol());

    dt.getConditionCols().add(new ConditionCol());

    dt.setData( new String[][] {
        new String[] {"hola"}
View Full Code Here

    @Test
    public void test2Rules() throws Exception {
        GuidedDecisionTable dt = new GuidedDecisionTable();
        dt.setTableName( "michael" );

        AttributeCol attr = new AttributeCol();
        attr.setAttribute( "salience" );
        attr.setDefaultValue( "66" );
        dt.getAttributeCols().add( attr );

        ConditionCol con = new ConditionCol();
        con.setBoundName( "f1" );
        con.setConstraintValueType( BaseSingleFieldConstraint.TYPE_LITERAL );
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.modeldriven.dt.AttributeCol

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.