|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.io.FilenameParseUtil
public class FilenameParseUtil
This class supports simple extraction of data from filenames. Used e.g. to parse the data in a gel mass spectrometry filename.
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
log
Logger used. |
| Constructor Summary | |
|---|---|
FilenameParseUtil()
Default constructor. |
|
| Method Summary | |
|---|---|
String |
convertToLocalWellNotation(String wellname,
String prototypeName)
Converts a well position of standard notation of type "A12" to local notation. |
String |
convertWellNotation(String wellname)
Converts a well position to standard notation of type "A12", where the uppercase letter notates the column and the number the row. |
String |
fetchBasename(String filename)
Fetches the basename from a filename, i.e. part of the filename before an optional file extension separated by a dot ".". |
String |
fetchBaseString(String inStr,
String separationStr)
Fetches the base string from an input string given a separation string. |
String |
fetchCounter(String filename)
Fetches the counter string from filename, i.e. part of the filename after the target id and date, excluding the position, e.g. filename "FL1_060306_2@A1.txt" will give counter "2". |
String |
fetchDate(String filename)
Fetches the date from filename, i.e. part of the filename after the target id starting with a number character, e.g. filename "FL1_060306_2@A1.txt" will give date "060306". |
String |
fetchExperimenter(String filename)
Fetches the experimenter from filename, i.e. part of the target id before any number characters, e.g. filename "FL1_060306_2@A1.txt" will give experimenter "FL". |
String |
fetchExperimenterFromTarget(String targetId)
Fetches the experimenter from a target id, i.e. part of the target id before any number characters, e.g. target id "FL1" will give experimenter "FL". |
String |
fetchFileExtension(String filename)
Fetches the file extension from a filename, i.e. part of the filename after an optional separation dot ".". |
int |
fetchFirstNonNumCharIndex(String inStr)
Fetches the position index of the first non-numerical character in a string. |
int |
fetchFirstNumCharIndex(String inStr)
Fetches the position index of the first numerical character in a string. |
int |
fetchLastNonNumCharIndex(String inStr)
Fetches the position index of the last non-numerical character in a string. |
int |
fetchLastNumCharIndex(String inStr)
Fetches the position index of the last numerical character in a string. |
String |
fetchNonPositionName(String filename)
Fetches the pure basename excluding plate position from a filename, i.e. part of the filename before any optional dot "." and "@" characters, e.g. filename "FL1_060306_2@A1.txt" will give "FL1_060306_1". |
String |
fetchPartAfterEndCut(String inStr,
String separationStr,
boolean firstCut,
boolean firstPart)
Fetches the first or last part of an input string, after it has been cut in two pieces by the first or last occurrence of a separation string. |
String |
fetchPlatePosition(String filename)
Fetches the plate position from filename, i.e. part of the basename after an "@" character, e.g. filename "FL1_060306_2@A1.txt" will give "A1". |
String |
fetchPureBasename(String filename)
Fetches the pure basename from a filename, i.e. part of the filename before any optional dots ".". |
String |
fetchPureBaseString(String inStr,
String separationStr)
Fetches the pure base string from an input string given a separation string. |
String |
fetchPureFileExtension(String filename)
Fetches the pure file extension from a filename, i.e. part of the filename after any optional dots ".". |
String |
fetchPureResidueString(String inStr,
String separationStr)
Fetches the pure residue string from an input string given a separation string. |
String |
fetchRegexResult(String inStr,
String regexStr)
Fetches the resulting string after parsing an input string with an input regex pattern. |
String |
fetchResidueString(String inStr,
String separationStr)
Fetches the residue string from an input string given a separation string. |
String |
fetchTargetId(String filename)
Fetches the target id from a filename, i.e. part of the filename before any optional underscore "_", dot " |
String |
fetchTargetIdFromSHWFilename(String filename)
Fetches the target id from a Spot Handling Worksatation (SHW) filename, i.e. part of the filename after string "18115042" and before any optional underscore "_", dot " |
String |
fetchTargetNumber(String filename)
Fetches the target number from filename, i.e. part of the target id starting with a number character, e.g. filename "FL1_060306_2@A1.txt" will give target number "1". |
String |
fetchTargetNumberFromTarget(String targetId)
Fetches the target number from a target id, i.e. part of the target id starting with a number character, e.g. target id "FL1" will give target number "1". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger log
| Constructor Detail |
|---|
public FilenameParseUtil()
| Method Detail |
|---|
public String fetchRegexResult(String inStr,
String regexStr)
inStr - String the input string to parse.regexStr - String The regex pattern string to use for parsing.
public String fetchPartAfterEndCut(String inStr,
String separationStr,
boolean firstCut,
boolean firstPart)
inStr - String the input string to parse.separationStr - String the separation string.firstCut - boolean true for cut is at first occurrence of the separation string, else last.firstPart - boolean true for first part after cut at separation string, else last.
public String fetchPureBaseString(String inStr,
String separationStr)
inStr - String the input string to parse.separationStr - String the separation string.
public String fetchBaseString(String inStr,
String separationStr)
inStr - String the input string to parse.separationStr - String the separation string.
public String fetchPureResidueString(String inStr,
String separationStr)
inStr - String the input string to parse.separationStr - String the separation string.
public String fetchResidueString(String inStr,
String separationStr)
inStr - String the input string to parse.separationStr - String the separation string.
public int fetchFirstNumCharIndex(String inStr)
inStr - String the string to parse.
public int fetchLastNumCharIndex(String inStr)
inStr - String the string to parse.
public int fetchFirstNonNumCharIndex(String inStr)
inStr - String the string to parse.
public int fetchLastNonNumCharIndex(String inStr)
inStr - String the string to parse.
public String fetchBasename(String filename)
filename - String the filename to parse.
public String fetchPureBasename(String filename)
filename - String the filename to parse.
public String fetchFileExtension(String filename)
filename - String the filename to parse.
public String fetchPureFileExtension(String filename)
filename - String the filename to parse.
public String fetchNonPositionName(String filename)
filename - String the filename to parse.
public String fetchTargetId(String filename)
filename - String the filename to parse.
public String fetchTargetIdFromSHWFilename(String filename)
filename - String the SHW filename to parse.
public String fetchExperimenterFromTarget(String targetId)
targetId - String the target id to parse.
public String fetchTargetNumberFromTarget(String targetId)
targetId - String the target id to parse.
public String fetchExperimenter(String filename)
filename - String the filename to parse.
public String fetchTargetNumber(String filename)
filename - String the filename to parse.
public String fetchDate(String filename)
filename - String the filename to parse.
public String fetchCounter(String filename)
filename - String the filename to parse.
public String fetchPlatePosition(String filename)
filename - String the filename to parse.
public String convertWellNotation(String wellname)
wellname - String the well position notation to convert.
public String convertToLocalWellNotation(String wellname,
String prototypeName)
wellname - String the well position standard notation to convert.prototypeName - String An example (prototype) of the local notation.
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||