Ferenczy György tudományos és oktatási munkásságának összefoglalása
MTA VII. Kémiai Tudományok Osztályának táblázata (2024.05.09)
2024. máj. 9. 9:43

The following items have errors:

ReportDesign (id = 1):
+ There are errors evaluating script "/**
* This script runs as many times as many elements the publications list has. The resulting data set will have as many elements as many times this
* function runs. To make it run again, it must return true, otherwise it must return false.
*
* In this case the function must run again and again until the publications list has more elements. When there are no more elements,
* so thi idx is equals to the size of the publications list, the function returns false.
*/
if(idx < publications.size())
{
 //if(params["DoRefresh"].value == true){
 // var refreshed = Mycite2ReportingHelper.refreshObject("publication", publications[idx].mtid);
 // publications = Mycite2ReportingHelper.replaceObjectInList(publications, idx, refreshed);
 //}
 /**
 * When an object is a JAVA Map and does not contain any elements, it throws exception. Here I declare and initialize some local variables
 * to avoid exceptions. Some variables must be JAVA ArrayLists, so I use the Mycite2ReportingHelper class.
 */
 var pubAuthorships = Mycite2ReportingHelper.getEmptyList();
 var impactFactor = null;
 var journal = {};
 var type = {};
 var subType = {};
 var category = {};
 var caseNumber = null;
 var issueDate = null;
 var pubYear = null;
 var languages = Mycite2ReportingHelper.getEmptyList();
 var cit_count_wo_diss = null;
 var ind_cit_count_wo_diss = null;

 /**
 * Here I iterate through the properties of the object (the keys of the Map) and give value to the above variables if it is possible.
 */
 for (var prop in publications[idx]) {
  if(prop == "type") type = publications[idx].type;
     if(prop == "authorships")  pubAuthorships = publications[idx].authorships;
     if(prop == "impactFactor") impactFactor = publications[idx].impactFactor;
     if(prop == "journal") journal = publications[idx].journal;
     if(prop == "subType") subType = publications[idx].subType;
     if(prop == "category") category = publications[idx].category;
     if(prop == "case_number") caseNumber = publications[idx].case_number;
     if(prop == "issue_date") issueDate = publications[idx].issue_date;
     if(prop == "publishedYear") pubYear = publications[idx].publishedYear;
     if(prop == "languages") languages = publications[idx].languages;
     //if(prop == "citationCountWoOther") cit_count_wo_diss = publications[idx].citationCountWoOther;
     //if(prop == "independentCitCountWoOther") ind_cit_count_wo_diss = publications[idx].independentCitCountWoOther;
    }
    
    if(Mycite2ReportingHelper.containsKey(citationCountMapWoOther, publications[idx].mtid) == true){
       log("pubidx id: " + publications[idx].mtid);
       //if(publications[idx].mtid == 240634){
     //log("citCountMap at pos: " + citationCountMapWoOther.get(publications[idx].mtid));
    //}
    cit_count_wo_diss = citationCountMapWoOther.get(publications[idx].mtid.toString()).size();
   }else{
    cit_count_wo_diss = 0;
   }
 
 if(Mycite2ReportingHelper.containsKey(indCitationCountMapWoOther, publications[idx].mtid) == true){
    ind_cit_count_wo_diss = indCitationCountMapWoOther.get(publications[idx].mtid.toString()).size();
   }else{
    ind_cit_count_wo_diss = 0;
   }
    
    if(publications[idx].mtid == 1161820){
     log(publications[idx]);
     log(publications[idx].impactFactor);
    }


 if(publications[idx].otype == "JournalArticle" && Mycite2ReportingHelper.containsKey(publications[idx], "journal") && !Mycite2ReportingHelper.containsKey(journal, "hungarian")){
     log("Hungarian is null at index " + idx);
     publications[idx].journal.hungarian = null;
    }

 //Giving values to the columns in the current DataSet row (the name of the array referrs to the column, I do not know why it is called row)
// row["hungarian_citations"] = independent_hun_citations;
// row["foreign_lang_citations"] = independent_eng_citations
// row["database_citations"] = database_citations;
 row["type_code"] = type.mtid;
 row["all_cit_count"] = cit_count_wo_diss;
 row["ind_cit_count"] = ind_cit_count_wo_diss;
 row["otype"] = publications[idx].otype;
 row["subtype_id"] = subType.mtid;
 row["index"] = idx + 1;
 row["mtid"] = publications[idx].mtid.toString();
 row["category_id"] = category.mtid;
 row["case_number"] = caseNumber;
 row["issue_date"] = issueDate;


 /** The journal is a Map and behaves like the publication object. To avoid exceptions I use the above solution and iterate through its properties
 *   and fill the values if possible.
 */
 for(var prop in journal){
  if(prop == "lang"){
   var jlang = journal.lang;
   if(jlang == 1){
    row["journal_lang"] = "HUNGARIAN";
   }
   if(jlang == 2){
    row["journal_lang"] = "FOREIGN_AND_HUNGARIAN";
   }
   if(jlang == 3){
    row["journal_lang"] = "FOREIGN";
   }
   
  }
  if(prop == "sci_indexed") row["sci_indexed"] = journal.sci_indexed;
  if(prop == "hungarian") row["journal_is_hungarian"] = journal.hungarian;
 }

    /**
 * Sometimes we need some extra information that are not explicitly given.
 */

/*****************************Gethering information regarding authorships*************************************/

 var is_author = false; //Tells if the selected author is an author of the current publication
 var is_editor = false; //Tells if the selected author is an editor of the current publication
 var authorCount = 0;
 var if_applicable = false;
 var corresponding = false;
 var isRealAuthor = false;

 log("Authorships: " + pubAuthorships);

 //To extract the required information, we need to iterate through the authorships and check for the apropriate authorship types
 for(var i = 0; i < pubAuthorships.size(); i++){

  /**
  * This section is for avoiding author and types fields being null
  * We iterate through the properties of the current authorship, and when a required property found, the value is passed to the apropriate
  * local variable.
  */
  var author = null;
  var authorTyped = false;
  var editorTyped = false;
  var atype = null;
  var corr = false;
  for(var prop in pubAuthorships[i]){
   if(prop == "author_mtid") author = pubAuthorships[i].author_mtid;
   if(prop == "authorTyped") authorTyped = pubAuthorships[i].authorTyped;
   if(prop == "editorTyped") editorTyped = pubAuthorships[i].editorTyped;
   if(prop == "type") atype = pubAuthorships[i].type.code;
   if(prop == "corresponding") corr = pubAuthorships[i].corresponding;
  }
  var if_app = atype == -4 || authorTyped == true;
  authorTyped = atype == -4 || atype == -5 || authorTyped == true;
  if(authorTyped == true){
   authorCount ++;
  }
  //If no author and no types property found, we know that the authorship contains no interesting information, so the loop can jump
  //to the next one
  if(author == null) continue;

  //If the author is not the selected author, the loop jumps to the next item.
  if(author != params["AuthorId"]) continue;
  
  if(authorTyped == true) is_author = true;
  if(editorTyped == true) is_editor = true;
  if(if_app == true) if_applicable = true;
  if(corr == true) corresponding = true;
  if(atype == 0) isRealAuthor = true;

 }
 
 if(is_author == true){
  is_editor = false;
  //curr_other = false;
 }
 if(is_editor == true){
  is_author = false;
  //curr_other = false;
 }

 row["curr_is_author"] = is_author;
 row["curr_is_editor"] = is_editor;
 row["single_author"] = authorCount == 1;
 row["if_applicable"] = if_applicable;
 row["curr_is_corresponding"] = corresponding;
 row["curr_is_real_author"] = isRealAuthor;

/***************************************************************************************************************/

/****************************************Gethering information regarding languages******************************/
 /* var is_hun = false; //The publication is Hungarian if the Hungarian language (oldId = 1) is listed in its languag list.
 var is_foreign = false; //The publication is published in foreign language if there is any language other than Hungarian listed in its language list
 for(var i = 0; i < languages.size(); i++){
  if(Mycite2ReportingHelper.containsKey(languages[i], "oldId") && languages[i].oldId == 1 && languages.size() == 1) is_hun = true;
  else is_foreign = true;
 }
 row["hungarian"] = is_hun;
 row["foreign_language"] = is_foreign;
 */

 row["foreign_language"] = Mycite2ReportingHelper.containsKey(publications[idx],'foreignLanguage') && publications[idx].foreignLanguage;
    row["hungarian"] = !row["foreign_language"];

 row["published_year"] = pubYear;
 row["impact_factor"] = impactFactor;
/***************************************************************************************************************/

 //At the end the index must be increased and the script must return true.
 idx++;
 if(idx == publications.size()){
        //pageNum++;
        //log("new page: " + pageNum);
        //publications = send(queryString + pageNum);
        //if(publications.size() > 0) idx = 0;
        pageOffset += rowsPerPage;
     log("new page start: " + (pageOffset + 1));
     nextIdList = getNextIds(pageOffset, rowsPerPage);
     if(nextIdList != ""){
   //publications = send(queryString + nextIdList + ")");
   publications = sendSql(nextIdList);
  }else{
   publications = Mycite2ReportingHelper.getEmptyList();
  }
  if(publications.size() > 0) idx = 0;
    }
 return true;

}
return false;":
Fail to execute script in function __bm_FETCH(). Source:
------
" + /**
* This script runs as many times as many elements the publications list has. The resulting data set will have as many elements as many times this
* function runs. To make it run again, it must return true, otherwise it must return false.
*
* In this case the function must run again and again until the publications list has more elements. When there are no more elements,
* so thi idx is equals to the size of the publications list, the function returns false.
*/
if(idx < publications.size())
{
 //if(params["DoRefresh"].value == true){
 // var refreshed = Mycite2ReportingHelper.refreshObject("publication", publications[idx].mtid);
 // publications = Mycite2ReportingHelper.replaceObjectInList(publications, idx, refreshed);
 //}
 /**
 * When an object is a JAVA Map and does not contain any elements, it throws exception. Here I declare and initialize some local variables
 * to avoid exceptions. Some variables must be JAVA ArrayLists, so I use the Mycite2ReportingHelper class.
 */
 var pubAuthorships = Mycite2ReportingHelper.getEmptyList();
 var impactFactor = null;
 var journal = {};
 var type = {};
 var subType = {};
 var category = {};
 var caseNumber = null;
 var issueDate = null;
 var pubYear = null;
 var languages = Mycite2ReportingHelper.getEmptyList();
 var cit_count_wo_diss = null;
 var ind_cit_count_wo_diss = null;

 /**
 * Here I iterate through the properties of the object (the keys of the Map) and give value to the above variables if it is possible.
 */
 for (var prop in publications[idx]) {
  if(prop == "type") type = publications[idx].type;
     if(prop == "authorships")  pubAuthorships = publications[idx].authorships;
     if(prop == "impactFactor") impactFactor = publications[idx].impactFactor;
     if(prop == "journal") journal = publications[idx].journal;
     if(prop == "subType") subType = publications[idx].subType;
     if(prop == "category") category = publications[idx].category;
     if(prop == "case_number") caseNumber = publications[idx].case_number;
     if(prop == "issue_date") issueDate = publications[idx].issue_date;
     if(prop == "publishedYear") pubYear = publications[idx].publishedYear;
     if(prop == "languages") languages = publications[idx].languages;
     //if(prop == "citationCountWoOther") cit_count_wo_diss = publications[idx].citationCountWoOther;
     //if(prop == "independentCitCountWoOther") ind_cit_count_wo_diss = publications[idx].independentCitCountWoOther;
    }
    
    if(Mycite2ReportingHelper.containsKey(citationCountMapWoOther, publications[idx].mtid) == true){
       log("pubidx id: " + publications[idx].mtid);
       //if(publications[idx].mtid == 240634){
     //log("citCountMap at pos: " + citationCountMapWoOther.get(publications[idx].mtid));
    //}
    cit_count_wo_diss = citationCountMapWoOther.get(publications[idx].mtid.toString()).size();
   }else{
    cit_count_wo_diss = 0;
   }
 
 if(Mycite2ReportingHelper.containsKey(indCitationCountMapWoOther, publications[idx].mtid) == true){
    ind_cit_count_wo_diss = indCitationCountMapWoOther.get(publications[idx].mtid.toString()).size();
   }else{
    ind_cit_count_wo_diss = 0;
   }
    
    if(publications[idx].mtid == 1161820){
     log(publications[idx]);
     log(publications[idx].impactFactor);
    }


 if(publications[idx].otype == "JournalArticle" && Mycite2ReportingHelper.containsKey(publications[idx], "journal") && !Mycite2ReportingHelper.containsKey(journal, "hungarian")){
     log("Hungarian is null at index " + idx);
     publications[idx].journal.hungarian = null;
    }

 //Giving values to the columns in the current DataSet row (the name of the array referrs to the column, I do not know why it is called row)
// row["hungarian_citations"] = independent_hun_citations;
// row["foreign_lang_citations"] = independent_eng_citations
// row["database_citations"] = database_citations;
 row["type_code"] = type.mtid;
 row["all_cit_count"] = cit_count_wo_diss;
 row["ind_cit_count"] = ind_cit_count_wo_diss;
 row["otype"] = publications[idx].otype;
 row["subtype_id"] = subType.mtid;
 row["index"] = idx + 1;
 row["mtid"] = publications[idx].mtid.toString();
 row["category_id"] = category.mtid;
 row["case_number"] = caseNumber;
 row["issue_date"] = issueDate;


 /** The journal is a Map and behaves like the publication object. To avoid exceptions I use the above solution and iterate through its properties
 *   and fill the values if possible.
 */
 for(var prop in journal){
  if(prop == "lang"){
   var jlang = journal.lang;
   if(jlang == 1){
    row["journal_lang"] = "HUNGARIAN";
   }
   if(jlang == 2){
    row["journal_lang"] = "FOREIGN_AND_HUNGARIAN";
   }
   if(jlang == 3){
    row["journal_lang"] = "FOREIGN";
   }
   
  }
  if(prop == "sci_indexed") row["sci_indexed"] = journal.sci_indexed;
  if(prop == "hungarian") row["journal_is_hungarian"] = journal.hungarian;
 }

    /**
 * Sometimes we need some extra information that are not explicitly given.
 */

/*****************************Gethering information regarding authorships*************************************/

 var is_author = false; //Tells if the selected author is an author of the current publication
 var is_editor = false; //Tells if the selected author is an editor of the current publication
 var authorCount = 0;
 var if_applicable = false;
 var corresponding = false;
 var isRealAuthor = false;

 log("Authorships: " + pubAuthorships);

 //To extract the required information, we need to iterate through the authorships and check for the apropriate authorship types
 for(var i = 0; i < pubAuthorships.size(); i++){

  /**
  * This section is for avoiding author and types fields being null
  * We iterate through the properties of the current authorship, and when a required property found, the value is passed to the apropriate
  * local variable.
  */
  var author = null;
  var authorTyped = false;
  var editorTyped = false;
  var atype = null;
  var corr = false;
  for(var prop in pubAuthorships[i]){
   if(prop == "author_mtid") author = pubAuthorships[i].author_mtid;
   if(prop == "authorTyped") authorTyped = pubAuthorships[i].authorTyped;
   if(prop == "editorTyped") editorTyped = pubAuthorships[i].editorTyped;
   if(prop == "type") atype = pubAuthorships[i].type.code;
   if(prop == "corresponding") corr = pubAuthorships[i].corresponding;
  }
  var if_app = atype == -4 || authorTyped == true;
  authorTyped = atype == -4 || atype == -5 || authorTyped == true;
  if(authorTyped == true){
   authorCount ++;
  }
  //If no author and no types property found, we know that the authorship contains no interesting information, so the loop can jump
  //to the next one
  if(author == null) continue;

  //If the author is not the selected author, the loop jumps to the next item.
  if(author != params["AuthorId"]) continue;
  
  if(authorTyped == true) is_author = true;
  if(editorTyped == true) is_editor = true;
  if(if_app == true) if_applicable = true;
  if(corr == true) corresponding = true;
  if(atype == 0) isRealAuthor = true;

 }
 
 if(is_author == true){
  is_editor = false;
  //curr_other = false;
 }
 if(is_editor == true){
  is_author = false;
  //curr_other = false;
 }

 row["curr_is_author"] = is_author;
 row["curr_is_editor"] = is_editor;
 row["single_author"] = authorCount == 1;
 row["if_applicable"] = if_applicable;
 row["curr_is_corresponding"] = corresponding;
 row["curr_is_real_author"] = isRealAuthor;

/***************************************************************************************************************/

/****************************************Gethering information regarding languages******************************/
 /* var is_hun = false; //The publication is Hungarian if the Hungarian language (oldId = 1) is listed in its languag list.
 var is_foreign = false; //The publication is published in foreign language if there is any language other than Hungarian listed in its language list
 for(var i = 0; i < languages.size(); i++){
  if(Mycite2ReportingHelper.containsKey(languages[i], "oldId") && languages[i].oldId == 1 && languages.size() == 1) is_hun = true;
  else is_foreign = true;
 }
 row["hungarian"] = is_hun;
 row["foreign_language"] = is_foreign;
 */

 row["foreign_language"] = Mycite2ReportingHelper.containsKey(publications[idx],'foreignLanguage') && publications[idx].foreignLanguage;
    row["hungarian"] = !row["foreign_language"];

 row["published_year"] = pubYear;
 row["impact_factor"] = impactFactor;
/***************************************************************************************************************/

 //At the end the index must be increased and the script must return true.
 idx++;
 if(idx == publications.size()){
        //pageNum++;
        //log("new page: " + pageNum);
        //publications = send(queryString + pageNum);
        //if(publications.size() > 0) idx = 0;
        pageOffset += rowsPerPage;
     log("new page start: " + (pageOffset + 1));
     nextIdList = getNextIds(pageOffset, rowsPerPage);
     if(nextIdList != ""){
   //publications = send(queryString + nextIdList + ")");
   publications = sendSql(nextIdList);
  }else{
   publications = Mycite2ReportingHelper.getEmptyList();
  }
  if(publications.size() > 0) idx = 0;
    }
 return true;

}
return false; + "
-----
A BIRT exception occurred. See next exception for more information.
impactFactor not found..
+ Data Set script method "Fetch" returned null; expected a Boolean value.