What is the turtle file syntax for named graph?

(Taher Uddin) #1

I am trying to load ttl file with named graph. Tried with some intuitive changes but nothing worked. Stardog-studio fails to load data. For example this below-

@graph <https://pet.dudeson.org/vat/xxxx-0001-zzzz> {
  <https://pet.dudeson.org/image/xxxx-0001-zzzz>  rdf:type tcf:ObjectUpdate ;
    tcf:ObjectRef <https://pet.dudeson.org/png-00> .
}

Also tried with removing "@graph", but no good. Does anyone know what is the syntax for named graph in turtle file for stardog?

(Jess Balint) #2

You will need to use the TriG syntax, check here: https://www.w3.org/TR/trig/#sec-graph-statements

(Taher Uddin) #3

Already tried, did not work.

(stephen) #4

Until full TriG support comes to Studio, you can insert data into a named graph by formatting as a SPARQL Update query and simply running it in Studio:

INSERT DATA {
    GRAPH <https://pet.dudeson.org/vat/xxxx-0001-zzzz> {
    <https://pet.dudeson.org/image/xxxx-0001-zzzz>  rdf:type tcf:ObjectUpdate ;
        tcf:ObjectRef <https://pet.dudeson.org/png-00> .
    }
}