Search in sources :

Example 11 with EndDateEntity

use of org.orcid.persistence.jpa.entities.EndDateEntity in project ORCID-Source by ORCID.

the class JpaJaxbEmploymentAdapterTest method getEmploymentEntity.

private OrgAffiliationRelationEntity getEmploymentEntity() {
    OrgEntity orgEntity = new OrgEntity();
    orgEntity.setCity("org:city");
    orgEntity.setCountry(org.orcid.jaxb.model.message.Iso3166Country.US);
    orgEntity.setName("org:name");
    orgEntity.setRegion("org:region");
    orgEntity.setUrl("org:url");
    orgEntity.setSource(new SourceEntity("APP-000000001"));
    OrgAffiliationRelationEntity result = new OrgAffiliationRelationEntity();
    result.setAffiliationType(AffiliationType.EMPLOYMENT);
    result.setDepartment("employment:department");
    result.setEndDate(new EndDateEntity(2020, 2, 2));
    result.setId(123456L);
    result.setOrg(orgEntity);
    result.setProfile(new ProfileEntity("0000-0001-0002-0003"));
    result.setStartDate(new StartDateEntity(2000, 1, 1));
    result.setTitle("employment:title");
    result.setVisibility(org.orcid.jaxb.model.common_v2.Visibility.PRIVATE);
    result.setClientSourceId("APP-000000001");
    return result;
}
Also used : EndDateEntity(org.orcid.persistence.jpa.entities.EndDateEntity) SourceEntity(org.orcid.persistence.jpa.entities.SourceEntity) StartDateEntity(org.orcid.persistence.jpa.entities.StartDateEntity) OrgAffiliationRelationEntity(org.orcid.persistence.jpa.entities.OrgAffiliationRelationEntity) ProfileEntity(org.orcid.persistence.jpa.entities.ProfileEntity) OrgEntity(org.orcid.persistence.jpa.entities.OrgEntity)

Example 12 with EndDateEntity

use of org.orcid.persistence.jpa.entities.EndDateEntity in project ORCID-Source by ORCID.

the class JpaJaxbFundingAdapterTest method getProfileFundingEntity.

private ProfileFundingEntity getProfileFundingEntity() {
    ProfileFundingEntity result = new ProfileFundingEntity();
    result.setContributorsJson("{\"contributor\":[{\"contributorOrcid\":{\"value\":null,\"valueAsString\":null,\"uri\":\"http://orcid.org/8888-8888-8888-8880\",\"path\":\"8888-8888-8888-8880\",\"host\":\"orcid.org\"},\"creditName\":{\"content\":\"funding:creditName\"},\"contributorEmail\":{\"value\":\"funding@contributorEmail.com\"},\"contributorAttributes\":{\"contributorRole\":\"LEAD\"}}]}");
    result.setDescription("funding:description");
    result.setEndDate(new EndDateEntity(2020, 1, 1));
    result.setStartDate(new StartDateEntity(2000, 1, 1));
    result.setExternalIdentifiersJson("{\"fundingExternalIdentifier\":[{\"type\":\"GRANT_NUMBER\",\"value\":\"12345\",\"url\":{\"value\":\"http://tempuri.org\"}},{\"type\":\"GRANT_NUMBER\",\"value\":\"67890\",\"url\":{\"value\":\"http://tempuri.org/2\"}}]}");
    result.setId(12345L);
    result.setNumericAmount(new BigDecimal(123456));
    result.setCurrencyCode("CRC");
    result.setTitle("funding:title");
    result.setTranslatedTitle("funding:translatedTitle");
    result.setTranslatedTitleLanguageCode("ES");
    result.setType(FundingType.SALARY_AWARD);
    result.setVisibility(Visibility.PRIVATE);
    return result;
}
Also used : EndDateEntity(org.orcid.persistence.jpa.entities.EndDateEntity) StartDateEntity(org.orcid.persistence.jpa.entities.StartDateEntity) BigDecimal(java.math.BigDecimal) ProfileFundingEntity(org.orcid.persistence.jpa.entities.ProfileFundingEntity)

