Search in sources :

Example 46 with WorkBulk

use of org.orcid.jaxb.model.record_rc4.WorkBulk in project ORCID-Source by ORCID.

the class WorksTest method createBulk.

private WorkBulk createBulk(int size, String extId) {
    WorkBulk bulk = new WorkBulk();
    Long time = System.currentTimeMillis();
    for (int i = 0; i < size; i++) {
        if (extId == null) {
            bulk.getBulk().add(getWork("Work title #" + i + "-" + time, true, null));
        } else {
            bulk.getBulk().add(getWork("Work title #" + i + "-" + time, false, String.valueOf(time)));
        }
    }
    return bulk;
}
Also used : WorkBulk(org.orcid.jaxb.model.record_v2.WorkBulk)

Aggregations

Test (org.junit.Test)39 WorkBulk (org.orcid.jaxb.model.record_v2.WorkBulk)36 Work (org.orcid.jaxb.model.record_v2.Work)22 OrcidError (org.orcid.jaxb.model.error_v2.OrcidError)21 ClientResponse (com.sun.jersey.api.client.ClientResponse)16 BulkElement (org.orcid.jaxb.model.record_v2.BulkElement)9 Response (javax.ws.rs.core.Response)7 DBUnitTest (org.orcid.test.DBUnitTest)7 BaseTest (org.orcid.core.BaseTest)5 WorkBulk (org.orcid.jaxb.model.record_rc3.WorkBulk)5 WorkBulk (org.orcid.jaxb.model.record_rc4.WorkBulk)5 Url (org.orcid.jaxb.model.common_v2.Url)4 ExternalID (org.orcid.jaxb.model.record_v2.ExternalID)4 Title (org.orcid.jaxb.model.common_v2.Title)3 OrcidError (org.orcid.jaxb.model.error_rc3.OrcidError)3 OrcidError (org.orcid.jaxb.model.error_rc4.OrcidError)3 BulkElement (org.orcid.jaxb.model.record_rc3.BulkElement)3 Work (org.orcid.jaxb.model.record_rc3.Work)3 BulkElement (org.orcid.jaxb.model.record_rc4.BulkElement)3 Work (org.orcid.jaxb.model.record_rc4.Work)3