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
IGraph
implementation in the standardTripleStore
instance so implementingIGraph
is sufficient to get you started. It is generally easiest to extend fromBaseGraph
if you aren't already as that will give you a lot of implementation for free.So yes you can run queries on an arbitrary
IGraph
implementation:However if you want to integrate more deeply then you need to look at implementing the
ISparqlDataset
interface which is the actual interface used internally by the query engine (IGraph
andITripleStore
end up wrapped inside this). Again there are base implementations likeBaseDataset
andBaseQuadDataset
which 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