use of org.orcid.jaxb.model.message.OrcidMessage in project ORCID-Source by ORCID.
the class NotificationManagerTest method getProfile.
private OrcidProfile getProfile(Locale locale) throws JAXBException {
OrcidMessage orcidMessage = (OrcidMessage) unmarshaller.unmarshal(getClass().getResourceAsStream(ORCID_INTERNAL_FULL_XML));
OrcidProfile orcidProfile = orcidMessage.getOrcidProfile();
orcidProfile.getOrcidPreferences().setLocale(locale);
orcidProfile.getOrcidIdentifier().setPath("0000-0000-0000-0003");
return orcidProfile;
}
use of org.orcid.jaxb.model.message.OrcidMessage in project ORCID-Source by ORCID.
the class OrcidIndexManagerImplTest method fullyPopulatedSolrDocumentForPersistence.
private OrcidSolrDocument fullyPopulatedSolrDocumentForPersistence() {
OrcidSolrDocument orcidSolrDocument = new OrcidSolrDocument();
orcidSolrDocument.setOrcid("1234");
orcidSolrDocument.setCreditName("credit name");
orcidSolrDocument.setArxiv(new ArrayList<String>());
orcidSolrDocument.setAsin(new ArrayList<String>());
orcidSolrDocument.setAsintld(new ArrayList<String>());
orcidSolrDocument.setBibcode(new ArrayList<String>());
orcidSolrDocument.setDigitalObjectIds(new ArrayList<String>());
orcidSolrDocument.setEid(new ArrayList<String>());
orcidSolrDocument.setIsbn(new ArrayList<String>());
orcidSolrDocument.setIssn(new ArrayList<String>());
orcidSolrDocument.setJfm(new ArrayList<String>());
orcidSolrDocument.setJstor(new ArrayList<String>());
orcidSolrDocument.setLccn(new ArrayList<String>());
orcidSolrDocument.setMr(new ArrayList<String>());
orcidSolrDocument.setOclc(new ArrayList<String>());
orcidSolrDocument.setOl(new ArrayList<String>());
orcidSolrDocument.setOsti(new ArrayList<String>());
orcidSolrDocument.setOtherIdentifierType(new ArrayList<String>());
orcidSolrDocument.setPmc(new ArrayList<String>());
orcidSolrDocument.setRfc(new ArrayList<String>());
orcidSolrDocument.setSsrn(new ArrayList<String>());
orcidSolrDocument.setZbl(new ArrayList<String>());
orcidSolrDocument.setFamilyName("familyName");
orcidSolrDocument.setGivenNames("givenNames");
orcidSolrDocument.addEmailAddress("email");
// orcidSolrDocument.setAffiliatePrimaryInstitutionNames(Arrays.asList(new
// String[] { "Primary Inst1" }));
// orcidSolrDocument.setAffiliateInstitutionNames(Arrays.asList(new
// String[] { "Current Inst2" }));
orcidSolrDocument.setOtherNames(Arrays.asList(new String[] { "Other 1", "Other 2" }));
orcidSolrDocument.setPmid(Arrays.asList(new String[] { "work1-pmid" }));
orcidSolrDocument.setExternalIdSources(Arrays.asList(new String[] { "45678", "54321" }));
orcidSolrDocument.setExternalIdReferences(Arrays.asList(new String[] { "defghi", "abc123" }));
orcidSolrDocument.setExternalIdSourcesAndReferences(Arrays.asList(new String[] { "45678=defghi", "54321=abc123" }));
// orcidSolrDocument.setPastInstitutionNames(Arrays.asList(new String[]
// { "Past Inst 1", "Past Inst 2" }));
orcidSolrDocument.setWorkTitles(Arrays.asList(new String[] { "Work title 1", "Work title 2" }));
orcidSolrDocument.setKeywords(Arrays.asList(new String[] { "Pavement Studies", "Advanced Tea Making" }));
OrcidProfile orcidProfile = getStandardOrcid();
OrcidMessage orcidMessage = createFilteredOrcidMessage(orcidProfile);
orcidSolrDocument.setPublicProfileMessage(orcidMessage.toString());
return orcidSolrDocument;
}
use of org.orcid.jaxb.model.message.OrcidMessage in project ORCID-Source by ORCID.
the class OrcidIndexManagerImplTest method solrDocumentLimitedtoVisibleDoi.
private OrcidSolrDocument solrDocumentLimitedtoVisibleDoi() {
OrcidSolrDocument orcidSolrDocument = fullyPopulatedSolrDocumentForPersistence();
orcidSolrDocument.setDigitalObjectIds((Arrays.asList(new String[] { "work1-doi1", "work2-doi1", "work2-doi2" })));
OrcidProfile orcidProfile = getStandardOrcidWithDoiInformation();
OrcidMessage orcidMessage = createFilteredOrcidMessage(orcidProfile);
orcidSolrDocument.setPublicProfileMessage(orcidMessage.toString());
return orcidSolrDocument;
}
use of org.orcid.jaxb.model.message.OrcidMessage in project ORCID-Source by ORCID.
the class OrcidIndexManagerImplTest method solrDocWithAdditionalSubtitles.
private OrcidSolrDocument solrDocWithAdditionalSubtitles() {
OrcidSolrDocument orcidSolrDocument = fullyPopulatedSolrDocumentForPersistence();
orcidSolrDocument.setWorkTitles(Arrays.asList(new String[] { "Work title 1", "Subtitle 1", "Work title 2", "Subtitle 2" }));
OrcidProfile orcidProfile = getOrcidWithSubtitledWork();
OrcidMessage orcidMessage = createFilteredOrcidMessage(orcidProfile);
orcidSolrDocument.setPublicProfileMessage(orcidMessage.toString());
return orcidSolrDocument;
}
use of org.orcid.jaxb.model.message.OrcidMessage in project ORCID-Source by ORCID.
the class OrcidIndexManagerImplTest method mandatoryDBFieldsSolrDocumentForPersistence.
/**
* According to the current schema - these fields are required by the DB -
* they may or may not make it into SOLR due to visibility restrictions
*
* @return
*/
private OrcidSolrDocument mandatoryDBFieldsSolrDocumentForPersistence() {
OrcidSolrDocument orcidSolrDocument = new OrcidSolrDocument();
orcidSolrDocument.setOrcid("5678");
orcidSolrDocument.setFamilyName("Logan");
orcidSolrDocument.setGivenNames("Donald Edward");
// orcidSolrDocument.setAffiliatePrimaryInstitutionNames(Arrays.asList(new
// String[] { "University of Portsmouth" }));
OrcidProfile orcidProfile = getOrcidProfileMandatoryOnly();
OrcidMessage orcidMessage = createFilteredOrcidMessage(orcidProfile);
orcidSolrDocument.setPublicProfileMessage(orcidMessage.toString());
return orcidSolrDocument;
}
Aggregations