Search in sources :

Example 21 with GivenNames

use of org.orcid.jaxb.model.message.GivenNames in project ORCID-Source by ORCID.

the class OrcidSearchManagerImplTest method getOrcidProfile5678MandatoryOnly.

private OrcidProfile getOrcidProfile5678MandatoryOnly() {
    OrcidProfile orcidProfile = new OrcidProfile();
    orcidProfile.setOrcidIdentifier("5678");
    OrcidBio orcidBio = new OrcidBio();
    PersonalDetails personalDetails = new PersonalDetails();
    personalDetails.setFamilyName(new FamilyName("Logan"));
    personalDetails.setGivenNames(new GivenNames("Donald Edward"));
    new Affiliation();
    orcidBio.setPersonalDetails(personalDetails);
    orcidProfile.setOrcidBio(orcidBio);
    return orcidProfile;
}
Also used : OrcidProfile(org.orcid.jaxb.model.message.OrcidProfile) OrcidBio(org.orcid.jaxb.model.message.OrcidBio) FamilyName(org.orcid.jaxb.model.message.FamilyName) GivenNames(org.orcid.jaxb.model.message.GivenNames) PersonalDetails(org.orcid.jaxb.model.message.PersonalDetails) Affiliation(org.orcid.jaxb.model.message.Affiliation)

Example 22 with GivenNames

use of org.orcid.jaxb.model.message.GivenNames in project ORCID-Source by ORCID.

the class OrcidProfileManagerBaseTest method createBasicProfile.

protected OrcidProfile createBasicProfile() {
    OrcidProfile profile = new OrcidProfile();
    profile.setPassword("password");
    profile.setVerificationCode("1234");
    profile.setSecurityQuestionAnswer("random answer");
    profile.setOrcidIdentifier(TEST_ORCID);
    OrcidBio bio = new OrcidBio();
    ContactDetails contactDetails = new ContactDetails();
    contactDetails.addOrReplacePrimaryEmail(new Email("will@semantico.com"));
    bio.setContactDetails(contactDetails);
    profile.setOrcidBio(bio);
    PersonalDetails personalDetails = new PersonalDetails();
    bio.setPersonalDetails(personalDetails);
    personalDetails.setGivenNames(new GivenNames("Will"));
    personalDetails.setFamilyName(new FamilyName("Simpson"));
    bio.setBiography(new Biography("Will is a software developer"));
    ResearcherUrls researcherUrls = new ResearcherUrls();
    bio.setResearcherUrls(researcherUrls);
    researcherUrls.getResearcherUrl().add(new ResearcherUrl(new Url("http://www.wjrs.co.uk"), null));
    OrcidWorks orcidWorks = new OrcidWorks();
    profile.setOrcidWorks(orcidWorks);
    OrcidWork orcidWork = createWork1();
    // TODO JB - needs test
    // orcidWork.setAddedToProfileDate(new
    // AddedToProfileDate(DateUtils.convertToXMLGregorianCalendar("2010-03-04")));
    // orcidWork.setAddedToProfileDate(new
    // AddedToProfileDate(DateUtils.convertToXMLGregorianCalendar("2010-03-04")));
    orcidWorks.getOrcidWork().add(orcidWork);
    OrcidInternal orcidInternal = new OrcidInternal();
    profile.setOrcidInternal(orcidInternal);
    SecurityDetails securityDetails = new SecurityDetails();
    securityDetails.setSecurityQuestionId(new SecurityQuestionId(3));
    orcidInternal.setSecurityDetails(securityDetails);
    Preferences preferences = new Preferences();
    orcidInternal.setPreferences(preferences);
    return profile;
}
Also used : Email(org.orcid.jaxb.model.message.Email) OrcidBio(org.orcid.jaxb.model.message.OrcidBio) FamilyName(org.orcid.jaxb.model.message.FamilyName) OrcidWork(org.orcid.jaxb.model.message.OrcidWork) OrcidInternal(org.orcid.jaxb.model.message.OrcidInternal) PersonalDetails(org.orcid.jaxb.model.message.PersonalDetails) Url(org.orcid.jaxb.model.message.Url) ResearcherUrl(org.orcid.jaxb.model.message.ResearcherUrl) OrcidWorks(org.orcid.jaxb.model.message.OrcidWorks) SecurityQuestionId(org.orcid.jaxb.model.message.SecurityQuestionId) OrcidProfile(org.orcid.jaxb.model.message.OrcidProfile) ContactDetails(org.orcid.jaxb.model.message.ContactDetails) GivenNames(org.orcid.jaxb.model.message.GivenNames) Biography(org.orcid.jaxb.model.message.Biography) ResearcherUrls(org.orcid.jaxb.model.message.ResearcherUrls) ResearcherUrl(org.orcid.jaxb.model.message.ResearcherUrl) SecurityDetails(org.orcid.jaxb.model.message.SecurityDetails) Preferences(org.orcid.jaxb.model.message.Preferences)

