Search in sources :

Example 1 with CompletionDateEntity

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

the class JSONPeerReviewWorkExternalIdentifierConverterV2Test method getPeerReviewEntity.

private PeerReviewEntity getPeerReviewEntity() {
    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"));
    PeerReviewEntity result = new PeerReviewEntity();
    result.setOrg(orgEntity);
    result.setCompletionDate(new CompletionDateEntity(2015, 1, 1));
    result.setExternalIdentifiersJson("{\"workExternalIdentifier\":[{\"relationship\":\"SELF\",\"url\":{\"value\":\"http://orcid.org\"},\"workExternalIdentifierType\":\"SOURCE_WORK_ID\",\"workExternalIdentifierId\":{\"content\":\"peer-review:external-identifier-id\"}}]}");
    result.setProfile(new ProfileEntity("0000-0001-0002-0003"));
    result.setRole(Role.MEMBER);
    result.setType(PeerReviewType.EVALUATION);
    result.setUrl("peer-review:url");
    result.setSubjectExternalIdentifiersJson("{\"relationship\":\"SELF\",\"url\":{\"value\":\"http://orcid.org\"},\"workExternalIdentifierType\":\"SOURCE_WORK_ID\",\"workExternalIdentifierId\":{\"content\":\"peer-review:subject-external-identifier-id\"}}");
    result.setSubjectContainerName("peer-review:subject-container-name");
    result.setSubjectName("peer-review:subject-name");
    result.setSubjectTranslatedName("peer-review:subject-translated-name");
    result.setSubjectTranslatedNameLanguageCode("en");
    result.setSubjectUrl("peer-review:subject-url");
    result.setSubjectType(WorkType.BOOK_REVIEW);
    result.setVisibility(Visibility.PRIVATE);
    result.setClientSourceId("APP-000000001");
    result.setGroupId("orcid-generated:12345");
    result.setId(12345L);
    return result;
}
Also used : CompletionDateEntity(org.orcid.persistence.jpa.entities.CompletionDateEntity) SourceEntity(org.orcid.persistence.jpa.entities.SourceEntity) PeerReviewEntity(org.orcid.persistence.jpa.entities.PeerReviewEntity) ProfileEntity(org.orcid.persistence.jpa.entities.ProfileEntity) OrgEntity(org.orcid.persistence.jpa.entities.OrgEntity)

Example 2 with CompletionDateEntity

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

the class JpaJaxbPeerReviewAdapterTest method getPeerReviewEntity.

private PeerReviewEntity getPeerReviewEntity() {
    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"));
    PeerReviewEntity result = new PeerReviewEntity();
    result.setOrg(orgEntity);
    result.setCompletionDate(new CompletionDateEntity(2015, 1, 1));
    result.setExternalIdentifiersJson("{\"workExternalIdentifier\":[{\"relationship\":\"SELF\",\"url\":{\"value\":\"http://orcid.org\"},\"workExternalIdentifierType\":\"SOURCE_WORK_ID\",\"workExternalIdentifierId\":{\"content\":\"peer-review:external-identifier-id\"}}]}");
    result.setProfile(new ProfileEntity("0000-0001-0002-0003"));
    result.setRole(Role.MEMBER);
    result.setType(PeerReviewType.EVALUATION);
    result.setUrl("peer-review:url");
    result.setSubjectExternalIdentifiersJson("{\"relationship\":\"SELF\",\"url\":{\"value\":\"http://orcid.org\"},\"workExternalIdentifierType\":\"SOURCE_WORK_ID\",\"workExternalIdentifierId\":{\"content\":\"peer-review:subject-external-identifier-id\"}}");
    result.setSubjectContainerName("peer-review:subject-container-name");
    result.setSubjectName("peer-review:subject-name");
    result.setSubjectTranslatedName("peer-review:subject-translated-name");
    result.setSubjectTranslatedNameLanguageCode("en");
    result.setSubjectUrl("peer-review:subject-url");
    result.setSubjectType(WorkType.BOOK_REVIEW);
    result.setVisibility(Visibility.PRIVATE);
    result.setClientSourceId("APP-000000001");
    result.setGroupId("orcid-generated:12345");
    result.setId(12345L);
    return result;
}
Also used : CompletionDateEntity(org.orcid.persistence.jpa.entities.CompletionDateEntity) SourceEntity(org.orcid.persistence.jpa.entities.SourceEntity) PeerReviewEntity(org.orcid.persistence.jpa.entities.PeerReviewEntity) ProfileEntity(org.orcid.persistence.jpa.entities.ProfileEntity) OrgEntity(org.orcid.persistence.jpa.entities.OrgEntity)

Example 3 with CompletionDateEntity

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

the class JpaJaxbPeerReviewAdapterTest method getPeerReviewEntity.

