Class CollectionSpecParserAbstract

    • Field Detail

      • spec

        protected final String spec
      • rootDir

        protected final String rootDir
      • subdirs

        protected final boolean subdirs
      • filterOnName

        protected final boolean filterOnName
      • filter

        protected final com.google.re2j.Pattern filter
      • dateFormatMark

        protected final String dateFormatMark
      • delimiter

        protected final String delimiter
      • fragment

        protected final String fragment
    • Constructor Detail

      • CollectionSpecParserAbstract

        protected CollectionSpecParserAbstract​(String collectionSpec,
                                               String rootDir,
                                               String filterAndDateMark,
                                               String delimiter,
                                               String fragment,
                                               Formatter errlog)
        Single spec : "/topdir/** /#dateFormatMark#regExp" This only allows the dateFormatMark to be in the file name, not anywhere else in the filename path, and you can't use any part of the dateFormat to filter on.
        Parameters:
        collectionSpec - the collection spec
        rootDir - the root directory
        filterAndDateMark - the part of spec containing filter and/ or date mark
        delimiter - the delimiter in the file path
        fragment - in path
        errlog - put error messages here, may be null
      • CollectionSpecParserAbstract

        protected CollectionSpecParserAbstract​(String rootDir,
                                               String regExp,
                                               String delimiter,
                                               String fragment,
                                               Formatter errlog)
        Parameters:
        rootDir - the root directory
        regExp - the regular expression to use as a filter
        delimiter - the delimiter in the file path
        fragment - in path
        errlog - put error messages here, may be null
    • Method Detail

      • getFilterAndDateMark

        protected static String getFilterAndDateMark​(String collectionSpec,
                                                     String delimiter)
      • splitOnLastDelimiter

        protected static String[] splitOnLastDelimiter​(String collectionSpec,
                                                       String delimiter)
      • getRegEx

        protected static com.google.re2j.Pattern getRegEx​(String filterAndDateMark)
      • getDateFormatMark

        protected static String getDateFormatMark​(String filterAndDateMark)
      • getRootDir

        public String getRootDir()
      • getFilePath

        public abstract String getFilePath​(String filename)
        Get the full path for a file
        Parameters:
        filename - the file name
        Returns:
        full file path
      • getDelimiter

        public String getDelimiter()
      • getFragment

        public String getFragment()
      • wantSubdirs

        public boolean wantSubdirs()
      • getFilter

        public com.google.re2j.Pattern getFilter()
      • getFilterOnName

        public boolean getFilterOnName()
      • getDateFormatMark

        public String getDateFormatMark()