Search in sources :

Example 16 with Country

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

the class OrcidSecurityManagerTestBase method createAddress.

protected Address createAddress(Visibility v, String sourceId) {
    Address a = new Address();
    a.setVisibility(v);
    Iso3166Country[] all = Iso3166Country.values();
    Random r = new Random();
    int index = r.nextInt(all.length);
    if (index < 0 || index >= all.length) {
        index = 0;
    }
    a.setCountry(new Country(all[index]));
    setSource(a, sourceId);
    return a;
}
Also used : Address(org.orcid.jaxb.model.v3.dev1.record.Address) Random(java.util.Random) Country(org.orcid.jaxb.model.v3.dev1.common.Country) Iso3166Country(org.orcid.jaxb.model.v3.dev1.common.Iso3166Country) Iso3166Country(org.orcid.jaxb.model.v3.dev1.common.Iso3166Country)

Example 17 with Country

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

the class AddressManagerTest method getAddress.

private Address getAddress(Iso3166Country country) {
    Address address = new Address();
    address.setCountry(new Country(country));
    address.setVisibility(Visibility.PUBLIC);
    return address;
}
Also used : Address(org.orcid.jaxb.model.v3.dev1.record.Address) Iso3166Country(org.orcid.jaxb.model.v3.dev1.common.Iso3166Country) Country(org.orcid.jaxb.model.v3.dev1.common.Country)

Aggregations

Iso3166Country (org.orcid.jaxb.model.v3.dev1.common.Iso3166Country)8 Country (org.orcid.jaxb.model.v3.dev1.common.Country)7 Work (org.orcid.jaxb.model.v3.dev1.record.Work)7 Url (org.orcid.jaxb.model.v3.dev1.common.Url)6 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)5 ContributorOrcid (org.orcid.jaxb.model.v3.dev1.common.ContributorOrcid)4 FuzzyDate (org.orcid.jaxb.model.v3.dev1.common.FuzzyDate)4 PublicationDate (org.orcid.jaxb.model.v3.dev1.common.PublicationDate)4 Title (org.orcid.jaxb.model.v3.dev1.common.Title)4 Address (org.orcid.jaxb.model.v3.dev1.record.Address)4 ExternalIDs (org.orcid.jaxb.model.v3.dev1.record.ExternalIDs)4 Funding (org.orcid.jaxb.model.v3.dev1.record.Funding)4 WorkTitle (org.orcid.jaxb.model.v3.dev1.record.WorkTitle)4 ProfileEntity (org.orcid.persistence.jpa.entities.ProfileEntity)4 CreatedDate (org.orcid.jaxb.model.v3.dev1.common.CreatedDate)3 CreditName (org.orcid.jaxb.model.v3.dev1.common.CreditName)3 Day (org.orcid.jaxb.model.v3.dev1.common.Day)3 Month (org.orcid.jaxb.model.v3.dev1.common.Month)3 Organization (org.orcid.jaxb.model.v3.dev1.common.Organization)3 OrganizationAddress (org.orcid.jaxb.model.v3.dev1.common.OrganizationAddress)3