Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

211 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

FDK Reasoning Service

This application extends and enriches graphs of harvested resources, before other parts of FDK handles the data.

For a broader understanding of the system’s context, refer to the architecture documentation wiki. For more specific context on this application, see the Harvesting subsystem section.

  • Each resource-type is enriched in by the reasoner based on different rules
  • All organizations are extended with triples from organization-catalog
  • These code lists from FDK reference data is used to extend associated triples:
    • LOS is extended for resource types: datasets, information models, services
    • Eurovocs is extended for resource types: datasets, information models, services
    • data themes is extended for resource types: datasets, information models, services
    • concept statuses is extended for resource types: concepts
    • concept subjects is extended for resource types: concepts
    • IANA media types is extended for resource types: data services, datasets
    • file types is extended for resource types: data services, datasets
    • licences is extended for resource types: datasets, information models
    • languages is extended for resource types: datasets, information models, services
    • nations is extended for resource types: datasets, information models
    • norwegian regions is extended for resource types: datasets, information models
    • norwegian municipalities is extended for resource types: datasets, information models
    • access rights is extended for resource types: datasets
    • frequencies is extended for resource types: datasets
    • provenance is extended for resource types: datasets
    • publisher types is extended for resource types: services
    • adms statuses is extended for resource types: services
    • role types is extended for resource types: services
    • evidence types is extended for resource types: services
    • channel types is extended for resource types: services
    • main activities is extended for resource types: services
    • week days is extended for resource types: services

Getting Started

These instructions will give you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Ensure you have the following installed:

  • Java 21
  • Maven
  • Docker

Running locally

Clone the repository

git clone https://github.com/Informasjonsforvaltning/fdk-reasoning-service.git
cd fdk-reasoning-service

Generate sources

Kafka messages are serialized using Avro. Avro schemas are located in kafka/schemas. To generate sources from Avro schema, run the following command:

mvn generate-sources    

Start Kafka cluster and setup topics/schemas

Topics and schemas are set up automatically when starting the Kafka cluster. Docker compose uses the scripts create-topics.sh and create-schemas.sh to set up topics and schemas.

docker-compose up -d

If you have problems starting kafka, check if all health checks are ok. Make sure number at the end (after 'grep') matches desired topics.

Start application

mvn spring-boot:run -Dspring-boot.run.profiles=develop

Produce messages

Check if schema id is correct in the script. This should be 1 if there is only one schema in your registry.

sh ./kafka/produce-messages.sh

Running tests

mvn verify

About

No description or website provided.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages