Class AbstractTextDataLoader

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.Object load​(java.io.InputStream data)
      FileDataLoader subclasess override this method to parse the file.
      protected abstract java.lang.String parseExtraArguments​(java.util.List args)
      Parses the argument list, except the 1st (file name) argument.
      protected abstract java.lang.Object parseText​(java.lang.String text)
      Parses the file content to the final object that the data loader will return.
      • Methods inherited from class java.lang.Object

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

      • AbstractTextDataLoader

        public AbstractTextDataLoader()
    • Method Detail

      • load

        protected final java.lang.Object load​(java.io.InputStream data)
                                       throws java.lang.Exception
        Description copied from class: FileDataLoader
        FileDataLoader subclasess override this method to parse the file.
        Specified by:
        load in class FileDataLoader
        Throws:
        java.lang.Exception
      • parseText

        protected abstract java.lang.Object parseText​(java.lang.String text)
                                               throws java.lang.Exception
        Parses the file content to the final object that the data loader will return.
        Parameters:
        text - the content of the text file
        Returns:
        the return value of the data loader
        Throws:
        java.lang.Exception
      • parseExtraArguments

        protected abstract java.lang.String parseExtraArguments​(java.util.List args)
                                                         throws java.lang.Exception
        Parses the argument list, except the 1st (file name) argument.
        Parameters:
        args - the arguments (all of them, starting from the 1st)
        Returns:
        the encoding given with the extra arguments, or null if the encoding was not specified. In the latest case the encoding will default to the source encoding engine parameter (the sourceEncoding setting).
        Throws:
        java.lang.Exception