|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectloci.formats.FilePattern
public class FilePattern
FilePattern is a collection of methods for handling file patterns, a way of succinctly representing a collection of files meant to be part of the same data series. Examples:
Constructor Summary | |
---|---|
FilePattern(Location file)
Creates a pattern object using the given file as a template. |
|
FilePattern(String pattern)
Creates a pattern object for files with the given pattern string. |
|
FilePattern(String name,
String dir)
Creates a pattern object using the given filename and directory path as a template. |
Method Summary | |
---|---|
static String |
findPattern(File file)
Identifies the group pattern from a given file within that group. |
static String |
findPattern(Location file)
Identifies the group pattern from a given file within that group. |
static String |
findPattern(String name,
String dir)
Identifies the group pattern from a given file within that group. |
static String |
findPattern(String name,
String dir,
String[] nameList)
Identifies the group pattern from a given file within that group. |
String |
getBlock(int i)
Gets the specified numerical block. |
String[] |
getBlocks()
Gets each numerical block. |
int[] |
getCount()
Gets the total count of each numerical block. |
String |
getErrorMessage()
Gets the file pattern error message, if any. |
String[] |
getFiles()
Gets a listing of all files matching the given file pattern. |
BigInteger[] |
getFirst()
Gets the first number of each numerical block. |
BigInteger[] |
getLast()
Gets the last number of each numerical block. |
String |
getPattern()
Gets the file pattern string. |
String |
getPrefix()
Gets the pattern's text string before any numerical ranges. |
String |
getPrefix(int i)
Gets the pattern's text string before the given numerical block. |
String[] |
getPrefixes()
Gets the pattern's text string before each numerical block. |
BigInteger[] |
getStep()
Gets the step increment of each numerical block. |
String |
getSuffix()
Gets the pattern's text string after all numerical ranges. |
boolean |
isValid()
Gets whether the file pattern string is valid. |
static void |
main(String[] args)
Method for testing file pattern logic. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FilePattern(Location file)
public FilePattern(String name, String dir)
public FilePattern(String pattern)
Method Detail |
---|
public String getPattern()
public boolean isValid()
public String getErrorMessage()
public BigInteger[] getFirst()
public BigInteger[] getLast()
public BigInteger[] getStep()
public int[] getCount()
public String[] getFiles()
public String getBlock(int i)
public String[] getBlocks()
public String getPrefix()
public String getSuffix()
public String getPrefix(int i)
public String[] getPrefixes()
public static String findPattern(Location file)
file
- The file to use as a template for the match.public static String findPattern(File file)
file
- The file to use as a template for the match.public static String findPattern(String name, 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 String findPattern(String name, String dir, 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 void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |