Skip to content

ritchiea/linked-data-registry

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linked package registry

A CouchDB powered data registry for semantic linked data packages.

Inspired by the npm registry but different because:

A client is in development here.

Installation

This module uses gm so first you need to download and install GraphicsMagick or ImageMagick.

API

GET /:pkgname

Get a JSON array of all the versions of the package with name :pkgname.

GET /:pkgname/:version

Download a package of name :pkgname and version :version as JSON interpreded as JSON-LD. If version is latest, the latest version is returned.

Version range can be specified as an (encoreURIComponent) range passed as query string parameter range.

If a package contains inline data, by default the inline data are not returned unless the query string parameter contentData is set to true.

GET /:pkgname/:version/dataset/:dataset

Download metadata from a dataset named :dataset from a package with name :pkgname and version :version. Version can be specifyied as latest and a qery string parameter range.

GET /:pkgname/:version/code/:code

Download metadata from a code entry named :code from a package with name :pkgname and version :version. Version can be specifyied as latest and a qery string parameter range.

GET /:pkgname/:version/figure/:figure

Download metadata from a figure named :figure from a package with name :pkgname and version :version. Version can be specifyied as latest and a qery string parameter range.

GET /:pkgname/:version/article/:article

Download metadata from a article named :article from a package with name :pkgname and version :version. Version can be specifyied as latest and a qery string parameter range.

PUT /adduser/:name

data:

{
  name: name,
  salt: salt,
  password_sha: sha(password+salt),
  email: email
}

Create an user of username :name.

PUT /:pkgname/:version

data: Document with attachments in multipart/related format as needed by CouchDb. See CouchDB multiple attachments for details. You might want to look at the couch-multipart-stream node module.

Publish a specific :version of the package of name :pkgname.

DELETE /:pkgname/:version?

Delete package of name :pkgname and version :version. If version is omitted all the versions are deleted.

GET /owner/ls/:pkgname

List the maintainers of package of name :pkgname.

POST /owner/add

data:

{
  username: name,
  pkgname: pkgname
}

Add maintainer :name to the package :pkgname.

POST /owner/rm

data:

{
  username: name,
  pkgname: pkgname
}

Remove maintainer :name from the package :pkgname.

GET /search?keys=["search", "terms"]

Search by keywords.

Tests

couchdb
npm run push
npm start
npm test

License

GPL version 3 or any later version.

About

A CouchDB powered registry for linked data packages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 51.1%
  • CSS 48.9%