Skip to content

Latest commit

 

History

History
41 lines (34 loc) · 1.28 KB

File metadata and controls

41 lines (34 loc) · 1.28 KB

lib-linked-data-fingerprint

Copyright (C) 2024 The Open Library Foundation

This software is distributed under the terms of the Apache License, Version 2.0. See the file "LICENSE" for more information.

Purpose

Fingerprint hash is the unique identifier for a resource in Linked Data Graph. This library provides a function for a fingerprint hash generation.

Compiling

mvn clean install

Using the library

The library can be used as a source of Linked Data resource hash:

import org.folio.ld.dictionary.model.Resource;
import org.folio.ld.fingerprint.service.FingerprintHashService;
import org.springframework.stereotype.Service;

@Service
public class YourService {

  private final FingerprintHashService fingerprintHashService;

  public YourService(FingerprintHashService fingerprintHashService) {
    this.fingerprintHashService = fingerprintHashService;
  }

  public void yourMethod(Resource resource) {
    Long hash = fingerprintHashService.hash(resource);
    // ...
    // ...
  }
}

Dependencies

Download and configuration

The built artifacts for this module are available. See configuration for repository access.