If I have RDF Triples say that they are held in Redis as Hash Key where each triple is represented as Key : S:Value P:Value O:Value.
How to pass collection of such triples to the DOTNETRDF and represent them as graph so that I can run SPARQL Queries on them ?
I do understand that SPARQL Engine in DOTNETRDF can operate on stores only , but if I create a class that implement IGraph Interface , then its possible to run the SPARQL Queries on the triples
You can put any
IGraphimplementation in the standardTripleStoreinstance so implementingIGraphis sufficient to get you started. It is generally easiest to extend fromBaseGraphif you aren't already as that will give you a lot of implementation for free.So yes you can run queries on an arbitrary
IGraphimplementation:However if you want to integrate more deeply then you need to look at implementing the
ISparqlDatasetinterface which is the actual interface used internally by the query engine (IGraphandITripleStoreend up wrapped inside this). Again there are base implementations likeBaseDatasetandBaseQuadDatasetwhich will give you chunks of the implementation.You may want to look at the open source BrightstarDB for an existing example of another triple store that uses dotNetRDF's SPARQL engine