use of org.orcid.jaxb.model.record_rc4.ExternalID in project ORCID-Source by ORCID.
the class JpaJaxbWorkAdapterTest method fromProfileWorkEntityToWorkSummaryTest.
@Test
public void fromProfileWorkEntityToWorkSummaryTest() {
WorkEntity work = getWorkEntity();
assertNotNull(work);
WorkSummary ws = jpaJaxbWorkAdapter.toWorkSummary(work);
assertNotNull(ws);
assertEquals(Long.valueOf(12345), ws.getPutCode());
assertEquals(Visibility.LIMITED.value(), ws.getVisibility().value());
assertEquals("1234567890", ws.getDisplayIndex());
assertNotNull(ws.getExternalIdentifiers());
assertNotNull(ws.getExternalIdentifiers().getExternalIdentifier());
assertEquals(1, ws.getExternalIdentifiers().getExternalIdentifier().size());
ExternalID workExtId = ws.getExternalIdentifiers().getExternalIdentifier().get(0);
assertNotNull(workExtId.getValue());
assertEquals("123", workExtId.getValue());
assertNotNull(workExtId.getType());
assertEquals(org.orcid.jaxb.model.message.WorkExternalIdentifierType.AGR.value(), workExtId.getType());
}
use of org.orcid.jaxb.model.record_rc4.ExternalID in project ORCID-Source by ORCID.
the class EmailMessageSenderTest method createActivity.
private Item createActivity(ItemType actType, String actName, String doi) {
Item act = new Item();
act.setItemType(actType);
act.setItemName(actName);
ExternalID extId = new ExternalID();
extId.setType("doi");
extId.setValue(doi);
act.setExternalIdentifier(extId);
return act;
}
use of org.orcid.jaxb.model.record_rc4.ExternalID in project ORCID-Source by ORCID.
the class OrcidSecurityManagerTestBase method createPeerReviewSummary.
protected PeerReviewSummary createPeerReviewSummary(Visibility v, String sourceId, String extIdValue) {
PeerReviewSummary p = new PeerReviewSummary();
p.setVisibility(v);
p.setGroupId(EXTID_SHARED);
setSource(p, sourceId);
ExternalID extId = new ExternalID();
extId.setValue(extIdValue);
ExternalIDs extIds = new ExternalIDs();
extIds.getExternalIdentifier().add(extId);
addSharedExtId(extIds);
p.setExternalIdentifiers(extIds);
return p;
}
use of org.orcid.jaxb.model.record_rc4.ExternalID in project ORCID-Source by ORCID.
the class OrcidSecurityManagerTestBase method createFundingSummary.
protected FundingSummary createFundingSummary(Visibility v, String sourceId, String extIdValue) {
FundingSummary f = new FundingSummary();
f.setVisibility(v);
setSource(f, sourceId);
ExternalID extId = new ExternalID();
extId.setValue(extIdValue);
ExternalIDs extIds = new ExternalIDs();
extIds.getExternalIdentifier().add(extId);
addSharedExtId(extIds);
f.setExternalIdentifiers(extIds);
return f;
}
use of org.orcid.jaxb.model.record_rc4.ExternalID in project ORCID-Source by ORCID.
the class OrcidSecurityManagerTestBase method getExtId.
protected ExternalID getExtId(String value) {
ExternalID extId = new ExternalID();
extId.setValue(value);
return extId;
}
Aggregations