forked from JabRef/jabref
-
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.
Merge remote-tracking branch 'upstream/main' into test-for-citationstyle
* upstream/main: Fix right clicking a group and choosing "remove selected entries from this group" leads to error when Bibtex source tab is selected (JabRef#8821) Fix single identifier cannot be opened on click (JabRef#8838) Add Pubmed/Medline Query Transformer (JabRef#8818) adjust and add testcases for FileAnnotationViewModel (JabRef#8830) Append config instead of replacing (JabRef#8834) Fix eclipse config (JabRef#8835) Add Nemo file manager (JabRef#8831) Fix missing clear action on pressing esc within the "Filter groups" field (JabRef#8829)
- Loading branch information
Showing
15 changed files
with
241 additions
and
44 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
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
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
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
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
54 changes: 54 additions & 0 deletions
54
src/main/java/org/jabref/logic/importer/fetcher/transformers/MedlineQueryTransformer.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,54 @@ | ||
package org.jabref.logic.importer.fetcher.transformers; | ||
|
||
/** | ||
* | ||
* Medline/Pubmed specific transformer which uses suffixes for searches | ||
* see <a href="https://pubmed.ncbi.nlm.nih.gov/help/#search-tags">Pubmed help</a> for details | ||
* | ||
*/ | ||
public class MedlineQueryTransformer extends AbstractQueryTransformer { | ||
|
||
@Override | ||
protected String getLogicalAndOperator() { | ||
return " AND "; | ||
} | ||
|
||
@Override | ||
protected String getLogicalOrOperator() { | ||
return " OR "; | ||
} | ||
|
||
@Override | ||
protected String getLogicalNotOperator() { | ||
return "NOT "; | ||
} | ||
|
||
@Override | ||
protected String handleAuthor(String author) { | ||
return author + "[au]"; | ||
} | ||
|
||
@Override | ||
protected String handleTitle(String title) { | ||
return title + "[ti]"; | ||
} | ||
|
||
@Override | ||
protected String handleJournal(String journalTitle) { | ||
return journalTitle + "[ta]"; | ||
} | ||
|
||
@Override | ||
protected String handleYear(String year) { | ||
return year + "[dp]"; | ||
} | ||
|
||
@Override | ||
protected String handleYearRange(String yearRange) { | ||
parseYearRange(yearRange); | ||
if (endYear == Integer.MAX_VALUE) { | ||
return yearRange; | ||
} | ||
return Integer.toString(startYear) + ":" + Integer.toString(endYear) + "[dp]"; | ||
} | ||
} |
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
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.