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
3
votes
0 answers

How can I link a literal value with another one in rdf graph?

I know that in RDF subjects can't be literals. However, let's say that I have a few properties and classes (in turtle syntax) already defined like this: foaf:Organization a owl:Class . ex:Employee a owl:Class . foaf:Project a owl:Class…
Plutone11011
  • 127
  • 3
  • 10
3
votes
2 answers

Can a .ttl Turtle file have two empty prefixes?

It it possible to have a Turtle file with two empty prefixes? Imagine that we have a .ttl file with this prefixes declaration: @prefix : . @prefix ex2: . @prefix ex3:…
tremendows
  • 4,262
  • 3
  • 34
  • 51
3
votes
3 answers

How do I add a start and end time to a RDF triple?

Supposing we have the following triple in Turtle syntax: . How do I add a start and end time? For example if I want to say he started at 10 am and finished his 10miles…
user3352632
  • 617
  • 6
  • 18
3
votes
1 answer

Import RDF: are referenced blank nodes gonna be merged or handled separately?

When importing RDF into a triple store: Are referenced blank nodes (as object) gonna be merged or handled separately, as if they are distinct? Example RDF to import into a triple store: @prefix ex: . ex:foo ex:bar [ ex:baz 42 ], [ …
k00ni
  • 315
  • 4
  • 17
3
votes
1 answer

Wikidata on local Blazegraph : Expected an RDF value here, found '' [line 1]

We (Thomas and Wolfgang) have installed locally wikidata and blazegraph following the instruction here : https://github.com/wikimedia/wikidata-query-rdf/blob/master/docs/getting-started.md The mvn package command was successful [INFO]…
3
votes
1 answer

Rdflib.js, how to serialize the data into turtle (.ttl) format?

How can I serialize RDF in turtle using rdflib.js? There's not much documentation. I can use: Serializer.statementsToN3(destination); to serialize into the N3 format, but not much besides that. I've tried altering the aforementioned command to…
Fox
  • 61
  • 6
3
votes
0 answers

How to tell that two variables have different values in SPARQL

I'm studying SPARQL and I have a doubt about queries. Suppose I have a simple ontology like the following :Jack a :Worker ; :worksAt :Project1,:Project2 :Bob a :Worker ; :worksAt :Project2,:Project3 :Mike a :Worker ; :worksAt…
Stefano Kira
  • 175
  • 2
  • 3
  • 16
3
votes
1 answer

Reduce string length of query sparql with fuseki

When I start a Fuseki server, I use this command : fuseki-server --config=config-orphadata.ttl In this ttl file, I can writte some prefix rules : @prefix orphanet: . @prefix ORDO:…
Matthieu
  • 221
  • 1
  • 11
3
votes
1 answer

Fuseki 1.0.1 SPARQL Update returns 404

I'm trying to learn to update data in Fuseki, but when I try I get a 404 error. I am clearly not doing something right. Perhaps it is my INSERT command? I've tried a ton of them though. I am using the web based SPARQL interface at /sparql.tpl.…
MeowCode
  • 1,053
  • 2
  • 12
  • 29
2
votes
2 answers

How to impose the uniqueness of data property values via SHACL

I cannot figure out how to impose the uniqueness of a data property value via SHACL. The following excerpts are lite versions of the examples presented by Henriette Harmse in her personal blog. Suppose we have the following data: @prefix ex:…
Stratos K
  • 341
  • 2
  • 14
2
votes
1 answer

Fetching triples using SPARQL query from turtle file

I am new to SPARQL and currently struglling to fetch triples from a turtle file. ### https://ontology/1001 rdf:type owl:Class ; rdfs:subClassOf ; …
rshar
  • 1,381
  • 10
  • 28
2
votes
2 answers

How to add external variables to a SPARQL query?

I have the following codes: name = [str(s) for s, in graph.query(''' SELECT ?lbl WHERE { ?obj . ?obj rdfs:label ?lbl . } …
2
votes
1 answer

Read Turtle file and query the graph using SPARQL

I am in a learning phase of SPARQL so excuse if the question sounds basic. I am exploring SPARQLWrapper to connect to a SPARQL endpoint to fetch some data. Below is the query. sparql = SPARQLWrapper("http://patho.phenomebrowser.net/sparql/")…
rshar
  • 1,381
  • 10
  • 28
2
votes
0 answers

Verify rdf:Container(rdf:Seq) using shacl constraints

I am currently trying to build a constraint validation shape for an incoming object of the type rdf:Seq. The shacl shapes I have used, use the path to identify triple and then add additional constraint validations on datatype, length and count. But,…
Shri
  • 51
  • 4
2
votes
1 answer

How to configure RDFWriter to explicit write data type in literals?

I'm saving a TTL file using RDFWriter. How can I explicitly save literals with their data type? For example, I want "5.36289"^^xsd:float but I get 5.36289E0 instead. I had the same problem with strings, but I found the…
1 2
3
18 19