add the option for having [value] or value
This commit is contained in:
parent
73cf280ad5
commit
69d93a99ff
2 changed files with 34 additions and 20 deletions
|
@ -51,66 +51,72 @@
|
|||
(s/and
|
||||
::owl/ObjectProperty
|
||||
::owl/Class
|
||||
(sh/seq-spec (s/and
|
||||
::Object
|
||||
::Link))
|
||||
::Link))))
|
||||
|
||||
;http://www.w3.org/ns/activitystreams#id
|
||||
(s/def ::id
|
||||
(s/and ::owl/DatatypeProperty
|
||||
::owl/FunctionalProperty
|
||||
::owl/DeprecatedProperty
|
||||
::xsd/anyURI))
|
||||
(sh/seq-spec ::xsd/anyURI)))
|
||||
|
||||
;http://www.w3.org/ns/activitystreams#bcc
|
||||
(s/def ::bcc
|
||||
(s/and ::owl/ObjectProperty
|
||||
(sh/seq-spec (s/and
|
||||
::Object
|
||||
::Link))
|
||||
::Link))))
|
||||
|
||||
;http://www.w3.org/ns/activitystreams#bto
|
||||
(s/def ::bto
|
||||
(s/and ::owl/ObjectProperty
|
||||
(sh/seq-spec (s/and
|
||||
::Object
|
||||
::Link))
|
||||
::Link))))
|
||||
|
||||
;http://www.w3.org/ns/activitystreams#cc
|
||||
(s/def ::cc
|
||||
(s/and ::owl/ObjectProperty
|
||||
(sh/seq-spec (s/and
|
||||
::Object
|
||||
::Link))
|
||||
::Link))))
|
||||
|
||||
;http://www.w3.org/ns/activitystreams#to
|
||||
(s/def ::to
|
||||
(s/and ::owl/ObjectProperty
|
||||
(sh/seq-spec (s/and
|
||||
::Object
|
||||
::Link))
|
||||
::Link))))
|
||||
|
||||
;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
|
||||
(s/or
|
||||
:single-value ::xsd/anyURI
|
||||
:coll-of-values (s/+ ::xsd/anyURI)))
|
||||
(sh/seq-spec ::xsd/anyURI))
|
||||
|
||||
;http://www.w3.org/ns/activitystreams#result
|
||||
(s/def ::result
|
||||
(s/and
|
||||
::owl/ObjectProperty
|
||||
(sh/seq-spec (s/and
|
||||
::Object
|
||||
::Link))
|
||||
::Link))))
|
||||
|
||||
;http://www.w3.org/ns/activitystreams#object
|
||||
(s/def ::object
|
||||
(s/and
|
||||
::owl/ObjectProperty
|
||||
::owl/Class
|
||||
(sh/seq-spec (s/and
|
||||
::Object
|
||||
::Link))
|
||||
::Link))))
|
||||
|
||||
;http://www.w3.org/ns/activitystreams#actor
|
||||
(s/def ::actor
|
||||
(s/and
|
||||
::owl/ObjectProperty
|
||||
::owl/Class
|
||||
(sh/seq-spec (s/and
|
||||
::Object
|
||||
::Link))
|
||||
::Link))))
|
||||
|
|
|
@ -13,6 +13,14 @@
|
|||
:no-map #(not (map? %))
|
||||
:map spec)))
|
||||
|
||||
(defn-spec seq-spec s/spec?
|
||||
"Spec that applies only for map values."
|
||||
[spec s/spec?]
|
||||
(s/and
|
||||
(s/or
|
||||
:single-value spec
|
||||
:coll-of-values (s/+ spec))))
|
||||
|
||||
(defn-spec
|
||||
is-functional-property? boolean?
|
||||
"Checks whether spec is a FunctionalProperty."
|
||||
|
|
Loading…
Reference in a new issue