add rdf4j setup

This commit is contained in:
Michael Jerger 2023-06-23 17:55:16 +02:00
parent 888082ab84
commit 559369e90a
3 changed files with 12 additions and 21 deletions

View file

@ -9,19 +9,17 @@
:resource-paths ["src/main/resources"] :resource-paths ["src/main/resources"]
:dependencies [[org.clojure/clojure "1.11.1"] :dependencies [[org.clojure/clojure "1.11.1"]
;; Incoming HTTP ;; Incoming HTTP
[ring/ring-core "1.9.6"] [ring/ring-core "1.10.0"]
[ring/ring-jetty-adapter "1.9.6"] [ring/ring-jetty-adapter "1.10.0"]
[ring/ring-mock "0.4.0"] [ring/ring-mock "0.4.0"]
[metosin/muuntaja "0.6.8"] [metosin/muuntaja "0.6.8"]
[metosin/reitit "0.5.18"] [metosin/reitit "0.6.0"]
;; Outgoing HTTP ;; Outgoing HTTP
[hato "0.9.0"] [hato "0.9.0"]
[cheshire/cheshire "5.11.0"] [cheshire/cheshire "5.11.0"]
[com.cognitect/transit-clj "1.0.333"] [com.cognitect/transit-clj "1.0.333"]
[lambdaisland/uri "1.13.95"] [lambdaisland/uri "1.15.125"]
[clj-turtle "0.1.3"] [org.eclipse.rdf4j/rdf4j-rio-turtle "4.3.2"]]
[org.clojars.quoll/raphael "0.1.6"]
[instaparse "1.4.12"]]
:main ^:skip-aot org.domaindrivenarchitecture.activity-pub-poc.core :main ^:skip-aot org.domaindrivenarchitecture.activity-pub-poc.core
:profiles {:test {:test-paths ["src/test/clj"] :profiles {:test {:test-paths ["src/test/clj"]
:resource-paths ["src/test/resources"] :resource-paths ["src/test/resources"]

View file

@ -1,7 +1,6 @@
(ns org.domaindrivenarchitecture.activity-pub-poc.core (ns org.domaindrivenarchitecture.activity-pub-poc.core
(:require [lambdaisland.souk.activitypub :as ap] (:require [lambdaisland.souk.activitypub :as ap]
[lambdaisland.souk.json-ld :as ld] [lambdaisland.souk.json-ld :as ld]
[quoll.raphael.core :refer [parse]]
[org.domaindrivenarchitecture.activity-pub-poc.common :as cm] [org.domaindrivenarchitecture.activity-pub-poc.common :as cm]
[clojure.spec.alpha :as s] [clojure.spec.alpha :as s]
[clojure.inspector :as ins] [clojure.inspector :as ins]
@ -20,17 +19,6 @@
(def team (ap/GET team-url)) (def team (ap/GET team-url))
(def parsed-rdf-syntax (parse (slurp cm/activitystreams-ttl)))
; ToDo
; Prädikat das langString parsen/validieren kann, evtl auch für xsd:string
; Prädikat für Name und Person ausformulieren
;;(ins/inspect-tree team-ld) ;;(ins/inspect-tree team-ld)
;;(ins/inspect-tree team) ;;(ins/inspect-tree team)

View file

@ -1,6 +1,11 @@
(ns org.domaindrivenarchitecture.activity-pub-poc.core-test (ns org.domaindrivenarchitecture.activity-pub-poc.core-test
(:require [clojure.test :refer :all] (:require [clojure.test :refer :all]
[clojure.java.io :as io]
[org.domaindrivenarchitecture.activity-pub-poc.core :as sut])) [org.domaindrivenarchitecture.activity-pub-poc.core :as sut]))
(deftest get-property-type-from-ld-resource (def activity-streams-ttl (slurp (io/resource "activitystreams_2.0_owl.ttl")))
(is (= 0 1)))
(deftest should-generate-spec
(is (= "(s/def ::activitystreams/name (s/or xsd/string? rdf/langString?))"
(sut/generate-spec activity-streams-ttl ":activitystreams/name"
["xsd/string?" "rdf/langString"]))))