1 |
35745
|
stefania.m
|
package eu.dnetlib.client.fundingrequest.stepinfo;
|
2 |
|
|
|
3 |
|
|
import com.google.gwt.user.client.ui.HTML;
|
4 |
|
|
import com.google.gwt.user.client.ui.IsWidget;
|
5 |
|
|
import com.google.gwt.user.client.ui.Widget;
|
6 |
|
|
import eu.dnetlib.goldoa.domain.Affiliation;
|
7 |
|
|
import eu.dnetlib.goldoa.domain.Person;
|
8 |
|
|
|
9 |
|
|
/**
|
10 |
|
|
* Created by stefania on 3/27/15.
|
11 |
|
|
*/
|
12 |
|
|
public class ResearcherFullInfo implements IsWidget {
|
13 |
|
|
|
14 |
|
|
private HTML researcherInfo = new HTML();
|
15 |
|
|
private String researcherInfoContents = "";
|
16 |
|
|
|
17 |
|
|
public ResearcherFullInfo(Person researcher) {
|
18 |
|
|
|
19 |
|
|
researcherInfoContents = "<div>";
|
20 |
|
|
|
21 |
|
|
researcherInfoContents += "<dl><dt class=\"chronologySubTitle\">RESEARCHER</dt></dl>";
|
22 |
|
|
|
23 |
35903
|
stefania.m
|
researcherInfoContents += "<dl><dd>" + researcher.getName() + " ";
|
24 |
35745
|
stefania.m
|
if(researcher.getInitials()!=null && !researcher.getInitials().trim().equals(""))
|
25 |
|
|
researcherInfoContents += researcher.getInitials() + ". ";
|
26 |
|
|
researcherInfoContents += researcher.getLastname() + "</dd></dl>";
|
27 |
35903
|
stefania.m
|
researcherInfoContents += "<dl><dd>" + researcher.getEmail() + "</dd></dl>";
|
28 |
35745
|
stefania.m
|
|
29 |
|
|
if(researcher.getTelephone()!=null && !researcher.getTelephone().trim().equals(""))
|
30 |
35903
|
stefania.m
|
researcherInfoContents += "<dl><dd>" + researcher.getTelephone() + "</dd></dl>";
|
31 |
35745
|
stefania.m
|
|
32 |
|
|
if(researcher.getOrcidId()!=null && !researcher.getOrcidId().trim().equals(""))
|
33 |
35903
|
stefania.m
|
researcherInfoContents += "<dl><dd>" + researcher.getOrcidId() + "</dd></dl>";
|
34 |
35745
|
stefania.m
|
|
35 |
|
|
if(!researcher.getAffiliations().isEmpty()) {
|
36 |
|
|
|
37 |
35903
|
stefania.m
|
researcherInfoContents += "<dl>";
|
38 |
35745
|
stefania.m
|
|
39 |
|
|
for(Affiliation affiliation : researcher.getAffiliations()) {
|
40 |
|
|
researcherInfoContents += "<dd>" + affiliation.getOrganization().getName();
|
41 |
|
|
if(affiliation.getDepartment()!=null && !affiliation.getDepartment().equals(""))
|
42 |
|
|
researcherInfoContents += " - " + affiliation.getDepartment();
|
43 |
|
|
researcherInfoContents += "</dd>";
|
44 |
|
|
}
|
45 |
|
|
researcherInfoContents += "</dl>";
|
46 |
|
|
}
|
47 |
|
|
|
48 |
|
|
researcherInfoContents += "</div>";
|
49 |
|
|
researcherInfo.setHTML(researcherInfoContents);
|
50 |
|
|
}
|
51 |
|
|
|
52 |
|
|
@Override
|
53 |
|
|
public Widget asWidget() {
|
54 |
|
|
return researcherInfo;
|
55 |
|
|
}
|
56 |
35747
|
stefania.m
|
|
57 |
|
|
public void addStyleName(String styleName) {
|
58 |
|
|
researcherInfo.addStyleName(styleName);
|
59 |
|
|
}
|
60 |
35745
|
stefania.m
|
}
|