Examples of addExpr()


Examples of lupos.rif.model.AbstractExpressionContainer.addExpr()

      term.termParams
          .add((IExpression) nodeSeq.get(2).accept(this, term));
      if (args.size() == 1)
        return term;
      else
        and.addExpr(term);
    }
    return and;
  }

  public Object visit(RIFConclusion n, IRuleNode argu) {
View Full Code Here

Examples of lupos.rif.model.Conjunction.addExpr()

    else {
      // And-verknuepfte Aussagen   
      final Conjunction conj = new Conjunction();
      conj.setParent(parent);
      for (final INode node : (List<INode>) ((List<INode>) n.f0.choice.accept(this, argu)).get(2).accept(this, argu))
        conj.addExpr((IExpression) node.accept(this, argu));
      if (!conj.isEmpty())
        parent.setHead(conj);
    }
    if (n.f1.present()){
      List<INode> bodyList = (List<INode>) n.f1.node.accept(this, argu);
View Full Code Here

Examples of lupos.rif.model.Conjunction.addExpr()

          .accept(this, argu)).get(2);
      final Conjunction conj = new Conjunction();
      conj.setParent(argu);
      for (final INode node : (List<INode>) andFormulas
          .accept(this, conj))
        conj.addExpr((IExpression) node.accept(this, conj));
      return conj;
    case 1:
      final NodeListOptional orFormulas = (NodeListOptional) ((List<INode>) n.f0.choice
          .accept(this, argu)).get(2);
      final Disjunction disj = new Disjunction();
View Full Code Here

Examples of lupos.rif.model.Conjunction.addExpr()

      term.termParams
          .add((IExpression) nodeSeq.get(2).accept(this, term));
      if (args.size() == 1)
        return term;
      else
        and.addExpr(term);
    }
    return and;
  }

  public Object visit(RIFConclusion n, IRuleNode argu) {
View Full Code Here

Examples of lupos.rif.model.Conjunction.addExpr()

      if (result instanceof Conjunction) {
        conjunction = conjunction == null ? new Conjunction()
            : conjunction;
        for (IExpression item : ((Conjunction) result).exprs)
          if (item instanceof RulePredicate)
            conjunction.addExpr(item);
          else if (item instanceof RuleVariable)
            obj.termParams.add(item);
      } else
        obj.termParams.add((IExpression) result);
    }
View Full Code Here

Examples of lupos.rif.model.Conjunction.addExpr()

            obj.termParams.add(item);
      } else
        obj.termParams.add((IExpression) result);
    }
    if (conjunction != null)
      conjunction.addExpr(obj);
    return conjunction == null ? obj : conjunction;
  }

  public IRuleNode visit(RuleList obj, IRuleNode arg) throws RIFException {
    try {
View Full Code Here

Examples of lupos.rif.model.Conjunction.addExpr()

      Conjunction conjunction = new Conjunction();
      conjunction.setParent(arg);
      int iteration = 0;
      //Listenidentifikator erstellen
      String baseName = aliasString + "list" + listCtr++ + "it";
      conjunction.addExpr(new RuleVariable(baseName + iteration));
      int ctr = obj.getItems().size();
      for (IExpression expr : obj.getItems()) {
        ctr--;
        IRuleNode result = expr.accept(this, conjunction);
        final String itVar = baseName + iteration++;
View Full Code Here

Examples of lupos.rif.model.Conjunction.addExpr()

        final String itVar = baseName + iteration++;
        if (result instanceof Conjunction) {
          for (IExpression item : new ArrayList<IExpression>(
              ((Conjunction) result).exprs))
            if (item instanceof RulePredicate)
              conjunction.addExpr(item);
            else if (item instanceof RuleVariable)
              result = item;
        }
        final RulePredicate item = new RulePredicate(
            new RuleVariable(itVar),
View Full Code Here

Examples of lupos.rif.model.Conjunction.addExpr()

            new RuleVariable(itVar),
            new Constant(
                LiteralFactory
                    .createURILiteral("<http://www.w3.org/1999/02/22-rdf-syntax-ns#first>"),
                arg), (IExpression) result);
        conjunction.addExpr(item);
        final RulePredicate next = new RulePredicate(
            new RuleVariable(itVar),
            new Constant(
                LiteralFactory
                    .createURILiteral("<http://www.w3.org/1999/02/22-rdf-syntax-ns#rest>"),
View Full Code Here

Examples of lupos.rif.model.Conjunction.addExpr()

            ctr == 0 ? new Constant(
                LiteralFactory
                    .createURILiteral("<http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>"),
                arg)
                : new RuleVariable(baseName + iteration));
        conjunction.addExpr(next);
        currentVariableScope.addVariable(new RuleVariable(itVar));
      }
      return conjunction;
    } catch (URISyntaxException e) {
      throw new RIFException(e.getMessage());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.