GithubHelp home page GithubHelp logo

setzer22 / jena-clj Goto Github PK

View Code? Open in Web Editor NEW
13.0 3.0 5.0 20 KB

An idiomatic clojure wrapper to the Jena API

License: GNU Lesser General Public License v3.0

Clojure 100.00%
clojure rdf jena ontology

jena-clj's Introduction

jena-clj

An idiomatic clojure wrapper to the Jena ontology management library.

Install

Leiningen / Boot:

[jena-clj "0.1.0"]

Gradle

compile "jena-clj:jena-clj:0.1.0"

Maven

<dependency>
  <groupId>jena-clj</groupId>
  <artifactId>jena-clj</artifactId>
  <version>0.1.0</version>
</dependency>

Usage

Some usage examples:

(require '[jena-clj.triplestore :as ts])
(import '[org.apache.jena.query ReadWrite])
(defonce db (ts/init-database "path/to/triplestore") ; If it doesn't exist, it creates one

(with-transaction db ReadWrite/WRITE
  (ts/insert-rdf db "path/to/rdf/or/ttl/file")) ; Loads a whole RDF file into triplestore
  
(with-transaction db ReadWrite/READ
  (ts/select-query 
    "prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
     SELECT ?uri ?name
     WHERE {?uri rdf:name ?name}")) ; Returns a lazy sequence with all results.

Take a look at triplestore.clj source for more!

Features

  • TDB Triplestore management
  • SPARQL queries

License

Copyright © 2017 setzer22

Distributed under the GNU General Public License v3.0

jena-clj's People

Contributors

kwisath avatar setzer22 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jena-clj's Issues

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.