Example 23 with GivenNames

use of org.orcid.jaxb.model.message.GivenNames in project ORCID-Source by ORCID.

the class OrcidProfileManagerBaseTest method createFullOrcidProfile.

protected OrcidProfile createFullOrcidProfile() {
    OrcidProfile profile2 = new OrcidProfile();
    profile2.setPassword("password");
    profile2.setVerificationCode("1234");
    profile2.setOrcidIdentifier(TEST_ORCID);
    OrcidBio bio = new OrcidBio();
    ContactDetails contactDetails = new ContactDetails();
    contactDetails.addOrReplacePrimaryEmail(new Email("will@orcid.org"));
    bio.setContactDetails(contactDetails);
    profile2.setOrcidBio(bio);
    PersonalDetails personalDetails = new PersonalDetails();
    personalDetails.setGivenNames(new GivenNames("William"));
    personalDetails.setFamilyName(new FamilyName("Simpson"));
    personalDetails.setCreditName(new CreditName("W. J. R. Simpson"));
    bio.setPersonalDetails(personalDetails);
    ResearcherUrls researcherUrls = new ResearcherUrls();
    researcherUrls.getResearcherUrl().add(new ResearcherUrl(new Url("http://www.wjrs.co.uk"), null));
    bio.setResearcherUrls(researcherUrls);
    Keywords keywords = new Keywords();
    bio.setKeywords(keywords);
    keywords.getKeyword().add(new Keyword("Java", null));
    bio.setBiography(new Biography("Will is a software developer at Semantico"));
    return profile2;
}
Also used : Email(org.orcid.jaxb.model.message.Email) Keywords(org.orcid.jaxb.model.message.Keywords) OrcidBio(org.orcid.jaxb.model.message.OrcidBio) Keyword(org.orcid.jaxb.model.message.Keyword) FamilyName(org.orcid.jaxb.model.message.FamilyName) CreditName(org.orcid.jaxb.model.message.CreditName) PersonalDetails(org.orcid.jaxb.model.message.PersonalDetails) Url(org.orcid.jaxb.model.message.Url) ResearcherUrl(org.orcid.jaxb.model.message.ResearcherUrl) OrcidProfile(org.orcid.jaxb.model.message.OrcidProfile) ContactDetails(org.orcid.jaxb.model.message.ContactDetails) GivenNames(org.orcid.jaxb.model.message.GivenNames) Biography(org.orcid.jaxb.model.message.Biography) ResearcherUrls(org.orcid.jaxb.model.message.ResearcherUrls) ResearcherUrl(org.orcid.jaxb.model.message.ResearcherUrl)

Aggregations

GivenNames (org.orcid.jaxb.model.message.GivenNames)23 OrcidBio (org.orcid.jaxb.model.message.OrcidBio)20 PersonalDetails (org.orcid.jaxb.model.message.PersonalDetails)20 OrcidProfile (org.orcid.jaxb.model.message.OrcidProfile)18 FamilyName (org.orcid.jaxb.model.message.FamilyName)16 ContactDetails (org.orcid.jaxb.model.message.ContactDetails)13 Email (org.orcid.jaxb.model.message.Email)12 CreditName (org.orcid.jaxb.model.message.CreditName)11 OrcidMessage (org.orcid.jaxb.model.message.OrcidMessage)8 OtherNames (org.orcid.jaxb.model.message.OtherNames)7 ResearcherUrls (org.orcid.jaxb.model.message.ResearcherUrls)7 ResearcherUrl (org.orcid.jaxb.model.message.ResearcherUrl)6 Url (org.orcid.jaxb.model.message.Url)6 Test (org.junit.Test)5 Biography (org.orcid.jaxb.model.message.Biography)5 ExternalIdentifiers (org.orcid.jaxb.model.message.ExternalIdentifiers)5 Keywords (org.orcid.jaxb.model.message.Keywords)5 OrcidHistory (org.orcid.jaxb.model.message.OrcidHistory)5 Affiliations (org.orcid.jaxb.model.message.Affiliations)4 Keyword (org.orcid.jaxb.model.message.Keyword)4