public class FilePattern
extends java.lang.Object
Constructor and Description |
---|
FilePattern(Location file)
Creates a pattern object using the given file as a template.
|
FilePattern(java.lang.String pattern)
Creates a pattern object for files with the given pattern string.
|
FilePattern(java.lang.String name,
java.lang.String dir)
Creates a pattern object using the given
filename and directory path as a template.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
findPattern(java.io.File file)
Identifies the group pattern from a given file within that group.
|
static java.lang.String |
findPattern(Location file)
Identifies the group pattern from a given file within that group.
|
static java.lang.String |
findPattern(java.lang.String path)
Identifies the group pattern from a given file within that group.
|
static java.lang.String |
findPattern(java.lang.String[] names)
Generate a pattern from a list of file names.
|
static java.lang.String |
findPattern(java.lang.String name,
java.lang.String dir)
Identifies the group pattern from a given file within that group.
|
static java.lang.String |
findPattern(java.lang.String name,
java.lang.String dir,
java.lang.String[] nameList)
Identifies the group pattern from a given file within that group.
|
static java.lang.String |
findPattern(java.lang.String name,
java.lang.String dir,
java.lang.String[] nameList,
int[] excludeAxes)
Identifies the group pattern from a given file within that group.
|
static java.lang.String[] |
findSeriesPatterns(java.lang.String base) |
static java.lang.String[] |
findSeriesPatterns(java.lang.String base,
java.lang.String dir,
java.lang.String[] nameList) |
java.lang.String |
getBlock(int i)
Gets the specified numerical block.
|
java.lang.String[] |
getBlocks()
Gets each numerical block.
|
int[] |
getCount() |
java.lang.String[][] |
getElements() |
java.lang.String |
getErrorMessage()
Gets the file pattern error message, if any.
|
java.lang.String[] |
getFiles()
Gets a listing of all files matching the given file pattern.
|
java.math.BigInteger[] |
getFirst() |
java.math.BigInteger[] |
getLast() |
java.lang.String |
getPattern()
Gets the file pattern string.
|
java.lang.String |
getPrefix()
Gets the pattern's text string before any numerical ranges.
|
java.lang.String |
getPrefix(int i)
Gets the pattern's text string before the given numerical block.
|
java.lang.String[] |
getPrefixes()
Gets the pattern's text string before each numerical block.
|
java.math.BigInteger[] |
getStep() |
java.lang.String |
getSuffix()
Gets the pattern's text string after all numerical ranges.
|
boolean |
isRegex()
Returns whether or not this pattern is a regular expression.
|
boolean |
isValid()
Gets whether the file pattern string is valid.
|
static void |
main(java.lang.String[] args)
Method for testing file pattern logic.
|
public FilePattern(Location file)
public FilePattern(java.lang.String name, java.lang.String dir)
public FilePattern(java.lang.String pattern)
public boolean isRegex()
public java.lang.String getPattern()
public boolean isValid()
public java.lang.String getErrorMessage()
public java.lang.String[] getFiles()
public java.lang.String[][] getElements()
public int[] getCount()
public java.lang.String getBlock(int i)
public java.lang.String[] getBlocks()
public java.lang.String getPrefix()
public java.lang.String getSuffix()
public java.lang.String getPrefix(int i)
public java.lang.String[] getPrefixes()
public static java.lang.String findPattern(java.lang.String path)
path
- The file path to use as a template for the match.public static java.lang.String findPattern(Location file)
file
- The file to use as a template for the match.public static java.lang.String findPattern(java.io.File file)
file
- The file to use as a template for the match.public static java.lang.String findPattern(java.lang.String name, java.lang.String dir)
name
- The filename to use as a template for the match.dir
- The directory in which to search for matching files.public static java.lang.String findPattern(java.lang.String name, java.lang.String dir, java.lang.String[] nameList)
name
- The filename to use as a template for the match.dir
- The directory prefix to use for matching files.nameList
- The names through which to search for matching files.public static java.lang.String findPattern(java.lang.String name, java.lang.String dir, java.lang.String[] nameList, int[] excludeAxes)
name
- The filename to use as a template for the match.dir
- The directory prefix to use for matching files.nameList
- The names through which to search for matching files.excludeAxes
- The list of axis types which should be excluded from the
pattern.public static java.lang.String findPattern(java.lang.String[] names)
public static java.lang.String[] findSeriesPatterns(java.lang.String base)
public static java.lang.String[] findSeriesPatterns(java.lang.String base, java.lang.String dir, java.lang.String[] nameList)
public static void main(java.lang.String[] args)
public java.math.BigInteger[] getFirst()
public java.math.BigInteger[] getLast()
public java.math.BigInteger[] getStep()
Copyright © 2014 Open Microscopy Environment