lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gsing...@apache.org
Subject svn commit: r616882 - /lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecDocMaker.java
Date Wed, 30 Jan 2008 20:03:42 GMT
Author: gsingers
Date: Wed Jan 30 12:03:39 2008
New Revision: 616882

URL: http://svn.apache.org/viewvc?rev=616882&view=rev
Log:
allow TrecDocMaker to be more easily extended by making values protected

Modified:
    lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecDocMaker.java

Modified: lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecDocMaker.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecDocMaker.java?rev=616882&r1=616881&r2=616882&view=diff
==============================================================================
--- lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecDocMaker.java
(original)
+++ lucene/java/trunk/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/TrecDocMaker.java
Wed Jan 30 12:03:39 2008
@@ -46,12 +46,12 @@
 
   private static final String newline = System.getProperty("line.separator");
   
-  private ThreadLocal dateFormat = new ThreadLocal();
-  private File dataDir = null;
-  private ArrayList inputFiles = new ArrayList();
-  private int nextFile = 0;
-  private int iteration=0;
-  private BufferedReader reader;
+  protected ThreadLocal dateFormat = new ThreadLocal();
+  protected File dataDir = null;
+  protected ArrayList inputFiles = new ArrayList();
+  protected int nextFile = 0;
+  protected int iteration=0;
+  protected BufferedReader reader;
   private GZIPInputStream zis;
   
   private static final String DATE_FORMATS [] = {
@@ -78,7 +78,7 @@
     }
  }
 
-  private void openNextFile() throws NoMoreDataException, Exception {
+  protected void openNextFile() throws NoMoreDataException, Exception {
     closeInputs();
     int retries = 0;
     while (true) {
@@ -111,7 +111,7 @@
     }
   }
 
-  private void closeInputs() {
+  protected void closeInputs() {
     if (zis!=null) {
       try {
         zis.close();
@@ -133,7 +133,7 @@
   }
   
   // read until finding a line that starts with the specified prefix
-  private StringBuffer read (String prefix, StringBuffer sb, boolean collectMatchLine, boolean
collectAll) throws Exception {
+  protected StringBuffer read (String prefix, StringBuffer sb, boolean collectMatchLine,
boolean collectAll) throws Exception {
     sb = (sb==null ? new StringBuffer() : sb);
     String sep = "";
     while (true) {
@@ -186,7 +186,7 @@
     return docData;
   }
 
-  private DateFormat getDateFormat(int n) {
+  protected DateFormat getDateFormat(int n) {
     DateFormat df[] = (DateFormat[]) dateFormat.get();
     if (df == null) {
       df = new SimpleDateFormat[DATE_FORMATS.length];
@@ -199,7 +199,7 @@
     return df[n];
   }
 
-  private Date parseDate(String dateStr) {
+  protected Date parseDate(String dateStr) {
     Date date = null;
     for (int i=0; i<DATE_FORMATS.length; i++) {
       try {



Mime
View raw message