object-or-refernce #1

Merged
jem merged 25 commits from object-or-refernce into main 2023-08-01 07:43:12 +00:00
Showing only changes of commit 572d42f6ea - Show all commits

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