ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlig...@apache.org
Subject svn commit: r1465078 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
Date Fri, 05 Apr 2013 18:06:08 GMT
Author: dligach
Date: Fri Apr  5 18:06:07 2013
New Revision: 1465078

URL: http://svn.apache.org/r1465078
Log:
Updates to account for the new directory structure in SVN

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java?rev=1465078&r1=1465077&r2=1465078&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
Fri Apr  5 18:06:07 2013
@@ -21,6 +21,7 @@ package org.apache.ctakes.temporal.eval;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
+import java.io.FilenameFilter;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
@@ -151,12 +152,16 @@ public abstract class Evaluation_ImplBas
   private List<File> getFilesFor(List<Integer> patientSets) {
     List<File> files = new ArrayList<File>();
     for (Integer set : patientSets) {
-      File setTextDirectory = new File(this.rawTextDirectory, "doc" + set);
-      for (File file : setTextDirectory.listFiles()) {
+      final int setNum = set;
+      for (File file : rawTextDirectory.listFiles(new FilenameFilter(){
+        @Override
+        public boolean accept(File dir, String name) {
+          return name.contains(String.format("ID%03d", setNum));
+        }})) {
         // skip hidden files like .svn
         if (!file.isHidden()) {
           files.add(file);
-        }
+        } 
       }
     }
     return files;



Mime
View raw message