Search in sources :

Example 1 with ExternalIdsHolder

use of org.folio.rest.jaxrs.model.ExternalIdsHolder in project mod-inventory by folio-org.

the class MarcBibModifiedPostProcessingEventHandler method handle.

@Override
public CompletableFuture<DataImportEventPayload> handle(DataImportEventPayload dataImportEventPayload) {
    CompletableFuture<DataImportEventPayload> future = new CompletableFuture<>();
    try {
        HashMap<String, String> payloadContext = dataImportEventPayload.getContext();
        if (isNull(payloadContext) || isBlank(payloadContext.get(MARC_BIBLIOGRAPHIC.value()))) {
            LOGGER.error(PAYLOAD_HAS_NO_DATA_MSG);
            return CompletableFuture.failedFuture(new EventProcessingException(PAYLOAD_HAS_NO_DATA_MSG));
        }
        LOGGER.info("Processing ReplaceInstanceEventHandler starting with jobExecutionId: {}.", dataImportEventPayload.getJobExecutionId());
        Record record = new JsonObject(payloadContext.get(MARC_BIBLIOGRAPHIC.value())).mapTo(Record.class);
        String instanceId = ParsedRecordUtil.getAdditionalSubfieldValue(record.getParsedRecord(), ParsedRecordUtil.AdditionalSubfields.I);
        if (isBlank(instanceId)) {
            return CompletableFuture.completedFuture(dataImportEventPayload);
        }
        record.setExternalIdsHolder(new ExternalIdsHolder().withInstanceId(instanceId));
        Context context = EventHandlingUtil.constructContext(dataImportEventPayload.getTenant(), dataImportEventPayload.getToken(), dataImportEventPayload.getOkapiUrl());
        Promise<Instance> instanceUpdatePromise = Promise.promise();
        mappingMetadataCache.get(dataImportEventPayload.getJobExecutionId(), context).map(parametersOptional -> parametersOptional.orElseThrow(() -> new EventProcessingException(format(MAPPING_METADATA_NOT_FOUND_MSG, dataImportEventPayload.getJobExecutionId())))).map(mappingMetadataDto -> buildPayloadForInstanceUpdate(dataImportEventPayload, mappingMetadataDto)).compose(payloadForUpdate -> instanceUpdateDelegate.handle(payloadForUpdate, record, context)).onSuccess(instanceUpdatePromise::complete).compose(updatedInstance -> precedingSucceedingTitlesHelper.getExistingPrecedingSucceedingTitles(updatedInstance, context)).map(precedingSucceedingTitles -> precedingSucceedingTitles.stream().map(titleJson -> titleJson.getString("id")).collect(Collectors.toSet())).compose(precedingSucceedingTitles -> precedingSucceedingTitlesHelper.deletePrecedingSucceedingTitles(precedingSucceedingTitles, context)).compose(ar -> precedingSucceedingTitlesHelper.createPrecedingSucceedingTitles(instanceUpdatePromise.future().result(), context)).onComplete(updateAr -> {
            if (updateAr.succeeded()) {
                dataImportEventPayload.getContext().remove(CURRENT_RETRY_NUMBER);
                Instance resultedInstance = instanceUpdatePromise.future().result();
                if (resultedInstance.getVersion() != null) {
                    int currentVersion = Integer.parseInt(resultedInstance.getVersion());
                    int incrementedVersion = currentVersion + 1;
                    resultedInstance.setVersion(String.valueOf(incrementedVersion));
                }
                dataImportEventPayload.getContext().put(INSTANCE.value(), Json.encode(resultedInstance));
                future.complete(dataImportEventPayload);
            } else {
                if (updateAr.cause() instanceof OptimisticLockingException) {
                    processOLError(dataImportEventPayload, future, updateAr);
                } else {
                    dataImportEventPayload.getContext().remove(CURRENT_RETRY_NUMBER);
                    LOGGER.error("Error updating inventory instance by id: '{}' by jobExecutionId: '{}'", instanceId, dataImportEventPayload.getJobExecutionId(), updateAr.cause());
                    future.completeExceptionally(updateAr.cause());
                }
            }
        });
    } catch (Exception e) {
        dataImportEventPayload.getContext().remove(CURRENT_RETRY_NUMBER);
        LOGGER.error("Error updating inventory instance", e);
        future.completeExceptionally(e);
    }
    return future;
}
Also used : Context(org.folio.inventory.common.Context) ParsedRecordUtil(org.folio.inventory.dataimport.util.ParsedRecordUtil) Json(io.vertx.core.json.Json) Context(org.folio.inventory.common.Context) MappingMetadataDto(org.folio.MappingMetadataDto) EventHandler(org.folio.processing.events.services.handler.EventHandler) HashMap(java.util.HashMap) CompletableFuture(java.util.concurrent.CompletableFuture) MARC_BIBLIOGRAPHIC(org.folio.rest.jaxrs.model.EntityType.MARC_BIBLIOGRAPHIC) ExternalIdsHolder(org.folio.rest.jaxrs.model.ExternalIdsHolder) Map(java.util.Map) EntityType(org.folio.rest.jaxrs.model.EntityType) MAPPING_PROFILE(org.folio.rest.jaxrs.model.ProfileSnapshotWrapper.ContentType.MAPPING_PROFILE) JsonObject(io.vertx.core.json.JsonObject) Objects.isNull(java.util.Objects.isNull) AsyncResult(io.vertx.core.AsyncResult) MappingProfile(org.folio.MappingProfile) Record(org.folio.rest.jaxrs.model.Record) Promise(io.vertx.core.Promise) DataImportEventPayload(org.folio.DataImportEventPayload) Collectors(java.util.stream.Collectors) String.format(java.lang.String.format) Logger(org.apache.logging.log4j.Logger) EventProcessingException(org.folio.processing.exceptions.EventProcessingException) StringUtils.isBlank(org.apache.commons.lang3.StringUtils.isBlank) EventHandlingUtil(org.folio.inventory.dataimport.handlers.matching.util.EventHandlingUtil) INSTANCE(org.folio.ActionProfile.FolioRecord.INSTANCE) Instance(org.folio.inventory.domain.instances.Instance) OptimisticLockingException(org.folio.inventory.dataimport.exceptions.OptimisticLockingException) LogManager(org.apache.logging.log4j.LogManager) DI_SRS_MARC_BIB_RECORD_MODIFIED_READY_FOR_POST_PROCESSING(org.folio.DataImportEventTypes.DI_SRS_MARC_BIB_RECORD_MODIFIED_READY_FOR_POST_PROCESSING) MappingMetadataCache(org.folio.inventory.dataimport.cache.MappingMetadataCache) ExternalIdsHolder(org.folio.rest.jaxrs.model.ExternalIdsHolder) Instance(org.folio.inventory.domain.instances.Instance) OptimisticLockingException(org.folio.inventory.dataimport.exceptions.OptimisticLockingException) JsonObject(io.vertx.core.json.JsonObject) EventProcessingException(org.folio.processing.exceptions.EventProcessingException) OptimisticLockingException(org.folio.inventory.dataimport.exceptions.OptimisticLockingException) DataImportEventPayload(org.folio.DataImportEventPayload) CompletableFuture(java.util.concurrent.CompletableFuture) Record(org.folio.rest.jaxrs.model.Record) EventProcessingException(org.folio.processing.exceptions.EventProcessingException)

