Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stain/owlapi-jsonld
JSON-LD parser and writer for OWL API
https://github.com/stain/owlapi-jsonld
Last synced: 3 months ago
JSON representation
JSON-LD parser and writer for OWL API
- Host: GitHub
- URL: https://github.com/stain/owlapi-jsonld
- Owner: stain
- Created: 2014-06-17T14:53:44.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-10T10:38:06.000Z (almost 9 years ago)
- Last Synced: 2024-11-01T08:50:27.786Z (3 months ago)
- Language: Java
- Size: 54.7 KB
- Stars: 17
- Watchers: 8
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# owlapi-jsonld
[![Build Status](https://travis-ci.org/stain/owlapi-jsonld.svg)](https://travis-ci.org/stain/owlapi-jsonld)
[![doi:10.5281/zenodo.10561](https://zenodo.org/badge/doi/10.5281/zenodo.10561.png)](http://dx.doi.org/10.5281/zenodo.10561)
*JSON-LD support for OWLAPI*
Add [JSON-LD](http://www.w3.org/TR/json-ld/) parser and renderer
(read and write) support for the [OWL API](http://owlapi.sourceforge.net/).## Usage
If using Maven, edit `pom.xml` to include:
```xml
org.clojars.stain
owlapi-jsonld
0.1.0
clojars
Clojars repository
https://clojars.org/repo
```From the [example](src/test/java/no/s11/owlapijsonld/example/TestExample.java):
Reading an JSON-LD-based ontology:
```java
OWLOntologyManager ontologyManager = OWLManager.createOWLOntologyManager();
JsonLdParserFactory.register(); // Really just needed onceIRI vcardIri = IRI.create("http://www.w3.org/2006/vcard/ns.jsonld");
OWLOntology ontology = ontologyManager.loadOntology(vcardIri);
ontologyManager.saveOntology(ontology, new TurtleOntologyFormat(), System.out);
```Writing out an ontology as JSON-LD:
```java
OWLOntologyManager ontologyManager = OWLManager.createOWLOntologyManager();
JsonLdStorer.register(ontologyManager); // Needed once per ontologyManagerIRI oaIri = IRI.create("http://www.w3.org/ns/oa.rdf");
OWLOntology ontology = ontologyManager.loadOntology(oaIri);
ontologyManager.saveOntology(ontology, new JsonLdOntologyFormat(), System.out);
```For further details about the OWL API, see [OWL API documentation](https://github.com/owlcs/owlapi/wiki/Documentation)
## License
Copyright © 2014 [Stian Soiland-Reyes](http://orcid.org/0000-0001-9842-9718), [University of Manchester](http://www.cs.manchester.ac.uk/).
License under the alternative of [LGPL 3.0](http://www.gnu.org/licenses/lgpl-3.0) or
[Apache license 2.0](http://www.apache.org/licenses); the same as OWL API.