TriG without named graphs is Turtle, AFAIK.

And you can't have named graphs in Model since it only contains triples,
not quads.

If you want named graphs (but you're not using them right now), you should
look into Dataset:
https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/query/Dataset.html

On Sun, Jun 3, 2018 at 1:43 PM, agate.m...@gmail.com <agate.m...@gmail.com>
wrote:

> Hi,
>
> There is obviously an issue with the Model.write method for TriG format.
>
> Run the following to see that ttl is returned when Trig is
> requested...Formats names are based on https://jena.apache.org/
> documentation/io/
>
> package io.bdrc.ldspdi.test;
>
> import org.apache.jena.rdf.model.Model;
> import org.apache.jena.rdf.model.ModelFactory;
>
> public class WriteTrigTest {
>
>     public static void main(String[] args) {
>         Model mod=ModelFactory.createDefaultModel();
>         mod.read("http://purl.bdrc.io/resource/T00AG0281.ttl";);
>         System.out.println("***************** TURTLE
> **************************");
>         mod.write(System.out,"TURTLE");
>         System.out.println("***************** JSON
>  **************************");
>         mod.write(System.out,"RDF/JSON");
>         System.out.println("***************** TRIG
>  **************************");
>         mod.write(System.out,"TriG");
>     }
>
> }
>
> Marc
>

Reply via email to