RuleModel.addLhsItem
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.drools.workbench.models.datamodel.rule.RuleModel.addLhsItem (Showing top 20 results out of 315)

origin: org.drools/drools-workbench-models-datamodel-api

public void addLhsItem(final IPattern pat,
            boolean append) {
  this.addLhsItem(pat,
          append ? this.lhs.length : 0);
}
origin: org.drools/drools-workbench-models-datamodel-api

public RuleModelVisitor(IPattern pattern,
            Map<InterpolationVariable, Integer> vars) {
  this.vars = vars;
  this.model.addLhsItem(pattern);
}
origin: org.drools/drools-wb-guided-rule-editor-backend

@Override
public void addLhsItem(IPattern pat,
            boolean append) {
  model.addLhsItem(pat, append);
}
origin: org.drools/drools-wb-guided-rule-editor-backend

@Override
public void addLhsItem(IPattern pat,
            int position) {
  model.addLhsItem(pat, position);
}
origin: kiegroup/drools-wb

@Override
public void addLhsItem(IPattern pat,
            boolean append) {
  model.addLhsItem(pat, append);
}
origin: org.drools/drools-workbench-models-commons

public GeneratorContextRuleModelVisitor(final IPattern pattern,
                    final Set<InterpolationVariable> vars) {
  this.vars = vars;
  this.model.addLhsItem(pattern);
}
origin: kiegroup/drools-wb

@Override
public void addLhsItem(IPattern pat,
            int position) {
  model.addLhsItem(pat, position);
}
origin: org.drools/drools-wb-guided-rule-editor-client

private void addNewCE(String s,
           int position) {
  this.model.addLhsItem(new CompositeFactPattern(s),
             position);
}
origin: org.drools/drools-wb-guided-rule-editor-client

private void addNewDSLLhs(final DSLSentence sentence,
             int position) {
  model.addLhsItem(sentence.copy(),
           position);
}
origin: kiegroup/drools-wb

private void addNewFact(String itemText,
            int position) {
  this.model.addLhsItem(new FactPattern(itemText),
             position);
}
origin: org.drools/drools-workbench-models-commons

private int parseDslInLhs(final RuleModel m,
             final ExpandedDRLInfo expandedDRLInfo,
             int lineCounter) {
  if (expandedDRLInfo.hasDsl) {
    String dslLine = expandedDRLInfo.dslStatementsInLhs.get(lineCounter);
    while (dslLine != null) {
      m.addLhsItem(toDSLSentence(expandedDRLInfo.lhsDslPatterns,
                    dslLine));
      dslLine = expandedDRLInfo.dslStatementsInLhs.get(++lineCounter);
    }
  }
  return lineCounter;
}
origin: org.drools/drools-wb-guided-rule-editor-client

private void addNewFact(String itemText,
            int position) {
  this.model.addLhsItem(new FactPattern(itemText),
             position);
}
origin: org.drools/drools-workbench-models-commons

private int parseFreeForm(final RuleModel m,
             final ExpandedDRLInfo expandedDRLInfo,
             int lineCounter) {
  String freeForm = expandedDRLInfo.freeFormStatementsInLhs.get(lineCounter);
  while (freeForm != null) {
    FreeFormLine ffl = new FreeFormLine();
    ffl.setText(freeForm);
    m.addLhsItem(ffl);
    freeForm = expandedDRLInfo.freeFormStatementsInLhs.get(++lineCounter);
  }
  return lineCounter;
}
origin: org.drools/drools-workbench-models-guided-dtable

private boolean hasVariables(BRLConditionColumn column) {
  Map<InterpolationVariable, Integer> ivs = new HashMap<InterpolationVariable, Integer>();
  RuleModel rm = new RuleModel();
  for (IPattern pattern : column.getDefinition()) {
    rm.addLhsItem(pattern);
  }
  RuleModelVisitor rmv = new RuleModelVisitor(ivs);
  rmv.visit(rm);
  return ivs.size() > 0;
}
origin: org.drools/drools-wb-guided-rule-editor-client

  public void execute() {
    model.addLhsItem(new FreeFormLine(),
            Integer.parseInt(positionCbo.getValue(positionCbo.getSelectedIndex())));
    hide();
  }
});
origin: kiegroup/drools-wb

private Set<String> getConditionFactTypesFromRuleModel(final List<IPattern> definition) {
  final RuleModel rm = new RuleModel();
  rm.setPackageName(model.getPackageName());
  rm.setImports(model.getImports());
  for (IPattern p : definition) {
    rm.addLhsItem(p);
  }
  final GuidedRuleModelVisitor visitor = new GuidedRuleModelVisitor(rm);
  return visitor.getConsumedModelClasses();
}
origin: org.drools/drools-wb-guided-rule-editor-client

@Test
public void testValidateCompositeFactPatternFalse() throws Exception {
  CompositeFactPattern not = new CompositeFactPattern();
  not.setType("not");
  model.addLhsItem(not);
  assertFalse(validator.isValid());
  assertTrue(validator.getErrors().get(0).equals(MISSING_FACT_PATTERN));
}
origin: org.drools/drools-wb-guided-rule-editor-client

@Test
public void testValidateFactPattern() throws Exception {
  model.addLhsItem(new FactPattern());
  assertTrue(validator.isValid());
  assertTrue(validator.getErrors().isEmpty());
}
origin: kiegroup/drools-wb

@Test
public void testCloneWithUnsupportedClass() {
  RuleModel model = new RuleModel();
  model.addLhsItem( new TestFactPattern() );
  RuleModelCloneVisitor visitor = new RuleModelCloneVisitor();
  thrown.expect( RuntimeException.class );
  thrown.expectMessage( TestFactPattern.class.getSimpleName() );
  visitor.visitRuleModel( model );
}
origin: org.drools/drools-wb-guided-rule-editor-client

@Test
public void testValidateCompositeFactPatternTrue() throws Exception {
  CompositeFactPattern not = new CompositeFactPattern();
  not.setType("not");
  not.addFactPattern(new FactPattern());
  model.addLhsItem(not);
  assertTrue(validator.isValid());
  assertTrue(validator.getErrors().isEmpty());
}
org.drools.workbench.models.datamodel.ruleRuleModeladdLhsItem

Popular methods of RuleModel

  • <init>
  • addRhsItem
  • addMetadata
    Add metaData
  • getLHSBindingType
  • addAttribute
  • getAllLHSVariables
    This will get a list of all LHS bound variables, including bound fields..
  • getAllRHSVariables
    This will get a list of all RHS bound variables.
  • getImports
  • getLHSBoundField
  • getRHSBoundFacts
    This will return a List of all ActionInsertFact bindings
  • isBoundFactUsed
  • getAllVariables
    This will get a list of all bound variables (LHS and RHS), including bound fields..
  • isBoundFactUsed,
  • getAllVariables,
  • getBoundVariablesInScope,
  • getLHSBoundFact,
  • getLHSBoundFacts,
  • getLHSParentFactPatternForBinding,
  • getLHSVariables,
  • getPackageName,
  • getRHSBoundFact

Popular in Java

  • Reading from database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setScale (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • JButton (javax.swing)
  • JOptionPane (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)