Search in sources :

Example 1 with Iso3166Country

use of org.orcid.jaxb.model.common_v2.Iso3166Country 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.record_v2.Address) Iso3166Country(org.orcid.jaxb.model.common_v2.Iso3166Country) Country(org.orcid.jaxb.model.common_v2.Country)

Example 2 with Iso3166Country

use of org.orcid.jaxb.model.common_v2.Iso3166Country 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.record_v2.Address) Random(java.util.Random) Country(org.orcid.jaxb.model.common_v2.Country) Iso3166Country(org.orcid.jaxb.model.common_v2.Iso3166Country) Iso3166Country(org.orcid.jaxb.model.common_v2.Iso3166Country)

Aggregations

Country (org.orcid.jaxb.model.common_v2.Country)2 Iso3166Country (org.orcid.jaxb.model.common_v2.Iso3166Country)2 Address (org.orcid.jaxb.model.record_v2.Address)2 Random (java.util.Random)1