Example 2 with ExternalIdsHolder

use of org.folio.rest.jaxrs.model.ExternalIdsHolder in project mod-source-record-storage by folio-org.

the class DataImportConsumersVerticleTest method setUp.

@Before
public void setUp(TestContext context) throws IOException {
    WireMock.stubFor(get(new UrlPathPattern(new RegexPattern(MAPPING_METADATA_URL + "/.*"), true)).willReturn(WireMock.ok().withBody(Json.encode(new MappingMetadataDto().withMappingParams(Json.encode(new MappingParameters()))))));
    RawRecord rawRecord = new RawRecord().withId(recordId).withContent(new ObjectMapper().readValue(TestUtil.readFileFromPath(RAW_MARC_RECORD_CONTENT_SAMPLE_PATH), String.class));
    ParsedRecord parsedRecord = new ParsedRecord().withId(recordId).withContent(PARSED_CONTENT);
    Snapshot snapshot = new Snapshot().withJobExecutionId(snapshotId).withProcessingStartedDate(new Date()).withStatus(Snapshot.Status.COMMITTED);
    record = new Record().withId(recordId).withSnapshotId(snapshot.getJobExecutionId()).withGeneration(0).withMatchedId(recordId).withRecordType(MARC_BIB).withRawRecord(rawRecord).withParsedRecord(parsedRecord).withExternalIdsHolder(new ExternalIdsHolder().withAuthorityId(UUID.randomUUID().toString()));
    ReactiveClassicGenericQueryExecutor queryExecutor = postgresClientFactory.getQueryExecutor(TENANT_ID);
    RecordDaoImpl recordDao = new RecordDaoImpl(postgresClientFactory);
    SnapshotDaoUtil.save(queryExecutor, snapshot).compose(v -> recordDao.saveRecord(record, TENANT_ID)).onComplete(context.asyncAssertSuccess());
}
Also used : TestContext(io.vertx.ext.unit.TestContext) ObserveKeyValues(net.mguenther.kafka.junit.ObserveKeyValues) JOB_PROFILE(org.folio.rest.jaxrs.model.ProfileSnapshotWrapper.ContentType.JOB_PROFILE) RecordDaoImpl(org.folio.dao.RecordDaoImpl) Date(java.util.Date) ACTION_PROFILE(org.folio.rest.jaxrs.model.ProfileSnapshotWrapper.ContentType.ACTION_PROFILE) Collections.singletonList(java.util.Collections.singletonList) KeyValue(net.mguenther.kafka.junit.KeyValue) ProfileSnapshotWrapper(org.folio.rest.jaxrs.model.ProfileSnapshotWrapper) DI_SRS_MARC_BIB_RECORD_CREATED(org.folio.rest.jaxrs.model.DataImportEventTypes.DI_SRS_MARC_BIB_RECORD_CREATED) JOB_EXECUTION_ID_HEADER(org.folio.consumers.ParsedRecordChunksKafkaHandler.JOB_EXECUTION_ID_HEADER) JsonObject(io.vertx.core.json.JsonObject) MappingProfile(org.folio.MappingProfile) JobProfile(org.folio.JobProfile) MarcField(org.folio.rest.jaxrs.model.MarcField) UUID(java.util.UUID) SnapshotDaoUtil(org.folio.dao.util.SnapshotDaoUtil) Data(org.folio.rest.jaxrs.model.Data) StandardCharsets(java.nio.charset.StandardCharsets) DI_SRS_MARC_AUTHORITY_RECORD_DELETED(org.folio.rest.jaxrs.model.DataImportEventTypes.DI_SRS_MARC_AUTHORITY_RECORD_DELETED) List(java.util.List) SendKeyValues(net.mguenther.kafka.junit.SendKeyValues) DELETE(org.folio.ActionProfile.Action.DELETE) MODIFY(org.folio.ActionProfile.Action.MODIFY) Slf4jNotifier(com.github.tomakehurst.wiremock.common.Slf4jNotifier) RestUtil(org.folio.dataimport.util.RestUtil) ParsedRecord(org.folio.rest.jaxrs.model.ParsedRecord) Json(io.vertx.core.json.Json) RegexPattern(com.github.tomakehurst.wiremock.matching.RegexPattern) KafkaTopicNameHelper.getDefaultNameSpace(org.folio.kafka.KafkaTopicNameHelper.getDefaultNameSpace) DataImportEventPayload(org.folio.rest.jaxrs.model.DataImportEventPayload) WireMockConfiguration(com.github.tomakehurst.wiremock.core.WireMockConfiguration) RunWith(org.junit.runner.RunWith) RawRecord(org.folio.rest.jaxrs.model.RawRecord) HashMap(java.util.HashMap) MarcMappingDetail(org.folio.rest.jaxrs.model.MarcMappingDetail) MappingDetail(org.folio.rest.jaxrs.model.MappingDetail) MappingMetadataDto(org.folio.rest.jaxrs.model.MappingMetadataDto) WireMock(com.github.tomakehurst.wiremock.client.WireMock) DI_MARC_FOR_DELETE_RECEIVED(org.folio.rest.jaxrs.model.DataImportEventTypes.DI_MARC_FOR_DELETE_RECEIVED) MARC_BIBLIOGRAPHIC(org.folio.rest.jaxrs.model.EntityType.MARC_BIBLIOGRAPHIC) WireMockRule(com.github.tomakehurst.wiremock.junit.WireMockRule) ExternalIdsHolder(org.folio.rest.jaxrs.model.ExternalIdsHolder) DI_SRS_MARC_BIB_RECORD_MODIFIED_READY_FOR_POST_PROCESSING(org.folio.rest.jaxrs.model.DataImportEventTypes.DI_SRS_MARC_BIB_RECORD_MODIFIED_READY_FOR_POST_PROCESSING) TestUtil(org.folio.TestUtil) MAPPING_PROFILE(org.folio.rest.jaxrs.model.ProfileSnapshotWrapper.ContentType.MAPPING_PROFILE) KafkaTopicNameHelper(org.folio.kafka.KafkaTopicNameHelper) ActionProfile(org.folio.ActionProfile) MappingParameters(org.folio.processing.mapping.defaultmapper.processor.parameters.MappingParameters) Before(org.junit.Before) WireMock.get(com.github.tomakehurst.wiremock.client.WireMock.get) Event(org.folio.rest.jaxrs.model.Event) MarcSubfield(org.folio.rest.jaxrs.model.MarcSubfield) UrlPathPattern(com.github.tomakehurst.wiremock.matching.UrlPathPattern) UTF_8(java.nio.charset.StandardCharsets.UTF_8) Assert.assertNotNull(org.junit.Assert.assertNotNull) Record(org.folio.rest.jaxrs.model.Record) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) IOException(java.io.IOException) ReactiveClassicGenericQueryExecutor(io.github.jklingsporn.vertx.jooq.classic.reactivepg.ReactiveClassicGenericQueryExecutor) Test(org.junit.Test) VertxUnitRunner(io.vertx.ext.unit.junit.VertxUnitRunner) AbstractLBServiceTest(org.folio.services.AbstractLBServiceTest) TimeUnit(java.util.concurrent.TimeUnit) MARC_BIB(org.folio.rest.jaxrs.model.Record.RecordType.MARC_BIB) Rule(org.junit.Rule) PROFILE_SNAPSHOT_ID_KEY(org.folio.consumers.DataImportKafkaHandler.PROFILE_SNAPSHOT_ID_KEY) Snapshot(org.folio.rest.jaxrs.model.Snapshot) Assert.assertEquals(org.junit.Assert.assertEquals) ExternalIdsHolder(org.folio.rest.jaxrs.model.ExternalIdsHolder) RegexPattern(com.github.tomakehurst.wiremock.matching.RegexPattern) ReactiveClassicGenericQueryExecutor(io.github.jklingsporn.vertx.jooq.classic.reactivepg.ReactiveClassicGenericQueryExecutor) MappingMetadataDto(org.folio.rest.jaxrs.model.MappingMetadataDto) ParsedRecord(org.folio.rest.jaxrs.model.ParsedRecord) Date(java.util.Date) Snapshot(org.folio.rest.jaxrs.model.Snapshot) RecordDaoImpl(org.folio.dao.RecordDaoImpl) UrlPathPattern(com.github.tomakehurst.wiremock.matching.UrlPathPattern) RawRecord(org.folio.rest.jaxrs.model.RawRecord) ParsedRecord(org.folio.rest.jaxrs.model.ParsedRecord) RawRecord(org.folio.rest.jaxrs.model.RawRecord) Record(org.folio.rest.jaxrs.model.Record) MappingParameters(org.folio.processing.mapping.defaultmapper.processor.parameters.MappingParameters) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Before(org.junit.Before)

