Interface OutputHandler

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void analyze​(RepInfo info)
      Callback allowing post-parse, pre-show analysis of object representation information.
      void applyDefaultParams()
      Applies the default parameters.
      void close()
      Do appropriate finalization after all output is complete.
      void endDirectory()
      Callback indicating a directory is finished being processed.
      Date getDate()
      Returns the last modification date of this handler
      String getEncoding()
      Returns this handler's encoding.
      String getName()
      Returns the name of this handler
      String getNote()
      Returns this handler's note
      String getRelease()
      Returns release information for this handler
      String getRights()
      Returns this handler's copyright information
      List<Document> getSpecification()
      Returns a List of Document objects giving the format specification documentation
      Agent getVendor()
      Returns a List of Agent objects giving the vendor(s) of this handler.
      void init​(String init)
      Per-instantiation initialization.
      boolean okToProcess​(String filepath)
      Callback to give the handler the opportunity to decide whether or not to process a file.
      void param​(String param)
      Per-action initialization.
      void reset()
      Reset the handler.
      void resetParams()
      Reset parameter settings.
      void setApp​(App app)
      Assigns an application object to provide services to this handler
      void setBase​(JhoveBase je)
      Assigns the JHOVE engine object to provide services to this handler
      void setDefaultParams​(List<String> params)
      Sets list of default parameters.
      void setEncoding​(String encoding)
      Assigns the encoding to be used by this OutputHandler
      void setWriter​(PrintWriter output)
      Assigns a PrintWriter to do output for this OutputHandler
      void show()
      Outputs minimal information about the application
      void show​(App app)
      Outputs detailed information about the application, including configuration, available modules and handlers, etc.
      void show​(Module module)
      Outputs information about a Module
      void show​(OutputHandler handler)
      Outputs information about the OutputHandler specified in the parameter
      void show​(RepInfo info)
      Outputs the information contained in a RepInfo object
      void showFooter()
      Do the final output.
      void showHeader()
      Do the initial output.
      void startDirectory​(String directory)
      Callback indicating a new directory is being processed.
    • Method Detail

      • reset

        void reset()
        Reset the handler. This needs to be called before each invocation.
      • analyze

        void analyze​(RepInfo info)
        Callback allowing post-parse, pre-show analysis of object representation information.
        Parameters:
        info - Object representation information
      • endDirectory

        void endDirectory()
        Callback indicating a directory is finished being processed. Most handlers will do nothing.
      • getName

        String getName()
        Returns the name of this handler
      • getRelease

        String getRelease()
        Returns release information for this handler
      • getDate

        Date getDate()
        Returns the last modification date of this handler
      • getSpecification

        List<Document> getSpecification()
        Returns a List of Document objects giving the format specification documentation
        See Also:
        Document
      • getVendor

        Agent getVendor()
        Returns a List of Agent objects giving the vendor(s) of this handler.
      • getNote

        String getNote()
        Returns this handler's note
      • getRights

        String getRights()
        Returns this handler's copyright information
      • getEncoding

        String getEncoding()
        Returns this handler's encoding.
      • init

        void init​(String init)
           throws Exception
        Per-instantiation initialization.
        Parameters:
        init - Initialization parameter. This is typically obtained from the configuration file.
        Throws:
        Exception
      • okToProcess

        boolean okToProcess​(String filepath)
        Callback to give the handler the opportunity to decide whether or not to process a file. Most handlers will always return true.
        Parameters:
        filepath - File pathname
      • setDefaultParams

        void setDefaultParams​(List<String> params)
        Sets list of default parameters.
        Parameters:
        params - A List whose elements are Strings. May be empty.
      • applyDefaultParams

        void applyDefaultParams()
                         throws Exception
        Applies the default parameters.
        Throws:
        Exception
      • resetParams

        void resetParams()
                  throws Exception
        Reset parameter settings. Returns to a default state without any parameters.
        Throws:
        Exception
      • param

        void param​(String param)
            throws Exception
        Per-action initialization.
        Parameters:
        param - Initialization parameter.
        Throws:
        Exception
      • setApp

        void setApp​(App app)
        Assigns an application object to provide services to this handler
      • setBase

        void setBase​(JhoveBase je)
        Assigns the JHOVE engine object to provide services to this handler
      • setEncoding

        void setEncoding​(String encoding)
        Assigns the encoding to be used by this OutputHandler
      • setWriter

        void setWriter​(PrintWriter output)
        Assigns a PrintWriter to do output for this OutputHandler
      • show

        void show​(Module module)
        Outputs information about a Module
      • show

        void show​(RepInfo info)
        Outputs the information contained in a RepInfo object
      • show

        void show​(OutputHandler handler)
        Outputs information about the OutputHandler specified in the parameter
      • show

        void show()
        Outputs minimal information about the application
      • show

        void show​(App app)
        Outputs detailed information about the application, including configuration, available modules and handlers, etc.
      • showHeader

        void showHeader()
        Do the initial output. This should be in a suitable format for including multiple files between the header and the footer.
      • showFooter

        void showFooter()
        Do the final output. This should be in a suitable format for including multiple files between the header and the footer.
      • close

        void close()
        Do appropriate finalization after all output is complete.
      • startDirectory

        void startDirectory​(String directory)
        Callback indicating a new directory is being processed. Most handlers will do nothing.
        Parameters:
        directory - Directory path