Package com.adobe.epubcheck.util

Examples of com.adobe.epubcheck.util.InvalidVersionException


        report.info(null, FeatureEnum.FORMAT_VERSION, EPUBVersion.VERSION_2.toString());
        return EPUBVersion.VERSION_2;
      }
      else if (InvalidVersionException.UNSUPPORTED_VERSION.equals(e.getMessage()))
      {
        throw new InvalidVersionException(InvalidVersionException.UNSUPPORTED_VERSION);
      }
      else if (InvalidVersionException.VERSION_ATTRIBUTE_NOT_FOUND.equals(e.getMessage()))
      {
        throw new InvalidVersionException(InvalidVersionException.VERSION_ATTRIBUTE_NOT_FOUND);
      }
      else if (InvalidVersionException.PACKAGE_ELEMENT_NOT_FOUND.equals(e.getMessage()))
      {
        throw new InvalidVersionException(InvalidVersionException.PACKAGE_ELEMENT_NOT_FOUND);
      }
      else
      {
        report.message(MessageId.RSC_005, new MessageLocation(path, -1, -1), e.getMessage());
      }
    }
    catch (IOException e)
    {
      report.message(MessageId.PKG_008, new MessageLocation(path, -1, -1), path);
    }
    throw new InvalidVersionException(InvalidVersionException.VERSION_NOT_FOUND);
  }
View Full Code Here


            version = EPUBVersion.VERSION_3;
          }
          else
          {
            outWriter.println(Messages.get("display_help"));
            throw new RuntimeException(new InvalidVersionException(
                InvalidVersionException.UNSUPPORTED_VERSION));
          }
        }
        else
        {
View Full Code Here

    } catch (IOException e)
    {
      report
          .message(MessageId.PKG_008, new MessageLocation(path, -1, -1), path);
    }
    throw new InvalidVersionException(InvalidVersionException.VERSION_NOT_FOUND);
  }
View Full Code Here

      {
        processPackage(attributes);
        isPackageRoot = true;
      } else if (!isPackageRoot)
      {
        throw new InvalidVersionException(
            InvalidVersionException.PACKAGE_ELEMENT_NOT_FOUND);
      } else if ("type".equals(localName) && EpubConstants.DCElements.equals(uri))
      {
        currentText = "";
      } else if ("identifier".equals(localName) && EpubConstants.DCElements.equals(uri)) {
View Full Code Here

      throws SAXException
    {
      String version = attributes.getValue("version");
      if (version == null)
      {
        throw new InvalidVersionException(
            InvalidVersionException.VERSION_ATTRIBUTE_NOT_FOUND);
      } else if (VERSION_3.equals(version))
      {
        builder.withVersion(EPUBVersion.VERSION_3);
      } else if (VERSION_2.equals(version))
      {
        builder.withVersion(EPUBVersion.VERSION_2);
      } else
      {
        throw new InvalidVersionException(
            InvalidVersionException.UNSUPPORTED_VERSION);
      }
      String uniqueId = attributes.getValue("unique-identifier");
      if (uniqueId != null)
        this.uniqueId  = uniqueId;
View Full Code Here

TOP

Related Classes of com.adobe.epubcheck.util.InvalidVersionException

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.