티스토리 뷰
반응형
AWS 에서 제공하는 텍스트 감지 서비스 Textreck 을 사용하면 한번 테스트하면 약 0.1달러씩 지불해야하기 때문에
개발을 진행하는 과정에서는 너무 부담되는 가격이다.
그런 개발자분을 위해 내가 테스트 전용으로 만든 엔티티를 공유하고자 한다.
사용방법은 AWS에서 제공하는 Code_Sample를 그대로 사용하고 엔티티만 교체하여 사용하면된다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.AirAPI.entity.json; | |
import lombok.AllArgsConstructor; | |
import lombok.Data; | |
import lombok.NoArgsConstructor; | |
@NoArgsConstructor | |
@AllArgsConstructor | |
@Data | |
public class AWS_Block { | |
private DocumentMetadata DocumentMetadata; | |
private Blocks[] Blocks; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.AirAPI.entity.json; | |
import com.fasterxml.jackson.annotation.JsonAlias; | |
import com.fasterxml.jackson.annotation.JsonProperty; | |
import lombok.AllArgsConstructor; | |
import lombok.Data; | |
import lombok.NoArgsConstructor; | |
@NoArgsConstructor | |
@AllArgsConstructor | |
@Data | |
public class Blocks { | |
private String id; | |
@JsonAlias("BlockType") | |
private String blockType; | |
@JsonAlias("Confidence") | |
private Long confidence; | |
@JsonAlias("RowIndex") | |
private int rowIndex; | |
@JsonAlias("RowSpan") | |
private int rowSpan; | |
@JsonAlias("ColumnSpan") | |
private int columnSpan; | |
@JsonAlias("ColumnIndex") | |
private int columnIndex; | |
@JsonAlias("Geometry") | |
private Geometry geometry; | |
@JsonAlias("EntityTypes") | |
private String[] entityTypes; | |
@JsonAlias("TextType") | |
private String texttype; | |
@JsonAlias("Page") | |
private int page; | |
@JsonAlias("SearchKey") | |
private String searchKey; | |
@JsonAlias("Text") | |
private String text; | |
private String childText; | |
@JsonAlias("Relationships") | |
private Relationships[] relationships; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.AirAPI.entity.json; | |
import lombok.AllArgsConstructor; | |
import lombok.Data; | |
import lombok.NoArgsConstructor; | |
@AllArgsConstructor | |
@NoArgsConstructor | |
@Data | |
public class BoundingBox { | |
private Long width; | |
private Long height; | |
private Long left; | |
private Long top; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.AirAPI.entity.json; | |
import lombok.AllArgsConstructor; | |
import lombok.Data; | |
import lombok.NoArgsConstructor; | |
@AllArgsConstructor | |
@NoArgsConstructor | |
@Data | |
public class DocumentMetadata { | |
private String pages; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.AirAPI.entity.json; | |
import com.fasterxml.jackson.annotation.JsonAlias; | |
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |
import lombok.AllArgsConstructor; | |
import lombok.Data; | |
import lombok.NoArgsConstructor; | |
@AllArgsConstructor | |
@NoArgsConstructor | |
@Data | |
public class Geometry { | |
@JsonAlias("BoundingBox") | |
private BoundingBox boundingBox; | |
@JsonAlias("Polygon") | |
private Polygon[] polygon; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.AirAPI.entity.json; | |
import com.fasterxml.jackson.annotation.JsonAlias; | |
import lombok.AllArgsConstructor; | |
import lombok.Data; | |
import lombok.NoArgsConstructor; | |
@NoArgsConstructor | |
@AllArgsConstructor | |
@Data | |
public class Polygon { | |
@JsonAlias("X") | |
private Float x; | |
@JsonAlias("Y") | |
private Float y; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.AirAPI.entity.json; | |
import lombok.AllArgsConstructor; | |
import lombok.Data; | |
import lombok.NoArgsConstructor; | |
@NoArgsConstructor | |
@AllArgsConstructor | |
@Data | |
public class Relationships { | |
private String type; | |
private String[] ids; | |
} |
반응형
'프로그래밍 언어 > JAVA' 카테고리의 다른 글
오버로딩 ? 오버라이딩? (0) | 2022.04.04 |
---|---|
내부 클래스와 익명 클래스 차이 (0) | 2022.04.03 |
[JAVA] 인터페이스와 추상 클래스의 개념과 정리 (0) | 2022.04.02 |
[JAVA] 자바가 메모리를 사용하는 방식 (0) | 2022.03.27 |
[JAVA] 자바 프로그램의 개발과 구동 (0) | 2022.03.26 |
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 면접
- docker
- 릿코드
- kakao
- spring-cloud
- springboot
- java
- 프로그래머스
- 디자인패턴
- Matlab
- C언어
- 알고리즘
- JPA
- nginx
- 수학
- 매트랩
- security
- 자격증
- OOP
- 스프링
- 자바
- 스프링부트
- CS
- Algorithm
- interview
- ajax
- Solid
- 그래프
- Spring
- 백준
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함