DOI QR코드

DOI QR Code

A Library for Object-to-Graph Mapping with Annotations in Java

  • Ji-Woong Choi (School of Computer Science and Engineering, Soongsil University)
  • Received : 2024.09.11
  • Accepted : 2024.10.04
  • Published : 2024.10.31

Abstract

In this paper, we propose a method for constructing RDF knowledge graphs from objects in OOP. RML mapping has been the de-facto way of generating RDF graphs from heterogeneous data. However, the input to an RML mapping is limited to the data in files or databases. Our new RML implementation, designed to overcome the limit, has two differences compared to existing RML implementations. First, our implementation provides a new way to specify mapping rules in the form of special comments known as annotations in the source code. It is because existing works do not provide a means to refer to specific program elements to which the mapping rules will be applied. Second, our work provides mapping engine as a library, whereas the engines in existing studies runs in an independent process. Therefore, our mapping engine can be easily embedded in other applications to access in-memory objects to be mapped. In this system paper, we describe the proposed system in detail and present the results of RML test cases execution to confirm the usefulness of the system.

본 논문에서는 OOP에서의 객체로부터 RDF 지식 그래프를 구축하는 방법을 제안한다. RML 매핑은 이기종 데이터로부터 RDF 그래프를 생성하고자 할 때 사용하는 사실상 표준 방법이다. 그러나 현재 RML 매핑에서의 입력은 파일이나 데이터베이스에 저장된 데이터로 제한된다. 이를 극복하기 위해, 제안된 RML 구현은 기존 구현들과 구별되는 두 가지 특징이 있다. 우선, 제안 방법에서는 매핑 규칙을 소스 코드에 애너테이션 형태로 작성한다. 기존 방법으로는 새로운 매핑 규칙 적용 대상이 된 프로그램 내의 특정 요소를 참조할 수단이 없기 때문이다. 다음으로, 기존 구현들에서는 매핑 엔진이 독립된 애플리케이션이지만 제안 방법에서는 매핑 엔진을 라이브러리 형태로 제공한다. 이것은 매핑 엔진이 다른 애플리케이션에 포함되어야 그 애플리케이션의 실행 시간 메모리에 존재하는 객체에 접근할 수 있기 때문이다. 본 논문에서는 제안 시스템의 구조와 동작 과정을 설명하며 유용성 확인을 위한 RML 테스트 케이스 실행 결과를 제시한다.

Keywords

References

  1. A. Hogan, E. Blomqvist, M. Cochez, C. D'amato, G. De Melo, C. Gutierrez, S. Kirrane, J. E. L. Gayo, R. Navigli, S. Neumaier, A. N. Ngomo, A. Polleres, S. M. Rashid, A. Rula, L. Schmelzeisen, J. Sequeda, S. Staab, and A. Zimmermann, "Knowledge Graphs," ACM Computing Surveys, Vol. 54, No. 4, pp. 1-37, May 2022. DOI: 10.1145/3447772 
  2. Y. Han, G. Lu, S. Zhang, L. Zhang, C. Zou, and G. Wen, "A Temporal Knowledge Graph Embedding Model Based on Variable Translation," Tsinghua Science and Technology, Vol. 29, No. 5, pp. 1554-1565, October 2024, DOI: 10.26599/TST.2023.9010142 
  3. S. Ji, S. Pan, E. Cambria, P. Marttinen, and P. S. Yu, "A Survey on Knowledge Graphs: Representation, Acquisition, and Applications," IEEE Transactions on Neural Networks and Learning Systems, Vol. 33, No. 2, pp. 494-514, February 2022, DOI: 10.1109/TNNLS.2021.3070843 
  4. R. Zhang, P. Liu, X. Guo, S. Li, and X. Wang, "A Unified Relational Storage Scheme for RDF and Property Graphs," Proceedings of the 16th International Conference on Web Information System and Applications, pp. 418-429, Qingdao, China, September 2019. DOI: 10.1007/978-3-030-30952-7_41 
  5. A. Dimou, "High-quality knowledge graphs generation: R2rml and rml comparison, rules validation and inconsistency resolution," Applications and Practices in Ontology Design, Extraction, and Reasoning, Vol. 49, No. 4, pp. 55-72, November 2020. DOI: 10.3233/SSW200035 
  6. S. Das, S. Sundara, and R. Cyganiak, R2RML: RDB to RDF Mapping Language, http://www.w3.org/TR/r2rml/. 
  7. B. D. Meester, P. Heyvaert, and T. Delva, RDF Mapping Language (RML), https://rml.io/specs/rml/
  8. V. Janev, D. Graux, H. Jabeen, and E. Sallinger, "Knowledge Graphs and Big Data Processing," Springer Cham, pp. 59-72, 2020. 
  9. E. Iglesias, S. Jozashoori, D. Chaves-Fraga, D. Collarana, and M. Vidal, "SDM-RDFizer: An RML Interpreter for the Efficient Creation of RDF Knowledge Graphs," Proceedings of the 29th ACM International Conference on Information & Knowledge Management, pp. 3039-3046, Virtual Event, Ireland, October 2020. DOI:10.1145/3340531.3412881 
  10. J. Arenas-Guerrero, D. Chaves-Fraga, J. Toledo, M. S. Perez, and O. Corcho, "Morph-KGC: Scalable knowledge graph materialization with mapping partitions," Semantic Web, Vol. 15, No. 1, pp. 1-20, January 2024. DOI:10.3233/SW-223135 
  11. G. Haesendonck, W. Maroy, P. Heyvaert, R. Verborgh, and A. Dimou, "Parallel RDF generation from heterogeneous big data," Proceedings of the International Workshop on Semantic Big Data, pp. 1-6, Amsterdam, Netherlands, July 2019. DOI: 10.1145/3323878.3325802. 
  12. E. Guerra, A. D. O. Dias, L. G. D. O. Veras, A. Aguiar, J. Choma, and T. S. D. Silva, "A Model to Enable the Reuse of Metadata-Based Frameworks in Adaptive Object Model Architectures," IEEE Access, Vol. 9, pp. 85124-85143, June 2021. DOI: 10.1109/ACCESS.2021.3087795 
  13. M. Bakken, "maplib: Interactive, Literal RDF Model Mapping for Industry," IEEE Access, Vol. 11, pp. 39990-40005, April 2023. DOI: 10.1109/ACCESS.2023.3269093 
  14. D. Beckett, T. Berners-Lee, E. Prud'hommeaux, and G. Carothers, RDF 1.1 Turtle, https://www.w3.org/TR/turtle/. 
  15. Project Lombok, https://projectlombok.org/
  16. C. Tudose, and C. Odubasteanu, "Object-relational Mapping Using JPA, Hibernate and Spring Data JPA," Proceedings of the 23rd International Conference on Control Systems and Computer Science, pp. 424-431, Bucharest, Romania, May 2021. DOI: 10.1109/CSCS52396.2021.00076 
  17. P. Heyvaert, A. Dimou and B. D. Meester, RML Test Cases, https://rml.io/test-cases/. 
  18. OpenCSV, https://opencsv.sourceforge.net/
  19. JAXB, https://javaee.github.io/jaxb-v2/
  20. Jackson, https://github.com/FasterXML/jackson 
  21. Spring Data JPA, https://spring.io/projects/spring-data-jpa