Class EpubChecker


  • public class EpubChecker
    extends java.lang.Object
    • Field Detail

      • path

        java.lang.String path
      • mode

        java.lang.String mode
      • expanded

        boolean expanded
      • keep

        boolean keep
      • jsonOutput

        boolean jsonOutput
      • xmlOutput

        boolean xmlOutput
      • xmpOutput

        boolean xmpOutput
      • fileOut

        java.io.File fileOut
      • listChecksOut

        java.io.File listChecksOut
      • customMessageFile

        java.io.File customMessageFile
      • listChecks

        boolean listChecks
      • displayHelp

        boolean displayHelp
      • displayVersion

        boolean displayVersion
      • useCustomMessageFile

        boolean useCustomMessageFile
      • failOnWarnings

        boolean failOnWarnings
      • locale

        private java.util.Locale locale
      • reportingLevel

        int reportingLevel
      • modeMimeTypeMap

        private static final java.util.HashMap<OPSType,​java.lang.String> modeMimeTypeMap
      • EPUBCHECK_CUSTOM_MESSAGE_FILE

        private static final java.lang.String EPUBCHECK_CUSTOM_MESSAGE_FILE
        See Also:
        Constant Field Values
    • Constructor Detail

      • EpubChecker

        public EpubChecker()
    • Method Detail

      • getLocale

        public java.util.Locale getLocale()
      • run

        public int run​(java.lang.String[] args)
      • processEpubFile

        @Deprecated
        public int processEpubFile​(java.lang.String[] args)
        Deprecated.
      • processFile

        private int processFile​(Report report)
      • printEpubCheckCompleted

        private void printEpubCheckCompleted​(Report report)
      • dumpMessageDictionary

        private void dumpMessageDictionary​(Report report)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • createReport

        private Report createReport()
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • processArguments

        private boolean processArguments​(java.lang.String[] args)
        This method iterates through all of the arguments passed to main to find accepted flags and the name of the file to check. This method returns the last argument that ends with ".epub" (which is assumed to be the file to check) Here are the currently accepted flags:

        -? or -help = display usage instructions
        -v or -version = display tool version number
        Parameters:
        args - String[] containing arguments passed to main
        Returns:
        the name of the file to check
      • setCustomMessageFileFromEnvironment

        private void setCustomMessageFileFromEnvironment()
      • displayHelp

        private void displayHelp()
        This method displays a short help message that describes the command-line usage of this tool
      • displayVersion

        private void displayVersion()
        This method displays the EpubCheck version.