You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2022/01/12 11:39:52 UTC

[jena-site] branch rdf-star created (now d9148fa)

This is an automated email from the ASF dual-hosted git repository.

andy pushed a change to branch rdf-star
in repository https://gitbox.apache.org/repos/asf/jena-site.git.


      at d9148fa  Update RDF-star terminology

This branch includes the following new commits:

     new d9148fa  Update RDF-star terminology

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[jena-site] 01/01: Update RDF-star terminology

Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

andy pushed a commit to branch rdf-star
in repository https://gitbox.apache.org/repos/asf/jena-site.git

commit d9148fa75038b95edcb87cb36d1e8ae6cbff8dc8
Author: Andy Seaborne <an...@apache.org>
AuthorDate: Wed Jan 12 11:39:44 2022 +0000

    Update RDF-star terminology
---
 source/documentation/rdf-star/__index.md | 44 +++++++++++++++++++-------------
 1 file changed, 26 insertions(+), 18 deletions(-)

diff --git a/source/documentation/rdf-star/__index.md b/source/documentation/rdf-star/__index.md
index b61bc39..616a65a 100644
--- a/source/documentation/rdf-star/__index.md
+++ b/source/documentation/rdf-star/__index.md
@@ -17,7 +17,7 @@ Example:
 << :john foaf:name "John Smith" >> dct:source <http://example/directory> .
 ```
 
-The part `<< :john foaf:name "John Smith" >>` is an embedded triple and refers to the triple with subject `:john`, property `foaf:name` and object `"John Smith"`.
+The part `<< :john foaf:name "John Smith" >>` is a quoted triple and refers to the triple with subject `:john`, property `foaf:name` and object `"John Smith"`.
 
 Triple terms can be in the subject or object position.
 
@@ -25,9 +25,10 @@ Jena provides support for RDF-star and the related SPARQL-star.
 
 * Turtle, N-Triples, TriG and N-Quads extended for Triple Terms syntax,
   input and output.  There is no output in RDF/XML.
-* SPARQL extended with Triple Term syntax for graph matching
-* SPARQL Result formats for JSON and XML extended to support Triple Terms in results.
+* SPARQL extended with Triple Term syntax for graph matching.
+* SPARQL Result formats for JSON and XML extended to support quoted triples in results.
 * Support in the Model API.
+* Translation to and from RDF reification.
 
 All this is active by default in Fuseki.
 
@@ -38,13 +39,13 @@ as well as in-memory databases is supported.
 
 ## RDF-star
 
-RDF-star syntax for embedded triples is added to the parsers for Turtle, N-Triples, TriG and N-Quads.
+RDF-star syntax for quoted triples is added to the parsers for Turtle, N-Triples, TriG and N-Quads.
 
-Datasets may have graphs that have embedded triples that refer to triples anywhere, not just in the same graph.
+Datasets may have graphs that have quoted triples that refer to triples anywhere, not just in the same graph.
 
 ## SPARQL-star
 
-Matches for embedded triples:
+Matches for quoted triples:
 
 ```sparql
 SELECT ?name { <<:john foaf:name ?name >> dct:source <http://example/directory> }
@@ -75,25 +76,24 @@ SELECT (<< ?s ?p ?o>> AS ?t) {
 }
 ```
 
-### SPARQL Functions related to embedded triples
+### SPARQL Functions related to quoted triples
 
-These functions cause an expression error if passed the wrong type of arguments. `afn:`
-is a prefix for `<http://jena.apache.org/ARQ/function#>`.
+These functions cause an expression error if passed the wrong type of arguments.
 
 | Function             | Description |
 |----------------------|------------------------ |
-| `TRIPLE(?s, ?p, ?o)` | Create an embedded triple from s/p/o                    |
-| `isTRIPLE(?t)`       | Return true if the argument value is an embedded triple |
-| `SUBJECT(?t)`        | Return the subject of the embedded triple               |
-| `PREDICATE(?t)`      | Return the predicate (property) of the embedded triple  |
-| `OBJECT(?t)`         | Return the object of the embedded triple                |
+| `TRIPLE(?s, ?p, ?o)` | Create a quoted triple from s/p/o                    |
+| `isTRIPLE(?t)`       | Return true if the argument value is a quoted triple |
+| `SUBJECT(?t)`        | Return the subject of the quoted triple               |
+| `PREDICATE(?t)`      | Return the predicate (property) of the quoted triple  |
+| `OBJECT(?t)`         | Return the object of the quoted triple                |
 
 ### SPARQL results
 
 The syntaxes for SPARQL results from a SELECT query, `application/sparql-results+json`,
-`application/sparql-results+xml` are extended to include embedded triples:
+`application/sparql-results+xml` are extended to include quoted triples:
 
-The embedded triple `<< _:b0 <http://example/p> 123  >>` is encoded, in
+The quoted triple `<< _:b0 <http://example/p> 123  >>` is encoded, in
 `application/sparql-results+json` as:
 
 ```json
@@ -124,13 +124,21 @@ and similarly in `application/sparql-results+xml`:
 
 ## Model API
 
-RDF-star embedded triples are treated as `Resource` to preserve the typed Model API.
+RDF-star quoted triples are treated as `Resource` to preserve the typed Model API.
 They occur in the subject and object positions.
 
-A `Resource` contains a `Statement` object if the underlying RDF term is an RDF-star embedded triple.
+A `Resource` contains a `Statement` object if the underlying RDF term is an RDF-star quoted triple.
 
 New methods include:
 
 * `Statement  Resource.getStatement()`
 * `Resource  Model.createResource(Statement)`
 * `Resource  ResourceFactory.createStatement`
+
+## Reification
+
+`org.apache.jena.system.RDFStar` provides functions to translate RDF-star into
+RDF reificiation, and translate it back again to RDF-star.
+
+Translating back to RDF-star relies on the consistency constraint that there is
+only one reification for each unique quoted triple term.