Reputation: 145
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:
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":
Can I create empty nodes in Refine to hold the place of resources, such as Document Type? Thanks!
Upvotes: 1
Views: 401
Reputation: 674
This is assigned in the dialog for the mapping. See "The cell's content is used ..." and then choose "as a URI".
(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