Package lupos.engine.operators.singleinput

Examples of lupos.engine.operators.singleinput.TypeErrorException


              "<http://www.w3.org/2001/XMLSchema#double>") == 0
          || tl.getType().compareTo(
              "<http://www.w3.org/2001/XMLSchema#decimal>") == 0)
        return Float.parseFloat(content);
    }
    throw new TypeErrorException();
  }
View Full Code Here


          "<http://www.w3.org/2001/XMLSchema#double>") == 0
          || tl.getType().compareTo(
              "<http://www.w3.org/2001/XMLSchema#decimal>") == 0)
        return Double.parseDouble(content);
    }
    throw new TypeErrorException();
  }
View Full Code Here

        return new BigDecimal(Double.parseDouble(content));
      if (tl.getType().compareTo(
          "<http://www.w3.org/2001/XMLSchema#decimal>") == 0)
        return new BigDecimal(content);
    }
    throw new TypeErrorException();
  }
View Full Code Here

    try {
      return getTz(getDateString(a));
    } catch (Exception e) {
      // ignore...
    }
    throw new TypeErrorException();
  }
View Full Code Here

    try {
      String timezone = getTz(getDateString(a));
      if (timezone.compareTo("\"Z\"") == 0) {
        return "\"PT0S\"";
      } else if (timezone.compareTo("\"\"") == 0) {
        throw new TypeErrorException();
      } else {
        timezone = Helper
            .unquote(timezone);
        String result = "\"";
        if (timezone.startsWith("-")) {
          result += "-";
          timezone = timezone.substring(1);
        } else if (timezone.startsWith("+")) {
          result += "+";
          timezone = timezone.substring(1);
        }
        result += "PT";
        Character c = timezone.charAt(0);
        if (Character.isDigit(c)) {
          if (c != '0') {
            result += c.toString();
          }
          timezone = timezone.substring(1);
          c = timezone.charAt(0);
          if (Character.isDigit(c)) {
            result += c.toString();
          }
          result += "H";
        }
        result += "\"";
        return result;
      }

    } catch (Exception e) {
      // ignore...
    }
    throw new TypeErrorException();
  }
View Full Code Here

        }
      }
    } catch (Exception e) {
      // ignore...
    }
    throw new TypeErrorException();
  }
View Full Code Here

  public static String getContent(TypedLiteral a) throws TypeErrorException {
    try {
      return (a).getContent().substring(1, (a).getContent().length() - 1);
    } catch (final Exception e) {
      throw new TypeErrorException();
    }
  }
View Full Code Here

  public static Date getDate(final TypedLiteral a) throws TypeErrorException {
    try {
      return getDate(getContent(a));
    } catch (final Exception e) {
      throw new TypeErrorException();
    }
  }
View Full Code Here

      if (a instanceof Date)
        return (Date) a;
      else
        return getDate((TypedLiteral) a);
    } else
      throw new TypeErrorException();
  }
View Full Code Here

    } else if (type == Double.class) {
      return getDouble(a).compareTo(getDouble(b)) == 0;
    } else if (type == BigDecimal.class) {
      return getBigDecimal(a).compareTo(getBigDecimal(b)) == 0;
    } else
      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.