OntoPop
Search…
Code Structure
An exploration of the OntoPop open-source code base.
Last Updated: 28 March 2022 • Page Author: Jillur Quddus

Overview

This page is intended for software engineers and data engineers who wish to gain a better understanding of the structure of the OntoPop open-source code base.

Prerequisites

Please ensure that you have read and followed the instructions in the Quickstart Guide and Development Environment articles respectively prior to reading this page.

Logical Architecture

As detailed in the Logical System Architecture article, the following diagram illustrates the software services that are provided by the OntoPop open-source project. Please refer to this diagram when reading the remainder of this page.
OntoPop as a single logical service

Software Services

The OntoPop open-source code base can be broadly divided into the following categories.

Configuration

The following Maven modules are relative to $ONTOPOP_BASE.
Maven Module
Logical Software Service
Description
ontopop-configuration
Global configuration
This Maven module contains the global configuration for OntoPop's Spring bootstrap and application contexts respectively, and is included as a dependency for all of OntoPop's applications (including its data pipeline event-driven serverless apps and API apps).

Entity Model

The following Maven modules are relative to $ONTOPOP_BASE.
Maven Module
Logical Software Service
Description
ontopop-model
Entity Model
This Maven module contains the OntoPop entity model (for example the Ontology, OWL and graph class definitions), and is included as a dependency for all of OntoPop's applications (including its data pipeline event-driven serverless apps and API apps).

Core Services

The following Maven modules are relative to $ONTOPOP_BASE/ontopop-core.
Maven Module
Logical Software Service
Description
ontopop-exceptions
Exception handling services
This Maven module contains OntoPop's global exception handling services, including OntoPop's API HTTP response exception handling.
ontopop-git
Git services
This Maven module contains Git services for Java, including services for interacting with and managing Git repositories (for example retrieving and writing files using relevant vendor APIs such as the GitHub API).
ontopop-graph
Property graph services
This Maven module contains Property Graph services for Java, including services for managing Apache TinkerPop-based graph database engines (for example bulk loading vertices and edges, and executing Gremlin graph traversal queries).
ontopop-jpa
RDBMS data services
This Maven module contains OntoPop's Spring Data JPA entity repositories (for example managing the persistence and querying of Ontology and Webhook objects in relevant SQL tables).
ontopop-logging
Logging services
This Maven module contains OntoPop's global logging configuration, including configuration of HTTP request logging.
ontopop-mappers
Object mapping services
This Maven module contains OntoPop's entity model mapping services, including a service for easily mapping between an Ontology object and an OntologyNonSecretData object.
ontopop-messaging
Messaging services
This Maven module contains OntoPop's Spring Cloud Stream source interfaces including the definition of subscribable and messaging channels for each source.
ontopop-owl
OWL services
This Maven module contains OWL services for Java, including services for easily loading and parsing OWL ontologies.
ontopop-search
Search services
This Maven module contains Search services for Java, including services for bulk indexing documents and executing free-text search queries using relevant vendor APIs such as the Elasticsearch Search API.
ontopop-secrets
Secret services
This Maven module contains Secret Engine services for Java, including services for reading and writing secrets using relevant vendor APIs such as the HashiCorp Vault client interface.
ontopop-security
Security services
This Maven module contains OntoPop's authentication and authorization framework used to secure OntoPop's API endpoints using the Spring Security framework.
ontopop-storage
Storage services
This Maven module contains object storage services for Java, including services for reading and writing objects to local storage and cloud-based object storage using relevant vendor APIs such as the Amazon S3 client interface.
ontopop-triplestore
Triplestore services
This Maven module contains RDF Triplestore services for Java, including services to directly load an RDF/XML OWL file into a RDF Triplestore using relevant vendor APIs such as the Apache Jena Fuseki API.
ontopop-utils
Utility services
This Maven module contains OntoPop's utility services, including services for explicitly defining property graph database schema.

Data Services

