You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
activity-pub-poc/doc/ideaForParsing.md

24 lines
535 B
Markdown

I have logic in this module: https://github.com/ont-app/igraph-jena that uses Jena's parser, called 'riot'.
https://jena.apache.org/documentation/
org.apache.jena/jena-arq {:mvn/version "4.9.0"}
```clojure
ns ...
(:import
[org.apache.jena.riot
RDFDataMgr RDFFormat]))
(defn read-rdf
[model rdf-file]
(try (RDFDataMgr/read model (str rdf-file))
(catch Error e
(throw (ex-info "Jena riot error"
(merge
(ex-data e)
{:type ::RiotError
::file-name (str rdf-file)
})))))
model)
```