Coder Social home page Coder Social logo

zaferozerr / melinda-record-import-harvester-publication-archives Goto Github PK

View Code? Open in Web Editor NEW

This project forked from natlibfi/melinda-record-import-harvester-publication-archives

0.0 0.0 0.0 749 KB

Publication archives record harvester for the Melinda record batch import system

License: GNU Affero General Public License v3.0

JavaScript 95.79% Dockerfile 4.21%

melinda-record-import-harvester-publication-archives's Introduction

Publication archives record harvester for the Melinda record batch import system

Publication archives record harvester for the Melinda record batch import system. Harvests Dublic Core records from publication archives.

License and copyright

Copyright (c) 2019, 2023-2024 University Of Helsinki (The National Library Of Finland)

This project's source code is licensed under the terms of GNU Affero General Public License Version 3 or any later version.

Environment variables

Mandatory environment values

Following variables are required for passing harvested records to import system. (API) This behaviour is inherited from melinda-record-import-commons.

  • API_URL
  • API_USERNAME
  • API_PASSWORD
  • API_PROFILE

Optional environmental values

These values have default values in projects configuration file src/config.js, and at least URL should be set for each instance. Default values may change.

  • POLL_INTERVAL
    • Polling interval of configurated endpoint in milliseconds
    • default: '10000'

  • POLL_CHANGE_TIMESTAMP
    • Timestamp of last polling time on startup in ISO 8601, overwriten by file set by CHANGE_TIMESTAMP_FILE
    • default: '2019-01-01T10:00:00+02:00'
  • CHANGE_TIMESTAMP_FILE
    • File for saving timestamps after harvest cycle, overwrites POLL_CHANGE_TIMESTAMP on startup
    • default: '.poll-change-timestamp.json'
  • FAILED_HARVEST_FILE
    • default: '.failed-harvest-log.json'

  • HARVESTING_API_URL
  • HARVESTING_API_METADATA
    • Filtering of correct datatype
    • default: 'kk'
  • HARVESTING_API_FILTER
    • Logic rule to filter harvested XML as XPath
    • default: '@qualifier="issued" and @value>"2016"'
    • example: '@qualifier="available"'
  • HARVESTING_API_FILTER_ISBN
    • Are records without ISBN filtered out
    • default: true
  • HARVESTING_API_FILTER_NAMESPACE

XML filtering

XML filtering is used to:

  • Remove deleted records, these have status=deleted
  • Filter only records matching filtering rule provided with HARVESTING_API_FILTER and from namespace HARVESTING_API_FILTER_NAMESPACE
  • Setting HARVESTING_API_FILTER_ISBN to true will also filter out records without ISBN value set in one of qualifier fields.

Filtering deleted records is static functionality but filtering rule can be configurated. This functionality is implemented with filterxml Filterxml filters XML using xpath syntax, but HARVESTING_API_FILTER is combined to existing logic: HARVESTING_API_FILTER_ISBN false

'x:metadata[not(x:field[' + process.env.HARVESTING_API_FILTER + '])]/../..'

HARVESTING_API_FILTER_ISBN true

'x:metadata[not(x:field[' + harvestFilter + ']) or not(x:field[@qualifier="isbn"])]/../..'

More about xpath.

melinda-record-import-harvester-publication-archives's People

Contributors

ammsalme avatar ollipaj avatar natlibfi-arlehiko avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.