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
1
vote
1 answer

Nested triples with units on value in rdflib - > turtle file

I'm currently making a turtle file. I have to relate values/units based on qudt.org Based on example data shown below: data = { "objectid_l1": "Bridge_1", "defid_l1": "Bridge", "objectid_l2": "Deck_1", …
Revnixcad
  • 61
  • 6
1
vote
2 answers

Converting Java HashMap to turtle triples

I am trying to construct :subject :${key} :${value} turtle triples in Java from a HashMap. I am currently doing this with a string builder iterating through the HashMap but this is not very elegant and is quite slow. Is there a better way to do…
cjrb
  • 104
  • 5
1
vote
1 answer

How do I update a turtle file using RDFLIB/SPARQL

I have a project where the goal is to add user input into a turtle file (Named Main_Triples) that contains data about countries. I am using python to create functions that takes parameters to insert using SPARQL. I have to use SPARQL. How do I write…
Maffe
  • 13
  • 3
1
vote
1 answer

Obtaining the rdf:type of the root node

I have the following data: @prefix ex: . @prefix rdf: . @prefix rdfs: . @prefix sch: . @prefix xml:…
James Hudson
  • 844
  • 6
  • 19
1
vote
1 answer

Implementing SHACL rule inference through expression in sh:object

Currently I am trying to infer a new property maps:mapstoclass based on the triples below. The idea is that I can use the inferred outcome (together with an rdf file containing alignment of data:classes) to determine the similarity between…
m2g2
  • 13
  • 2
1
vote
1 answer

Validating that every subject has a type of class

I have the following Data & Shape Graph. @prefix hr: . @prefix rdf: . @prefix rdfs: . @prefix xml:…
James Hudson
  • 844
  • 6
  • 19
1
vote
1 answer

Can a type chain be followed to test where it ends?

Let's say I have the following: @prefix hr: . @prefix rdf: . @prefix rdfs: . @prefix xml:…
James Hudson
  • 844
  • 6
  • 19
1
vote
0 answers

SPARQL Delete Query

I have been searching everywhere for a way to delete only duplicate triples, however, I haven't been successfully in finding solution. For example if I had the following triple store ex:Bob rdf:type dbo:Person. ex:Bob rdf:type dbo:Person. ex:Bob…
Alex
  • 21
  • 5
1
vote
1 answer

SPARQL query formation

I have RDF data and I want to form a SPARQL query to fetch records that match with a particular organism name. Just FYI, I used RDF4J to generate RDF records using JSONLD data available. I am having problem in fetching records that match any…
1
vote
1 answer

Semantic Web - Are Turtle and JSON-LD the same thing - a way to save RDF

I've just started looking at Semantic Web and there's one thing I'm a little uncertain of: Are Turtle, JSON-LD (and others like Trig) simply ways to write RDF in their own respective syntaxes? From what I understand once its in some RDF format, I…
userMod2
  • 8,312
  • 13
  • 63
  • 115
1
vote
0 answers

SPARQL: select sparql query to get data from a file

I need some help, I am new to SPARQL. I got stuck in this query I have to build, in which I have to get all musicians that have participed in a song with all 4 Beatles (excluding Uncredited as a possible answer). What I have donw until now, but I am…
user12532474
1
vote
1 answer

SPARQL: Using filter in query

I recently started using SPARQL and have an exercise to make a query that will allow me to get song titles that have a singer as their only vocalist? In this case being John Lennon the only singer. I have a beatles.ttl data file, so far I was able…
user12532474
1
vote
2 answers

Turtle-RDF ontology (OWL) - is base re-use possible?

Instead of having to copy the full IRI when defining the ontology in Turtle, is there a way to re-use the @base, : or my-base: instead? NOTE: @base provides a prefix for relative IRIs using <...>. So in the example below,
hoijui
  • 3,615
  • 2
  • 33
  • 41
1
vote
0 answers

Invalid characters and other problems in RDF knowledge graphs

I've been processing some older versions of some medium and large sized knowledge graphs in N-Triples and Turtle format, such as: a 2012 version of Freebase a 2015 version of Wikidata a 2017 version of LinkedBrainz etc They all seem to contain…
andrefs
  • 555
  • 4
  • 14
1
vote
2 answers

Load Ontology serialized in Turtle using OWL API

I am trying to load an ontology from a Jena model using OWL API, but most of the axioms are appearing as annotations. The ontology in Turtle is shown below. I use a Jena model to store it. NB: The ontology below is not correct, as mentioned in…
Noor
  • 19,638
  • 38
  • 136
  • 254