Hi Steve, you should definitely use the Graph interface instead of the Model interface (as the RDF tutorial page you refer to also mentions), because for read-only access you only have to implement the Graph.find(...) and Graph.contains(...) methods of the Graph interface.
If your implementation of the Graph interface is called MyGraph, then you can turn your graph into a Dataset using the following code: Graph g = new MyGraph(...); Model m = ModelFactory.createModelForGraph(g); Hope this helps a bit. Best regards, Barry -----Original Message----- From: Steve Vestal <[email protected]> Sent: maandag 12 oktober 2020 17:31 To: [email protected] Subject: How to wrap external data source as an OntModel? I would like to make an external non-RDF data source visible as an OntModel (read-only for me). The page https://jena.apache.org/documentation/rdf/ mentions doing such things, but I haven't found anything more specific about how to do it. The RDF tutorial mentions that the Model method model.listStatements(Selector s) is the root query method, but I have the impression the proper way is to create an OntModel (no reasoner needed for me) that has my own custom implementation for the Graph interface. A little time spent searching the Jena API didn't turn up an obvious way to do this. Can someone give me a get-started pointer or two? This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.
