Definition

A graph is a set of RDF triples. A Callimachus graph document is an RDF document encoded as a Turtle file.

Purpose

Graph documents are used to add RDF data to the Callimachus RDF database.

Creating a graph document

To create a graph document, select Graph document using the create menu from the folder you wish to store the graph document in. You will be presented with the following initial Turtle code:

@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rif: <http://www.w3.org/2007/rif#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix skosxl: <http://www.w3.org/2008/05/skos-xl#> .
@prefix cc: <http://creativecommons.org/ns#> .
@prefix wdr: <http://www.w3.org/2007/05/powder#> .
@prefix void: <http://rdfs.org/ns/void#> .
@prefix msg: <http://www.openrdf.org/rdf/2011/messaging#> .
@prefix calli: <http://callimachusproject.org/rdf/2009/framework#> .
@prefix : <#> .

Sample Turtle file

Here is a sample turtle file:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix ex: <http://example.org/stuff/1.0/> .

<http://www.w3.org/TR/rdf-syntax-grammar>
  dc:title "RDF/XML Syntax Specification (Revised)" ;
  ex:editor [
    ex:fullname "Dave Beckett";
    ex:homePage <http://purl.org/net/dajobe/>
  ] .

Turtle syntax

Angle brackets are used to identify relative URLs, while colons outside of angle brackets identify a compact URI or a CURIE. The prefix before the colon is mapped to a namespace at the top and prepended to the remaining part after the colon. A comma separates multiple objects; a semicolon separates multiple relationships to to same subject; and a period marks the end of a subject.

For more information about the Turtle syntax see Turtle syntax for RDF.