Examples of DatatypeConverterImpl


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

  protected JavaQName getObjectRuntimeType(SimpleTypeSG pController) { return DOUBLE_OBJECT_TYPE; }
  protected String getDatatypeName() { return "Double"; }

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

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

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

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

      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

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

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

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

  protected JavaQName getObjectRuntimeType(SimpleTypeSG pController) { return LONG_OBJECT_TYPE; }
  protected String getDatatypeName() { return "Long"; }

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

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

  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

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

  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

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

  public JavaQName getPrimitiveRuntimeType(SimpleTypeSG pController) { return BOOLEAN_TYPE; }
  protected JavaQName getObjectRuntimeType(SimpleTypeSG pController) { return BOOLEAN_OBJECT_TYPE; }

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

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

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

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

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

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
TOP
Copyright © 2018 www.massapi.com. 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.