adjustments
This commit is contained in:
parent
7e60392a75
commit
c3cda39e41
8 changed files with 38 additions and 37 deletions
|
@ -20,4 +20,25 @@ Maps to
|
||||||
(s/and
|
(s/and
|
||||||
::DeprecatedProperty
|
::DeprecatedProperty
|
||||||
::FunctionalProperty))
|
::FunctionalProperty))
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Der token `a` in einer ttl Definition entspricht dem RDF-Prädikat `rdf:type`. Siehe:
|
||||||
|
* https://www.w3.org/TR/turtle/#sec-iri
|
||||||
|
* https://www.w3.org/TR/rdf12-schema/#ch_type
|
||||||
|
|
||||||
|
Das bedeutet für das Tripel: `(R, rdf:type, C) => C instanceof rdfs:Class & R instanceof C`
|
||||||
|
|
||||||
|
# Further infos
|
||||||
|
|
||||||
|
## RDF/S
|
||||||
|
|
||||||
|
### range (https://www.w3.org/TR/rdf12-schema/#ch_range)
|
||||||
|
|
||||||
|
"P rdfs:range C" indicates that:
|
||||||
|
1. P is an instance of the class rdf:Property
|
||||||
|
2. C is an instance of the class rdfs:Class
|
||||||
|
3. all the resources denoted by the objects of triples whose predicate is P are instances of the class C.
|
||||||
|
=>Bedeutet(?): Es gilt: Tupel = (Subjekt, Prädikat, Objekt):
|
||||||
|
=> Wenn (P, rdfs:range, C) & (S, P, C2) => C2 is instance of C
|
||||||
|
|
||||||
|
### type (https://www.w3.org/TR/rdf12-schema/#ch_type)
|
|
@ -1,4 +1,4 @@
|
||||||
(ns org.domaindrivenarchitecture.activity-pub-poc.activitystreams2
|
(ns org.domaindrivenarchitecture.activity-pub-poc.activitystreams2-legacy
|
||||||
(:require [clojure.spec.alpha :as s]
|
(:require [clojure.spec.alpha :as s]
|
||||||
[org.domaindrivenarchitecture.activity-pub-poc.owl :as owl]
|
[org.domaindrivenarchitecture.activity-pub-poc.owl :as owl]
|
||||||
[org.domaindrivenarchitecture.activity-pub-poc.core :as core]))
|
[org.domaindrivenarchitecture.activity-pub-poc.core :as core]))
|
|
@ -1,14 +1,12 @@
|
||||||
(ns org.domaindrivenarchitecture.activity-pub-poc.activitystreams2
|
(ns org.domaindrivenarchitecture.activity-pub-poc.activitystreams2
|
||||||
(:require [clojure.spec.alpha :as s]
|
(:require [clojure.spec.alpha :as s]
|
||||||
[org.domaindrivenarchitecture.activity-pub-poc.owl :as owl]
|
[org.domaindrivenarchitecture.activity-pub-poc.owl :as owl]
|
||||||
|
[org.domaindrivenarchitecture.activity-pub-poc.rdf :as rdf]
|
||||||
[org.domaindrivenarchitecture.activity-pub-poc.core :as core]))
|
[org.domaindrivenarchitecture.activity-pub-poc.core :as core]))
|
||||||
|
|
||||||
;http://www.w3.org/ns/activitystreams#id
|
;http://www.w3.org/ns/activitystreams#id
|
||||||
;TODO: how do we translate this? rdfs:domain [a owl:Class ; owl:unionOf (as:Link as:Object)]
|
;TODO: how do we translate this? rdfs:domain [a owl:Class ; owl:unionOf (as:Link as:Object)]
|
||||||
; Der token 'a' in einer ttl definition entspricht dem RDF-Prädikat rdf:type.
|
|
||||||
; Siehe: https://www.w3.org/TR/turtle/#sec-iri UND https://www.w3.org/TR/rdf12-schema/#ch_type
|
|
||||||
; => (R, rdf:type, C) => C instanceof rdfs:Class & R instanceof C
|
|
||||||
(s/def ::id (s/and ::owl/FunctionalProperty
|
(s/def ::id (s/and ::owl/FunctionalProperty
|
||||||
::owl/DatatypeProperty
|
::owl/DatatypeProperty
|
||||||
::owl/DeprecatedProperty
|
::owl/DeprecatedProperty
|
||||||
core/uri-string?))
|
core/uri-string?))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
(ns org.domaindrivenarchitecture.activity-pub-poc.owl
|
(ns org.domaindrivenarchitecture.activity-pub-poc.owl
|
||||||
"""A swallow spec translation implementation of owl. Inheritance of FunctionalProperty
|
"A swallow spec translation implementation of owl. Inheritance of FunctionalProperty
|
||||||
is realized in deep implemented."""
|
is realized in deep implemented."
|
||||||
(:require [clojure.spec.alpha :as s]))
|
(:require [clojure.spec.alpha :as s]))
|
||||||
|
|
||||||
; Properties:https://www.w3.org/TR/owl-ref/#Property
|
; Properties:https://www.w3.org/TR/owl-ref/#Property
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
(ns org.domaindrivenarchitecture.activity-pub-poc.rdf
|
|
||||||
"" "A swallow spec translation implementation of rdf. Inheritance of FunctionalProperty
|
|
||||||
is realized in deep implemented." ""
|
|
||||||
(:require [clojure.spec.alpha :as s]
|
|
||||||
[orchestra.core :refer [defn-spec]]))
|
|
||||||
|
|
||||||
; TODO: Fill out logic
|
|
||||||
(defn-spec triple boolean?
|
|
||||||
[rdf-types any?
|
|
||||||
property any?
|
|
||||||
object any?]
|
|
||||||
)
|
|
|
@ -1,15 +0,0 @@
|
||||||
(ns org.domaindrivenarchitecture.activity-pub-poc.rdfs
|
|
||||||
"" "A swallow spec translation implementation of rdfs. Inheritance of FunctionalProperty
|
|
||||||
is realized in deep implemented." ""
|
|
||||||
(:require [clojure.spec.alpha :as s]))
|
|
||||||
|
|
||||||
;https://www.w3.org/TR/rdf12-schema/#ch_range
|
|
||||||
; "P rdfs:range C" indicates that:
|
|
||||||
; 1. P is an instance of the class rdf:Property
|
|
||||||
; 2. C is an instance of the class rdfs:Class
|
|
||||||
; 3. all the resources denoted by the objects of triples whose predicate is P are instances of the class C.
|
|
||||||
; =>Bedeutet(?): Es gilt: Tupel = (Subjekt, Prädikat, Objekt):
|
|
||||||
; => Wenn (P, rdfs:range, C) & (S, P, C2) => C2 is instance of C
|
|
||||||
;
|
|
||||||
; 1. und 2. könnten wir in der spec abbilden. 3. brauchen wir vmtl nicht (und hab ich nicht 100% verstanden)
|
|
||||||
(s/def ::range any?)
|
|
|
@ -1,6 +1,6 @@
|
||||||
(ns org.domaindrivenarchitecture.activity-pub-poc.xsd
|
(ns org.domaindrivenarchitecture.activity-pub-poc.xsd
|
||||||
"" "A swallow spec translation implementation of xsd Inheritance of FunctionalProperty
|
"A swallow spec translation implementation of xsd Inheritance of FunctionalProperty
|
||||||
is realized in deep implemented." ""
|
is realized in deep implemented."
|
||||||
(:require [clojure.spec.alpha :as s]
|
(:require [clojure.spec.alpha :as s]
|
||||||
[org.domaindrivenarchitecture.activity-pub-poc.predicates :as p]))
|
[org.domaindrivenarchitecture.activity-pub-poc.predicates :as p]))
|
||||||
|
|
||||||
|
|
9
src/test/cljc/org/activitystreams2_test.clj
Normal file
9
src/test/cljc/org/activitystreams2_test.clj
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
(ns org.domaindrivenarchitecture.activity-pub-poc.activitystreams2-test
|
||||||
|
(:require
|
||||||
|
[clojure.test :refer [deftest is are testing run-tests]]
|
||||||
|
[clojure.spec.test.alpha :as st]
|
||||||
|
[clojure.spec.alpha :as s]
|
||||||
|
[org.domaindrivenarchitecture.activity-pub-poc.activitystreams2 :as sut]))
|
||||||
|
|
||||||
|
(deftest id-test
|
||||||
|
(is true))
|
Loading…
Reference in a new issue