Class EpubCheck

  • All Implemented Interfaces:
    Checker

    public class EpubCheck
    extends java.lang.Object
    implements Checker
    Public interface to epub validator.
    • Constructor Summary

      Constructors 
      Constructor Description
      EpubCheck​(java.io.File epubFile)
      Create an epub validator to validate the given file.
      EpubCheck​(java.io.File epubFile, Report report)
      Create an epub validator to validate the given file and report issues to a given Report object.
      EpubCheck​(java.io.File epubFile, Report report, EPUBProfile profile)
      Create an epub validator to validate the given file and report issues to a given Report object.
      EpubCheck​(java.io.File epubFile, java.io.PrintWriter out)
      Create an epub validator to validate the given file.
      EpubCheck​(java.io.InputStream inputStream, Report report, java.lang.String uri)  
      EpubCheck​(java.io.InputStream inputStream, Report report, java.lang.String uri, EPUBProfile profile)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String buildDate()  
      void check()
      Validate the file.
      int doValidate()  
      void setLocale​(java.util.Locale locale)
      Allows for a per-instance override of the locale, if supported by the underlying Report.
      static java.lang.String version()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • VERSION

        private static java.lang.String VERSION
      • BUILD_DATE

        private static java.lang.String BUILD_DATE
      • epubFile

        private final java.io.File epubFile
      • report

        private final Report report
    • Constructor Detail

      • EpubCheck

        public EpubCheck​(java.io.File epubFile)
        Create an epub validator to validate the given file. Issues will be reported to standard error.
      • EpubCheck

        public EpubCheck​(java.io.File epubFile,
                         java.io.PrintWriter out)
        Create an epub validator to validate the given file. Issues will be reported to the given PrintWriter.
      • EpubCheck

        public EpubCheck​(java.io.File epubFile,
                         Report report)
        Create an epub validator to validate the given file and report issues to a given Report object.
      • EpubCheck

        public EpubCheck​(java.io.File epubFile,
                         Report report,
                         EPUBProfile profile)
        Create an epub validator to validate the given file and report issues to a given Report object. Can validate a specific EPUB profile (e.g. EDUPUB, DICT, IDX, etc).
      • EpubCheck

        public EpubCheck​(java.io.InputStream inputStream,
                         Report report,
                         java.lang.String uri)
      • EpubCheck

        public EpubCheck​(java.io.InputStream inputStream,
                         Report report,
                         java.lang.String uri,
                         EPUBProfile profile)
    • Method Detail

      • version

        public static java.lang.String version()
      • buildDate

        public static java.lang.String buildDate()
      • setLocale

        public void setLocale​(java.util.Locale locale)
        Allows for a per-instance override of the locale, if supported by the underlying Report. Otherwise takes the default host locale.
        Parameters:
        locale - The overridden locale.
      • check

        public void check()
        Validate the file. Return true if no errors or warnings found.
        Specified by:
        check in interface Checker
      • doValidate

        public int doValidate()