Search in sources :

Example 16 with DisambiguatedOrganization

use of org.orcid.jaxb.model.v3.dev1.common.DisambiguatedOrganization in project ORCID-Source by ORCID.

the class ActivityValidatorTest method getDisambiguatedOrganization.

private DisambiguatedOrganization getDisambiguatedOrganization() {
    DisambiguatedOrganization disambiguatedOrganization = new DisambiguatedOrganization();
    disambiguatedOrganization.setDisambiguatedOrganizationIdentifier("some-identifier");
    disambiguatedOrganization.setDisambiguationSource("FUNDREF");
    return disambiguatedOrganization;
}
Also used : DisambiguatedOrganization(org.orcid.jaxb.model.v3.dev1.common.DisambiguatedOrganization)

Example 17 with DisambiguatedOrganization

use of org.orcid.jaxb.model.v3.dev1.common.DisambiguatedOrganization in project ORCID-Source by ORCID.

the class AffiliationsManagerTest method fillAffiliation.

private void fillAffiliation(Affiliation aff) {
    Organization org = new Organization();
    org.setName("org-name");
    OrganizationAddress address = new OrganizationAddress();
    address.setCity("city");
    address.setCountry(Iso3166Country.US);
    org.setAddress(address);
    DisambiguatedOrganization disambiguatedOrg = new DisambiguatedOrganization();
    disambiguatedOrg.setDisambiguatedOrganizationIdentifier("def456");
    disambiguatedOrg.setDisambiguationSource("WDB");
    org.setDisambiguatedOrganization(disambiguatedOrg);
    aff.setOrganization(org);
    aff.setStartDate(new FuzzyDate(new Year(2016), new Month(3), new Day(29)));
    aff.setVisibility(Visibility.PUBLIC);
}
Also used : Month(org.orcid.jaxb.model.v3.dev1.common.Month) Organization(org.orcid.jaxb.model.v3.dev1.common.Organization) DisambiguatedOrganization(org.orcid.jaxb.model.v3.dev1.common.DisambiguatedOrganization) DisambiguatedOrganization(org.orcid.jaxb.model.v3.dev1.common.DisambiguatedOrganization) Year(org.orcid.jaxb.model.v3.dev1.common.Year) OrganizationAddress(org.orcid.jaxb.model.v3.dev1.common.OrganizationAddress) FuzzyDate(org.orcid.jaxb.model.v3.dev1.common.FuzzyDate) Day(org.orcid.jaxb.model.v3.dev1.common.Day)

Example 18 with DisambiguatedOrganization

use of org.orcid.jaxb.model.v3.dev1.common.DisambiguatedOrganization in project ORCID-Source by ORCID.

the class ProfileFundingManagerTest method getFunding.

private Funding getFunding(String grantNumber) {
    Funding funding = new Funding();
    ExternalIDs extIds = new ExternalIDs();
    ExternalID extId = new ExternalID();
    extId.setRelationship(Relationship.SELF);
    extId.setType("grant_number");
    extId.setUrl(new Url("http://orcid.org"));
    if (grantNumber == null) {
        extId.setValue("ext-id-value");
    } else {
        extId.setValue(grantNumber);
    }
    extIds.getExternalIdentifier().add(extId);
    funding.setExternalIdentifiers(extIds);
    FundingTitle title = new FundingTitle();
    if (grantNumber == null) {
        title.setTitle(new Title("Funding title"));
    } else {
        title.setTitle(new Title("Funding title " + grantNumber));
    }
    funding.setTitle(title);
    Organization org = new Organization();
    org.setName("org-name");
    OrganizationAddress address = new OrganizationAddress();
    address.setCity("city");
    address.setCountry(Iso3166Country.US);
    org.setAddress(address);
    DisambiguatedOrganization disambiguatedOrg = new DisambiguatedOrganization();
    disambiguatedOrg.setDisambiguatedOrganizationIdentifier("abc456");
    disambiguatedOrg.setDisambiguationSource("WDB");
    org.setDisambiguatedOrganization(disambiguatedOrg);
    funding.setOrganization(org);
    funding.setVisibility(Visibility.PUBLIC);
    funding.setType(FundingType.AWARD);
    return funding;
}
Also used : ExternalIDs(org.orcid.jaxb.model.v3.dev1.record.ExternalIDs) Organization(org.orcid.jaxb.model.v3.dev1.common.Organization) DisambiguatedOrganization(org.orcid.jaxb.model.v3.dev1.common.DisambiguatedOrganization) DisambiguatedOrganization(org.orcid.jaxb.model.v3.dev1.common.DisambiguatedOrganization) Funding(org.orcid.jaxb.model.v3.dev1.record.Funding) ExternalID(org.orcid.jaxb.model.v3.dev1.record.ExternalID) OrganizationAddress(org.orcid.jaxb.model.v3.dev1.common.OrganizationAddress) Title(org.orcid.jaxb.model.v3.dev1.common.Title) FundingTitle(org.orcid.jaxb.model.v3.dev1.record.FundingTitle) FundingTitle(org.orcid.jaxb.model.v3.dev1.record.FundingTitle) Url(org.orcid.jaxb.model.v3.dev1.common.Url)

Aggregations

DisambiguatedOrganization (org.orcid.jaxb.model.v3.dev1.common.DisambiguatedOrganization)18 Response (javax.ws.rs.core.Response)9 Test (org.junit.Test)9 DBUnitTest (org.orcid.test.DBUnitTest)9 Organization (org.orcid.jaxb.model.v3.dev1.common.Organization)8 OrganizationAddress (org.orcid.jaxb.model.v3.dev1.common.OrganizationAddress)8 LastModifiedDate (org.orcid.jaxb.model.v3.dev1.common.LastModifiedDate)7 Url (org.orcid.jaxb.model.v3.dev1.common.Url)7 ExternalIDs (org.orcid.jaxb.model.v3.dev1.record.ExternalIDs)5 ExternalID (org.orcid.jaxb.model.v3.dev1.record.ExternalID)4 PeerReview (org.orcid.jaxb.model.v3.dev1.record.PeerReview)4 FuzzyDate (org.orcid.jaxb.model.v3.dev1.common.FuzzyDate)3 Title (org.orcid.jaxb.model.v3.dev1.common.Title)3 Distinction (org.orcid.jaxb.model.v3.dev1.record.Distinction)2 Education (org.orcid.jaxb.model.v3.dev1.record.Education)2 Employment (org.orcid.jaxb.model.v3.dev1.record.Employment)2 Funding (org.orcid.jaxb.model.v3.dev1.record.Funding)2 FundingContributor (org.orcid.jaxb.model.v3.dev1.record.FundingContributor)2 InvitedPosition (org.orcid.jaxb.model.v3.dev1.record.InvitedPosition)2 Membership (org.orcid.jaxb.model.v3.dev1.record.Membership)2