You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by GitBox <gi...@apache.org> on 2020/09/20 10:12:12 UTC

[GitHub] [jena-site] afs opened a new pull request #22: Turtle writer options

afs opened a new pull request #22:
URL: https://github.com/apache/jena-site/pull/22


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jena-site] afs commented on pull request #22: Turtle writer options

Posted by GitBox <gi...@apache.org>.
afs commented on pull request #22:
URL: https://github.com/apache/jena-site/pull/22#issuecomment-736707750


   Applied locally from diff, edited to resolve the merge conflict.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jena-site] afs commented on pull request #22: Turtle writer options

Posted by GitBox <gi...@apache.org>.
afs commented on pull request #22:
URL: https://github.com/apache/jena-site/pull/22#issuecomment-705521367


   This is for 3.17.0 - I'll note when things need to wait for a release next time.
   
   https://issues.apache.org/jira/browse/JENA-1968


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jena-site] kinow commented on a change in pull request #22: Turtle writer options

Posted by GitBox <gi...@apache.org>.
kinow commented on a change in pull request #22:
URL: https://github.com/apache/jena-site/pull/22#discussion_r491678810



##########
File path: source/documentation/io/rdf-output.md
##########
@@ -240,7 +241,58 @@ but always writes one complete triple on one line (no use of `;`).
 | TURTLE_FLAT |
 | TRIG_FLAT   |
 
-### N-Triples and N-Quads
+### Turtle and Trig format options {#opt-turtle-trig}
+
+Some context settings affect the output of Turtle and TriG writers. Unless
+otherwise noted, the settign applies to both Turtle and TriG.
+
+| Context setting | Cmd line | Values |
+|-----------------|----------|--|
+| RIOT.symTurtleDirectiveStyle | "ttl:directiveStyle" | "sparql", "rdf11", "at", "n3" |
+| RIOT.symTurtleOmitBase       | "ttl:omitBase"       | "true", "false" |
+
+<p>&nbsp;</p>

Review comment:
       Ha, nice trick!

##########
File path: source/documentation/io/rdf-output.md
##########
@@ -240,7 +241,58 @@ but always writes one complete triple on one line (no use of `;`).
 | TURTLE_FLAT |
 | TRIG_FLAT   |
 
-### N-Triples and N-Quads
+### Turtle and Trig format options {#opt-turtle-trig}
+
+Some context settings affect the output of Turtle and TriG writers. Unless
+otherwise noted, the settign applies to both Turtle and TriG.

Review comment:
       s/the settign/the setting

##########
File path: source/documentation/io/rdf-output.md
##########
@@ -240,7 +241,58 @@ but always writes one complete triple on one line (no use of `;`).
 | TURTLE_FLAT |
 | TRIG_FLAT   |
 
-### N-Triples and N-Quads
+### Turtle and Trig format options {#opt-turtle-trig}
+
+Some context settings affect the output of Turtle and TriG writers. Unless
+otherwise noted, the settign applies to both Turtle and TriG.
+
+| Context setting | Cmd line | Values |
+|-----------------|----------|--|
+| RIOT.symTurtleDirectiveStyle | "ttl:directiveStyle" | "sparql", "rdf11", "at", "n3" |
+| RIOT.symTurtleOmitBase       | "ttl:omitBase"       | "true", "false" |
+
+<p>&nbsp;</p>
+
+| Directive Style | Effect |
+|------------------|-------|
+| "sparql", "rdf11"    | Use `PREFIX` and `BASE` in output.   |
+| "at", "n3"           | Use `@prefix` and `@base` in output. |
+| unset                | Use `@prefix` and `@base` in output. |
+
+<p>&nbsp;</b>
+
+#### Format Option Usage
+
+##### _Setting directive style_
+```
+    riot --set ttl:directiveStyle=sparql --pretty Turtle file1.rdf file2.nt ...
+```
+and in code:
+```
+  RDFWriter.create()
+     .set(RIOT.symTurtleDirectiveStyle, "sparql")
+     .lang(Lang.TTL)
+     .source(model)
+     .output(System.out);
+```
+##### _Base URI_
+
+Output can be written with relative URIs and no base. Note: such output is not
+portable; it's meaning depends on the base URI at the time of reading.

Review comment:
       s/it's/its




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jena-site] afs commented on pull request #22: Turtle writer options

Posted by GitBox <gi...@apache.org>.
afs commented on pull request #22:
URL: https://github.com/apache/jena-site/pull/22#issuecomment-705521367


   This is for 3.17.0 - I'll note when things need to wait for a release next time.
   
   https://issues.apache.org/jira/browse/JENA-1968


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jena-site] afs commented on a change in pull request #22: Turtle writer options

Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #22:
URL: https://github.com/apache/jena-site/pull/22#discussion_r491679653



##########
File path: source/documentation/io/rdf-output.md
##########
@@ -240,7 +241,58 @@ but always writes one complete triple on one line (no use of `;`).
 | TURTLE_FLAT |
 | TRIG_FLAT   |
 
-### N-Triples and N-Quads
+### Turtle and Trig format options {#opt-turtle-trig}
+
+Some context settings affect the output of Turtle and TriG writers. Unless
+otherwise noted, the settign applies to both Turtle and TriG.
+
+| Context setting | Cmd line | Values |
+|-----------------|----------|--|
+| RIOT.symTurtleDirectiveStyle | "ttl:directiveStyle" | "sparql", "rdf11", "at", "n3" |
+| RIOT.symTurtleOmitBase       | "ttl:omitBase"       | "true", "false" |
+
+<p>&nbsp;</p>

