org.emboss.jemboss.programs
Class ListFile

java.lang.Object
  extended byorg.emboss.jemboss.programs.ListFile

public class ListFile
extends java.lang.Object

Parse an EMBOSS list file, reading it in line by line, loading other list files recursively if necessary, and loading any files referred to into the filesToMove hash


Constructor Summary
ListFile()
           
 
Method Summary
private static java.lang.String addFileToList(java.lang.String line, java.lang.String listfile, java.util.Hashtable filesToMove)
          Add a file to the list
private static java.lang.String[] expandWildcards(java.lang.String line)
          Wildcard (*) is allowed in the filelist data types.
private static byte[] getLocalFile(java.io.File name)
          Read file in as a byte array.
static void parse(java.lang.String fn, java.util.Hashtable filesToMove)
           
private static java.lang.String trim(java.lang.String fn)
          Given a list file @file or list::file return just the file name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListFile

public ListFile()
Method Detail

parse

public static void parse(java.lang.String fn,
                         java.util.Hashtable filesToMove)
Parameters:
fn - name of the list file
filesToMove - hash to put the files into

addFileToList

private static java.lang.String addFileToList(java.lang.String line,
                                              java.lang.String listfile,
                                              java.util.Hashtable filesToMove)
Add a file to the list

Parameters:
line - file to add
listfile - list file
filesToMove - files to move to the server
Returns:
updated list file

getLocalFile

private static byte[] getLocalFile(java.io.File name)
Read file in as a byte array.

Parameters:
name - file to read
Returns:
byte array contents of file

expandWildcards

private static java.lang.String[] expandWildcards(java.lang.String line)
Wildcard (*) is allowed in the filelist data types. This function will expand this to find all files with that prefix.

Parameters:
line - line to expand
Returns:
list file

trim

private static java.lang.String trim(java.lang.String fn)
Given a list file @file or list::file return just the file name

Parameters:
fn - file name
Returns:
trimmed file name