de.fuberlin.wiwiss.ng4j.triql
Class QueryExecutionService

java.lang.Object
  extended by de.fuberlin.wiwiss.ng4j.triql.QueryExecutionService

public class QueryExecutionService
extends Object

Executes a TriQL query and returns results. This class is used by TriQLQuery.getResults() and is usually not used explicitly.

The class implements the TriQL query algorithm. It's a na•ve implementation. The first triple pattern is matched against the proper graph(s), then for every match, a recursive call matches the second pattern, etc. Finally, the constraint clauses are evaluated. For this part, the RDQL implementation is used.

TODO: Refactor containsNonMatchingDuplicates(); it should check for duplicate variables in a single graph pattern before the query executes, and do the runtime checks only if any were found

Author:
Richard Cyganiak (richard@cyganiak.de)

Constructor Summary
QueryExecutionService(TriQLQuery query)
          Constructs a new QueryExecutionService from a TriQL query.
 
Method Summary
 List execute()
          Executes the query and returns a list of results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryExecutionService

public QueryExecutionService(TriQLQuery query)
Constructs a new QueryExecutionService from a TriQL query.

Parameters:
query - a TriQL query object
Method Detail

execute

public List execute()
Executes the query and returns a list of results.

Returns:
a list of maps from variable names to result Nodes