allow TrecDocMaker to be more easily extended by making values protected

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@616882 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Grant Ingersoll 2008-01-30 20:03:39 +00:00
parent 4fc8654bc1
commit 61f2aa3078
1 changed files with 11 additions and 11 deletions

View File

@ -46,12 +46,12 @@ public class TrecDocMaker extends BasicDocMaker {
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 @@ public class TrecDocMaker extends BasicDocMaker {
}
}
private void openNextFile() throws NoMoreDataException, Exception {
protected void openNextFile() throws NoMoreDataException, Exception {
closeInputs();
int retries = 0;
while (true) {
@ -111,7 +111,7 @@ public class TrecDocMaker extends BasicDocMaker {
}
}
private void closeInputs() {
protected void closeInputs() {
if (zis!=null) {
try {
zis.close();
@ -133,7 +133,7 @@ public class TrecDocMaker extends BasicDocMaker {
}
// 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 @@ public class TrecDocMaker extends BasicDocMaker {
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 @@ public class TrecDocMaker extends BasicDocMaker {
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 {