private PeerReviewEntity getPeerReviewEntity() {
    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"));
    PeerReviewEntity result = new PeerReviewEntity();
    result.setOrg(orgEntity);
    result.setCompletionDate(new CompletionDateEntity(2015, 1, 1));
    result.setExternalIdentifiersJson("{\"workExternalIdentifier\":[{\"relationship\":\"SELF\",\"url\":{\"value\":\"http://orcid.org\"},\"workExternalIdentifierType\":\"SOURCE_WORK_ID\",\"workExternalIdentifierId\":{\"content\":\"peer-review:external-identifier-id\"}}]}");
    result.setProfile(new ProfileEntity("0000-0001-0002-0003"));
    result.setRole(org.orcid.jaxb.model.record_v2.Role.MEMBER);
    result.setType(org.orcid.jaxb.model.record_v2.PeerReviewType.EVALUATION);
    result.setUrl("peer-review:url");
    result.setSubjectExternalIdentifiersJson("{\"relationship\":\"SELF\",\"url\":{\"value\":\"http://orcid.org\"},\"workExternalIdentifierType\":\"SOURCE_WORK_ID\",\"workExternalIdentifierId\":{\"content\":\"peer-review:subject-external-identifier-id\"}}");
    result.setSubjectContainerName("peer-review:subject-container-name");
    result.setSubjectName("peer-review:subject-name");
    result.setSubjectTranslatedName("peer-review:subject-translated-name");
    result.setSubjectTranslatedNameLanguageCode("en");
    result.setSubjectUrl("peer-review:subject-url");
    result.setSubjectType(org.orcid.jaxb.model.record_v2.WorkType.BOOK_REVIEW);
    result.setVisibility(org.orcid.jaxb.model.common_v2.Visibility.PRIVATE);
    result.setClientSourceId("APP-000000001");
    result.setGroupId("orcid-generated:12345");
    result.setId(12345L);
    return result;
}
Also used : CompletionDateEntity(org.orcid.persistence.jpa.entities.CompletionDateEntity) SourceEntity(org.orcid.persistence.jpa.entities.SourceEntity) PeerReviewEntity(org.orcid.persistence.jpa.entities.PeerReviewEntity) ProfileEntity(org.orcid.persistence.jpa.entities.ProfileEntity) OrgEntity(org.orcid.persistence.jpa.entities.OrgEntity)

Example 4 with CompletionDateEntity

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

the class JSONPeerReviewWorkExternalIdentifierConverterV3Test method getPeerReviewEntity.

private PeerReviewEntity getPeerReviewEntity() {
    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"));
    PeerReviewEntity result = new PeerReviewEntity();
    result.setOrg(orgEntity);
    result.setCompletionDate(new CompletionDateEntity(2015, 1, 1));
    result.setExternalIdentifiersJson("{\"workExternalIdentifier\":[{\"relationship\":\"SELF\",\"url\":{\"value\":\"http://orcid.org\"},\"workExternalIdentifierType\":\"SOURCE_WORK_ID\",\"workExternalIdentifierId\":{\"content\":\"peer-review:external-identifier-id\"}}]}");
    result.setProfile(new ProfileEntity("0000-0001-0002-0003"));
    result.setRole(org.orcid.jaxb.model.record_v2.Role.MEMBER);
    result.setType(org.orcid.jaxb.model.record_v2.PeerReviewType.EVALUATION);
    result.setUrl("peer-review:url");
    result.setSubjectExternalIdentifiersJson("{\"relationship\":\"SELF\",\"url\":{\"value\":\"http://orcid.org\"},\"workExternalIdentifierType\":\"SOURCE_WORK_ID\",\"workExternalIdentifierId\":{\"content\":\"peer-review:subject-external-identifier-id\"}}");
    result.setSubjectContainerName("peer-review:subject-container-name");
    result.setSubjectName("peer-review:subject-name");
    result.setSubjectTranslatedName("peer-review:subject-translated-name");
    result.setSubjectTranslatedNameLanguageCode("en");
    result.setSubjectUrl("peer-review:subject-url");
    result.setSubjectType(org.orcid.jaxb.model.record_v2.WorkType.BOOK_REVIEW);
    result.setVisibility(org.orcid.jaxb.model.common_v2.Visibility.PRIVATE);
    result.setClientSourceId("APP-000000001");
    result.setGroupId("orcid-generated:12345");
    result.setId(12345L);
    return result;
}
Also used : CompletionDateEntity(org.orcid.persistence.jpa.entities.CompletionDateEntity) SourceEntity(org.orcid.persistence.jpa.entities.SourceEntity) PeerReviewEntity(org.orcid.persistence.jpa.entities.PeerReviewEntity) ProfileEntity(org.orcid.persistence.jpa.entities.ProfileEntity) OrgEntity(org.orcid.persistence.jpa.entities.OrgEntity)

Aggregations

CompletionDateEntity (org.orcid.persistence.jpa.entities.CompletionDateEntity)4 OrgEntity (org.orcid.persistence.jpa.entities.OrgEntity)4 PeerReviewEntity (org.orcid.persistence.jpa.entities.PeerReviewEntity)4 ProfileEntity (org.orcid.persistence.jpa.entities.ProfileEntity)4 SourceEntity (org.orcid.persistence.jpa.entities.SourceEntity)4