Package thredds.inventory.s3
Class CollectionSpecParserS3
- java.lang.Object
-
- thredds.inventory.CollectionSpecParserAbstract
-
- thredds.inventory.s3.CollectionSpecParserS3
-
public class CollectionSpecParserS3 extends CollectionSpecParserAbstract
Parses the collection specification string for S3 files.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CollectionSpecParserS3.Provider
An S3 Service Provider ofCollectionSpecParserAbstract
.
-
Field Summary
-
Fields inherited from class thredds.inventory.CollectionSpecParserAbstract
dateFormatMark, delimiter, filter, filterOnName, fragment, rootDir, spec, subdirs
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CollectionSpecParserS3
create(String rootDir, String regExp, Formatter errlog)
static CollectionSpecParserS3
create(String collectionSpec, Formatter errlog)
Example spec: "cdms3:top-bucket/directory/#dateFormatMark#regExp#delimiter=/" 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.String
getFilePath(String filename)
Get the full path for a file-
Methods inherited from class thredds.inventory.CollectionSpecParserAbstract
getDateFormatMark, getDateFormatMark, getDelimiter, getFilter, getFilterAndDateMark, getFilterOnName, getFragment, getPathMatcher, getRegEx, getRootDir, getRootDir, splitOnLastDelimiter, toString, wantSubdirs
-
-
-
-
Method Detail
-
create
public static CollectionSpecParserS3 create(String collectionSpec, Formatter errlog)
Example spec: "cdms3:top-bucket/directory/#dateFormatMark#regExp#delimiter=/" 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 specerrlog
- put error messages here, may be null- Returns:
CollectionSpecParserS3
-
create
public static CollectionSpecParserS3 create(String rootDir, String regExp, Formatter errlog)
- Parameters:
rootDir
- the root directoryregExp
- the regular expression to use as a filtererrlog
- put error messages here, may be null- Returns:
CollectionSpecParserS3
-
getFilePath
public String getFilePath(String filename)
Description copied from class:CollectionSpecParserAbstract
Get the full path for a file- Specified by:
getFilePath
in classCollectionSpecParserAbstract
- Parameters:
filename
- the file name- Returns:
- full file path
-
-