Package org.apache.ws.jaxme.impl

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


  protected JavaQName getDatatypeType() { return CALENDAR_TYPE; }
    protected Class getFormatClass() { return XsDateTimeFormat.class; }
    public JavaQName getRuntimeType(SimpleTypeSG pController) { return CALENDAR_TYPE; }

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


public class DefaultValueTest extends Assert {

    @Test
    public void testFooDefaultValues() throws Exception {

        DatatypeConverter.setDatatypeConverter(new DatatypeConverterImpl());
       
        Foo foo = new org.apache.cxf.configuration.foo.ObjectFactory().createFoo();

        // verify default values
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 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

  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 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

      "<ex:DurationElem>P1Y2M3DT4H5M6.7S</ex:DurationElem>" +
      "<ex:HexBinaryElem>0111234E739DBBFF</ex:HexBinaryElem>" +
      "<ex:Base64BinaryElem>AREjTnOdu/8=</ex:Base64BinaryElem>" +
      "<ex:NmTokenElem>a-name-token</ex:NmTokenElem>" +
      "<ex:NmTokensElem>a-name-token another:name-token</ex:NmTokensElem>" +
      "<ex:DecimalElem>" + new DatatypeConverterImpl().printDecimal(newBigDecimal()) + "</ex:DecimalElem>" +
      "<ex:IntegerElem>-602300000000000000000000</ex:IntegerElem>" +
      "<ex:NonNegativeIntegerElem>101</ex:NonNegativeIntegerElem>" +
      "<ex:PositiveIntegerElem>602300000000000000000000</ex:PositiveIntegerElem>" +
      "<ex:NonPositiveIntegerElem>-21714</ex:NonPositiveIntegerElem>" +
      "<ex:NegativeIntegerElem>-21714</ex:NegativeIntegerElem>" +
View Full Code Here

      sep2 + "<ex:DurationElem>P1Y2M3DT4H5M6.7S</ex:DurationElem>" + lf +
      sep2 + "<ex:HexBinaryElem>0111234E739DBBFF</ex:HexBinaryElem>" + lf +
      sep2 + "<ex:Base64BinaryElem>AREjTnOdu/8=</ex:Base64BinaryElem>" + lf +
      sep2 + "<ex:NmTokenElem>a-name-token</ex:NmTokenElem>" + lf +
      sep2 + "<ex:NmTokensElem>a-name-token another:name-token</ex:NmTokensElem>" + lf +
      sep2 + "<ex:DecimalElem>" + new DatatypeConverterImpl().printDecimal(newBigDecimal()) + "</ex:DecimalElem>" + lf +
      sep2 + "<ex:IntegerElem>-602300000000000000000000</ex:IntegerElem>" + lf +
      sep2 + "<ex:NonNegativeIntegerElem>101</ex:NonNegativeIntegerElem>" + lf +
      sep2 + "<ex:PositiveIntegerElem>602300000000000000000000</ex:PositiveIntegerElem>" + lf +
      sep2 + "<ex:NonPositiveIntegerElem>-21714</ex:NonPositiveIntegerElem>" + lf +
      sep2 + "<ex:NegativeIntegerElem>-21714</ex:NegativeIntegerElem>" + lf +
View Full Code Here

      "<ex:DurationElem>P1Y2M3DT4H5M6.7S</ex:DurationElem>",
      "<ex:HexBinaryElem>0111234E739DBBFF</ex:HexBinaryElem>",
      "<ex:Base64BinaryElem>AREjTnOdu/8=</ex:Base64BinaryElem>",
      "<ex:NmTokenElem>a-name-token</ex:NmTokenElem>",
      "<ex:NmTokensElem>a-name-token another:name-token</ex:NmTokensElem>",
      "<ex:DecimalElem>" + new DatatypeConverterImpl().printDecimal(newBigDecimal()) + "</ex:DecimalElem>",
      "<ex:IntegerElem>-602300000000000000000000</ex:IntegerElem>",
      "<ex:NonNegativeIntegerElem>101</ex:NonNegativeIntegerElem>",
      "<ex:PositiveIntegerElem>602300000000000000000000</ex:PositiveIntegerElem>",
      "<ex:NonPositiveIntegerElem>-21714</ex:NonPositiveIntegerElem>",
      "<ex:NegativeIntegerElem>-21714</ex:NegativeIntegerElem>",
View Full Code Here

    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

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.