use of org.orcid.jaxb.model.record.summary_rc4.EducationSummary in project ORCID-Source by ORCID.
the class PublicV2ApiServiceDelegatorImpl method viewEducations.
@Override
public Response viewEducations(String orcid) {
List<EducationSummary> educations = affiliationsManagerReadOnly.getEducationSummaryList(orcid, getLastModifiedTime(orcid));
Educations publicEducations = new Educations();
for (EducationSummary summary : educations) {
if (Visibility.PUBLIC.equals(summary.getVisibility())) {
ActivityUtils.setPathToActivity(summary, orcid);
sourceUtilsReadOnly.setSourceName(summary);
publicEducations.getSummaries().add(summary);
}
}
Api2_0_LastModifiedDatesHelper.calculateLastModified(publicEducations);
ActivityUtils.setPathToEducations(publicEducations, orcid);
return Response.ok(publicEducations).build();
}
use of org.orcid.jaxb.model.record.summary_rc4.EducationSummary in project ORCID-Source by ORCID.
the class PublicV2ApiServiceDelegatorImpl method viewEducationSummary.
@Override
public Response viewEducationSummary(String orcid, Long putCode) {
EducationSummary es = affiliationsManagerReadOnly.getEducationSummary(orcid, putCode);
publicAPISecurityManagerV2.checkIsPublic(es);
ActivityUtils.setPathToActivity(es, orcid);
sourceUtilsReadOnly.setSourceName(es);
return Response.ok(es).build();
}
use of org.orcid.jaxb.model.record.summary_rc4.EducationSummary in project ORCID-Source by ORCID.
the class SourceUtils method setSourceName.
public void setSourceName(ActivitiesSummary as) {
if (as == null) {
return;
}
if (as.getEducations() != null) {
Educations educations = as.getEducations();
List<EducationSummary> list = educations.getSummaries();
if (list != null) {
for (EducationSummary summary : list) {
setSourceName(summary);
}
}
}
if (as.getEmployments() != null) {
Employments employments = as.getEmployments();
List<EmploymentSummary> list = employments.getSummaries();
if (list != null) {
for (EmploymentSummary summary : list) {
setSourceName(summary);
}
}
}
if (as.getFundings() != null) {
Fundings fundings = as.getFundings();
List<FundingGroup> groups = fundings.getFundingGroup();
if (groups != null) {
for (FundingGroup group : groups) {
List<FundingSummary> summaryList = group.getFundingSummary();
if (summaryList != null) {
for (FundingSummary summary : summaryList) {
setSourceName(summary);
}
}
}
}
}
if (as.getPeerReviews() != null) {
PeerReviews peerReviews = as.getPeerReviews();
List<PeerReviewGroup> groups = peerReviews.getPeerReviewGroup();
if (groups != null) {
for (PeerReviewGroup group : groups) {
List<PeerReviewSummary> summaryList = group.getPeerReviewSummary();
if (summaryList != null) {
for (PeerReviewSummary summary : summaryList) {
setSourceName(summary);
}
}
}
}
}
if (as.getWorks() != null) {
Works works = as.getWorks();
List<WorkGroup> groups = works.getWorkGroup();
if (groups != null) {
for (WorkGroup group : groups) {
List<WorkSummary> summaryList = group.getWorkSummary();
if (summaryList != null) {
for (WorkSummary summary : summaryList) {
setSourceName(summary);
}
}
}
}
}
}
Aggregations