Skip to content

Generate mu:uuid's for integrating data in a semantic.works project

License

Notifications You must be signed in to change notification settings

kanselarij-vlaanderen/uuid-generation-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UUID generation service

Data used within a semantic.works-stack (and mu-cl-resources in particular) requires each RDF-object to have a mu:uuid property. Data imported from third parties might not have this uuid. Thus, in order to integrate with other sources while harnessing the power of semantic.works, uuid's need to be added to each imported object. This service does exactly that.

Configuration

config.json

The service can be configured through a configuration file config.json. If you use the docker-compose config below, this file should be in config/uuid-generation/. This file consists of one object with the accepted types as keys and a list of all the graphs those types should be checked in. For example:

{
    "http://data.vlaanderen.be/ns/besluit#Agendapunt": ["http://mu.semte.ch/graphs/public"],
    "http://data.vlaanderen.be/ns/besluit#Zitting": ["http://mu.semte.ch/graphs/public"],
    "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Email": ["http://mu.semte.ch/graphs/public", "http://mu.semte.ch/graphs/emails"]
}

docker-compose snippet

uuid-generation:
  build: https://github.com/kanselarij-vlaanderen/uuid-generation-service.git
  volumes:
    - ./config/uuid-generation/:/config

delta-notifier configuration

{
  match: {
    predicate: {
      type: 'uri',
      value: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'
    },
    object: {
      type: 'uri',
      value: 'http://data.europa.eu/eli/ontology#LegalResource' // Example type.
    }
  },
  callback: {
    url: 'http://uuid-generation/delta',
    method: 'POST'
  },
  options: {
    resourceFormat: 'v0.0.1',
    gracePeriod: 250,
    ignoreFromSelf: false
  }
}

API

POST /delta

Internal endpoint which receives deltas.

POST /run

Service-endpoint to manually trigger running uuid-insertion for the configured types.

About

Generate mu:uuid's for integrating data in a semantic.works project

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published