Example 3 with ExternalIdsHolder

use of org.folio.rest.jaxrs.model.ExternalIdsHolder in project mod-source-record-storage by folio-org.

the class AuthorityPostProcessingEventHandlerTest method shouldSetAuthorityIdToParsedRecordWhenContentHasField999.

@Test
public void shouldSetAuthorityIdToParsedRecordWhenContentHasField999(TestContext context) {
    Async async = context.async();
    String expectedAuthorityId = UUID.randomUUID().toString();
    record.withParsedRecord(new ParsedRecord().withId(recordId).withContent(PARSED_CONTENT_WITH_999_FIELD)).withExternalIdsHolder(new ExternalIdsHolder().withAuthorityId(expectedAuthorityId));
    HashMap<String, String> payloadContext = new HashMap<>();
    payloadContext.put(AUTHORITY.value(), new JsonObject().put("id", expectedAuthorityId).encode());
    payloadContext.put(MARC_AUTHORITY.value(), Json.encode(record));
    DataImportEventPayload dataImportEventPayload = createDataImportEventPayload(payloadContext, DI_INVENTORY_AUTHORITY_CREATED_READY_FOR_POST_PROCESSING);
    CompletableFuture<DataImportEventPayload> future = new CompletableFuture<>();
    recordDao.saveRecord(record, TENANT_ID).onFailure(future::completeExceptionally).onSuccess(rec -> handler.handle(dataImportEventPayload).thenApply(future::complete).exceptionally(future::completeExceptionally));
    future.whenComplete((payload, throwable) -> {
        if (throwable != null) {
            context.fail(throwable);
        }
        recordDao.getRecordById(record.getId(), TENANT_ID).onComplete(getAr -> {
            if (getAr.failed()) {
                context.fail(getAr.cause());
            }
            context.assertTrue(getAr.result().isPresent());
            Record updatedRecord = getAr.result().get();
            context.assertNotNull(updatedRecord.getExternalIdsHolder());
            context.assertTrue(expectedAuthorityId.equals(updatedRecord.getExternalIdsHolder().getAuthorityId()));
            context.assertNotNull(updatedRecord.getParsedRecord().getContent());
            JsonObject parsedContent = JsonObject.mapFrom(updatedRecord.getParsedRecord().getContent());
            JsonArray fields = parsedContent.getJsonArray("fields");
            context.assertTrue(!fields.isEmpty());
            String actualAuthorityId = getInventoryId(fields);
            context.assertEquals(expectedAuthorityId, actualAuthorityId);
            async.complete();
        });
    });
}
Also used : ExternalIdsHolder(org.folio.rest.jaxrs.model.ExternalIdsHolder) HashMap(java.util.HashMap) JsonObject(io.vertx.core.json.JsonObject) ParsedRecord(org.folio.rest.jaxrs.model.ParsedRecord) DataImportEventPayload(org.folio.DataImportEventPayload) JsonArray(io.vertx.core.json.JsonArray) CompletableFuture(java.util.concurrent.CompletableFuture) Async(io.vertx.ext.unit.Async) RawRecord(org.folio.rest.jaxrs.model.RawRecord) Record(org.folio.rest.jaxrs.model.Record) ParsedRecord(org.folio.rest.jaxrs.model.ParsedRecord) Test(org.junit.Test)

