Skip to content
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

Springer fetcher #291

Merged
merged 9 commits into from
Nov 29, 2015
Merged

Springer fetcher #291

merged 9 commits into from
Nov 29, 2015

Conversation

oscargus
Copy link
Contributor

@oscargus oscargus commented Nov 4, 2015

Playing around with Json was quite fun, so I did a Springer fetcher (search) as well...

Remains:

  • Help file
  • Replace spaces with %20 in queries
  • Where to put SpringerJsonConverter?
  • Test file

@oscargus oscargus changed the title Springer fetcher [WIP] Springer fetcher Nov 4, 2015
@oscargus oscargus changed the title [WIP] Springer fetcher Springer fetcher Nov 21, 2015
for (String field : singleFieldStrings) {
if (springerJsonEntry.has(field)) {
String text = springerJsonEntry.getString(field);
if (text.length() > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use !isEmpty


// Guess publication type
String isbn = springerJsonEntry.optString("isbn");
if ((isbn == null) || (isbn.length() == 0)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use com.google.common.base.Strings.isNullOrEmpty(isbn) for that.

@simonharrer
Copy link
Contributor

@oscargus if you have time, could you work on the comments? Then we can merge this in, and ship this feature alongside JabRef 3.0.

@oscargus
Copy link
Contributor Author

I've implemented the changes (and a few more). Testing is still lacking though.

@matthiasgeiger matthiasgeiger added this to the v3.0 milestone Nov 27, 2015
@koppor
Copy link
Member

koppor commented Nov 27, 2015

An idea regarding test files is implemented at GVKParserTest.java.

@oscargus
Copy link
Contributor Author

Yes, I've noted that, but at the moment I do not see that there will be time to read up on it. But it is in fact the reason that I didn't hard code more tests using the current approach.

@koppor
Copy link
Member

koppor commented Nov 29, 2015

OK, let's this go through and improve testing afterwards. Refs koppor#62

koppor added a commit that referenced this pull request Nov 29, 2015
@koppor koppor merged commit 0c53b6e into JabRef:master Nov 29, 2015
@matthiasgeiger
Copy link
Member

I just tested the Fetcher which works well from a technical standpoint - however, springer is returning some shitty dates (article published in year 2102 and so...) is this a general problem or do they currently have some problems? @oscargus

@oscargus
Copy link
Contributor Author

I haven't noticed that problem earlier anyway (rather noted that quite a lot of papers had 2016 as year).

@oscargus oscargus deleted the springersearch branch November 30, 2015 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants