Compare commits
4 commits
56a4642800
...
0fadba5e53
Author | SHA1 | Date | |
---|---|---|---|
0fadba5e53 | |||
26fac9b467 | |||
19b050f517 | |||
33404eb853 |
5 changed files with 20 additions and 11 deletions
|
@ -1,7 +0,0 @@
|
||||||
(ns org.domaindrivenarchitecture.activity-pub-poc.xsd
|
|
||||||
(:require [clojure.spec.alpha :as s]))
|
|
||||||
|
|
||||||
; http://www.datypic.com/sc/xsd/t-xsd_anyURI.html
|
|
||||||
; TODO: Find out correct definition!
|
|
||||||
(defn anyUri? [input]
|
|
||||||
false)
|
|
|
@ -65,8 +65,9 @@
|
||||||
;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/merge ::owl/Class
|
(s/and ::owl/Class
|
||||||
(s/keys :opt-un [::id ::object])))
|
))
|
||||||
|
;(s/keys :opt-un [::id ::object])))
|
||||||
|
|
||||||
|
|
||||||
;http://www.w3.org/ns/activitystreams#Like
|
;http://www.w3.org/ns/activitystreams#Like
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
is realized in deep implemented."
|
is realized in deep implemented."
|
||||||
(:require
|
(:require
|
||||||
[clojure.spec.alpha :as s]
|
[clojure.spec.alpha :as s]
|
||||||
|
[org.domaindrivenarchitecture.activity-pub-poc.predicates :as p]
|
||||||
[orchestra.core :refer [defn-spec]]))
|
[orchestra.core :refer [defn-spec]]))
|
||||||
|
|
||||||
; Properties:https://www.w3.org/TR/owl-ref/#Property
|
; Properties:https://www.w3.org/TR/owl-ref/#Property
|
||||||
|
@ -11,7 +12,12 @@
|
||||||
|
|
||||||
;http://www.w3.org/2002/07/owl#Class
|
;http://www.w3.org/2002/07/owl#Class
|
||||||
;https://www.w3.org/TR/owl-ref/#Class-def
|
;https://www.w3.org/TR/owl-ref/#Class-def
|
||||||
(s/def ::Class any?)
|
(defn-spec owl-class? boolean?
|
||||||
|
[elem any?]
|
||||||
|
(or (p/uri-string? elem)
|
||||||
|
(map? elem)
|
||||||
|
(vector? elem)))
|
||||||
|
(s/def ::Class owl-class?)
|
||||||
|
|
||||||
;http://www.w3.org/2002/07/owl#DatatypeProperty
|
;http://www.w3.org/2002/07/owl#DatatypeProperty
|
||||||
(s/def ::DatatypeProperty any?)
|
(s/def ::DatatypeProperty any?)
|
||||||
|
|
|
@ -477,6 +477,8 @@ as:id a owl:DatatypeProperty ,
|
||||||
owl:DeprecatedProperty ;
|
owl:DeprecatedProperty ;
|
||||||
rdfs:label "id"@en ;
|
rdfs:label "id"@en ;
|
||||||
rdfs:range xsd:anyURI ;
|
rdfs:range xsd:anyURI ;
|
||||||
|
rdfs:domain as:Link,
|
||||||
|
as:Object;
|
||||||
rdfs:domain [
|
rdfs:domain [
|
||||||
a owl:Class ;
|
a owl:Class ;
|
||||||
owl:unionOf (as:Link as:Object)
|
owl:unionOf (as:Link as:Object)
|
||||||
|
|
|
@ -11,4 +11,11 @@
|
||||||
(is (sut/functional? ["str"]))
|
(is (sut/functional? ["str"]))
|
||||||
(is (not (sut/functional? [])))
|
(is (not (sut/functional? [])))
|
||||||
(is (not (sut/functional? nil)))
|
(is (not (sut/functional? nil)))
|
||||||
(is (not (sut/functional? [1 2]))))
|
(is (not (sut/functional? [1 2]))))
|
||||||
|
|
||||||
|
(deftest owl-class-predicate
|
||||||
|
(is (sut/owl-class? "http://some.uri"))
|
||||||
|
(is (sut/owl-class? {:as "class-definition"}))
|
||||||
|
(is (sut/owl-class? []))
|
||||||
|
(is (not (sut/owl-class? "str")))
|
||||||
|
(is (not (sut/owl-class? nil))))
|
||||||
|
|
Loading…
Reference in a new issue