Sara Lafia
Sara Lafia

Reputation: 145

Refine with RDF extension: literals or resources?

I am using Refine with RDF Extension to produce triples from a CSV. I have imported two vocabularies and am now using them to describe the columns: RDF Schema Alignment

How can I change the nodes to describe resources rather than literals? For example, when I preview the Turtle representation, the triples map to literals, such as geolink:hasDocumentType "datasets": RDF preview Turtle

Can I create empty nodes in Refine to hold the place of resources, such as Document Type? Thanks!

Upvotes: 1

Views: 401

Answers (1)

Adrian Gschwend
Adrian Gschwend

Reputation: 674

This is assigned in the dialog for the mapping. See "The cell's content is used ..." and then choose "as a URI".

enter image description here

(sorry for the broken dialog rendering)

Then you choose "Use custom expression" where you can make up your own URI scheme. In this example I simply add the value of the cell to a fix URI pattern:

"http://classifications.data.admin.ch/municipality/"+value

In the preview you can directly see if this is what you need.

If I need to do more complex things I usually create simple key-value like RDF, so technically not really a graph yet. Then I write a bunch of SPARQL CONSTRUCT queries to clean up the data and transform it into a "real" graph. I found that for many things easier and faster. You can see some examples on Github

Upvotes: 2

Related Questions