com.bigdata.rdf.sparql.ast
Class ASTContainer

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.ASTContainer
All Implemented Interfaces:
BOp, IPropertySet, Serializable, Cloneable

public class ASTContainer
extends ASTBase

A super container for the AST.

Version:
$Id: ASTContainer.java 6160 2012-03-18 19:57:37Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form

Nested Class Summary
static interface ASTContainer.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
ASTContainer(ASTContainer op)
          Deep copy constructor.
ASTContainer(BOp[] args, Map<String,Object> annotations)
          Shallow copy constructor.
ASTContainer(QueryRoot queryRoot)
           
ASTContainer(UpdateRoot updateRoot)
           
 
Method Summary
 void clearOptimizedAST()
          Clears the optimized AST model (necessary when something on which it depends has been changed in the original AST model, for example, if you replace the DatasetNode).
 QueryRoot getOptimizedAST()
          Return the optimized AST model.
 QueryRoot getOriginalAST()
          Return the original AST model (before any optimization).
 UpdateRoot getOriginalUpdateAST()
          Return the original AST model (before any optimization).
 Object getParseTree()
          Return the parse tree generated from the query string.
 PipelineOp getQueryPlan()
          Return the physical query plan (pipeline bops).
 String getQueryString()
          Return the original query from which this AST model was generated.
 boolean isQuery()
          Return true iff this ASTContainer models a SPARQL QUERY operation.
 boolean isUpdate()
          Return true iff this ASTContainer models a SPARQL UPDATE operation.
 void setOptimizedAST(QueryRoot queryRoot)
          Set the optimized AST model.
 void setOriginalAST(QueryRoot queryRoot)
          Set the original AST model (before any optimizations).
 void setOriginalUpdateAST(UpdateRoot updateRoot)
          Set the original AST model (before any optimizations).
 void setParseTree(Object parseTree)
          Set the parse tree generated from the query string.
 void setQueryPlan(PipelineOp queryPlan)
          Set the physical plan for query or update (pipeline bops).
 void setQueryString(String queryString)
          Set the query string used to generate the AST model.
 String toString()
          Return a non-recursive representation of the arguments and annotations for this BOp.
 
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

ASTContainer

public ASTContainer(ASTContainer op)
Deep copy constructor.


ASTContainer

public ASTContainer(BOp[] args,
                    Map<String,Object> annotations)
Shallow copy constructor.


ASTContainer

public ASTContainer(QueryRoot queryRoot)

ASTContainer

public ASTContainer(UpdateRoot updateRoot)
Method Detail

getQueryString

public String getQueryString()
Return the original query from which this AST model was generated.


setQueryString

public void setQueryString(String queryString)
Set the query string used to generate the AST model.

Parameters:
queryString - The query string.

getParseTree

public Object getParseTree()
Return the parse tree generated from the query string.


setParseTree

public void setParseTree(Object parseTree)
Set the parse tree generated from the query string.

Parameters:
parseTree - The parse tree (may be null).

isUpdate

public boolean isUpdate()
Return true iff this ASTContainer models a SPARQL UPDATE operation.


isQuery

public boolean isQuery()
Return true iff this ASTContainer models a SPARQL QUERY operation.


getOriginalUpdateAST

public UpdateRoot getOriginalUpdateAST()
Return the original AST model (before any optimization).


setOriginalUpdateAST

public void setOriginalUpdateAST(UpdateRoot updateRoot)
Set the original AST model (before any optimizations).


getOriginalAST

public QueryRoot getOriginalAST()
Return the original AST model (before any optimization).


setOriginalAST

public void setOriginalAST(QueryRoot queryRoot)
Set the original AST model (before any optimizations).


getOptimizedAST

public QueryRoot getOptimizedAST()
Return the optimized AST model.


setOptimizedAST

public void setOptimizedAST(QueryRoot queryRoot)
Set the optimized AST model.

Note: You MUST deep copy the original AST to avoid destructive side effects when the IASTOptimizers are run.


clearOptimizedAST

public void clearOptimizedAST()
Clears the optimized AST model (necessary when something on which it depends has been changed in the original AST model, for example, if you replace the DatasetNode).


getQueryPlan

public PipelineOp getQueryPlan()
Return the physical query plan (pipeline bops).


setQueryPlan

public void setQueryPlan(PipelineOp queryPlan)
Set the physical plan for query or update (pipeline bops).


toString

public String toString()
Description copied from class: CoreBaseBOp
Return a non-recursive representation of the arguments and annotations for this BOp.

Specified by:
toString in interface BOp
Overrides:
toString in class CoreBaseBOp


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