Package org.apache.ws.jaxme.impl

Examples of org.apache.ws.jaxme.impl.DatatypeConverterImpl


    public JavaQName getRuntimeType(SimpleTypeSG pController) { return CALENDAR_TYPE; }

    public TypedValue getCastFromString(SimpleTypeSG pController, String pValue)
      throws SAXException {
    try {
      Calendar calendar = new DatatypeConverterImpl().parseDate(pValue);
      return new TypedValueImpl(
          new Object[] { "new java.util.GregorianCalendar("
              + calendar.get(Calendar.YEAR) + ","
              + calendar.get(Calendar.MONTH) + ","
              + calendar.get(Calendar.DAY_OF_MONTH) + ")" },
View Full Code Here


  public JavaQName getRuntimeType(SimpleTypeSG pController) { return INTEGER_TYPE; }
  protected String getDatatypeName() { return "Integer"; }

  public Object getCastFromString(SimpleTypeSG pController, String pValue) throws SAXException {
    try {
      return new DatatypeConverterImpl().parseInteger(pValue);
    } catch (NumberFormatException e) {
      throw new LocSAXException("Failed to convert string value to BigInteger: " + pValue, getLocator());
    }
  }
View Full Code Here

    return f;
  }

  public Object getCastFromString(SimpleTypeSG pController, String pValue) throws SAXException {
    try {
      return new DatatypeConverterImpl().parseDuration(pValue);
    } catch (RuntimeException e) {
      throw new LocSAXException("Failed to convert string value to dateTime instance: " + pValue, getLocator());
    }
  }
View Full Code Here

  protected JavaQName getObjectRuntimeType(SimpleTypeSG pController) { return FLOAT_OBJECT_TYPE; }
  protected String getDatatypeName() { return "Float"; }

  public Object getCastFromString(SimpleTypeSG pController, String pValue) throws SAXException {
    try {
      return new Float(new DatatypeConverterImpl().parseFloat(pValue)) + "f";
    } catch (NumberFormatException e) {
      throw new LocSAXException("Failed to convert string value to float: " + pValue, getLocator());
    }
  }
View Full Code Here

  protected String getDatatypeName() { return "DateTime"; }
  public JavaQName getRuntimeType(SimpleTypeSG pController) { return CALENDAR_TYPE; }

  public Object getCastFromString(SimpleTypeSG pController, String pValue) throws SAXException {
    return new DatatypeConverterImpl().parseDateTime(pValue);
  }
View Full Code Here

  public JavaQName getRuntimeType(SimpleTypeSG pController) { return DECIMAL_TYPE; }
  protected String getDatatypeName() { return "Decimal"; }

  public Object getCastFromString(SimpleTypeSG pController, String pValue) throws SAXException {
    try {
      return new DatatypeConverterImpl().parseDecimal(pValue);
    } catch (NumberFormatException e) {
      throw new LocSAXException("Failed to convert string value to BigInteger: " + pValue, getLocator());
    }
  }
View Full Code Here

  protected String getDatatypeName() { return "Date"; }

  public Object getCastFromString(SimpleTypeSG pController, String pValue) throws SAXException {
    try {
      return new DatatypeConverterImpl().parseDate(pValue);
    } catch (RuntimeException e) {
      throw new LocSAXException("Failed to convert string value to date instance: " + pValue, getLocator());
    }
  }
View Full Code Here

  protected boolean isUnsigned() { return true; }
  protected String getDatatypeName() { return "UnsignedInt"; }

  public Object getCastFromString(SimpleTypeSG pController, String pValue) throws SAXException {
    try {
      return new Long(new DatatypeConverterImpl().parseUnsignedInt(pValue));
    } catch (NumberFormatException e) {
      throw new LocSAXException("Failed to convert string value to unsigned integer: " + pValue, getLocator());
    }
  }
View Full Code Here

  protected JavaQName getObjectRuntimeType(SimpleTypeSG pController) { return SHORT_OBJECT_TYPE; }
  protected String getDatatypeName() { return "Short"; }

  public Object getCastFromString(SimpleTypeSG pController, String pValue) throws SAXException {
    try {
      return new Object[]{"((", SHORT_TYPE, ")", new Short(new DatatypeConverterImpl().parseShort(pValue)), ")"};
    } catch (NumberFormatException e) {
      throw new LocSAXException("Failed to convert string value to short: " + pValue, getLocator());
    }
  }
View Full Code Here

  protected JavaQName getObjectRuntimeType(SimpleTypeSG pController) { return INT_OBJECT_TYPE; }
  protected String getDatatypeName() { return "Int"; }

  public Object getCastFromString(SimpleTypeSG pController, String pValue) throws SAXException {
    try {
      return new Integer(new DatatypeConverterImpl().parseInt(pValue));
    } catch (NumberFormatException e) {
      Locator locator;
      try {
        locator = getLocator();
      } catch (Exception f) {
View Full Code Here

TOP

Related Classes of org.apache.ws.jaxme.impl.DatatypeConverterImpl

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.