Example 4 with ExternalIdsHolder

use of org.folio.rest.jaxrs.model.ExternalIdsHolder in project mod-source-record-storage by folio-org.

the class MarcBibliographicMatchEventHandlerTest method setUp.

@Before
public void setUp(TestContext context) {
    MockitoAnnotations.initMocks(this);
    recordDao = new RecordDaoImpl(postgresClientFactory);
    handler = new MarcBibliographicMatchEventHandler(recordDao);
    Async async = context.async();
    Snapshot existingRecordSnapshot = new Snapshot().withJobExecutionId(UUID.randomUUID().toString()).withProcessingStartedDate(new Date()).withStatus(Snapshot.Status.COMMITTED);
    Snapshot incomingRecordSnapshot = new Snapshot().withJobExecutionId(UUID.randomUUID().toString()).withProcessingStartedDate(new Date()).withStatus(Snapshot.Status.COMMITTED);
    List<Snapshot> snapshots = new ArrayList<>();
    snapshots.add(existingRecordSnapshot);
    snapshots.add(incomingRecordSnapshot);
    String existingRecordId = "acf4f6e2-115c-4509-9d4c-536c758ef917";
    this.existingRecord = new Record().withId(existingRecordId).withMatchedId(existingRecordId).withSnapshotId(existingRecordSnapshot.getJobExecutionId()).withGeneration(0).withRecordType(MARC_BIB).withRawRecord(new RawRecord().withId(existingRecordId).withContent(rawRecordContent)).withParsedRecord(new ParsedRecord().withId(existingRecordId).withContent(PARSED_CONTENT_WITH_ADDITIONAL_FIELDS)).withExternalIdsHolder(new ExternalIdsHolder().withInstanceId("681394b4-10d8-4cb1-a618-0f9bd6152119").withInstanceHrid("12345"));
    String incomingRecordId = UUID.randomUUID().toString();
    this.incomingRecord = new Record().withId(incomingRecordId).withMatchedId(existingRecordId).withSnapshotId(incomingRecordSnapshot.getJobExecutionId()).withGeneration(1).withRecordType(MARC_BIB).withRawRecord(new RawRecord().withId(incomingRecordId).withContent(rawRecordContent)).withParsedRecord(new ParsedRecord().withId(incomingRecordId).withContent(PARSED_CONTENT_WITH_ADDITIONAL_FIELDS)).withExternalIdsHolder(new ExternalIdsHolder());
    SnapshotDaoUtil.save(postgresClientFactory.getQueryExecutor(TENANT_ID), snapshots).onComplete(save -> {
        if (save.failed()) {
            context.fail(save.cause());
        }
        async.complete();
    });
}
Also used : Snapshot(org.folio.rest.jaxrs.model.Snapshot) ExternalIdsHolder(org.folio.rest.jaxrs.model.ExternalIdsHolder) RecordDaoImpl(org.folio.dao.RecordDaoImpl) MarcBibliographicMatchEventHandler(org.folio.services.handlers.match.MarcBibliographicMatchEventHandler) Async(io.vertx.ext.unit.Async) RawRecord(org.folio.rest.jaxrs.model.RawRecord) ArrayList(java.util.ArrayList) RawRecord(org.folio.rest.jaxrs.model.RawRecord) Record(org.folio.rest.jaxrs.model.Record) ParsedRecord(org.folio.rest.jaxrs.model.ParsedRecord) ParsedRecord(org.folio.rest.jaxrs.model.ParsedRecord) Date(java.util.Date) Before(org.junit.Before)

