-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed the bug in the bundle, using a delegated search engine. Added c…
…opyrights in classes where it was missing
- Loading branch information
1 parent
3e862f8
commit b34a787
Showing
46 changed files
with
555 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...src/main/java/com/livetheoogway/forage/dropwizard/bundle/DelegatedForageSearchEngine.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.livetheoogway.forage.dropwizard.bundle; | ||
|
||
import com.livetheoogway.forage.models.query.ForageQuery; | ||
import com.livetheoogway.forage.models.result.ForageQueryResult; | ||
import com.livetheoogway.forage.search.engine.ForageSearchEngine; | ||
import com.livetheoogway.forage.search.engine.exception.ForageSearchError; | ||
|
||
import java.util.concurrent.atomic.AtomicReference; | ||
|
||
public class DelegatedForageSearchEngine<D> implements ForageSearchEngine<D> { | ||
private final AtomicReference<ForageSearchEngine<D>> reference; | ||
|
||
public DelegatedForageSearchEngine(ForageSearchEngine<D> preStart) { | ||
this.reference = new AtomicReference<>(preStart); | ||
} | ||
|
||
public void onStart(ForageSearchEngine<D> engine) { | ||
reference.set(engine); | ||
} | ||
|
||
@Override | ||
public ForageQueryResult<D> search(final ForageQuery query) throws ForageSearchError { | ||
return reference.get().search(query); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...bundle/src/main/java/com/livetheoogway/forage/dropwizard/bundle/ForagePreStartEngine.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.livetheoogway.forage.dropwizard.bundle; | ||
|
||
import com.livetheoogway.forage.models.query.ForageQuery; | ||
import com.livetheoogway.forage.models.result.ForageQueryResult; | ||
import com.livetheoogway.forage.search.engine.ForageSearchEngine; | ||
import com.livetheoogway.forage.search.engine.exception.ForageErrorCode; | ||
import com.livetheoogway.forage.search.engine.exception.ForageSearchError; | ||
|
||
public class ForagePreStartEngine<D> implements ForageSearchEngine<D> { | ||
@Override | ||
public ForageQueryResult<D> search(final ForageQuery query) throws ForageSearchError { | ||
throw new ForageSearchError(ForageErrorCode.SEARCH_ENGINE_INITIALIZATION_ERROR, | ||
"Forage bundle is not started yet"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
forage-models/src/main/java/com/livetheoogway/forage/models/DataId.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
forage-models/src/main/java/com/livetheoogway/forage/models/query/ForageQuery.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
forage-models/src/main/java/com/livetheoogway/forage/models/query/ForageQueryType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
forage-models/src/main/java/com/livetheoogway/forage/models/query/ForageQueryVisitor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
forage-models/src/main/java/com/livetheoogway/forage/models/query/ForageSearchQuery.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
forage-models/src/main/java/com/livetheoogway/forage/models/query/PageQuery.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
forage-models/src/main/java/com/livetheoogway/forage/models/query/search/BooleanQuery.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
forage-models/src/main/java/com/livetheoogway/forage/models/query/search/ClauseType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
forage-models/src/main/java/com/livetheoogway/forage/models/query/search/ClauseVisitor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...ge-models/src/main/java/com/livetheoogway/forage/models/query/search/FuzzyMatchQuery.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
forage-models/src/main/java/com/livetheoogway/forage/models/query/search/MatchQuery.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
forage-models/src/main/java/com/livetheoogway/forage/models/query/search/ParsableQuery.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
forage-models/src/main/java/com/livetheoogway/forage/models/query/search/Query.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.