Example 13 with EndDateEntity

use of org.orcid.persistence.jpa.entities.EndDateEntity in project ORCID-Source by ORCID.

the class JpaJaxbFundingAdapterTest method getProfileFundingEntity.

private ProfileFundingEntity getProfileFundingEntity() {
    ProfileFundingEntity result = new ProfileFundingEntity();
    result.setContributorsJson("{\"contributor\":[{\"contributorOrcid\":{\"value\":null,\"valueAsString\":null,\"uri\":\"http://orcid.org/8888-8888-8888-8880\",\"path\":\"8888-8888-8888-8880\",\"host\":\"orcid.org\"},\"creditName\":{\"content\":\"funding:creditName\"},\"contributorEmail\":{\"value\":\"funding@contributorEmail.com\"},\"contributorAttributes\":{\"contributorRole\":\"LEAD\"}}]}");
    result.setDescription("funding:description");
    result.setEndDate(new EndDateEntity(2020, 1, 1));
    result.setStartDate(new StartDateEntity(2000, 1, 1));
    result.setExternalIdentifiersJson("{\"fundingExternalIdentifier\":[{\"type\":\"GRANT_NUMBER\",\"value\":\"12345\",\"url\":{\"value\":\"http://tempuri.org\"}},{\"type\":\"GRANT_NUMBER\",\"value\":\"67890\",\"url\":{\"value\":\"http://tempuri.org/2\"}}]}");
    result.setId(12345L);
    result.setNumericAmount(new BigDecimal(123456));
    result.setCurrencyCode("CRC");
    result.setTitle("funding:title");
    result.setTranslatedTitle("funding:translatedTitle");
    result.setTranslatedTitleLanguageCode("ES");
    result.setType(org.orcid.jaxb.model.record_v2.FundingType.SALARY_AWARD);
    result.setVisibility(org.orcid.jaxb.model.common_v2.Visibility.PRIVATE);
    return result;
}
Also used : EndDateEntity(org.orcid.persistence.jpa.entities.EndDateEntity) StartDateEntity(org.orcid.persistence.jpa.entities.StartDateEntity) BigDecimal(java.math.BigDecimal) ProfileFundingEntity(org.orcid.persistence.jpa.entities.ProfileFundingEntity)

Example 14 with EndDateEntity

use of org.orcid.persistence.jpa.entities.EndDateEntity in project ORCID-Source by ORCID.

the class JpaJaxbMembershipAdapterTest method getEntity.

private OrgAffiliationRelationEntity getEntity() {
    OrgEntity orgEntity = new OrgEntity();
    orgEntity.setCity("org:city");
    orgEntity.setCountry(org.orcid.jaxb.model.message.Iso3166Country.US);
    orgEntity.setName("org:name");
    orgEntity.setRegion("org:region");
    orgEntity.setUrl("org:url");
    orgEntity.setSource(new SourceEntity("APP-000000001"));
    OrgAffiliationRelationEntity result = new OrgAffiliationRelationEntity();
    result.setAffiliationType(AffiliationType.MEMBERSHIP);
    result.setDepartment("membership:department");
    result.setEndDate(new EndDateEntity(2020, 2, 2));
    result.setId(123456L);
    result.setOrg(orgEntity);
    result.setProfile(new ProfileEntity("0000-0001-0002-0003"));
    result.setStartDate(new StartDateEntity(2000, 1, 1));
    result.setTitle("membership:title");
    result.setVisibility(org.orcid.jaxb.model.common_v2.Visibility.PRIVATE);
    result.setClientSourceId("APP-000000001");
    return result;
}
Also used : EndDateEntity(org.orcid.persistence.jpa.entities.EndDateEntity) SourceEntity(org.orcid.persistence.jpa.entities.SourceEntity) StartDateEntity(org.orcid.persistence.jpa.entities.StartDateEntity) OrgAffiliationRelationEntity(org.orcid.persistence.jpa.entities.OrgAffiliationRelationEntity) ProfileEntity(org.orcid.persistence.jpa.entities.ProfileEntity) OrgEntity(org.orcid.persistence.jpa.entities.OrgEntity)