Example 5 with ExternalIdsHolder

use of org.folio.rest.jaxrs.model.ExternalIdsHolder in project mod-source-record-storage by folio-org.

the class RecordApiTest method suppressFromDiscoveryByInstanceIdSuccess.

@Test
public void suppressFromDiscoveryByInstanceIdSuccess(TestContext testContext) {
    postSnapshots(testContext, snapshot_1);
    Async async = testContext.async();
    String srsId = UUID.randomUUID().toString();
    String instanceId = UUID.randomUUID().toString();
    ParsedRecord parsedRecord = new ParsedRecord().withId(srsId).withContent(new JsonObject().put("leader", "01542ccm a2200361   4500").put("fields", new JsonArray().add(new JsonObject().put("999", new JsonObject().put("subfields", new JsonArray().add(new JsonObject().put("s", srsId)).add(new JsonObject().put("i", instanceId)))))));
    Record newRecord = new Record().withId(srsId).withSnapshotId(snapshot_1.getJobExecutionId()).withRecordType(Record.RecordType.MARC_BIB).withRawRecord(rawMarcRecord).withParsedRecord(parsedRecord).withExternalIdsHolder(new ExternalIdsHolder().withInstanceId(instanceId)).withMatchedId(UUID.randomUUID().toString());
    RestAssured.given().spec(spec).body(JsonObject.mapFrom(newRecord).toString()).when().post(SOURCE_STORAGE_RECORDS_PATH).then().statusCode(HttpStatus.SC_CREATED).body("id", is(srsId));
    async.complete();
    async = testContext.async();
    RestAssured.given().spec(spec).when().put(SOURCE_STORAGE_RECORDS_PATH + "/" + instanceId + "/suppress-from-discovery?idType=INSTANCE&suppress=true").then().statusCode(HttpStatus.SC_OK);
    async.complete();
}
Also used : JsonArray(io.vertx.core.json.JsonArray) ExternalIdsHolder(org.folio.rest.jaxrs.model.ExternalIdsHolder) Async(io.vertx.ext.unit.Async) JsonObject(io.vertx.core.json.JsonObject) RawRecord(org.folio.rest.jaxrs.model.RawRecord) Record(org.folio.rest.jaxrs.model.Record) ErrorRecord(org.folio.rest.jaxrs.model.ErrorRecord) ParsedRecord(org.folio.rest.jaxrs.model.ParsedRecord) ParsedRecord(org.folio.rest.jaxrs.model.ParsedRecord) Test(org.junit.Test)

Aggregations

ExternalIdsHolder (org.folio.rest.jaxrs.model.ExternalIdsHolder)25 ParsedRecord (org.folio.rest.jaxrs.model.ParsedRecord)22 Record (org.folio.rest.jaxrs.model.Record)22 Test (org.junit.Test)18 RawRecord (org.folio.rest.jaxrs.model.RawRecord)16 Async (io.vertx.ext.unit.Async)15 JsonObject (io.vertx.core.json.JsonObject)11 ErrorRecord (org.folio.rest.jaxrs.model.ErrorRecord)8 Date (java.util.Date)6 HashMap (java.util.HashMap)6 Snapshot (org.folio.rest.jaxrs.model.Snapshot)6 SourceRecord (org.folio.rest.jaxrs.model.SourceRecord)6 Before (org.junit.Before)6 JsonArray (io.vertx.core.json.JsonArray)5 UUID (java.util.UUID)5 ArrayList (java.util.ArrayList)4 List (java.util.List)4 DataImportEventPayload (org.folio.DataImportEventPayload)4 SnapshotDaoUtil (org.folio.dao.util.SnapshotDaoUtil)4 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)3