Package org.apache.ws.jaxme.impl

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


  public JavaQName getRuntimeType(SimpleTypeSG pController) { return BYTE_ARRAY_TYPE; }
  protected String getDatatypeName() { return "Base64Binary"; }

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


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

  public Object getCastFromString(SimpleTypeSG pController, String pValue) throws SAXException {
    try {
      return new Integer(new DatatypeConverterImpl().parseUnsignedShort(pValue));
    } catch (NumberFormatException e) {
      throw new LocSAXException("Failed to convert string value to unsigned short: " + pValue, getLocator());
    }
  }
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 new Object[]{DURATION_TYPE, ".valueOf(", pValue, ")"};
  }

  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"; }
    protected Class getFormatClass() { return XsDateTimeFormat.class; }
    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"; }
  protected Class getFormatClass() { return XsDateFormat.class; }
 
  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 String getDatatypeName() { return "Time"; }
  protected Class getFormatClass() { return XsTimeFormat.class; }
 
  public Object getCastFromString(SimpleTypeSG pController, String pValue) throws SAXException {
    try {
      return new DatatypeConverterImpl().parseTime(pValue);
    } catch (RuntimeException e) {
      throw new LocSAXException("Failed to convert string value to time instance: " + pValue, getLocator());
    }
  }
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.