Creating Virtual Graph using Stardog API

Hi Team,

I understand Automatic RDBMS Mappings is a newly introduced functionality. I would like to know if Stardog has a way to implement the same programatically, using stardog API, yet.
I found this article in the blogs:
But as per my understanding this also requires a N3 file. Is there any other similar article on the same which might be helpful?
Any leads would be much appreciated.

Thank you!

I'm not sure exactly what you're looking to do but I think a good start would be looking at VirtualGraphAdminConnection

The example uses N3 but you can use any serialization that Stardog understands which is most of the ones available. N3, turtle, rdf/xml, etc

The Stardog examples github repo is also a great place to look and you can always ask questions here.

Thank you for the quick response.
I am using the same VirtualGraphAdminConnection to create Virtual graph. But what should I pass as third parameter if I dont have any mappings file(.tll).
I understand that we can do it through command line by using command:
stardog-admin virtual add
as mentioned in :
I tried passing null as mappings, but I am facing NullPointerException in that case. Shall I pass an empty file or anything else in that case?

Thank you!

Hi Smrati,

You can do this by passing an empty Model instance which has no statements.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.