An experimental metadata Service Provider using the Event Notification protocol.
This services requires accesss to a Zotero translator service.
yarn install
cp .env-example .env
yarn run server
Post an example that should result in successful lookup
yarn run post-data
Post an example that should result in a failed lookup. In this example we are posting the none-existent URL https://lib.ugent.be/123. When ZOTERO_FALLBACK
is set to true
an attempt will be made to retrieve this URL via the Internet Archive (which should also fail).
yarn run post-fail
Post an example that should result in a failed lookup when ZOTERO_FALLBACK
is set to false
.
yarn run post-fallback
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "urn:uuid:9ec17fd7-f0f1-4d97-b421-29bfad935aad",
"type": "Offer",
"published": "2024-08-01T07:00:11.000Z",
"actor": {
"id": "http://mycontributions.info/service/m/profile/card#me",
"name": "Mastodon Bot",
"inbox": "http://mycontributions.info/service/m/inbox/",
"type": "Service"
},
"object": {
"id": "https://journal.code4lib.org/articles/17823",
"type": "Document"
}
}
where $.object.id
is the URL for which a JSON CSL result should be created.
yarn run handle-inbox
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Announce",
"actor": {
"id": "http://localhost:8000/profile/card#me",
"name": "Mastodon Bot",
"inbox": "http://localhost:8000/inbox/",
"type": "Service"
},
"object": {
"id": "http://localhost:8000/result/2024/08/12/3b0bace90cea16941d61d696fe4f2a87.json",
"type": "Document"
},
"target": {
"id": "http://mycontributions.info/service/m/profile/card#me",
"name": "Mastodon Bot",
"inbox": "http://mycontributions.info/service/m/inbox/",
"type": "Service"
}
}
[
{
"key": "2CL8KBEJ",
"version": 0,
"itemType": "journalArticle",
"creators": [
{
"firstName": "Patrick",
"lastName": "Hochstenbach",
"creatorType": "author"
},
{
"firstName": "Ruben",
"lastName": "Verborgh",
"creatorType": "author"
},
{
"firstName": "Herbert Van de",
"lastName": "Sompel",
"creatorType": "author"
}
],
"tags": [],
"publicationTitle": "The Code4Lib Journal",
"ISSN": "1940-5758",
"url": "https://journal.code4lib.org/articles/17823",
"title": "Using Event Notifications, Solid and Orchestration for Decentralizing and Decoupling Scholarly Communication",
"abstractNote": "The paper presents the case for a decentralized and decoupled architecture for scholarly communication. An introduction to the Event Notifications protocol will be provided as being applied in projects such as the international COAR Notify Initiative and the NDE-Usable program by memory institutions in The Netherlands. This paper provides an implementation of Event Notifications using a Solid server. The processing of notifications can be automated using an orchestration service called Koreografeye. Koreografeye will be applied to a citation extraction and relay experiment to show all these tools fit together.",
"issue": "58",
"date": "2023-12-04",
"libraryCatalog": "Code4Lib Journal",
"accessDate": "2024-08-12T08:43:33Z"
}
]
yarn run handle-outbox
yarn real-clean
LOG4JS
: logging levelLDN_SERVER_OTHER_CONFIG
: configuration file defining the inbox/outbox endpointsLDN_SERVER_INBOX_PATH
: local path to the inboxLDN_SERVER_OUTBOX_PATH
: local path to the outboxLDN_SERVER_PUBLIC_PATH
: local path to the public directory (serving documents)LDN_SERVER_INBOX_CONFIG
: configuration file defining the inbox handlersLDN_SERVER_OUTBOX_CONFIG
: configuration file defining the oubox handlersLDN_SERVER_BASEURL
: base URL of this metadata serverZOTERO_SERVICE
: Location of a Zotero translator serviceZOTERO_FORMAT
: Requested format to return from the Zotero serviceZOTERO_CONTENT_TYPE
: Requested content type forZOTERO_FORMAT
ZOTERO_FALLBACK
: Attempt to fallback to an Internet Archive lookup when an URL lookup fails
The metadata server needs to be restarted when configuration parameters are updated.