adjustments

pull/1/head
Clemens 10 months ago
parent ada2074726
commit 5588bcd5b8

@ -4,7 +4,6 @@
[org.domaindrivenarchitecture.activity-pub-poc.owl :as owl]
[org.domaindrivenarchitecture.activity-pub-poc.xsd :as xsd]))
; TODO gec: what is this needed for?
(defn-spec
is-functional-property? boolean?
"Checks whether spec is a FunctionalProperty."
@ -12,29 +11,70 @@
(some #(clojure.string/includes? % "FunctionalProperty") (s/describe spec)))
(defn-spec map-class-spec s/spec?
"Spec which checks whether a value is a ::owl/Class
"Spec which checks whether a value is a ::Class
and if it is a map, if it validates the given map-spec."
[map-spec s/spec?]
(s/and
::owl/Class
::Class
(s/or
:no-map #(not (map? %))
:map map-spec)))
;=======================
;TODO: There is no as:Class! Why do we need this?
;Answer jem: I do not want to enhance owl/Class inline from here.
(s/def
::Class
(s/and ::owl/Class))
;=======================
;http://www.w3.org/ns/activitystreams#object
(s/def ::Object
(s/and
::owl/Class
::Class
(s/keys :opt-un [::id ::type ::attachment])))
;http://www.w3.org/ns/activitystreams#Link
(s/def ::Link
(s/and
::owl/Class
::Class
(s/keys :opt-un [::id ::type])))
;http://www.w3.org/ns/activitystreams#Activity
;TODO: Define more properties necessary for Like
(s/def ::Activity
(s/and
::Class
::Object
(s/keys :opt-un [::result ::object])))
;http://www.w3.org/ns/activitystreams#Relationship
;We only have this class, since the property "object" is in the domain "Activity" and "Relationship"
; TODO: What means: "as:Relationship a rdf:Statement". Relevant for spec?
(s/def ::Relationship
(s/and
::Class
::Object
(s/keys :opt-un [::object])))
;http://www.w3.org/ns/activitystreams#Like
(s/def ::Like
(s/and
::Class
::Activity))
;http://www.w3.org/ns/activitystreams#attachment
; TODO: Why do we need to model this? Is this necessary for a Like-Activity?
(s/def ::attachment
(s/and
::owl/ObjectProperty
(map-class-spec
(s/or
:object ::Object
:link ::Link))))
;http://www.w3.org/ns/activitystreams#id
(s/def ::id
(s/and ::owl/DatatypeProperty
@ -49,15 +89,6 @@
)
;http://www.w3.org/ns/activitystreams#Activity
;TODO: Define more properties necessary for Like
(s/def ::Activity
(s/and
::owl/Class
::Object
(s/keys :opt-un [::result ::object])))
;http://www.w3.org/ns/activitystreams#result
(s/def ::result
(s/and
@ -66,15 +97,6 @@
(s/or :object ::Object
:link ::Link))))
;http://www.w3.org/ns/activitystreams#Relationship
;We only have this class, since the property "object" is in the domain "Activity" and "Relationship"
; TODO: What means: "as:Relationship a rdf:Statement". Relevant for spec?
(s/def ::Relationship
(s/and
::owl/Class
::Object
(s/keys :opt-un [::object])))
;http://www.w3.org/ns/activitystreams#object
(s/def ::object
(s/and
@ -103,29 +125,9 @@
(s/and ::Class))
(s/def ::Link link-type)
;http://www.w3.org/ns/activitystreams#attachment
; TODO: Why do we need to model this? Is this necessary for a Like-Activity?
(s/def ::attachment
(s/and
::owl/ObjectProperty
(map-class-spec
(s/or
:object ::Object
:link ::Link))))
;http://www.w3.org/ns/activitystreams#Like
(s/def ::Like
(s/and
::owl/Class
::Activity))
;=============
;TODO: There is no as:Class! Why do we need this?
;Answer jem: I do not want to enhance owl/Class inline from here.
(s/def
::Class
(s/and ::owl/Class))

Loading…
Cancel
Save