Repository navigation
SearchIO module #329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
SearchIO module #329
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
51262c5
Deleted test files that can be delegated to superclass
paolopavan 5ad3cc9
Massive refactoring: moved alignment data structures from biojava-ali…
paolopavan dd5b463
Merge branch 'API_variation' into SearchIO_branch
paolopavan 967168d
Fixed reference to resource file.
paolopavan 42f3337
Modified method with more appropriate access level.
paolopavan 911ba72
Better exception handling.
paolopavan d9c17d7
Tests enhancement.
paolopavan b78d387
bugfix
paolopavan 26eaebf
Change in the way equals() is evaluated for Results, Hits, Hsps.Modif…
paolopavan 31f3729
Added setter method for parsing fine tuning configuration.
paolopavan f059f0e
Refactoring proposed by Jose Manuel Duarte to separate this module fr…
paolopavan 9cbd9ee
Changed logger to slf4j
paolopavan 248cc08
Increased type checking.
paolopavan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Change in the way equals() is evaluated for Results, Hits, Hsps.Modif…
…ied tests accordingly.
- Loading branch information
commit 26eaebf2cd88d069855645431124771de5348312
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -47,31 +47,41 @@ public Result(String program, String version, String reference, String dbFile, H | |
| this.hits = hits; | ||
| this.querySequence = querySequence; | ||
| } | ||
|
|
||
| @Override | ||
| public int hashCode() { | ||
| int hash = 7; | ||
| hash = 29 * hash + (this.queryID != null ? this.queryID.hashCode() : 0); | ||
| hash = 29 * hash + (this.queryDef != null ? this.queryDef.hashCode() : 0); | ||
| hash = 29 * hash + (this.hits != null ? this.hits.hashCode() : 0); | ||
| return hash; | ||
| } | ||
| /** | ||
| * Experimental. | ||
| * Wants to return an hashcode designed to allow conceptual comparisons of search results. | ||
| * Wants to implement conceptual comparisons of search results. | ||
| * Fields unrelated to search are deliberately not considered. | ||
| * @return | ||
| */ | ||
| public int hashCode(){ | ||
| String prefix = queryID+queryDef; | ||
| String suffix=""; | ||
| if (hits != null){ | ||
| for (Hit h: hits) { | ||
| String hashString = h.getHspsHashString(); | ||
| if (hashString== null) return prefix.hashCode(); | ||
| suffix += hashString; | ||
| } | ||
| } | ||
| return (prefix+suffix).hashCode(); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean equals(Object o){ | ||
| if (!(o instanceof Result)) return false; | ||
|
|
||
| return o.hashCode() == this.hashCode(); | ||
| public boolean equals(Object obj) { | ||
| if (obj == null) { | ||
| return false; | ||
| } | ||
| if (getClass() != obj.getClass()) { | ||
| return false; | ||
| } | ||
| final Result other = (Result) obj; | ||
| if ((this.queryID == null) ? (other.queryID != null) : !this.queryID.equals(other.queryID)) { | ||
| return false; | ||
| } | ||
| if ((this.queryDef == null) ? (other.queryDef != null) : !this.queryDef.equals(other.queryDef)) { | ||
| return false; | ||
| } | ||
| if (this.hits != other.hits && (this.hits == null || !this.hits.equals(other.hits))) { | ||
| return false; | ||
| } | ||
| return true; | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comments as above about hashCode and equals. Try using the eclipse built-in function to generate them. |
||
|
|
||
| public int getIterationNumber() { | ||
|
|
||
This file contains hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two comments here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have changed the full stuff. I have revisited the way equality is
evaluated and I have modified properties accordingly.
2015-09-22 20:23 GMT+02:00 Jose Manuel Duarte notifications@github.com: