use of org.orcid.jaxb.model.record_rc3.ExternalIDs in project ORCID-Source by ORCID.
the class SingleWorkExternalIdentifierFromJsonConverter method convertTo.
@Override
public String convertTo(ExternalID source, Type<String> destinationType) {
ExternalIDs eids = new ExternalIDs();
eids.getExternalIdentifier().add(source);
WorkExternalIdentifiers ids = new WorkExternalIdentifiers(eids);
return ids.toDBJSONString();
}
use of org.orcid.jaxb.model.record_rc3.ExternalIDs 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_rc3.ExternalIDs 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_rc3.ExternalIDs in project ORCID-Source by ORCID.
the class OrcidSecurityManagerTestBase method createWorkSummary.
protected WorkSummary createWorkSummary(Visibility v, String sourceId, String extIdValue) {
WorkSummary work = new WorkSummary();
work.setVisibility(v);
ExternalID extId = new ExternalID();
extId.setValue(extIdValue);
ExternalIDs extIds = new ExternalIDs();
extIds.getExternalIdentifier().add(extId);
work.setExternalIdentifiers(extIds);
addSharedExtId(extIds);
setSource(work, sourceId);
return work;
}
use of org.orcid.jaxb.model.record_rc3.ExternalIDs in project ORCID-Source by ORCID.
the class ActivityValidatorTest method validateDuplicatedExtIds_noDuplicatesTest.
/**
* VALIDATE DUPLICATED EXTERNAL IDENTIFIERS
* */
@SuppressWarnings("deprecation")
@Test
public void validateDuplicatedExtIds_noDuplicatesTest() {
SourceEntity source1 = mock(SourceEntity.class);
when(source1.getSourceName()).thenReturn("source name");
when(source1.getSourceId()).thenReturn("APP-00000000000000");
SourceOrcid sourceOrcid = new SourceOrcid();
sourceOrcid.setPath("0000-0000-0000-0000");
Source source2 = mock(Source.class);
when(source2.getSourceName()).thenReturn(new SourceName("other source name"));
when(source2.getSourceOrcid()).thenReturn(sourceOrcid);
ExternalIDs extIds1 = getExternalIDs();
ExternalIDs extIds2 = getExternalIDs();
activityValidator.checkExternalIdentifiersForDuplicates(extIds1, extIds2, source2, source1);
}
Aggregations