Search in sources :

Example 46 with Title

use of com.adobe.cq.wcm.core.components.it.seljup.util.components.title.v1.Title in project ORCID-Source by ORCID.

the class ContributorUtilsTest method getFundingWithoutContributors.

private Funding getFundingWithoutContributors() {
    Funding funding = new Funding();
    FundingTitle fundingTitle = new FundingTitle();
    fundingTitle.setTitle(new Title("funding without contributors"));
    funding.setTitle(fundingTitle);
    return funding;
}
Also used : Funding(org.orcid.jaxb.model.record_v2.Funding) FundingTitle(org.orcid.jaxb.model.record_v2.FundingTitle) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) Title(org.orcid.jaxb.model.common_v2.Title) FundingTitle(org.orcid.jaxb.model.record_v2.FundingTitle)

Example 47 with Title

use of com.adobe.cq.wcm.core.components.it.seljup.util.components.title.v1.Title in project ORCID-Source by ORCID.

the class ContributorUtilsTest method getWorkWithContributorWithoutOrcid.

private Work getWorkWithContributorWithoutOrcid() {
    Work work = new Work();
    WorkTitle workTitle = new WorkTitle();
    workTitle.setTitle(new Title("work with contributor without ORCID record"));
    work.setWorkTitle(workTitle);
    work.setWorkContributors(getWorkContributorWithoutOrcid());
    return work;
}
Also used : WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) Work(org.orcid.jaxb.model.record_v2.Work) FundingTitle(org.orcid.jaxb.model.record_v2.FundingTitle) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) Title(org.orcid.jaxb.model.common_v2.Title)

Example 48 with Title

use of com.adobe.cq.wcm.core.components.it.seljup.util.components.title.v1.Title in project ORCID-Source by ORCID.

the class SourceInActivitiesTest method getWorkWithoutExternalIdentifier.

private Work getWorkWithoutExternalIdentifier(String userOrcid, boolean validate) {
    Work work = new Work();
    WorkTitle title = new WorkTitle();
    title.setTitle(new Title("Work " + System.currentTimeMillis()));
    work.setWorkTitle(title);
    work.setWorkType(org.orcid.jaxb.model.record_v2.WorkType.BOOK);
    work = workManager.createWork(userOrcid, work, validate);
    return workManager.getWork(userOrcid, work.getPutCode());
}
Also used : WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) Work(org.orcid.jaxb.model.record_v2.Work) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) FundingTitle(org.orcid.jaxb.model.record_v2.FundingTitle) Title(org.orcid.jaxb.model.common_v2.Title)

Example 49 with Title

use of com.adobe.cq.wcm.core.components.it.seljup.util.components.title.v1.Title in project ORCID-Source by ORCID.

the class SourceInActivitiesTest method getWorkWithPutCode.

private Work getWorkWithPutCode(String userOrcid, boolean validate) {
    Work work = new Work();
    WorkTitle title = new WorkTitle();
    title.setTitle(new Title("Work " + System.currentTimeMillis()));
    work.setWorkTitle(title);
    ExternalID extId = new ExternalID();
    extId.setValue("111");
    extId.setType(WorkExternalIdentifierType.DOI.value());
    ExternalIDs extIdentifiers = new ExternalIDs();
    extIdentifiers.getExternalIdentifier().add(extId);
    work.setWorkExternalIdentifiers(extIdentifiers);
    work.setWorkType(org.orcid.jaxb.model.record_v2.WorkType.BOOK);
    work.setPutCode(Long.valueOf(111));
    work = workManager.createWork(userOrcid, work, validate);
    return workManager.getWork(userOrcid, work.getPutCode());
}
Also used : ExternalIDs(org.orcid.jaxb.model.record_v2.ExternalIDs) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) ExternalID(org.orcid.jaxb.model.record_v2.ExternalID) Work(org.orcid.jaxb.model.record_v2.Work) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) FundingTitle(org.orcid.jaxb.model.record_v2.FundingTitle) Title(org.orcid.jaxb.model.common_v2.Title)

Example 50 with Title

use of com.adobe.cq.wcm.core.components.it.seljup.util.components.title.v1.Title in project ORCID-Source by ORCID.

the class v2ClientPerMessageCacheTest method before.

@Before
public void before() {
    MockitoAnnotations.initMocks(this);
    TargetProxyHelper.injectIntoProxy(orcid20ApiClient, "jerseyClient", mock_jerseyClient);
    // mock methods
    when(mock_jerseyClient.resource(Matchers.isA(URI.class))).thenReturn(mock_resource);
    when(mock_resource.path(Matchers.anyString())).thenReturn(mock_resource);
    when(mock_resource.accept(Matchers.anyString())).thenReturn(mock_builder);
    when(mock_builder.get(Matchers.isA(Class.class))).thenReturn(mock_response);
    when(mock_builder.header(Matchers.anyString(), Matchers.anyString())).thenReturn(mock_builder);
    when(mock_response.getStatus()).thenReturn(200);
    when(mock_response.getEntity(Record.class)).thenReturn(record);
    // build test record
    record.setOrcidIdentifier(new OrcidIdentifier("http://orcid.org/0000-0000-0000-0000"));
    ActivitiesSummary sum = new ActivitiesSummary();
    Works works = new Works();
    WorkGroup group = new WorkGroup();
    WorkSummary work = new WorkSummary();
    WorkTitle title = new WorkTitle();
    title.setTitle(new Title("blah"));
    work.setTitle(title);
    group.getWorkSummary().add(work);
    works.getWorkGroup().add(group);
    sum.setWorks(works);
    record.setActivitiesSummary(sum);
}
Also used : WorkGroup(org.orcid.jaxb.model.record.summary_v2.WorkGroup) WorkSummary(org.orcid.jaxb.model.record.summary_v2.WorkSummary) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) OrcidIdentifier(org.orcid.jaxb.model.common_v2.OrcidIdentifier) WorkTitle(org.orcid.jaxb.model.record_v2.WorkTitle) Title(org.orcid.jaxb.model.common_v2.Title) Works(org.orcid.jaxb.model.record.summary_v2.Works) URI(java.net.URI) ActivitiesSummary(org.orcid.jaxb.model.record.summary_v2.ActivitiesSummary) Before(org.junit.Before)

Aggregations

Title (org.orcid.jaxb.model.common_v2.Title)47 WorkTitle (org.orcid.jaxb.model.record_v2.WorkTitle)41 ExternalID (org.orcid.jaxb.model.record_v2.ExternalID)28 Test (org.junit.Test)24 ExternalIDs (org.orcid.jaxb.model.record_v2.ExternalIDs)24 Work (org.orcid.jaxb.model.record_v2.Work)24 Url (org.orcid.jaxb.model.common_v2.Url)23 FundingTitle (org.orcid.jaxb.model.record_v2.FundingTitle)23 TranslatedTitle (org.orcid.jaxb.model.common_v2.TranslatedTitle)14 ClientResponse (com.sun.jersey.api.client.ClientResponse)13 Funding (org.orcid.jaxb.model.record_v2.Funding)11 List (java.util.List)8 WorkSummary (org.orcid.jaxb.model.record.summary_v2.WorkSummary)8 ArrayList (java.util.ArrayList)7 Map (java.util.Map)6 WorkBulk (org.orcid.jaxb.model.record_v2.WorkBulk)6 BaseTest (org.orcid.core.BaseTest)5 ActivitiesSummary (org.orcid.jaxb.model.record.summary_v2.ActivitiesSummary)5 WorkGroup (org.orcid.jaxb.model.record.summary_v2.WorkGroup)5 PeerReview (org.orcid.jaxb.model.record_v2.PeerReview)5