+ 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..
Error.ScriptEvaluationError ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: 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..
at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:99)
at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.handleJS(DataSetScriptExecutor.java:256)
at org.eclipse.birt.report.engine.script.internal.ScriptDataSetScriptExecutor.handleFetch(ScriptDataSetScriptExecutor.java:143)
at org.eclipse.birt.data.engine.impl.ScriptDataSetRuntime.fetch(ScriptDataSetRuntime.java:103)
at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor$CustomDataSet.fetch(PreparedScriptDSQuery.java:260)
at org.eclipse.birt.data.engine.executor.dscache.DataSetToCache.fetchFromDataSet(DataSetToCache.java:243)
at org.eclipse.birt.data.engine.executor.dscache.DataSetToCache.fetch(DataSetToCache.java:171)
at org.eclipse.birt.data.engine.executor.cache.OdiAdapter.fetch(OdiAdapter.java:218)
at org.eclipse.birt.data.engine.executor.cache.RowResultSet.fetch(RowResultSet.java:145)
at org.eclipse.birt.data.engine.executor.cache.RowResultSet.doNext(RowResultSet.java:118)
at org.eclipse.birt.data.engine.executor.cache.RowResultSet.next(RowResultSet.java:96)
at org.eclipse.birt.data.engine.executor.cache.ExpandableRowResultSet.next(ExpandableRowResultSet.java:63)
at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.populateData(SmartCacheHelper.java:318)
at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.initInstance(SmartCacheHelper.java:285)
at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.getResultSetCache(SmartCacheHelper.java:246)
at org.eclipse.birt.data.engine.executor.cache.SmartCache.<init>(SmartCache.java:74)
at org.eclipse.birt.data.engine.executor.transform.pass.PassUtil.populateOdiResultSet(PassUtil.java:132)
at org.eclipse.birt.data.engine.executor.transform.pass.PassUtil.pass(PassUtil.java:62)
at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.doSinglePass(PassManager.java:170)
at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.prepareDataSetResultSet(PassManager.java:94)
at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.populateDataSetResultSet(PassManager.java:80)
at org.eclipse.birt.data.engine.executor.transform.ResultSetPopulator.cacheDataSet(ResultSetPopulator.java:223)
at org.eclipse.birt.data.engine.executor.transform.CachedResultSet.<init>(CachedResultSet.java:146)
at org.eclipse.birt.data.engine.executor.CandidateQuery.execute(CandidateQuery.java:148)
at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor.executeOdiQuery(PreparedScriptDSQuery.java:226)
at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:1222)
at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(ServiceForQueryResults.java:233)
at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(QueryResults.java:178)
at org.eclipse.birt.report.engine.data.dte.QueryResultSet.<init>(QueryResultSet.java:98)
at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:168)
at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:275)
at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1947)
at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80)
at org.eclipse.birt.report.engine.executor.GridItemExecutor.execute(GridItemExecutor.java:65)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:181)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at hu.sztaki.dsd.mycite2.tools.BIRTReportHandler.createReport(BIRTReportHandler.java:1490)
at hu.sztaki.dsd.mycite2.tools.BIRTReportHandler.doCreateReportForSummaryTable(BIRTReportHandler.java:2017)
at hu.sztaki.dsd.mycite2.tools.BIRTReportHandler.createSummaryTableForAuthor(BIRTReportHandler.java:1796)
at hu.sztaki.dsd.mycite2.tools.BIRTReportHandler$$FastClassBySpringCGLIB$$ba382947.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:721)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:656)
at hu.sztaki.dsd.mycite2.tools.BIRTReportHandler$$EnhancerBySpringCGLIB$$55964e51.createSummaryTableForAuthor(<generated>)
at hu.sztaki.dsd.mycite2.controllers.AuthorRestController.createSummaryTable(AuthorRestController.java:208)
at hu.sztaki.dsd.mycite2.controllers.AuthorRestController$$FastClassBySpringCGLIB$$6b15d385.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:721)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
at hu.sztaki.dsd.mycite2.security.RequestMethodPermissionChecker.checkPermissionsBefore(RequestMethodPermissionChecker.java:143)
at jdk.internal.reflect.GeneratedMethodAccessor258.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:52)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:656)
at hu.sztaki.dsd.mycite2.controllers.AuthorRestController$$EnhancerBySpringCGLIB$$a1ceb1e.createSummaryTable(<generated>)
at jdk.internal.reflect.GeneratedMethodAccessor1146.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:178)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:108)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
at hu.sztaki.dsd.mycite2.common.HttpRequestParameterConverterFilter.doFilterInternal(HttpRequestParameterConverterFilter.java:52)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.common.RedirectFilter.doFilterInternal(RedirectFilter.java:60)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.i18n.LabelConfigFilter.doFilterInternal(LabelConfigFilter.java:51)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.security.AnonymousLockdownFilter.doFilterInternal(AnonymousLockdownFilter.java:46)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.security.CacheabilityFilter.doFilterInternal(CacheabilityFilter.java:98)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.security.UsageLoggingFilter.doFilter(UsageLoggingFilter.java:35)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.common.MyciteRequestContextFilter.doFilterInternal(MyciteRequestContextFilter.java:58)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.security.SessionTimeoutFilter.doFilterInternal(SessionTimeoutFilter.java:73)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.security.SwitchedUserNameLoggerFilter.doFilter(SwitchedUserNameLoggerFilter.java:38)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.security.MySwitchUserFilter.doFilterInternal(MySwitchUserFilter.java:214)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.security.Mycite2AccessExceptionFilter.doFilterInternal(Mycite2AccessExceptionFilter.java:38)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:155)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.security.ApiVersionCheckingFilter.callFilterChain(ApiVersionCheckingFilter.java:65)
at hu.sztaki.dsd.mycite2.security.ApiVersionCheckingFilter.doFilterInternal(ApiVersionCheckingFilter.java:60)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.i18n.LabelConfigFilter.doFilterInternal(LabelConfigFilter.java:51)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.security.ClickjackProtectionFilter.doFilterInternal(ClickjackProtectionFilter.java:38)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.security.CORSFilter.doFilterInternal(CORSFilter.java:59)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.security.ReadOnlyModeFilter.doFilterInternal(ReadOnlyModeFilter.java:38)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.security.MyciteRequestContextClearFilter.doFilterInternal(MyciteRequestContextClearFilter.java:27)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at hu.sztaki.dsd.mycite2.security.LoggingFilter.doFilterInternal(LoggingFilter.java:125)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:305)
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:747)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:609)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:810)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1623)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.eclipse.birt.data.engine.core.DataException: 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.
at org.eclipse.birt.data.engine.script.JSMethodRunner.runScript(JSMethodRunner.java:147)
at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:90)
... 231 more
Caused by: org.eclipse.birt.data.engine.core.DataException: A BIRT exception occurred. See next exception for more information.
impactFactor not found.
at org.eclipse.birt.data.engine.core.DataException.wrap(DataException.java:123)
at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evaluateJSAsExpr(ScriptEvalUtil.java:997)
at org.eclipse.birt.data.engine.script.JSMethodRunner.runScript(JSMethodRunner.java:138)
... 232 more
Caused by: org.eclipse.birt.core.exception.CoreException: impactFactor not found.
at org.eclipse.birt.core.script.JavascriptEvalUtil.wrapRhinoException(JavascriptEvalUtil.java:307)
at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateRawScript(JavascriptEvalUtil.java:106)
at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateScript(JavascriptEvalUtil.java:138)
at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evaluateJSAsExpr(ScriptEvalUtil.java:993)
... 233 more
Caused by: org.mozilla.javascript.JavaScriptException: impactFactor not found.
at org.eclipse.birt.core.script.NativeJavaMap.get(NativeJavaMap.java:75)
at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1617)
at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1437)
at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1423)
at org.mozilla.javascript.gen.c24027._c1(/report/data-sets/script-data-set[@id="3674"]/method[@name="fetch"]:67)
at org.mozilla.javascript.gen.c24027.call(/report/data-sets/script-data-set[@id="3674"]/method[@name="fetch"])
at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
at org.mozilla.javascript.gen.c25._c0(/report/data-sets/script-data-set[@id="2855"]/method[@name="fetch"]:0)
at org.mozilla.javascript.gen.c25.call(/report/data-sets/script-data-set[@id="2855"]/method[@name="fetch"])
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
at org.mozilla.javascript.gen.c25.call(/report/data-sets/script-data-set[@id="2855"]/method[@name="fetch"])
at org.mozilla.javascript.gen.c25.exec(/report/data-sets/script-data-set[@id="2855"]/method[@name="fetch"])
at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateRawScript(JavascriptEvalUtil.java:99)
... 235 more