Example 15 with EndDateEntity

use of org.orcid.persistence.jpa.entities.EndDateEntity in project ORCID-Source by ORCID.

the class JpaJaxbQualificationAdapterTest method getEntity.

private OrgAffiliationRelationEntity getEntity() {
    OrgEntity orgEntity = new OrgEntity();
    orgEntity.setCity("org:city");
    orgEntity.setCountry(org.orcid.jaxb.model.message.Iso3166Country.US);
    orgEntity.setName("org:name");
    orgEntity.setRegion("org:region");
    orgEntity.setUrl("org:url");
    orgEntity.setSource(new SourceEntity("APP-000000001"));
    OrgAffiliationRelationEntity result = new OrgAffiliationRelationEntity();
    result.setAffiliationType(AffiliationType.QUALIFICATION);
    result.setDepartment("qualification:department");
    result.setEndDate(new EndDateEntity(2020, 2, 2));
    result.setId(123456L);
    result.setOrg(orgEntity);
    result.setProfile(new ProfileEntity("0000-0001-0002-0003"));
    result.setStartDate(new StartDateEntity(2000, 1, 1));
    result.setTitle("qualification:title");
    result.setVisibility(org.orcid.jaxb.model.common_v2.Visibility.PRIVATE);
    result.setClientSourceId("APP-000000001");
    return result;
}
Also used : EndDateEntity(org.orcid.persistence.jpa.entities.EndDateEntity) SourceEntity(org.orcid.persistence.jpa.entities.SourceEntity) StartDateEntity(org.orcid.persistence.jpa.entities.StartDateEntity) OrgAffiliationRelationEntity(org.orcid.persistence.jpa.entities.OrgAffiliationRelationEntity) ProfileEntity(org.orcid.persistence.jpa.entities.ProfileEntity) OrgEntity(org.orcid.persistence.jpa.entities.OrgEntity)

Aggregations

EndDateEntity (org.orcid.persistence.jpa.entities.EndDateEntity)17 StartDateEntity (org.orcid.persistence.jpa.entities.StartDateEntity)17 OrgEntity (org.orcid.persistence.jpa.entities.OrgEntity)11 OrgAffiliationRelationEntity (org.orcid.persistence.jpa.entities.OrgAffiliationRelationEntity)10 ProfileEntity (org.orcid.persistence.jpa.entities.ProfileEntity)9 SourceEntity (org.orcid.persistence.jpa.entities.SourceEntity)9 BigDecimal (java.math.BigDecimal)5 ProfileFundingEntity (org.orcid.persistence.jpa.entities.ProfileFundingEntity)5 CustomMapper (ma.glasnost.orika.CustomMapper)2 MappingContext (ma.glasnost.orika.MappingContext)2 FuzzyDate (org.orcid.jaxb.model.message.FuzzyDate)2 JSONFundingExternalIdentifiersConverterV1 (org.orcid.core.adapter.jsonidentifier.converter.JSONFundingExternalIdentifiersConverterV1)1 ApplicationException (org.orcid.core.exception.ApplicationException)1 Day (org.orcid.jaxb.model.common_v2.Day)1 FuzzyDate (org.orcid.jaxb.model.common_v2.FuzzyDate)1 Month (org.orcid.jaxb.model.common_v2.Month)1 Year (org.orcid.jaxb.model.common_v2.Year)1 FundingTitle (org.orcid.jaxb.model.message.FundingTitle)1 Day (org.orcid.jaxb.model.v3.dev1.common.Day)1 FuzzyDate (org.orcid.jaxb.model.v3.dev1.common.FuzzyDate)1