fix the tests - transormation description in progress

This commit is contained in:
Michael Jerger 2023-07-28 13:31:48 +02:00
parent 3e84e78c15
commit 572d42f6ea

View file

@ -50,24 +50,33 @@
(s/and (s/and
::owl/ObjectProperty ::owl/ObjectProperty
::Class ::Class
(s/or ::Object ::Object
::Link))) ::Link))
;http://www.w3.org/ns/activitystreams#object ;http://www.w3.org/ns/activitystreams#object
(s/def ::Object (defmulti object-type map?)
(s/keys :opt-un [::id ::Class])) (defmethod object-type true [_]
(s/and ::Class
(s/keys :opt-un [::id])))
(defmethod object-type false [_]
(s/and ::Class))
(s/def ::Object object-type)
;http://www.w3.org/ns/activitystreams#Link ;http://www.w3.org/ns/activitystreams#Link
;TODO: definition in progress ;TODO: definition in progress
(s/def ::Link (s/keys :opt-un [::id])) (defmulti link-type map?)
(defmethod link-type true [_]
(s/and ::Class
(s/keys :opt-un [::id])))
(defmethod link-type false [_]
(s/and ::Class))
(s/def ::Link link-type)
;TODO: There is no as:Class! Why do we need this? ;TODO: There is no as:Class! Why do we need this?
;Answer jem: I do not want to enhance owl/Class inline from here. ;Answer jem: I do not want to enhance owl/Class inline from here.
(s/def (s/def
::Class ::Class
(s/and ::owl/Class (s/and ::owl/Class))
))
;(s/keys :opt-un [::id ::object])))
;http://www.w3.org/ns/activitystreams#Like ;http://www.w3.org/ns/activitystreams#Like