Package lupos.rif

Examples of lupos.rif.RIFException


    try {
      return LiteralFactory.createTypedLiteralWithoutLazyLiteral("\""
          + value.toString() + "\"",
          "<http://www.w3.org/2001/XMLSchema#" + type + ">");
    } catch (URISyntaxException e) {
      throw new RIFException(e.getMessage());
    }
  }
View Full Code Here


          .createTypedLiteralWithoutLazyLiteral(
              "\"" + value.toString() + "\"",
              "<http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                  + type + ">");
    } catch (URISyntaxException e) {
      throw new RIFException(e.getMessage());
    }
  }
View Full Code Here

  public Object evaluate(Bindings binding, Object optionalResult, Multimap<IExpression, IExpression> equalities) {
    final URILiteral name = (URILiteral) ((Constant) termName).getLiteral();
    // Definiert?
    if (!RIFBuiltinFactory.isDefined(name))
      throw new RIFException("Builtin " + name.toString()
          + " not defined!");
    // Bindung notwendig?
    // if (!doBind
    // && !(Sets
    // .intersection(getVariables(), binding.getVariableSet())
View Full Code Here

        // Linke ungebunden, muss allein stehen
        if (rightExpr instanceof RuleVariable)
          rightAssign = true;
      }
    if (rightAssign && leftAssign)
      throw new RIFException("All Variables in Assignment " + toString()
          + " are unbound!");
    if (rightAssign ^ leftAssign) {
      // Einzelne ungebundene variable auf einer seite, dann einfach die
      // andere auswerten und ergebniss reinschreiben
      Literal assignValue = (Literal) (leftAssign ? rightExpr
View Full Code Here

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

  public Object evaluate(Bindings binding, Object optionalResult) {
    return evaluate(binding, optionalResult, null);
  }

  public Object evaluate(Bindings binding, Object result, Multimap<IExpression, IExpression> equalities) {
    throw new RIFException("Exists not supported in Evaluation!");
  }
View Full Code Here

            term.termName = new Constant(
                LiteralFactory
                    .createURILiteralWithoutLazyLiteral("<http://www.w3.org/2000/01/rdf-schema#subClassOf>"),
                term);
        } catch (URISyntaxException e) {
          throw new RIFException(e.getMessage());
        }
        return term;
      }
      final Equality comp = new Equality();
      comp.setParent(argu);
View Full Code Here

    var.setParent(argu);
    return var;
  }

  public Object visit(final RIFImport n, final IRuleNode argu) {
    throw new RIFException("IMPORT not supported!");
  }
View Full Code Here

    Literal literal;
    try {
      literal = LiteralFactory.createTypedLiteralWithoutLazyLiteral(content.toString(),
          type.toString());
    } catch (final URISyntaxException e) {
      throw new RIFException(e.getMessage());
    }
    return new Constant(literal, argu);
  }
View Full Code Here

    final String content = (String) n.f0.accept(this, argu);
    Literal literal = null;
    final String[] parts = content.split(":");
    if (parts[0].equals("")) {
      if (baseNamespace == null)
        throw new RIFException("Literal " + content
            + " requires Declaration of BASE!");
      try {
        literal = LiteralFactory.createURILiteralWithoutLazyLiteral("<" + baseNamespace
            + parts[1] + ">");
      } catch (final URISyntaxException e) {
        throw new RIFException(e.toString());
      }
    } else {
      if (!prefixMap.containsKey(parts[0]))
        throw new RIFException("Undeclared Prefix " + parts[0]);
      try {
        literal = LiteralFactory.createURILiteralWithoutLazyLiteral("<"
            + prefixMap.get(parts[0]) + parts[1] + ">");
      } catch (final URISyntaxException e) {
        throw new RIFException(e.toString());
      }
    }
    return new Constant(literal, argu);
  }
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.