Review comment:
       Somewhat crude really! But to tweak the CSS, and then have it ripple out across the site is a somewhat bigger task.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jena-site] kinow commented on pull request #22: Turtle writer options

Posted by GitBox <gi...@apache.org>.
kinow commented on pull request #22:
URL: https://github.com/apache/jena-site/pull/22#issuecomment-705466786


   Are we waiting for a PR in Jena before merging this one @afs ?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jena-site] afs closed pull request #22: Turtle writer options

Posted by GitBox <gi...@apache.org>.
afs closed pull request #22:
URL: https://github.com/apache/jena-site/pull/22


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jena-site] afs commented on a change in pull request #22: Turtle writer options

Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #22:
URL: https://github.com/apache/jena-site/pull/22#discussion_r491679653



##########
File path: source/documentation/io/rdf-output.md
##########
@@ -240,7 +241,58 @@ but always writes one complete triple on one line (no use of `;`).
 | TURTLE_FLAT |
 | TRIG_FLAT   |
 
-### N-Triples and N-Quads
+### Turtle and Trig format options {#opt-turtle-trig}
+
+Some context settings affect the output of Turtle and TriG writers. Unless
+otherwise noted, the settign applies to both Turtle and TriG.
+
+| Context setting | Cmd line | Values |
+|-----------------|----------|--|
+| RIOT.symTurtleDirectiveStyle | "ttl:directiveStyle" | "sparql", "rdf11", "at", "n3" |
+| RIOT.symTurtleOmitBase       | "ttl:omitBase"       | "true", "false" |
+
+<p>&nbsp;</p>

Review comment:
       Somewhat crude really! But to tweak the CSS, and then have it ripple out across the site is a somewhat bigger task.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jena-site] kinow commented on a change in pull request #22: Turtle writer options

Posted by GitBox <gi...@apache.org>.
kinow commented on a change in pull request #22:
URL: https://github.com/apache/jena-site/pull/22#discussion_r491678810



##########
File path: source/documentation/io/rdf-output.md
##########
@@ -240,7 +241,58 @@ but always writes one complete triple on one line (no use of `;`).
 | TURTLE_FLAT |
 | TRIG_FLAT   |
 
-### N-Triples and N-Quads
+### Turtle and Trig format options {#opt-turtle-trig}
+
+Some context settings affect the output of Turtle and TriG writers. Unless
+otherwise noted, the settign applies to both Turtle and TriG.
+
+| Context setting | Cmd line | Values |
+|-----------------|----------|--|
+| RIOT.symTurtleDirectiveStyle | "ttl:directiveStyle" | "sparql", "rdf11", "at", "n3" |
+| RIOT.symTurtleOmitBase       | "ttl:omitBase"       | "true", "false" |
+
+<p>&nbsp;</p>

Review comment:
       Ha, nice trick!

##########
File path: source/documentation/io/rdf-output.md
##########
@@ -240,7 +241,58 @@ but always writes one complete triple on one line (no use of `;`).
 | TURTLE_FLAT |
 | TRIG_FLAT   |
 
-### N-Triples and N-Quads
+### Turtle and Trig format options {#opt-turtle-trig}
+
+Some context settings affect the output of Turtle and TriG writers. Unless
+otherwise noted, the settign applies to both Turtle and TriG.

Review comment:
       s/the settign/the setting

##########
File path: source/documentation/io/rdf-output.md
##########
@@ -240,7 +241,58 @@ but always writes one complete triple on one line (no use of `;`).
 | TURTLE_FLAT |
 | TRIG_FLAT   |
 
-### N-Triples and N-Quads
+### Turtle and Trig format options {#opt-turtle-trig}
+
+Some context settings affect the output of Turtle and TriG writers. Unless
+otherwise noted, the settign applies to both Turtle and TriG.
+
+| Context setting | Cmd line | Values |
+|-----------------|----------|--|
+| RIOT.symTurtleDirectiveStyle | "ttl:directiveStyle" | "sparql", "rdf11", "at", "n3" |
+| RIOT.symTurtleOmitBase       | "ttl:omitBase"       | "true", "false" |
+
+<p>&nbsp;</p>
+
+| Directive Style | Effect |
+|------------------|-------|
+| "sparql", "rdf11"    | Use `PREFIX` and `BASE` in output.   |
+| "at", "n3"           | Use `@prefix` and `@base` in output. |
+| unset                | Use `@prefix` and `@base` in output. |
+
+<p>&nbsp;</b>
+
+#### Format Option Usage
+
+##### _Setting directive style_
+```
+    riot --set ttl:directiveStyle=sparql --pretty Turtle file1.rdf file2.nt ...
+```
+and in code:
+```
+  RDFWriter.create()
+     .set(RIOT.symTurtleDirectiveStyle, "sparql")
+     .lang(Lang.TTL)
+     .source(model)
+     .output(System.out);
+```
+##### _Base URI_
+
+Output can be written with relative URIs and no base. Note: such output is not
+portable; it's meaning depends on the base URI at the time of reading.

Review comment:
       s/it's/its




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [jena-site] kinow commented on pull request #22: Turtle writer options

Posted by GitBox <gi...@apache.org>.
kinow commented on pull request #22:
URL: https://github.com/apache/jena-site/pull/22#issuecomment-705466786


   Are we waiting for a PR in Jena before merging this one @afs ?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org