Fork me on GitHub
#rdf
<
2016-11-22
>
rickmoynihan22:11:41

@stain: Check out grafter - we have pretty comprehensive protocols to coerce between RDF/clojure types

rickmoynihan22:11:42

its been in production use for a few years - and its pretty robust… it should cover all of RDF 1.1 and support all RDF serialisations etc... https://github.com/Swirrl/grafter/blob/master/src/rdf-common/grafter/rdf/io.clj

rickmoynihan22:11:51

I also have a side project to do what you’re starting… I’m basically extracting the protocols from grafter into a separate project, with plans to implement them on Commons RDF, Sesame and Jena.. https://github.com/Swirrl/core.rdf

rickmoynihan22:11:29

The grafter stuff isn’t perfect - it has a few minor aesthetic issues which are largely resolved on the 0.8.0-snapshot branch (which is basically stable and will be released soon) but we’ve been using it for almost all of our RDF processing for almost 3 years… It also has a super simple turtle like DSL which you can use for writing triple templates e.g.

(def template
  (graph-fn [{:keys [dataset-title dataset-slug dataset-uri dataset-graph
                     observation-graph
                     structure-uri]}]
            (graph dataset-graph
                   [dataset-uri
                    [rdf:a qb:DataSet]
                    [qb:structure structure-uri]
                    [rdfs:label (lang dataset-title :en)]
                    [dcterms:title (lang dataset-title :en)]
                    [dcterms:modified (modified-date)]])))

rickmoynihan22:11:35

I do really need to write a tutorial for the RDF side of things though

rickmoynihan22:11:26

I see you’re based in Manchester! Small world!! I run the Manchester Lambda Lounge http://lambdalounge.org.uk/