Commit bba89b70 authored by mohamad.alturky's avatar mohamad.alturky

abstracting the filters

parent 6b7314e1
package com.search.lucene.file.filters;
import com.search.lucene.file.filters.abstractions.IFileFilter;
import java.io.File;
import java.io.FileFilter;
public class CSVFileFilter implements FileFilter {
public class CSVFileFilter implements IFileFilter {
@Override
public boolean accept(File pathname) {
return pathname.getName().toLowerCase().endsWith(".csv");
......
package com.search.lucene.file.filters;
import com.search.lucene.file.filters.abstractions.IFileFilter;
import java.io.File;
import java.io.FileFilter;
public class PDFFileFilter implements FileFilter {
public class PDFFileFilter implements IFileFilter {
@Override
public boolean accept(File pathname) {
......
package com.search.lucene.file.filters;
import com.search.lucene.file.filters.abstractions.IFileFilter;
import java.io.File;
import java.io.FileFilter;
public class TextFileFilter implements FileFilter {
public class TextFileFilter implements IFileFilter {
@Override
public boolean accept(File pathname) {
......
package com.search.lucene.file.filters.abstractions;
import java.io.File;
import java.io.FileFilter;
public interface IFileFilter extends FileFilter{
@Override
boolean accept(File pathname);
}
......@@ -7,7 +7,7 @@ public class LuceneConstants {
public static final String FILE_PATH = "filepath";
public static final String COLUMN = "column";
public static final String VALUE = "value";
public static final String LINE = "line";
public static final String ROW = "row";
public static final int MAX_SEARCH = 10;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment