[Pointrel-discuss] Generating Clojure from an Ontology - Digital Digressions by Stuart Sierra
Status: Alpha
Brought to you by:
paulfernhout
From: Paul D. F. <pdf...@ku...> - 2009-10-21 22:01:36
|
From: http://stuartsierra.com/2009/10/08/generating-clojure-from-an-ontology """ I’ve been fascinated with RDF for years, but I always end up frustrated when I try to use it. How do you read/write/manipulate RDF data in code? Sure, there are lots of libraries, but they all represent RDF data as its primitive structures: statements, resources, literals, etc. Working with data through these APIs feels like using a glovebox. To get anything useful done, you have to define mappings between RDF properties/classes and normal data structures in your programming language — classes, maps, lists, whatever. In effect, you have to define everything twice. ... What I really wanted was a way to create and work with RDF data in Clojure, using the same map/set/sequence APIs that I use for any other Clojure data structure. I flirted with implementing RDF in Clojure but lost interest when I realized that 1) there’s a lot more to implementing RDF than datatype conversions; and 2) my Clojure library suffered from the same glovebox problem as the Java RDF libraries. The solution, however, was staring me in the face all along. Clojure is a Lisp. I can generate functions directly, without any intermediate “source” representation. I can use my own customized validation and type-checking functions. Furthermore, I can extend the definitions in my RDF schema with new Clojure functions. """ --Paul Fernhout http://www.pdfernhout.net/ http://www.beyondajoblessrecovery.org/ |