The following Maven modules are relative to $ONTOPOP_BASE/ontopop-data.
Maven Module
Logical Software Service
Description
ontopop-data-ontology-ingestor
Ontology Ingestion service
Java Service Class OntologyIngestorService.java High-Level Summary 1. Ingest and parse a GitHub webhook payload. 2. Download the OWL file from the GitHub repository to object storage. 3. Publish a message to the shared messaging system.
ontopop-data-ontology-validator
Ontology Validation service
Java Service Class OntologyValidatorService.java High-Level Summary 1. Download the OWL file from object storage. 2. Validate the OWL file using semantic reasoners. 3. Save the validated OWL file to object storage. 4. Publish a message to the shared messaging system.
ontopop-data-ontology-loader-triplestore
Ontology Triplestore Loading service
Java Service Class OntologyTriplestoreLoaderService.java High-Level Summary 1. Download the OWL file from object storage. 2. Load the OWL file directly into the RDF Triplestore. 3. Save the loaded OWL file to object storage. 4. Publish a message to the shared messaging system.
ontopop-data-ontology-parser
Ontology Parsing service
Java Service Class OntologyParserService.java High-Level Summary 1. Download the OWL file from object storage. 2. Parse the OWL file into annotation properties, object properties, classes and class relationships. 3. Serialize and save the parsed POJO as a JSON file to object storage. 4. Publish a message to the shared messaging system.
ontopop-data-ontology-modeller-graph
Property Graph Modelling service
Java Service Class OntologyGraphModellerService.java High-Level Summary 1. Download the parsed JSON file from object storage and deserialize to a parsed POJO. 2. Model the parsed POJO as a directed property graph of vertices, directed edges, vertex properties and edge properties. 3. Serialize and save the modelled POJO as a JSON file to object storage. 4. Publish a message to the shared messaging system.
ontopop-data-ontology-loader-graph
Property Graph Loading service
Java Service Class OntologyGraphLoaderService.java High-Level Summary 1. Download the modelled JSON file from object storage and deserialize to a modelled POJO. 2. Bulk load all the vertices (OWL classes and class properties) from the modelled POJO into the graph database. 3. Bulk load all the directed edges (OWL class restrictions) from the modelled POJO into the graph database. 4. Save the modelled POJO to object storage. 5. Publish a message to the shared messaging system.
ontopop-data-ontology-indexer-graph
Property Graph Indexing service
Java Service Class OntologyGraphIndexerService.java High-Level Summary 1. Download the modelled JSON file from object storage and deserialize to a modelled POJO. 2. Bulk index all the vertices (OWL classes and class properties) from the modelled POJO into the search index. 3. Save the modelled POJO to object storage. 4. Publish a message to the shared messaging system.

Security Services

The following Maven modules are relative to $ONTOPOP_BASE.
Maven Module
Logical Software Service
Description
ontopop-security
Authentication and Authorization Services
This Maven module contains OntoPop's API authentication and API authorization services.

API Collections

The following Maven modules are relative to $ONTOPOP_BASE/ontopop-api.
Maven Module
Logical Software Service
Description
ontopop-api-ontology-graph
Graph API
This Maven module contains OntoPop's Graph API endpoints.
ontopop-api-ontology-management
This Maven module contains OntoPop's Management API endpoints.
ontopop-api-ontology-search
This Maven module contains OntoPop's Search API endpoints.
ontopop-api-ontology-triplestore
This Maven module contains OntoPop's Triplestore API endpoints.

Application Wrappers

The following Maven modules are relative to $ONTOPOP_BASE/ontopop-apps.
Maven Module
Logical Software Service
Description
ontopop-apps-spring
Spring Boot applications
This Maven module contains OntoPop's data pipeline event-driven serverless Spring Boot function apps, and OntoPop's Spring Boot API apps. The child Maven modules in this module are designed for deployment to self-managed or Spring Cloud environments.
ontopop-apps-aws
AWS Spring Boot applications
This Maven module contains OntoPop's data pipeline event-driven serverless Spring Boot function apps designed for deployment to AWS Lambda instances. This Maven module also contains OntoPop's Spring Boot API apps designed for deployment to AWS Elastic Beanstalk environments.
ontopop-apps-azure
Azure Spring Boot applications
This Maven module contains OntoPop's data pipeline event-driven serverless Spring Boot function apps designed for deployment to Azure Function instances. This Maven module also contains OntoPop's Spring Boot API apps designed for deployment to Azure Web Apps.

Parent POM

The OntoPop parent POM, found at $ONTOPOP_BASE/pom.xml, contains the exhaustive list of all 3rd party Java dependencies directly utilized by the OntoPop open-source project along with their version numbers. All the OntoPop Maven modules listed above are children (or grandchildren) of the parent POM and thus inherit all configuration defined in it.

Parent Maven Profiles

In addition to dependency management, the OntoPop parent POM also defines the following Maven profiles that can be selected based on which services you wish to build and package:
Profile Name
Default Profile
Description
apps
Yes
Manages the lifecycle of all OntoPop's core services as well as all OntoPop Spring Boot applications (i.e. serverless function apps and API applications) across all cloud vendors.

Maven Application Profiles

In addition to the Maven profiles defined in the OntoPop parent POM, four (4) further Maven application-specific profiles are defined in $ONTOPOP_BASE/ontopop-apps/pom.xml. These Maven profiles enable software and platform engineers to explicitly select which Spring Boot applications to compile, build and package based on the target deployment environment, as follows:
Profile Name
Default Profile
Description
apps-multicloud
Yes
Manages the lifecycle of all OntoPop Spring Boot applications (i.e. serverless function apps and API applications) across all cloud vendors.
apps-spring
No
Manages the lifecycle of Spring Boot applications designed for development and testing purposes, or for deployment to self-managed or Spring Cloud environments.
apps-aws
No
Manages the lifecycle of AWS Spring Boot applications designed for deployment to AWS Lambda and AWS Beanstalk apps respectively.
apps-azure
No
Manages the lifecycle of Microsoft Azure Spring Boot applications designed for deployment to Azure Function apps and Azure Web Apps respectively.