Package org.apache.ws.jaxme.xs.parser.impl

Examples of org.apache.ws.jaxme.xs.parser.impl.LocSAXException


  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


  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

  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

  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

  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

  public JavaQName getPMName() { return pmName; }

  protected static String getClassNameFromLocalName(Locator pLocator, String pLocalName,
                                                      SchemaSG pSchemaSG) throws SAXException {
    if (pLocalName == null  ||  pLocalName.length() == 0) {
      throw new LocSAXException("Invalid local name: " + pLocalName, pLocator);
    }
    return JavaNamer.convert(pLocalName, pSchemaSG);
  }
View Full Code Here

    return sb.toString();
  }
 
  protected static String getPackageNameFromURI(Locator pLocator, String pURI) throws SAXException {
    if (pURI == null  ||  pURI.length() == 0) {
      throw new LocSAXException("Unable to derive package name from an empty namespace URI. Use the schemaBindings to specify a package name.", pLocator);
    }
    try {
      URL url = new java.net.URL(pURI);
      return getPackageNameFromURL(url);
    } catch (MalformedURLException e) {
      throw new LocSAXException("Unable to derive package name from an URI, which is no URL: " + pURI,
                                 pLocator);
    }
  }
View Full Code Here

  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

      try {
        locator = getLocator();
      } catch (Exception f) {
        throw new SAXException("Failed to convert string value to integer: " + pValue);
      }
      throw new LocSAXException("Failed to convert string value to integer: " + pValue, locator);
    }
  }
View Full Code Here

  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

TOP

Related Classes of org.apache.ws.jaxme.xs.parser.impl.LocSAXException

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.