org.apache.clerezza.rdf.core.sparql.query.impl
Class SimpleSelectQuery

java.lang.Object
  extended by org.apache.clerezza.rdf.core.sparql.query.impl.SimpleQuery
      extended by org.apache.clerezza.rdf.core.sparql.query.impl.SimpleQueryWithSolutionModifier
          extended by org.apache.clerezza.rdf.core.sparql.query.impl.SimpleSelectQuery
All Implemented Interfaces:
Query, QueryWithSolutionModifier, SelectQuery

public class SimpleSelectQuery
extends SimpleQueryWithSolutionModifier
implements SelectQuery

Author:
hasan

Constructor Summary
SimpleSelectQuery()
           
 
Method Summary
 void addSelection(Variable var)
           
 List<Variable> getSelection()
          Gets the list of Variables to project the solution to.
 boolean isDistinct()
          Tests if this query should return distinct results.
 boolean isReduced()
          Tests if this query should return reduced results.
 boolean isSelectAll()
          Tests if this query returns all its variables, and not a projected subset.
 void setDistinct()
           
 void setReduced()
           
 void setSelectAll()
           
 String toString()
           
 
Methods inherited from class org.apache.clerezza.rdf.core.sparql.query.impl.SimpleQueryWithSolutionModifier
addOrderCondition, getLimit, getOffset, getOrderConditions, setLimit, setOffset
 
Methods inherited from class org.apache.clerezza.rdf.core.sparql.query.impl.SimpleQuery
addDefaultGraph, addNamedGraph, getDataSet, getQueryPattern, setQueryPattern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.clerezza.rdf.core.sparql.query.QueryWithSolutionModifier
getLimit, getOffset, getOrderConditions
 
Methods inherited from interface org.apache.clerezza.rdf.core.sparql.query.Query
getDataSet, getQueryPattern
 

Constructor Detail

SimpleSelectQuery

public SimpleSelectQuery()
Method Detail

isDistinct

public boolean isDistinct()
Description copied from interface: SelectQuery

Tests if this query should return distinct results.

Specified by:
isDistinct in interface SelectQuery
Returns:
true if the query should return distinct results.
See Also:
SPARQL Query Language: 9.3.1 DISTINCT

isReduced

public boolean isReduced()
Description copied from interface: SelectQuery

Tests if this query should return reduced results.

Specified by:
isReduced in interface SelectQuery
Returns:
true if the query should return reduced results.
See Also:
SPARQL Query Language: 9.3.2 REDUCED

isSelectAll

public boolean isSelectAll()
Description copied from interface: SelectQuery

Tests if this query returns all its variables, and not a projected subset.

Specified by:
isSelectAll in interface SelectQuery
Returns:
true if the query should return all variables.
See Also:
SPARQL Query Language: 9 Solution Sequences and Modifiers, SPARQL Query Language: 9.2 Projection

getSelection

public List<Variable> getSelection()
Description copied from interface: SelectQuery

Gets the list of Variables to project the solution to. If SelectQuery.isSelectAll() returns true then this list contains all the variables from the query.

Specified by:
getSelection in interface SelectQuery
Returns:
A list of Variables to return from the query.
See Also:
SPARQL Query Language: 10.1 SELECT, SPARQL Query Language: 9.2 Projection

setDistinct

public void setDistinct()

setReduced

public void setReduced()

setSelectAll

public void setSelectAll()

addSelection

public void addSelection(Variable var)

toString

public String toString()
Specified by:
toString in interface Query
Specified by:
toString in class SimpleQuery
Returns:
A valid String representation of the query.


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.