fix merge conflicts

pull/1/head
Clemens 10 months ago
parent 572d42f6ea
commit ada2074726

@ -91,6 +91,29 @@ Maps to
(s/def ::Link (s/keys :opt-un [::id]))
```
## **rdfs:subClassOf**
*its* value a **rdfs:subClassOf** *the class*
If subClassOf links to an other definition we map range same as **a**.
Example:
```ttl
as:Activity rdfs:subClassOf as:Object ;
```
Maps to
```clojure
(s/def ::Object ...)
(s/def ::Activity
(s/and
...
::Object
...))
```
# Further infos
## RDF/S

@ -4,54 +4,85 @@
[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."
[spec keyword?]
(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
and if it is a map, if it validates the given map-spec."
[map-spec s/spec?]
(s/and
::owl/Class
(s/or
:no-map #(not (map? %))
:map map-spec)))
;=======================
;http://www.w3.org/ns/activitystreams#object
(s/def ::Object
(s/and
::owl/Class
(s/keys :opt-un [::id ::type ::attachment])))
;http://www.w3.org/ns/activitystreams#Link
(s/def ::Link
(s/and
::owl/Class
(s/keys :opt-un [::id ::type])))
;http://www.w3.org/ns/activitystreams#id
(s/def
::id (s/and ::owl/DatatypeProperty
::owl/FunctionalProperty
::owl/DeprecatedProperty
::xsd/anyURI))
(s/def ::id
(s/and ::owl/DatatypeProperty
::owl/FunctionalProperty
::owl/DeprecatedProperty
::xsd/anyURI))
;http://www.w3.org/ns/activitystreams#result
(s/def ::result
(s/and
::owl/ObjectProperty
::Class
;https://www.w3.org/TR/activitystreams-vocabulary/#dfn-type
;TODO: this can not be found in the ttl / namespace. Where is this exactly defined?
(s/def ::type
any?;::xsd/anyURI
)
;http://www.w3.org/ns/activitystreams#Activity
;TODO: Define more properties necessary for Like
(s/def ::Activity
(s/and
::owl/Class
::Object
::Link))
(s/keys :opt-un [::result ::object])))
;http://www.w3.org/ns/activitystreams#attachment
(s/def ::attachment
;http://www.w3.org/ns/activitystreams#result
(s/def ::result
(s/and
::owl/ObjectProperty
::Class
::Link
::Object))
(map-class-spec
(s/or :object ::Object
:link ::Link))))
;http://www.w3.org/ns/activitystreams#Relationship
;TODO: definition in progress
;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 (s/keys :opt-un [::object])))
;http://www.w3.org/ns/activitystreams#Activity
;TODO: definition in progress
(s/def ::Activity
(s/and ::Object
(s/keys :opt-un [::result
::object])))
(s/and
::owl/Class
::Object
(s/keys :opt-un [::object])))
;http://www.w3.org/ns/activitystreams#object
(s/def ::object
(s/and
::owl/ObjectProperty
::Class
::Object
::Link))
(map-class-spec
(s/or
:object ::Object
:link ::Link))))
;http://www.w3.org/ns/activitystreams#object
(defmulti object-type map?)
@ -72,12 +103,29 @@
(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))
;http://www.w3.org/ns/activitystreams#Like
(s/def ::Like ::Activity)
Loading…
Cancel
Save