Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
lucene
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mohamad.alturky
lucene
Commits
bba89b70
Commit
bba89b70
authored
Mar 24, 2024
by
mohamad.alturky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abstracting the filters
parent
6b7314e1
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
7 deletions
+19
-7
CSVFileFilter.java
...in/java/com/search/lucene/file/filters/CSVFileFilter.java
+3
-2
PDFFileFilter.java
...in/java/com/search/lucene/file/filters/PDFFileFilter.java
+3
-2
TextFileFilter.java
...n/java/com/search/lucene/file/filters/TextFileFilter.java
+3
-2
IFileFilter.java
.../search/lucene/file/filters/abstractions/IFileFilter.java
+9
-0
Constants.java
src/main/java/com/search/lucene/settings/Constants.java
+1
-1
No files found.
src/main/java/com/search/lucene/file/filters/CSVFileFilter.java
View file @
bba89b70
package
com
.
search
.
lucene
.
file
.
filters
;
package
com
.
search
.
lucene
.
file
.
filters
;
import
com.search.lucene.file.filters.abstractions.IFileFilter
;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileFilter
;
public
class
CSVFileFilter
implements
FileFilter
{
public
class
CSVFileFilter
implements
I
FileFilter
{
@Override
@Override
public
boolean
accept
(
File
pathname
)
{
public
boolean
accept
(
File
pathname
)
{
return
pathname
.
getName
().
toLowerCase
().
endsWith
(
".csv"
);
return
pathname
.
getName
().
toLowerCase
().
endsWith
(
".csv"
);
...
...
src/main/java/com/search/lucene/file/filters/PDFFileFilter.java
View file @
bba89b70
package
com
.
search
.
lucene
.
file
.
filters
;
package
com
.
search
.
lucene
.
file
.
filters
;
import
com.search.lucene.file.filters.abstractions.IFileFilter
;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileFilter
;
public
class
PDFFileFilter
implements
FileFilter
{
public
class
PDFFileFilter
implements
I
FileFilter
{
@Override
@Override
public
boolean
accept
(
File
pathname
)
{
public
boolean
accept
(
File
pathname
)
{
...
...
src/main/java/com/search/lucene/file/filters/TextFileFilter.java
View file @
bba89b70
package
com
.
search
.
lucene
.
file
.
filters
;
package
com
.
search
.
lucene
.
file
.
filters
;
import
com.search.lucene.file.filters.abstractions.IFileFilter
;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileFilter
;
public
class
TextFileFilter
implements
FileFilter
{
public
class
TextFileFilter
implements
I
FileFilter
{
@Override
@Override
public
boolean
accept
(
File
pathname
)
{
public
boolean
accept
(
File
pathname
)
{
...
...
src/main/java/com/search/lucene/file/filters/abstractions/IFileFilter.java
0 → 100644
View file @
bba89b70
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
);
}
src/main/java/com/search/lucene/settings/
Lucene
Constants.java
→
src/main/java/com/search/lucene/settings/Constants.java
View file @
bba89b70
...
@@ -7,7 +7,7 @@ public class LuceneConstants {
...
@@ -7,7 +7,7 @@ public class LuceneConstants {
public
static
final
String
FILE_PATH
=
"filepath"
;
public
static
final
String
FILE_PATH
=
"filepath"
;
public
static
final
String
COLUMN
=
"column"
;
public
static
final
String
COLUMN
=
"column"
;
public
static
final
String
VALUE
=
"value"
;
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
;
public
static
final
int
MAX_SEARCH
=
10
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment