Package lupos.engine.operators.singleinput

Examples of lupos.engine.operators.singleinput.TypeErrorException


    else if (o instanceof TypedLiteral) {
      return ((TypedLiteral) o).getContent();
    } else if (o instanceof LanguageTaggedLiteral) {
      return ((LanguageTaggedLiteral) o).getContent();
    }
    throw new TypeErrorException();
  }
View Full Code Here


    if (literal instanceof TypedLiteral) {
      try {
        return LiteralFactory.createTypedLiteral(quote(content),
            ((TypedLiteral) literal).getTypeLiteral());
      } catch (URISyntaxException e) {
        throw new TypeErrorException();
      }
    } else if (literal instanceof LanguageTaggedLiteral) {
      return LiteralFactory.createLanguageTaggedLiteral(quote(content),
          ((LanguageTaggedLiteral) literal).getOriginalLanguage());
    } else {
View Full Code Here

  }

  @Override
  public Object evaluate(final ASTOrNode node, final Bindings b, final Map<Node, Object> d) throws NotBoundException, TypeErrorException {
    NotBoundException _exceptionNB = null;
    TypeErrorException _exceptionTE = null;
    try {
      if (Helper.booleanEffectiveValue(node.jjtGetChild(0).accept(this, b, d))) {
        return true;
      }
    } catch (final NotBoundException nbe) {
View Full Code Here

    } else if (operand[1] == Double.class) {
      return -1 * Helper.getDouble(operand[0]);
    } else if (operand[1] == BigDecimal.class) {
      return Helper.getBigDecimal(operand[0]).negate();
    }
    throw new TypeErrorException();
  }
View Full Code Here

    if (o instanceof LanguageTaggedLiteral) {
      return "\"" + ((LanguageTaggedLiteral) o).getOriginalLanguage() + "\"";
    } else if (o instanceof TypedLiteral || o instanceof CodeMapLiteral || o instanceof StringLiteral) {
      return "\"\"";
    } else {
      throw new TypeErrorException();
    }
  }
View Full Code Here

      } catch (final URISyntaxException e) {
        System.err.println(e);
        e.printStackTrace();
      }
    }
      throw new TypeErrorException();
  }
View Full Code Here

    if(o instanceof TypedLiteral){
      final TypedLiteral tl = (TypedLiteral) o;
      if(tl.getType().compareTo("<http://www.w3.org/2001/XMLSchema#string>")==0) {
        o = tl.getContent();
      } else {
        throw new TypeErrorException();
      }
    }
    if(o instanceof String || o instanceof StringLiteral || o instanceof CodeMapLiteral){
      try {
        String s = Helper.trim(o.toString());
        if(s.startsWith("'") || s.startsWith("\"")) {
          s=s.substring(1, s.length()-1);
        }
        return LiteralFactory.createURILiteral("<"+s+">");
      } catch (final URISyntaxException e) {
        throw new TypeErrorException();
      }
    }
    throw new TypeErrorException();
  }
View Full Code Here

    final Object arg1 = Helper.unlazy(this.resultOfChildOne(node, b, d));
    try {
      return LiteralFactory.createTypedLiteral("\""
          + Helper.getSimpleString(arg0) + "\"", Helper.getString(arg1));
    } catch (final URISyntaxException e) {
      throw new TypeErrorException();
    }
  }
View Full Code Here

      return Math.abs(Helper.getFloat(o));
    }
    if (type == BigDecimal.class) {
      return Helper.getBigDecimal(o).abs();
    }
    throw new TypeErrorException();
  }
View Full Code Here

    }
    if (type == BigDecimal.class) {
      final BigDecimal bd = Helper.getBigDecimal(o);
      return bd.setScale(0, RoundingMode.CEILING);
    }
    throw new TypeErrorException();
  }
View Full Code Here

TOP

Related Classes of lupos.engine.operators.singleinput.TypeErrorException

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.