Skip to content

Commit

Permalink
Adding log information to check the logic flow #12
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoppiano committed Feb 9, 2019
1 parent e5f8eef commit c7a0013
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,18 @@ protected void getByQuery(
}

if (isNotBlank(atitle) && isNotBlank(firstAuthor)) {
LOGGER.debug("Match with article infos");
// processed = true;
lookupEngine.retrieveByArticleMetadataAsync(atitle, firstAuthor, postValidate, matchingDocument -> {
if (matchingDocument.isException()) {
// error with article info - trying to match with journal infos (without first Page)
// error with article info - trying to match with journal infos (without first author)
LOGGER.debug("Error in article info, trying to match with journal infos (no first author)");
if (isNotBlank(jtitle) && isNotBlank(volume) && isNotBlank(firstPage)) {
lookupEngine.retrieveByJournalMetadataAsync(jtitle, volume, firstPage, atitle, firstAuthor, postValidate, matchingDocumentJournal -> {
if (matchingDocumentJournal.isException()) {

//error with journal info - trying to match biblio
LOGGER.debug("Error in journal info, trying to match with biblio string");
if (isNotBlank(biblio)) {
lookupEngine.retrieveByBiblioAsync(biblio, postValidate, firstAuthor, atitle, parseReference, MatchingDocumentBiblio -> {
if (MatchingDocumentBiblio.isException()) {
Expand All @@ -207,12 +210,14 @@ protected void getByQuery(
return;
}

// error with article info - trying to match with journal infos (with first Page)
// error with article info - trying to match with journal infos (with first Author)
LOGGER.debug("Error in article info, trying to match with journal infos (with first author)");
if (isNotBlank(jtitle) && isNotBlank(volume) && isNotBlank(firstPage)) {
lookupEngine.retrieveByJournalMetadataAsync(jtitle, volume, firstPage, atitle, firstAuthor, postValidate, matchingDocumentJournal -> {
if (matchingDocumentJournal.isException()) {

//error with journal info - trying to match biblio
LOGGER.debug("Error in journal info, trying to match with biblio string");
if (isNotBlank(biblio)) {
lookupEngine.retrieveByBiblioAsync(biblio, postValidate, firstAuthor, atitle, parseReference, matchingDocumentBiblio -> {
if (matchingDocumentBiblio.isException()) {
Expand All @@ -234,6 +239,7 @@ protected void getByQuery(

// error with article info - and no journal information provided -
// trying to match with journal infos (with first Page)
LOGGER.debug("Error in article info, trying to match with biblio string");
if (isNotBlank(biblio)) {
lookupEngine.retrieveByBiblioAsync(biblio, postValidate, firstAuthor, atitle, parseReference, matchingDocumentBiblio -> {
if (matchingDocumentBiblio.isException()) {
Expand All @@ -254,6 +260,7 @@ protected void getByQuery(
}

if (isNotBlank(jtitle) && isNotBlank(volume) && isNotBlank(firstPage)) {
LOGGER.debug("Match with journal string (without first page)");
// processed = true;
lookupEngine.retrieveByJournalMetadataAsync(jtitle, volume, firstPage, atitle, firstAuthor, postValidate, matchingDocument -> {
if (matchingDocument.isException()) {
Expand All @@ -278,6 +285,7 @@ protected void getByQuery(
}

if (isNotBlank(jtitle) && isNotBlank(firstAuthor) && isNotBlank(volume) && isNotBlank(firstPage)) {
LOGGER.debug("Match with journal string (with first page)");
// processed = true;
lookupEngine.retrieveByJournalMetadataAsync(jtitle, volume, firstPage, atitle, firstAuthor, postValidate, matchingDocument -> {
if (matchingDocument.isException()) {
Expand All @@ -302,6 +310,7 @@ protected void getByQuery(
}

if (isNotBlank(biblio)) {
LOGGER.debug("Match with biblio string");
// processed = true;
lookupEngine.retrieveByBiblioAsync(biblio, postValidate, firstAuthor, atitle, parseReference, matchingDocumentBiblio -> {
if (matchingDocumentBiblio.isException()) {
Expand Down

0 comments on commit c7a0013

Please sign in to comment.