Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/haoliangyu/w3c-dcat
A utility library to create and convert dataset metadata with W3C DCAT in JSON
https://github.com/haoliangyu/w3c-dcat
dcat interoperation json utility-library w3c
Last synced: about 1 month ago
JSON representation
A utility library to create and convert dataset metadata with W3C DCAT in JSON
- Host: GitHub
- URL: https://github.com/haoliangyu/w3c-dcat
- Owner: haoliangyu
- License: mit
- Created: 2017-12-03T15:47:01.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-15T15:51:06.000Z (over 6 years ago)
- Last Synced: 2024-10-11T06:35:37.306Z (about 1 month ago)
- Topics: dcat, interoperation, json, utility-library, w3c
- Language: TypeScript
- Homepage: https://haoliangyu.github.io/w3c-dcat
- Size: 234 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# w3c-dcat
[![Build Status](https://travis-ci.org/haoliangyu/w3c-dcat.svg?branch=master)](https://travis-ci.org/haoliangyu/w3c-dcat)
A utility library to create and convert [W3C DCAT](https://www.w3.org/TR/vocab-dcat/) in JSON.
Primarily developed for [SingularData.net](https://github.com/SingularData/SingularData.net)
## Installation
``` bash
npm install w3c-dcat
```## Use
Support DCAT spec:
* [Dataset](https://www.w3.org/TR/vocab-dcat/#class-dataset)``` javascript
import { Dataset } from 'w3c-dcat';// create a new dataset class
const datasetA = new Dataset();// create a new dataset with predefined value
const datasetB = new Dataset({ title: 'New Dataset' });// extend the dataset metadata with an key-value object
datasetA.set({ title: 'New Name' });// get property value
console.log(datasetA.title);// get a JSON copy of the dataset metadata
console.log(datasetB.toJSON())// get a DCAT datset class from other open data vendor's
// dataset metadata
const datasetC = Dataset.from('ArcGIS', metadata)```
[TypeScript](https://www.typescriptlang.org/) is natively supported. For more examples, please see [tests](https://github.com/haoliangyu/w3c-dcat/blob/master/test/index.test.ts) and [documentation](https://haoliangyu.github.io/w3c-dcat/).
### Supported Vendor
`w3c-dcat` is able to convert dataset metadata from the following open data vendors:
* [ArcGIS](https://hub.arcgis.com/pages/open-data) (v2 API)
* [CKAN](https://ckan.org/) (v3 API)
* [DKAN](https://getdkan.org/)
* [GeoNode](http://geonode.org/)
* [Junar](https://junar.github.io/docs/en) (v2 API)
* [OpenDataSoft](https://www.opendatasoft.com/) (v2 API)
* [Socrata](https://socrata.com/solutions/open-data-citizen-engagement/) (v1 API)## License
MIT