TriG (syntax)

Filename extension .trig
Internet media type application/trig
Developed by Freie Universit├Ąt Berlin
Type of format semantic web
Container for RDF data
Extended from Turtle
Extended to TriG
Standard W3C Recommendation

TriG is a serialization format for RDF (Resource Description Framework) graphs. It is a plain text format for serializing named graphs and RDF Datasets which offers a compact and readable alternative to the XML-based TriX syntax.


This example encodes three interlinked named graphs:

 @prefix rdf: <> .
 @prefix xsd: <> .
 @prefix swp: <> .
 @prefix dc: <> .
 @prefix ex: <> .
 @prefix : <> .
 :G1 { :Monica ex:name "Monica Murphy" .      
       :Monica ex:homepage <> .
       :Monica ex:email <> .
       :Monica ex:hasSkill ex:Management }
 :G2 { :Monica rdf:type ex:Person .
       :Monica ex:hasSkill ex:Programming }
 :G3 { :G1 swp:assertedBy _:w1 .
       _:w1 swp:authority :Chris .
       _:w1 dc:date "2003-10-02"^^xsd:date .   
       :G2 swp:quotedBy _:w2 .
       :G3 swp:assertedBy _:w2 .
       _:w2 dc:date "2003-09-03"^^xsd:date .
       _:w2 swp:authority :Chris .
       :Chris rdf:type ex:Person .
       :Chris ex:email <> }

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.