Package lupos.rif

Examples of lupos.rif.RIFException


    Literal literal;
    try {
      literal = LiteralFactory.createTypedLiteralWithoutLazyLiteral("\"" + content + "\"",
          "<http://www.w3.org/2001/XMLSchema#integer>");
    } catch (final URISyntaxException e) {
      throw new RIFException(e.toString());
    }
    return new Constant(literal, argu);
  }
View Full Code Here


    if (content.contains("e") || content.contains("E"))
      try {
        literal = LiteralFactory.createTypedLiteralWithoutLazyLiteral("\"" + content
            + "\"", "<http://www.w3.org/2001/XMLSchema#double>");
      } catch (final URISyntaxException e) {
        throw new RIFException(e.toString());
      }
    else
      try {
        literal = LiteralFactory.createTypedLiteralWithoutLazyLiteral("\"" + content
            + "\"", "<http://www.w3.org/2001/XMLSchema#decimal>");
      } catch (final URISyntaxException e) {
        throw new RIFException(e.toString());
      }
    return new Constant(literal, argu);
  }
View Full Code Here

    final String uriRef = (String) n.f0.accept(this, argu);
    Literal literal;
    try {
      literal = LiteralFactory.createURILiteralWithoutLazyLiteral(uriRef);
    } catch (final URISyntaxException e) {
      throw new RIFException(e.toString());
    }
    return new Constant(literal, argu);
  }
View Full Code Here

      pred.termName = new Constant((Literal) this.termName.evaluate(binding),
          pred);
      for (final IExpression expr : this.termParams) {
        final Object obj = expr.evaluate(binding);
        if (obj instanceof Variable) {
          throw new RIFException("Unbound Variable " + obj
              + " while evaluating " + this.toString());
        } else if (obj instanceof Literal) {
          pred.termParams.add(new Constant((Literal) obj, pred));
        } else {
          pred.termParams.add((IExpression) obj);
View Full Code Here

      Object result = expr.evaluate(binding);
      if (result instanceof BooleanLiteral) {
        if (!((BooleanLiteral) result).value)
          return result;
      } else
        throw new RIFException(
        "In Conjunction, only Boolean Resulttypes are allowed!");
    }
    return BooleanLiteral.create(true);
  }
View Full Code Here

  public void addItem(final IExpression expr) {
    if (!(expr instanceof AbstractExpressionContainer))
      items.add(expr);
    else
      throw new RIFException("And() and Or() forbidden in Lists!");
  }
View Full Code Here

        conjunction.addExpr(next);
        currentVariableScope.addVariable(new RuleVariable(itVar));
      }
      return conjunction;
    } catch (URISyntaxException e) {
      throw new RIFException(e.getMessage());
    }
  }
View Full Code Here

    try {
      return (Iterator<Literal>) methodToCall.invoke(null, args);
    } catch (final Exception e) {
      System.err.println(e);
      e.printStackTrace();
      throw new RIFException(e.getMessage());
    }
  }
View Full Code Here

    try {
      return method.invoke(null, arg);
    } catch (final Exception e) {
      System.err.println(e);
      e.printStackTrace();
      throw new RIFException(e.getMessage());
    }
  }
View Full Code Here

  public static BooleanLiteral create(boolean value) {
    try {
      return new BooleanLiteral(value);
    } catch (URISyntaxException e) {
      throw new RIFException(e.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of lupos.rif.RIFException

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.