protected override HashSet <model.rdf.Triple> GetTriplesForQuery(string query) { var result = new HashSet <model.rdf.Triple>(); var graphQueryResult = _repository.ExecuteQuery(query) as IGraph; foreach (var triple in graphQueryResult.Triples) { result.Add(_rdf4jMapper.StatementToTriple(triple)); } return(result); }
protected override HashSet <model.rdf.Triple> GetTriplesForQuery(string query) { var result = new HashSet <model.rdf.Triple>(); var parser = new SparqlQueryParser(); SparqlQuery tupleQuery = parser.ParseFromString(query); var processor = new LeviathanQueryProcessor(_repository); var graphQueryResult = processor.ProcessQuery(tupleQuery) as IGraph; foreach (var triple in graphQueryResult.Triples) { result.Add(_rdf4jMapper.StatementToTriple(triple)); } return(result); }