use of org.orcid.jaxb.model.record_rc3.WorkTitle in project ORCID-Source by ORCID.
the class ActivityValidatorTest method getWorkTitle.
public WorkTitle getWorkTitle() {
WorkTitle title = new WorkTitle();
title.setTitle(new Title("title"));
title.setSubtitle(new Subtitle("subtitle"));
title.setTranslatedTitle(new TranslatedTitle("translated title", "en"));
return title;
}
use of org.orcid.jaxb.model.record_rc3.WorkTitle in project ORCID-Source by ORCID.
the class WorksTest method getWork.
private Work getWork(String title, boolean randomExtId, String extIdValue) {
Long time = System.currentTimeMillis();
Work work = new Work();
WorkTitle workTitle = new WorkTitle();
Title wTitle = new Title(title);
workTitle.setTranslatedTitle(new TranslatedTitle(title, "en"));
workTitle.setTitle(wTitle);
work.setWorkTitle(workTitle);
work.setWorkType(WorkType.BOOK);
ExternalID extId = new ExternalID();
extId.setRelationship(Relationship.SELF);
if (randomExtId) {
extId.setValue("work-ext-id-" + (Math.random() * 1000) + "-" + time);
} else {
extId.setValue("work-ext-id-" + extIdValue);
}
extId.setType("doi");
ExternalIDs extIds = new ExternalIDs();
extIds.getExternalIdentifier().add(extId);
work.setWorkExternalIdentifiers(extIds);
return work;
}
use of org.orcid.jaxb.model.record_rc3.WorkTitle in project ORCID-Source by ORCID.
the class ContributorUtilsTest method getWorkWithContributorWithoutOrcid.
private Work getWorkWithContributorWithoutOrcid() {
Work work = new Work();
WorkTitle workTitle = new WorkTitle();
workTitle.setTitle(new Title("work with contributor without ORCID record"));
work.setWorkTitle(workTitle);
work.setWorkContributors(getWorkContributorWithoutOrcid());
return work;
}
use of org.orcid.jaxb.model.record_rc3.WorkTitle in project ORCID-Source by ORCID.
the class SourceInActivitiesTest method getWorkWithoutExternalIdentifier.
private Work getWorkWithoutExternalIdentifier(String userOrcid, boolean validate) {
Work work = new Work();
WorkTitle title = new WorkTitle();
title.setTitle(new Title("Work " + System.currentTimeMillis()));
work.setWorkTitle(title);
work.setWorkType(org.orcid.jaxb.model.record_v2.WorkType.BOOK);
work = workManager.createWork(userOrcid, work, validate);
return workManager.getWork(userOrcid, work.getPutCode());
}
use of org.orcid.jaxb.model.record_rc3.WorkTitle in project ORCID-Source by ORCID.
the class SourceInActivitiesTest method getWorkWithPutCode.
private Work getWorkWithPutCode(String userOrcid, boolean validate) {
Work work = new Work();
WorkTitle title = new WorkTitle();
title.setTitle(new Title("Work " + System.currentTimeMillis()));
work.setWorkTitle(title);
ExternalID extId = new ExternalID();
extId.setValue("111");
extId.setType(WorkExternalIdentifierType.DOI.value());
ExternalIDs extIdentifiers = new ExternalIDs();
extIdentifiers.getExternalIdentifier().add(extId);
work.setWorkExternalIdentifiers(extIdentifiers);
work.setWorkType(org.orcid.jaxb.model.record_v2.WorkType.BOOK);
work.setPutCode(Long.valueOf(111));
work = workManager.createWork(userOrcid, work, validate);
return workManager.getWork(userOrcid, work.getPutCode());
}
Aggregations