activity-pub-poc/doc/Translate_ttl_to_spec.md

44 lines
1.1 KiB
Markdown
Raw Normal View History

2023-07-18 07:18:40 +00:00
# receipts to transform ttl to spec
## *it* **a** *something*
*it* is **a** *something*
Example:
```ttl
as:id a owl:DatatypeProperty ,
owl:FunctionalProperty,
```
Maps to
```clojure
(s/def ::DatatypeProperty any?)
(s/def ::FunctionalProperty any?)
(s/def ::id
(s/and
::DeprecatedProperty
::FunctionalProperty))
2023-07-21 14:14:10 +00:00
```
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)