AKRA
This commit is contained in:
parent
730f6c601c
commit
c2bdf1c91f
@ -1,3 +1,4 @@
|
|||||||
|
dd/MM/yyyy
|
||||||
dd-MMM-yyyy
|
dd-MMM-yyyy
|
||||||
dd MMM yyyy
|
dd MMM yyyy
|
||||||
dd MMM yy
|
dd MMM yy
|
||||||
@ -35,4 +36,7 @@ dd.MMMM.yy
|
|||||||
dd.MMM-yyyy
|
dd.MMM-yyyy
|
||||||
dd.MMMM-yyyy
|
dd.MMMM-yyyy
|
||||||
d['th']['st']['nd']['rd'] MMMM yy
|
d['th']['st']['nd']['rd'] MMMM yy
|
||||||
d['th']['st']['nd']['rd'] MMMM yyyy
|
d['th']['st']['nd']['rd'] MMMM yyyy
|
||||||
|
dd-MMMM-yyyy
|
||||||
|
dd. MM.yyyy
|
||||||
|
dd. MM. yyyy
|
||||||
@ -41,6 +41,7 @@ import com.iqser.red.service.redaction.v1.server.annotate.AnnotateRequest;
|
|||||||
import com.iqser.red.service.redaction.v1.server.annotate.AnnotateResponse;
|
import com.iqser.red.service.redaction.v1.server.annotate.AnnotateResponse;
|
||||||
import com.iqser.red.service.redaction.v1.server.redaction.utils.OsUtils;
|
import com.iqser.red.service.redaction.v1.server.redaction.utils.OsUtils;
|
||||||
import com.iqser.red.service.redaction.v1.server.storage.RedactionStorageService;
|
import com.iqser.red.service.redaction.v1.server.storage.RedactionStorageService;
|
||||||
|
import com.iqser.red.service.redaction.v1.server.utils.DateConverter;
|
||||||
import com.iqser.red.storage.commons.StorageAutoConfiguration;
|
import com.iqser.red.storage.commons.StorageAutoConfiguration;
|
||||||
import com.iqser.red.storage.commons.service.StorageService;
|
import com.iqser.red.storage.commons.service.StorageService;
|
||||||
import com.iqser.red.storage.commons.utils.FileSystemBackedStorageService;
|
import com.iqser.red.storage.commons.utils.FileSystemBackedStorageService;
|
||||||
@ -61,30 +62,10 @@ public class DocumineFloraTest extends AbstractRedactionIntegrationTest {
|
|||||||
// @Disabled
|
// @Disabled
|
||||||
public void titleExtraction() throws IOException {
|
public void titleExtraction() throws IOException {
|
||||||
|
|
||||||
AnalyzeRequest request = uploadFileToStorage("files/syngenta/CustomerFiles/18 Chlorothalonil RAR 08 Volume 3CA B 6a Oct 2017.pdf");
|
|
||||||
|
|
||||||
ClassPathResource importedRedactionClasspathResource = new ClassPathResource(
|
var date = DateConverter.parseDate("28/12/2018");
|
||||||
"files/ImportedRedactions/18 Chlorothalonil RAR 08 Volume 3CA B 6a Oct 2017.IMPORTED_REDACTIONS.json");
|
if (date.isPresent()){
|
||||||
storageService.storeObject(TenantContext.getTenantId(),
|
System.out.println(date.get());
|
||||||
RedactionStorageService.StorageIdUtils.getStorageId(TEST_DOSSIER_ID, TEST_FILE_ID, FileType.IMPORTED_REDACTIONS),
|
|
||||||
importedRedactionClasspathResource.getInputStream());
|
|
||||||
|
|
||||||
// AnalyzeRequest request = prepareStorage("files/Documine/Flora/ProblemDocs/SOLICITA_VICTRATO-GOLD-II_Item 21_Mutacao_Genica (1).pdf",
|
|
||||||
// "files/Documine/Flora/ProblemDocs/SOLICITA_VICTRATO-GOLD-II_Item 21_Mutacao_Genica (1).TABLES.json");
|
|
||||||
|
|
||||||
System.out.println("Start Full integration test");
|
|
||||||
analyzeDocumentStructure(LayoutParsingType.DOCUMINE, request);
|
|
||||||
System.out.println("Finished structure analysis");
|
|
||||||
AnalyzeResult result = analyzeService.analyze(request);
|
|
||||||
System.out.println("Finished analysis");
|
|
||||||
var entityLog = redactionStorageService.getEntityLog(TEST_DOSSIER_ID, TEST_FILE_ID);
|
|
||||||
var componentLog = redactionStorageService.getComponentLog(TEST_DOSSIER_ID, TEST_FILE_ID);
|
|
||||||
AnnotateResponse annotateResponse = annotationService.annotate(AnnotateRequest.builder().dossierId(TEST_DOSSIER_ID).fileId(TEST_FILE_ID).build());
|
|
||||||
|
|
||||||
String outputFileName = OsUtils.getTemporaryDirectory() + "/Documine.pdf";
|
|
||||||
|
|
||||||
try (FileOutputStream fileOutputStream = new FileOutputStream(outputFileName)) {
|
|
||||||
fileOutputStream.write(annotateResponse.getDocument());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user