Questions tagged [turtle-rdf]

Turtle is a textual syntax that allows RDF graphs to be written in a compact and natural text form, with abbreviations for common usage patterns and datatypes

About

Turtle (Terse RDF Triple Language) is a format for expressing data in the Resource Description Framework () data model with a syntax similar to . RDF, in turn, represents information using "triples", each of which consists of a subject, a predicate, and an object. Each of those items is expressed as a Web URI. Hence Turtle provides levels of compatibility with the existing and formats as well as the triple pattern syntax of .

Links

273 questions
14
votes
4 answers

How to parse .ttl files with RDFLib?

I have a file in .ttl form. It has 4 attributes/columns containing quadruples of the following form: (id, student_name, student_address, student_phoneno). (id, faculty_name, faculty_address, faculty_phoneno). I know how to parse .n3 form triples…
Keira Shaw
  • 261
  • 2
  • 4
  • 10
12
votes
2 answers

TTL file format - I have no idea what this is

I have a file which has a structure, but I don't know what format it is, nor how to parse it. The file extension is ttl, but I have never encountered this before. Some lines from the file looks like…
DaveTheAl
  • 1,995
  • 4
  • 35
  • 65
11
votes
2 answers

Meaning of square brackets "[]" when querying RDF with SPARQL?

I am pretty new to SPARQL and RDF and I was wondering what exactly does the below mean in SPARQL? [] vc:n ?vcard . The complete query is PREFIX vc: SELECT ?given ?family WHERE{ [] vc:n ?vcard . …
Nitish Mathur
  • 113
  • 1
  • 6
10
votes
1 answer

Is there a syntax to define cyclic reference between anonymous nodes in Turtle RDF?

I'm looking for a turtle syntax for calling the anonymous node who call an other anonymous node. For example, I want to reproduce this code : :Instance0 a Class0; :property0 :Instance1. :Instance1 a Class1; :property1…
Thibaut Guirimand
  • 851
  • 10
  • 33
8
votes
1 answer

Reading a Turtle/N3 RDF File with Python

I'm trying to encode some botanical data in Turtle format, and read this data from Python using RDFLib. However, I'm having trouble, and I'm not sure if it's because my Turtle is malformed or I'm misusing RDFLib. My test data is: @PREFIX rdf:…
Cerin
  • 60,957
  • 96
  • 316
  • 522
8
votes
1 answer

Turtle difference between @base and empty prefix

In RDF-Turtle, what is the difference between using a @base prefix and empty prefix (with just :)?
Daniel
  • 117
  • 4
8
votes
1 answer

How to define the type of elements in an rdf:Seq?

I want to create a property defining a rdf:Seq as a rdfs:range of an object : eg:myProperty a rdf:Property; rdfs:range rdf:Seq; . I'm looking for a way to define the type of the elements stored in the rdf:Seq. For example, I don't want this…
Thibaut Guirimand
  • 851
  • 10
  • 33
8
votes
2 answers

Jena read from turtle fails

I have just imported jena libraries to eclipse to work on rdf-s and it is my first try, but I cannot read a turtle (.ttl) file. I tried it in the following way: import java.io.*; import java.util.*; import com.hp.hpl.jena.rdf.model.*; public class…
kemenesendre
  • 165
  • 1
  • 1
  • 11
7
votes
1 answer

How to use Turtle sparql php

I'm trying to filter this database written in Turtle @prefix : . @prefix vcard: . @prefix cs: . :pt0001 vcard:category "Poste e…
pilettoturtle
  • 73
  • 1
  • 5
5
votes
1 answer

Namespace binding in RDFLib

In the following minimal test case: from rdflib import Graph, Namespace, Literal, RDF base = "http://test.com/ns" foobar = Namespace("http://test.com/ns#") g = Graph(base=base) g.bind('foobar', foobar) g.add((foobar.something, RDF.type,…
Balduin
  • 415
  • 4
  • 11
5
votes
1 answer

Reverse property path in Turtle RDF serialization?

In the Turtle serialization of an RDF graph, I have many triples like this (many individuals, all with a common value of type): :A a :b . :B a :b . :C a :b . :D a :b . # … :Z a :b . Is there any way to write this succinctly in Turtle? In SPARQL,…
Ania David
  • 1,168
  • 1
  • 15
  • 36
5
votes
1 answer

Creating triple for http://schema.org/workLocation

I am creating a Turtle file which would contain triples for a particular individual of type schema:Person. I am stuck in defining triples for the person's schema:workLocation. According to the documentation, the range of schema:workLocation…
Anubhav
  • 87
  • 3
5
votes
2 answers

in turtle or RDF can I add a predicate/object on all subjects that match a criteria?

I am doing some experiments with importing triples formulated in the turtle language within the openrdf-workbench webapp in Tomcat, which has incorporated a SPARQL endpoint. I wonder if with turtle, or, generally, in RDF / RDFS is it possible to add…
fstab
  • 4,801
  • 8
  • 34
  • 66
5
votes
2 answers

Iterate over RDF with Jena

I am working on a project for my studies right now and I need some help. Basically, I need to convert the following RDF to representations of a Java class. I read the RDF to a model and from there I am stuck. StringReader in = new…
5
votes
2 answers

Ensure that multiple subjects point to same list of blank nodes

Consider the following instance of SomeClass: instances:some_thing1 a semapi:SomeClass ; semapi:hasChainTo ( [ ... ] [ ... ] [ ... ] ) . I need every instance (some_thing2,…
parliament
  • 21,544
  • 38
  • 148
  • 238
1
2 3
18 19