You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.4 KiB
Clojure
46 lines
1.4 KiB
Clojure
(ns org.domaindrivenarchitecture.fed-poc.owl
|
|
"A swallow spec translation implementation of owl. Inheritance of FunctionalProperty
|
|
is realized in deep implemented."
|
|
(:require
|
|
[clojure.spec.alpha :as s]
|
|
[org.domaindrivenarchitecture.fed-poc.predicates :as p]
|
|
[orchestra.core :refer [defn-spec]]))
|
|
|
|
; Properties:https://www.w3.org/TR/owl-ref/#Property
|
|
; * Datatype properties link individuals to data values.
|
|
; * Object properties link individuals to individuals.
|
|
|
|
;http://www.w3.org/2002/07/owl#Class
|
|
;https://www.w3.org/TR/owl-ref/#Class-def
|
|
(defn-spec owl-class? boolean?
|
|
[elem any?]
|
|
(or (p/uri-string? elem)
|
|
(coll? elem)))
|
|
(s/def ::Class owl-class?)
|
|
|
|
;http://www.w3.org/2002/07/owl#DatatypeProperty
|
|
(s/def ::DatatypeProperty any?)
|
|
|
|
;http://www.w3.org/2002/07/owl#ObjectProperty
|
|
(s/def ::ObjectProperty any?)
|
|
|
|
;http://www.w3.org/2002/07/owl#FunctionalProperty
|
|
;https://www.w3.org/TR/owl-ref/#FunctionalProperty-def
|
|
(defn-spec
|
|
functional? boolean?
|
|
[elem any?]
|
|
(and
|
|
(some? elem)
|
|
(or
|
|
(not (coll? elem))
|
|
(and (sequential? elem) (= 1 (count elem))))))
|
|
(s/def ::FunctionalProperty functional?)
|
|
|
|
;http://www.w3.org/2002/07/owl#DeprecatedProperty
|
|
;https://www.w3.org/TR/owl-ref/#Deprecation
|
|
(s/def ::DeprecatedProperty any?)
|
|
|
|
|
|
;http://www.w3.org/2002/07/owl#ObjectProperty
|
|
;https://www.w3.org/TR/owl-ref/#ObjectProperty
|
|
(s/def ::ObjectProperty any?) |