|
From: <de...@us...> - 2003-10-10 08:09:39
|
Update of /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker
In directory sc8-pr-cvs1:/tmp/cvs-serv18710/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker
Modified Files:
DirectoryScanner.java
Log Message:
Applied David Kinnvalls patch:
- Added missing messages to messages.properties
- Moved the patterns Hashtable to the top of the ScannerWorker
file and added a brief javadoc about it
- Re-ordered the methods and accompanying javadocs that got a
bit mixed up (addFilter and acceptEntry) and added a bit more
javadoc text explaining how the filter logic works
- Really "new" in this patch is only my previously suggested
addition of providing the DirectoryScanner's doneDirectory
under the attribute "done_dir"
Index: DirectoryScanner.java
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/scanner/src/com/babeldoc/scanner/worker/DirectoryScanner.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** DirectoryScanner.java 8 Oct 2003 13:39:07 -0000 1.24
--- DirectoryScanner.java 10 Oct 2003 08:09:35 -0000 1.25
***************
*** 101,104 ****
--- 101,110 ----
public static final String MINIMUM_FILE_AGE = "minimumFileAge";
+ /**
+ * This is used to provide information to the pipeline stages
+ * about where documents processed by this scanner are moved.
+ */
+ public static final String DONE_DIR_KEY = "done_dir";
+
public DirectoryScanner() {
super(new DirectoryScannerInfo());
***************
*** 306,310 ****
new NameValuePair(SCAN_DATE_KEY, Long.toString(modified)),
new NameValuePair(SCAN_PATH_KEY, file.getCanonicalPath()),
! new NameValuePair(FILE_NAME_KEY, file.getName())});
} finally {
fis.close();
--- 312,317 ----
new NameValuePair(SCAN_DATE_KEY, Long.toString(modified)),
new NameValuePair(SCAN_PATH_KEY, file.getCanonicalPath()),
! new NameValuePair(FILE_NAME_KEY, file.getName()),
! new NameValuePair(DONE_DIR_KEY, getDoneDirectory())});
} finally {
fis.close();
***************
*** 316,320 ****
* Consult configuration if this file should be processed
* or not. Current configurable constraints include the age
! * of the file and a filename filter.
*
* @param file The file to be checked against configuration
--- 323,328 ----
* Consult configuration if this file should be processed
* or not. Current configurable constraints include the age
! * of the file and a filename filter, both optional and by
! * default all permissive.
*
* @param file The file to be checked against configuration
|