-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Springer fetcher #291
Conversation
c3decfe
to
30fc764
Compare
08517a3
to
151a4a9
Compare
151a4a9
to
b535b75
Compare
for (String field : singleFieldStrings) { | ||
if (springerJsonEntry.has(field)) { | ||
String text = springerJsonEntry.getString(field); | ||
if (text.length() > 0) { |
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.
use !isEmpty
|
||
// Guess publication type | ||
String isbn = springerJsonEntry.optString("isbn"); | ||
if ((isbn == null) || (isbn.length() == 0)) { |
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.
You can use com.google.common.base.Strings.isNullOrEmpty(isbn)
for that.
@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. |
ba2d074
to
c5ec38f
Compare
I've implemented the changes (and a few more). Testing is still lacking though. |
An idea regarding test files is implemented at GVKParserTest.java. |
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. |
OK, let's this go through and improve testing afterwards. Refs koppor#62 |
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 |
I haven't noticed that problem earlier anyway (rather noted that quite a lot of papers had 2016 as year). |
Playing around with Json was quite fun, so I did a Springer fetcher (search) as well...
Remains: