- From: Andy Seaborne <andy@apache.org>
- Date: Mon, 1 Jan 2024 16:32:57 +0000
- To: RDF-star Working Group <public-rdf-star-wg@w3.org>
This is an update of the consolidated triple/edges proposal. In this revision the RDF abstract data model has "NAMED occurrences" as an RDF term. A NAMED occurrences is a pair of (name, triple) Multiple edges with the same label are handled as multiple occurrences - the predicate URI of the RDF triple is thought as a conceptual relationship - with multiple sets of annotations. This preserves the uniqueness of triples in a graph, and allows independent collections of assertions about a relationship. Such collections of assertions do not get entangled on merge. There are named occurrences in the data model (RDF-Concepts - section 3.1 : editors draft [1]). [1] https://w3c.github.io/rdf-concepts/spec/#section-triples (as of 2023-12-10) ## Semantics https://github.com/w3c/rdf-star-wg/wiki/Semantics:-Andy's-proposal ## Turtle A named occurrence is written in Turtle as << occurrenceName | :s :p :o >> This names an occurrence of the triple s p o. The triple is not asserted, keeping "assertion" and "occurrence" as orthogonal concepts even if they might commonly be used together. occurrenceName is a URI or blank node, including [] (the ANON terminal rule 47 in Turtle - no triples inside the []). The occurrence name can be repeated with it being the same named occurrence term: It can be used with a predicateObjectList (rule [14] in RDF 1.1 Turtle) << _:a | :s :p :o >> :starts 1999 ; :finishes 2000 . or repeated (it's the same RDF term) << _:a | :s :p :o >> :starts 1999 . << _:a | :s :p :o >> :finishes 2000 . The name can be omitted - a blank node is generated by the parser. << :s :p :o >> :q 123 . << :s :p :o >> :starts 1983 ; :finishes 1985 . ## N-Triples In N-Triples, reflecting the RDF abstract data model, there is a new syntax form for a named occurrence term: << _:a | :s :p :o >> :q 123 . In N-triples, the name is required. There are no shorthand forms. ## RDF Graph Merge Graph merge happens as before - blank nodes need to be kept apart. ## Annotation Annotation syntax is Turtle/TriG syntax that both asserts a triple, and uses an occurrence of that triple. :liz :spouse :dick {| id:1 | :start 1964; :end 1974 |} . :liz :spouse :dick {| id:2 | :start 1975; :end 1976 |} . which would generate to 6 triples and there are 5 unique triples - the RDF graph does not have a duplicate asserted triple. :liz :spouse :dick . << id:1 | :liz :spouse :dick >> ; :start 1964; :end 1974 . << id:2 | :liz :spouse :dick >> ; :start 1975; :end 1976 . Andy
Received on Monday, 1 January 2024 16:33:06 UTC