com.bigdata.rdf.sparql.ast
Class QueryRoot

java.lang.Object
  extended by com.bigdata.bop.CoreBaseBOp
      extended by com.bigdata.bop.ModifiableBOpBase
          extended by com.bigdata.rdf.sparql.ast.ASTBase
              extended by com.bigdata.rdf.sparql.ast.QueryNodeBase
                  extended by com.bigdata.rdf.sparql.ast.QueryBase
                      extended by com.bigdata.rdf.sparql.ast.QueryRoot
All Implemented Interfaces:
BOp, IBindingProducerNode, IDataSetNode, IGraphPatternContainer, IPrefixDecls, IProjectionDecl, IQueryNode, IPropertySet, Serializable, Cloneable

public class QueryRoot
extends QueryBase
implements IPrefixDecls, IDataSetNode

The top-level Query.

See Also:
DatasetNode, IGroupNode, ProjectionNode, GroupByNode, HavingNode, OrderByNode, SliceNode, Serialized Form

Nested Class Summary
static interface QueryRoot.Annotations
           
 
Field Summary
 
Fields inherited from class com.bigdata.bop.CoreBaseBOp
DEFAULT_INITIAL_CAPACITY
 
Fields inherited from interface com.bigdata.bop.BOp
NOANNS, NOARGS
 
Constructor Summary
QueryRoot(BOp[] args, Map<String,Object> anns)
           
QueryRoot(QueryRoot queryRoot)
          Deep copy constructor.
QueryRoot(QueryType queryType)
           
 
Method Summary
 BindingsClause getBindingsClause()
          Return the BINDINGS.
 DatasetNode getDataset()
          Return the dataset.
 NamedSubqueriesNode getNamedSubqueries()
          Return the node for the named subqueries -or- null if there it does not exist.
 NamedSubqueriesNode getNamedSubqueriesNotNull()
          Return the node for the named subqueries.
 Map<String,String> getPrefixDecls()
          The namespace prefix declarations map.
 void setBindingsClause(BindingsClause bindings)
          Set the BINDINGS.
 void setDataset(DatasetNode dataset)
          Set the dataset.
 void setNamedSubqueries(NamedSubqueriesNode namedSubqueries)
          Set or clear the named subqueries node.
 void setParent(IGroupNode<?> parent)
          This is a root node.
 void setPrefixDecls(Map<String,String> prefixDecls)
          Set the namespace prefix declarations map.
 String toString(int indent)
          Pretty print with an indent.
 
Methods inherited from class com.bigdata.rdf.sparql.ast.QueryBase
getConstruct, getGraphPattern, getGroupBy, getHaving, getIncludeInferred, getOrderBy, getProjectedVars, getProjection, getQueryType, getSelectExprVars, getSlice, getTimeout, getWhereClause, hasSlice, hasWhereClause, setConstruct, setGraphPattern, setGroupBy, setHaving, setIncludeInferred, setOrderBy, setProjection, setQueryType, setSlice, setTimeout, setWhereClause
 
Methods inherited from class com.bigdata.rdf.sparql.ast.QueryNodeBase
toString
 
Methods inherited from class com.bigdata.rdf.sparql.ast.ASTBase
getQueryHint, getQueryHint, getQueryHintAsBoolean, getQueryHintAsBoolean, getQueryHints, replaceAllWith, setQueryHint, setQueryHints
 
Methods inherited from class com.bigdata.bop.ModifiableBOpBase
addArg, addArg, addArgIfAbsent, annotations, annotationsEqual, argIterator, args, arity, clearProperty, copyAll, get, getProperty, mutation, removeArg, replaceWith, setArg, setArgs, setId, setProperty, setUnboundProperty, toArray, toArray
 
Methods inherited from class com.bigdata.bop.CoreBaseBOp
annotationsEqual, annotationsToString, checkArgs, clone, equals, getEvaluationContext, getId, getProperty, getRequiredProperty, hashCode, indent, isController, toShortString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryRoot

public QueryRoot(QueryRoot queryRoot)
Deep copy constructor.

Parameters:
queryRoot -

QueryRoot

public QueryRoot(BOp[] args,
                 Map<String,Object> anns)

QueryRoot

public QueryRoot(QueryType queryType)
Method Detail

setParent

public void setParent(IGroupNode<?> parent)
This is a root node. It may not be attached as a child of another node.

Throws:
UnsupportedOperationException

getPrefixDecls

public Map<String,String> getPrefixDecls()
Description copied from interface: IPrefixDecls
The namespace prefix declarations map. This is a Map with String keys (prefix) and String values (the uri associated with that prefix).

Specified by:
getPrefixDecls in interface IPrefixDecls
Returns:
The namespace prefix declarations map. If this annotation was not set, then an empty map will be returned. The returned map is immutable to preserve the general contract for notification on mutation.

setPrefixDecls

public void setPrefixDecls(Map<String,String> prefixDecls)
Description copied from interface: IPrefixDecls
Set the namespace prefix declarations map. This is a Map with String keys (prefix) and String values (the uri associated with that prefix).

Specified by:
setPrefixDecls in interface IPrefixDecls

setDataset

public void setDataset(DatasetNode dataset)
Description copied from interface: IDataSetNode
Set the dataset.

Specified by:
setDataset in interface IDataSetNode

getDataset

public DatasetNode getDataset()
Description copied from interface: IDataSetNode
Return the dataset.

Specified by:
getDataset in interface IDataSetNode

getNamedSubqueries

public NamedSubqueriesNode getNamedSubqueries()
Return the node for the named subqueries -or- null if there it does not exist.

See Also:
getNamedSubqueriesNotNull()

getNamedSubqueriesNotNull

public NamedSubqueriesNode getNamedSubqueriesNotNull()
Return the node for the named subqueries. If the node does not exist then it is created, set on the QueryRoot and returned. This helps out with what is otherwise an awkward conditional construction pattern.


setNamedSubqueries

public void setNamedSubqueries(NamedSubqueriesNode namedSubqueries)
Set or clear the named subqueries node.

Parameters:
namedSubqueries - The named subqueries not (may be null).
See Also:
getNamedSubqueriesNotNull()

setBindingsClause

public void setBindingsClause(BindingsClause bindings)
Set the BINDINGS.

Parameters:
bindings -

getBindingsClause

public BindingsClause getBindingsClause()
Return the BINDINGS.


toString

public String toString(int indent)
Description copied from interface: IQueryNode
Pretty print with an indent.

Specified by:
toString in interface IQueryNode
Overrides:
toString in class QueryBase


Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.