Search in sources :

Example 1 with Organization

use of org.orcid.jaxb.model.common_v2.Organization in project ORCID-Source by ORCID.

the class Utils method getOrganization.

public static Organization getOrganization() {
    Organization org = new Organization();
    org.setName("Org Name");
    OrganizationAddress add = new OrganizationAddress();
    add.setCity("city");
    add.setCountry(Iso3166Country.TT);
    org.setAddress(add);
    return org;
}
Also used : Organization(org.orcid.jaxb.model.common_v2.Organization) OrganizationAddress(org.orcid.jaxb.model.common_v2.OrganizationAddress)

Example 2 with Organization

use of org.orcid.jaxb.model.common_v2.Organization in project ORCID-Source by ORCID.

the class SourceInActivitiesTest method getOrganization.

private Organization getOrganization() {
    if (organization == null) {
        OrganizationAddress address = new OrganizationAddress();
        address.setCity("City");
        address.setRegion("Region");
        address.setCountry(org.orcid.jaxb.model.common_v2.Iso3166Country.US);
        organization = new Organization();
        organization.setName("Org name");
        organization.setAddress(address);
    }
    return organization;
}
Also used : Organization(org.orcid.jaxb.model.common_v2.Organization) OrganizationAddress(org.orcid.jaxb.model.common_v2.OrganizationAddress)

Example 3 with Organization

use of org.orcid.jaxb.model.common_v2.Organization in project ORCID-Source by ORCID.

the class PeerReviewManagerTest method getPeerReview.

private PeerReview getPeerReview(String extIdValue) {
    PeerReview peerReview = new PeerReview();
    peerReview.setRole(Role.CHAIR);
    ExternalIDs extIds = new ExternalIDs();
    ExternalID extId = new ExternalID();
    extId.setRelationship(Relationship.SELF);
    extId.setType("doi");
    extId.setUrl(new Url("http://orcid.org"));
    if (extIdValue == null) {
        extId.setValue("ext-id-value");
    } else {
        extId.setValue("ext-id-value-" + extIdValue);
    }
    extIds.getExternalIdentifier().add(extId);
    peerReview.setExternalIdentifiers(extIds);
    if (extIdValue == null) {
        peerReview.setSubjectContainerName(new Title("Peer review title"));
    } else {
        peerReview.setSubjectContainerName(new Title("Peer review title " + extIdValue));
    }
    peerReview.setSubjectExternalIdentifier(extId);
    Organization org = new Organization();
    org.setName("org-name");
    OrganizationAddress address = new OrganizationAddress();
    address.setCity("city");
    address.setCountry(Iso3166Country.US);
    org.setAddress(address);
    peerReview.setOrganization(org);
    peerReview.setType(PeerReviewType.EVALUATION);
    peerReview.setVisibility(Visibility.PUBLIC);
    return peerReview;
}
Also used : ExternalIDs(org.orcid.jaxb.model.record_v2.ExternalIDs) Organization(org.orcid.jaxb.model.common_v2.Organization) ExternalID(org.orcid.jaxb.model.record_v2.ExternalID) OrganizationAddress(org.orcid.jaxb.model.common_v2.OrganizationAddress) Title(org.orcid.jaxb.model.common_v2.Title) PeerReview(org.orcid.jaxb.model.record_v2.PeerReview) Url(org.orcid.jaxb.model.common_v2.Url)

Example 4 with Organization

use of org.orcid.jaxb.model.common_v2.Organization in project ORCID-Source by ORCID.

the class AffiliationsManagerTest method getEducation.

private Education getEducation() {
    Education education = new Education();
    Organization org = new Organization();
    org.setName("org-name");
    OrganizationAddress address = new OrganizationAddress();
    address.setCity("city");
    address.setCountry(Iso3166Country.US);
    org.setAddress(address);
    education.setOrganization(org);
    education.setStartDate(new FuzzyDate(new Year(2016), new Month(3), new Day(29)));
    education.setVisibility(Visibility.PUBLIC);
    return education;
}
Also used : Month(org.orcid.jaxb.model.common_v2.Month) Organization(org.orcid.jaxb.model.common_v2.Organization) Year(org.orcid.jaxb.model.common_v2.Year) Education(org.orcid.jaxb.model.record_v2.Education) OrganizationAddress(org.orcid.jaxb.model.common_v2.OrganizationAddress) FuzzyDate(org.orcid.jaxb.model.common_v2.FuzzyDate) Day(org.orcid.jaxb.model.common_v2.Day)

Example 5 with Organization

use of org.orcid.jaxb.model.common_v2.Organization in project ORCID-Source by ORCID.

the class AffiliationsManagerTest method getEmployment.

private Employment getEmployment() {
    Employment employment = new Employment();
    Organization org = new Organization();
    org.setName("org-name");
    OrganizationAddress address = new OrganizationAddress();
    address.setCity("city");
    address.setCountry(Iso3166Country.US);
    org.setAddress(address);
    employment.setOrganization(org);
    employment.setStartDate(new FuzzyDate(new Year(2016), new Month(3), new Day(29)));
    employment.setVisibility(Visibility.PUBLIC);
    return employment;
}
Also used : Month(org.orcid.jaxb.model.common_v2.Month) Organization(org.orcid.jaxb.model.common_v2.Organization) Year(org.orcid.jaxb.model.common_v2.Year) Employment(org.orcid.jaxb.model.record_v2.Employment) OrganizationAddress(org.orcid.jaxb.model.common_v2.OrganizationAddress) FuzzyDate(org.orcid.jaxb.model.common_v2.FuzzyDate) Day(org.orcid.jaxb.model.common_v2.Day)

Aggregations

Organization (org.orcid.jaxb.model.common_v2.Organization)9 OrganizationAddress (org.orcid.jaxb.model.common_v2.OrganizationAddress)9 ExternalID (org.orcid.jaxb.model.record_v2.ExternalID)4 ExternalIDs (org.orcid.jaxb.model.record_v2.ExternalIDs)4 Day (org.orcid.jaxb.model.common_v2.Day)3 FuzzyDate (org.orcid.jaxb.model.common_v2.FuzzyDate)3 Month (org.orcid.jaxb.model.common_v2.Month)3 Title (org.orcid.jaxb.model.common_v2.Title)3 Url (org.orcid.jaxb.model.common_v2.Url)3 Visibility (org.orcid.jaxb.model.common_v2.Visibility)3 Year (org.orcid.jaxb.model.common_v2.Year)3 OrgEntity (org.orcid.persistence.jpa.entities.OrgEntity)3 SourceEntity (org.orcid.persistence.jpa.entities.SourceEntity)3 Funding (org.orcid.jaxb.model.record_v2.Funding)2 FundingTitle (org.orcid.jaxb.model.record_v2.FundingTitle)2 PeerReview (org.orcid.jaxb.model.record_v2.PeerReview)2 OrgAffiliationRelationEntity (org.orcid.persistence.jpa.entities.OrgAffiliationRelationEntity)2 ClientResponse (com.sun.jersey.api.client.ClientResponse)1 URISyntaxException (java.net.URISyntaxException)1 JSONException (org.codehaus.jettison.json.JSONException)1