Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templatizing RDF import #58

Open
sanjar opened this issue Apr 22, 2019 · 1 comment
Open

Templatizing RDF import #58

sanjar opened this issue Apr 22, 2019 · 1 comment

Comments

@sanjar
Copy link

sanjar commented Apr 22, 2019

I am able to use RDF Import feature easily. As, This import feature by default creates a Wiki page for each Subject defined in RDF. Now want these imported wiki page to be created on my Template page so that other stuffs can be embedded.
I referred 'https://jbiomedsem.biomedcentral.com/track/pdf/10.1186/s13326-017-0136-y' for understanding details of RDFIO which says:

Optionally, the facts can be converted into a MediaWiki template call, if there is a template available that will write the corresponding fact, by the use of its parameter values.

But I couldn't get the proper way to do it.
If you can please guide me in achieving this it would be helpful to me.

Thanks

@samuell
Copy link
Member

samuell commented Apr 24, 2019

Hi @sanjar and thanks for your question!

Sorry for the lack of documentation of this issue. I actually had to fire up the Virtual machine to check this for myself.

It seems (to my surprise and worry) that this actually only works for updating pages that are already tagged with a template, not currently for creating new pages.

So what works for me is to create the following pages with the corresponding content:

India

{{Country}}

Property:Has capital

[[Equivalent URI::http://example.org/hasCapital]]

Template:Country

[[Has capital::{{{capital}}}]]

... and then importing the following turtle content:

"India" <http://ex.org/hasCapital> "New Delhi" .

Then, in the page "India", I see the following content:

{{Country|capital=New Delhi
}}
[[Equivalent URI::India]]

... where the first two lines show that the "Country" template call has been updated with the parameter "capital", which is then setting the "Has capital" property via the Country template.

So, unfortunately, I realize that this does not work unless the "India" article is not already created and tagged with the "Country" template.

This is a bug. Not sure when I will be able to work on it though, due to way too little time.

Contributions welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants