rdf-tools
TypeScript icon, indicating that this package has built-in type declarations

0.5.1 • Public • Published

rdf-tools

Tools for RDF.

Installation

npm install -g rdf-tools

Usage

rdf-tools --help
Usage: rdf-tools <command> [options] <pattern>

Commands:
  rdf-tools typescript [options] <pattern>  generate TypeScript from RDF               [aliases: ts]
  rdf-tools jsonld [options] <pattern>      generate JSON-LD from RDF                  [aliases: ld]

Options:
  -D, --debug    output debug information                                                  [boolean]
  -h, --help     Show help                                                                 [boolean]
  -v, --version  Show version number                                                       [boolean]

Happy coding!

Example

The following command will output types for all classes explicitly defined in the ontology, as well as an object containing the prefixes and IRIs used by the ontology.

rdf-tools typescript example.ttl > example.ts

How does it work?

Classes

In order to construct types for the classes in the ontology we need the following pieces of information for each type:

  • owl:Class: What is the name of the class?
  • rdfs:subClassOf: What are its super-classes?
  • rdfs:domain, rdfs:range, owl:FunctionalProperty: Property names, types and pluralities.

Readme

Keywords

none

Package Sidebar

Install

npm i rdf-tools

Weekly Downloads

0

Version

0.5.1

License

MIT

Unpacked Size

282 kB

Total Files

97

Last publish

Collaborators

  • joostverdoorn
  • steffansluis