add field id to image data
This commit is contained in:
parent
2a55654fcf
commit
d6a74dc9f9
@ -12,7 +12,6 @@
|
|||||||
<exclude name="DataflowAnomalyAnalysis"/>
|
<exclude name="DataflowAnomalyAnalysis"/>
|
||||||
<exclude name="MissingSerialVersionUID"/>
|
<exclude name="MissingSerialVersionUID"/>
|
||||||
<exclude name="NullAssignment"/>
|
<exclude name="NullAssignment"/>
|
||||||
<exclude name="BeanMembersShouldSerialize"/>
|
|
||||||
<exclude name="AvoidLiteralsInIfCondition"/>
|
<exclude name="AvoidLiteralsInIfCondition"/>
|
||||||
<exclude name="AvoidDuplicateLiterals"/>
|
<exclude name="AvoidDuplicateLiterals"/>
|
||||||
<exclude name="AvoidFieldNameMatchingMethodName"/>
|
<exclude name="AvoidFieldNameMatchingMethodName"/>
|
||||||
|
|||||||
@ -13,7 +13,6 @@
|
|||||||
<exclude name="DataflowAnomalyAnalysis"/>
|
<exclude name="DataflowAnomalyAnalysis"/>
|
||||||
<exclude name="MissingSerialVersionUID"/>
|
<exclude name="MissingSerialVersionUID"/>
|
||||||
<exclude name="NullAssignment"/>
|
<exclude name="NullAssignment"/>
|
||||||
<exclude name="BeanMembersShouldSerialize"/>
|
|
||||||
<exclude name="AvoidLiteralsInIfCondition"/>
|
<exclude name="AvoidLiteralsInIfCondition"/>
|
||||||
<exclude name="AvoidDuplicateLiterals"/>
|
<exclude name="AvoidDuplicateLiterals"/>
|
||||||
<exclude name="AvoidFieldNameMatchingMethodName"/>
|
<exclude name="AvoidFieldNameMatchingMethodName"/>
|
||||||
|
|||||||
@ -35,6 +35,7 @@ public class DocumentStructure {
|
|||||||
public static final String TRANSPARENT = "transparent";
|
public static final String TRANSPARENT = "transparent";
|
||||||
public static final String IMAGE_TYPE = "imageType";
|
public static final String IMAGE_TYPE = "imageType";
|
||||||
public static final String POSITION = "position";
|
public static final String POSITION = "position";
|
||||||
|
public static final String ID = "id";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,6 +18,7 @@ public class PropertiesMapper {
|
|||||||
properties.put(DocumentStructure.ImageProperties.IMAGE_TYPE, image.getImageType().toString());
|
properties.put(DocumentStructure.ImageProperties.IMAGE_TYPE, image.getImageType().toString());
|
||||||
properties.put(DocumentStructure.ImageProperties.TRANSPARENT, String.valueOf(image.isTransparent()));
|
properties.put(DocumentStructure.ImageProperties.TRANSPARENT, String.valueOf(image.isTransparent()));
|
||||||
properties.put(DocumentStructure.ImageProperties.POSITION, toString(image.getPosition()));
|
properties.put(DocumentStructure.ImageProperties.POSITION, toString(image.getPosition()));
|
||||||
|
properties.put(DocumentStructure.ImageProperties.ID, image.getId());
|
||||||
return properties;
|
return properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,9 @@ package com.knecon.fforesight.service.layoutparser.server;
|
|||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import com.knecon.fforesight.service.layoutparser.server.utils.BaseTest;
|
import com.knecon.fforesight.service.layoutparser.server.utils.AbstractTest;
|
||||||
|
|
||||||
class ApplicationTests extends BaseTest {
|
class ApplicationTests extends AbstractTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void contextLoads() {
|
void contextLoads() {
|
||||||
|
|||||||
@ -27,12 +27,12 @@ import com.knecon.fforesight.service.layoutparser.processor.python_api.model.tab
|
|||||||
import com.knecon.fforesight.service.layoutparser.processor.model.graph.nodes.Document;
|
import com.knecon.fforesight.service.layoutparser.processor.model.graph.nodes.Document;
|
||||||
import com.knecon.fforesight.service.layoutparser.processor.model.graph.textblock.TextBlock;
|
import com.knecon.fforesight.service.layoutparser.processor.model.graph.textblock.TextBlock;
|
||||||
import com.knecon.fforesight.service.layoutparser.processor.services.mapper.TaasDocumentDataMapper;
|
import com.knecon.fforesight.service.layoutparser.processor.services.mapper.TaasDocumentDataMapper;
|
||||||
import com.knecon.fforesight.service.layoutparser.server.utils.BaseTest;
|
import com.knecon.fforesight.service.layoutparser.server.utils.AbstractTest;
|
||||||
import com.knecon.fforesight.service.layoutparser.server.utils.visualizations.PdfDraw;
|
import com.knecon.fforesight.service.layoutparser.server.utils.visualizations.PdfDraw;
|
||||||
|
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
|
|
||||||
public class BdrJsonBuildTest extends BaseTest {
|
public class BdrJsonBuildTest extends AbstractTest {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ObjectMapper objectMapper;
|
private ObjectMapper objectMapper;
|
||||||
|
|||||||
@ -15,11 +15,11 @@ import com.knecon.fforesight.service.layoutparser.internal.api.queue.LayoutParsi
|
|||||||
import com.knecon.fforesight.service.layoutparser.processor.LayoutParsingPipeline;
|
import com.knecon.fforesight.service.layoutparser.processor.LayoutParsingPipeline;
|
||||||
import com.knecon.fforesight.service.layoutparser.processor.python_api.model.table.TableServiceResponse;
|
import com.knecon.fforesight.service.layoutparser.processor.python_api.model.table.TableServiceResponse;
|
||||||
import com.knecon.fforesight.service.layoutparser.processor.model.graph.nodes.Document;
|
import com.knecon.fforesight.service.layoutparser.processor.model.graph.nodes.Document;
|
||||||
import com.knecon.fforesight.service.layoutparser.server.utils.BaseTest;
|
import com.knecon.fforesight.service.layoutparser.server.utils.AbstractTest;
|
||||||
|
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
|
|
||||||
public class BuildDocumentGraphTest extends BaseTest {
|
public class BuildDocumentGraphTest extends AbstractTest {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
protected LayoutParsingPipeline layoutParsingPipeline;
|
protected LayoutParsingPipeline layoutParsingPipeline;
|
||||||
|
|||||||
@ -33,11 +33,11 @@ import com.knecon.fforesight.service.layoutparser.processor.model.table.TablePag
|
|||||||
import com.knecon.fforesight.service.layoutparser.processor.services.PdfParsingService;
|
import com.knecon.fforesight.service.layoutparser.processor.services.PdfParsingService;
|
||||||
import com.knecon.fforesight.service.layoutparser.processor.services.SectionsBuilderService;
|
import com.knecon.fforesight.service.layoutparser.processor.services.SectionsBuilderService;
|
||||||
import com.knecon.fforesight.service.layoutparser.processor.services.classification.RedactManagerClassificationService;
|
import com.knecon.fforesight.service.layoutparser.processor.services.classification.RedactManagerClassificationService;
|
||||||
import com.knecon.fforesight.service.layoutparser.server.utils.BaseTest;
|
import com.knecon.fforesight.service.layoutparser.server.utils.AbstractTest;
|
||||||
|
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
|
|
||||||
public class PdfSegmentationServiceTest extends BaseTest {
|
public class PdfSegmentationServiceTest extends AbstractTest {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private PdfParsingService pdfParsingService;
|
private PdfParsingService pdfParsingService;
|
||||||
|
|||||||
@ -29,8 +29,8 @@ import lombok.SneakyThrows;
|
|||||||
|
|
||||||
@ExtendWith(SpringExtension.class)
|
@ExtendWith(SpringExtension.class)
|
||||||
@SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
@SpringBootTest(classes = Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||||
@Import(BaseTest.TestConfiguration.class)
|
@Import(AbstractTest.TestConfiguration.class)
|
||||||
public class BaseTest {
|
public abstract class AbstractTest {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
protected LayoutParsingStorageService layoutParsingStorageService;
|
protected LayoutParsingStorageService layoutParsingStorageService;
|
||||||
Loading…
x
Reference in New Issue
Block a user