org.qi4j.index.rdf.query
Class NamedSparqlDescriptor

java.lang.Object
  extended by org.qi4j.index.rdf.query.NamedSparqlDescriptor
All Implemented Interfaces:
Serializable, NamedQueryDescriptor

public class NamedSparqlDescriptor
extends Object
implements NamedQueryDescriptor, Serializable

See Also:
Serialized Form

Constructor Summary
NamedSparqlDescriptor(String name, String query)
           
 
Method Summary
 String compose(Map<String,Object> variables, OrderBy[] orderBySegments, Integer firstResult, Integer maxResults)
          Creates a valid Query string.
 String language()
          Returns the name of the query language.
 String name()
          Returns the name of the query.
 List<String> variableNames()
          Returns a list of variable names allowed in the query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedSparqlDescriptor

public NamedSparqlDescriptor(String name,
                             String query)
Method Detail

name

public String name()
Description copied from interface: NamedQueryDescriptor
Returns the name of the query.

Specified by:
name in interface NamedQueryDescriptor
Returns:
the name of the query as it is declared.

compose

public String compose(Map<String,Object> variables,
                      OrderBy[] orderBySegments,
                      Integer firstResult,
                      Integer maxResults)
Description copied from interface: NamedQueryDescriptor
Creates a valid Query string.

Specified by:
compose in interface NamedQueryDescriptor
Parameters:
variables - The variables used, and their values.
orderBySegments - The list of OrderBy instrctions.
firstResult - The offset into the resultset.
maxResults - The maximum number of results to be returned.
Returns:
A valid query in the language given.

language

public String language()
Description copied from interface: NamedQueryDescriptor
Returns the name of the query language.

Specified by:
language in interface NamedQueryDescriptor
Returns:
The formal name of the query language.

variableNames

public List<String> variableNames()
Description copied from interface: NamedQueryDescriptor
Returns a list of variable names allowed in the query.

Specified by:
variableNames in interface NamedQueryDescriptor
Returns:
a list of variable names allowed in the query.