Git Product home page Git Product logo

owl2jsonld's Introduction

owl2jsonld

Build Status doi:10.5281/zenodo.10565

Convert OWL ontology to JSON-LD context

This tool generate a JSON-LD @context for concepts (classes and properties) found in the specified OWL or RDFS ontology.

Download

The official releases contain an uberjar (standalone) JAR, which bundles all dependencies and can be used as a commandline tool.

The uberjar contains OWL API, which is distributed under the alternative of LGPL or Apache license 2.0.

Installing from source

Install dependencies:

Check out owl2jsonld (this project) and build it:

$ git clone https://github.com/stain/owl2jsonld.git
$ cd owl2jsonld
$ lein uberjar

Command line usage

Generate JSON-LD context from the given RDFS/OWL ontology URL(s):

$ java -jar owl2jsonld-*-standalone.jar [-a|-n] [-c|-p] [-P PREFIX] [-i] [-o OUTPUT] [-e] ONTOLOGY ...

To avoid making a uberjar (e.g. during development), you may alternatively run the tool using:

$ lein run -- [options] ONTOLOGY`

Options

Convert OWL ontology to JSON-LD context

Usage: owl2jsonld [options] ONTOLOGY...

Options:
  -a, --all-imports    Include all OWL-imported concepts (default: only directly referenced elements)
  -d, --only-defined   Include only concepts which are rdfs:isDefinedBy the specified ontologies
  -c, --classes        Include only classes
  -p, --properties     Include only properties
  -P, --prefix PREFIX  JSON-LD prefix to use for generated concepts (default: no prefix)
  -i, --inherit        Inherit prefixes from the source ontology
  -o, --output OUTPUT  Output file for generated JSON-LD context (default: write to STDOUT)
  -v, --verbose        Verbose output on STDERR
  -h, --help


More info: README.md or https://github.com/stain/owl2jsonld

Example

$ java -jar owl2jsonld-0.2.1-standalone.jar http://purl.org/pav/
{ "@context": {
    "authoredBy": { "@id": "http://purl.org/pav/authoredBy",
                    "@type": "@id"
                  },
    "authoredOn": { "@id": "http://purl.org/pav/authoredOn",
                    "@type" "http://www.w3.org/2001/XMLSchema#dateTime"
                  }
    }
    ...
}

Usage from Clojure

To use from Clojure with Leiningen, use the Clojar dependency owl2jsonld:

[owl2jsonld "0.2.1"]

License

Copyright © 2014 Stian Soiland-Reyes, University of Manchester.

This source code is distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

The uberjar contains OWL API, which is distributed under the alternative of LGPL or Apache license 2.0.

Cite

Cite as:

Soiland-Reyes, Stian (2014). owl2jsonld 0.2.1. ZENODO. 10.5281/zenodo.10565

(Check https://github.com/stain/owl2jsonld#cite for latest version/citation)

owl2jsonld's People

Contributors

stain avatar

Watchers

J. Duan 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.