Package org.drools.guvnor.client.modeldriven.dt

Examples of org.drools.guvnor.client.modeldriven.dt.MetadataCol


 
  void doMetadata(List<MetadataCol> metadataCols, String[] row, RuleModel rm) {
    List<RuleMetadata> metadataList = new ArrayList<RuleMetadata>();
   
    for (int j = 0;j < metadataCols.size(); j++) {
      MetadataCol meta = metadataCols.get(j);
      String cell = row[j + 2];
      if (validCell(cell)) {
        metadataList.add(new RuleMetadata(meta.attr, cell));
      }
    }
View Full Code Here


    p.doMetadata(metadataCols, row, rm);
//    p.doAttribs(0,metadataCols, row, rm);

    assertSame(orig, rm.metadataList);

    MetadataCol col1 = new MetadataCol();
    col1.attr = "foo";
    MetadataCol col2 = new MetadataCol();
    col2.attr = "foo2";
    metadataCols.add(col1);
    metadataCols.add(col2);

    p.doMetadata(metadataCols, row, rm);
View Full Code Here

    // setup temp list
    List<RuleMetadata> metadataList = new ArrayList<RuleMetadata>();

    for (int j = 0; j < metadataCols.size(); j++) {
      MetadataCol meta = metadataCols.get(j);
      String cell = row[j + GuidedDecisionTable.INTERNAL_ELEMENTS];
      if (validCell(cell)) {
        metadataList.add(new RuleMetadata(meta.attr, cell));
      }
    }
View Full Code Here

    // setup temp list
    List<RuleMetadata> metadataList = new ArrayList<RuleMetadata>();

    for (int j = 0; j < metadataCols.size(); j++) {
      MetadataCol meta = metadataCols.get(j);
      String cell = row[j + GuidedDecisionTable.INTERNAL_ELEMENTS];
      if (validCell(cell)) {
        metadataList.add(new RuleMetadata(meta.attr, cell));
      }
    }
View Full Code Here

    // setup temp list
    List<RuleMetadata> metadataList = new ArrayList<RuleMetadata>();

    for (int j = 0; j < metadataCols.size(); j++) {
      MetadataCol meta = metadataCols.get(j);
      String cell = row[j + GuidedDecisionTable.INTERNAL_ELEMENTS];
      if (validCell(cell)) {
        metadataList.add(new RuleMetadata(meta.attr, cell));
      }
    }
View Full Code Here

    p.doMetadata(metadataCols, row, rm);
//    p.doAttribs(0,metadataCols, row, rm);

    assertSame(orig, rm.metadataList);

    MetadataCol col1 = new MetadataCol();
    col1.attr = "foo";
    MetadataCol col2 = new MetadataCol();
    col2.attr = "foo2";
    metadataCols.add(col1);
    metadataCols.add(col2);

    p.doMetadata(metadataCols, row, rm);
View Full Code Here

    dt.actionCols.add(new ActionInsertFactCol());
    ActionSetFieldCol set = new ActionSetFieldCol();
    set.factField = "foo";
    dt.actionCols.add(set);

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

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

    dt.conditionCols.add(new ConditionCol());
View Full Code Here

    list.addItem(constants.Description(), "desc"); //NON-NLS
    if(dt.getMetadataCols() == null){
      dt.setMetadataCols(new ArrayList<MetadataCol>());
    }
    for (Iterator iterator = dt.getMetadataCols().iterator(); iterator.hasNext();) {
      MetadataCol c = (MetadataCol) iterator.next();
      list.addItem(c.attr, c.attr);
      if (c.attr.equals(dt.groupField)) {
        list.setSelectedIndex(list.getItemCount() - 1);
      }
    }
View Full Code Here

      hp.add(new HTML("&nbsp;&nbsp;")); //NON-NLS
      hp.add(new SmallLabel(constants.Metadata()));
      attributeConfigWidget.add(hp);
    }
    for (int i = 0; i < dt.getMetadataCols().size(); i++) {
      MetadataCol at = (MetadataCol) dt.getMetadataCols().get(i);
      HorizontalPanel hp = new HorizontalPanel();
      hp.add(new HTML("&nbsp;&nbsp;&nbsp;&nbsp;")); //NON-NLS
      hp.add(removeMeta(at));
      hp.add(new SmallLabel(at.attr));
      attributeConfigWidget.add(hp);
View Full Code Here

            addbutton.setTitle(constants.AddMetadataToTheRule());

            addbutton.addClickListener( new ClickListener() {
                public void onClick(Widget w) {
                  MetadataCol met = new MetadataCol();
                  met.attr = box.getText();
                  dt.getMetadataCols().add(met);
                  scrapeData(dt.getMetadataCols().size() + 1);
            refreshGrid();
            refreshAttributeWidget();
View Full Code Here

TOP

Related Classes of org.drools.guvnor.client.modeldriven.dt.MetadataCol

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.