Package org.apache.wookie.w3c.exceptions

Examples of org.apache.wookie.w3c.exceptions.BadManifestException


      } catch (InvalidStartFileException e) {
        throw e;
      } catch (BadManifestException e) {
        throw e;
      } catch (Exception e){
        throw new BadManifestException(e);
      }
    }
    else{
      // no manifest file found in zip archive
      throw new BadWidgetZipFileException(); //$NON-NLS-1$
View Full Code Here


    SAXBuilder builder = new SAXBuilder();
    Element root;
    try {
      root = builder.build(new StringReader(xmlText)).getRootElement();
    } catch (Exception e) {
      throw new BadManifestException("Config.xml is not well-formed XML");
    }       
    fromXML(root,locales)
   
    // Add default icons
    for (String iconpath:WidgetPackageUtils.getDefaults(zip, locales,IW3CXMLConfiguration.DEFAULT_ICON_FILES)){
View Full Code Here

  @SuppressWarnings("deprecation")
  public void fromXML(Element element, String[] locales) throws BadManifestException {           
    // check the namespace uri
    if(!element.getNamespace().getURI().equals(IW3CXMLConfiguration.MANIFEST_NAMESPACE)){     
      throw new BadManifestException("'"+element.getNamespace().getURI()
          + "' is a bad namespace. (Should be '" + IW3CXMLConfiguration.MANIFEST_NAMESPACE +"')");
    }       
    // IDENTIFIER IS OPTIONAL
    fIdentifier = element.getAttributeValue(IW3CXMLConfiguration.ID_ATTRIBUTE);
    if(fIdentifier == null){
View Full Code Here

      fName = null;
    } else {
      // Not a valid IRI?
      if (!IRIValidator.isValidIRI(fName)){
        if (fRequired) {
          throw new BadManifestException("Feature name is not a valid IRI");
        } else {
          fName = null
        }
      }
      // Not supported?
      boolean supported = false;
      if (fName != null){
        for (String supportedFeature: features){
          if(fName.equalsIgnoreCase(supportedFeature)) supported = true;
        }
      }
      if (!supported){
        if (fRequired){
          throw new BadManifestException("Required feature is not supported");
        } else {
          fName = null;
        }
      } 
    }
View Full Code Here

      } catch (InvalidStartFileException e) {
        throw e;
      } catch (BadManifestException e) {
        throw e;
      } catch (Exception e){
        throw new BadManifestException(e);
      } finally
          try {
            zip.close();
          } catch (IOException e) {
            _logger.error("Unable to close wgt file:" + e.getMessage());
View Full Code Here

TOP

Related Classes of org.apache.wookie.w3c.exceptions.BadManifestException

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.