com.bigdata.rdf.sparql.ast
Class ASTBase

java.lang.Object
  extended by com.bigdata.bop.CoreBaseBOp
      extended by com.bigdata.bop.ModifiableBOpBase
          extended by com.bigdata.rdf.sparql.ast.ASTBase
All Implemented Interfaces:
BOp, IPropertySet, Serializable, Cloneable
Direct Known Subclasses:
ASTContainer, BindingsClause, OrderByExpr, QueryNodeBase, RangeNode, ValueExpressionNode

public class ASTBase
extends ModifiableBOpBase

Base class for the AST.

Version:
$Id: ASTBase.java 5744 2011-11-27 23:55:11Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form

Nested Class Summary
static interface ASTBase.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
ASTBase(ASTBase op)
          Required deep copy constructor.
ASTBase(BOp[] args, Map<String,Object> annotations)
          Required shallow copy constructor.
 
Method Summary
 String getQueryHint(String name)
          Return the value of the query hint.
 String getQueryHint(String name, String defaultValue)
          Return the value of the query hint.
 boolean getQueryHintAsBoolean(String name, boolean defaultValue)
          Return the boolean value of the query hint.
 boolean getQueryHintAsBoolean(String name, String defaultValue)
          Return the boolean value of the query hint.
 Properties getQueryHints()
          Return the query hints for this AST node.
 int replaceAllWith(BOp oldVal, BOp newVal)
          Replace all occurrences of the old value with the new value in both the arguments and annotations of this operator (recursive).
 void setQueryHint(String name, String value)
          Set a query hint.
 void setQueryHints(Properties queryHints)
          Set the query hints.
 
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, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ASTBase

public ASTBase(ASTBase op)
Required deep copy constructor.


ASTBase

public ASTBase(BOp[] args,
               Map<String,Object> annotations)
Required shallow copy constructor.

Method Detail

getQueryHints

public Properties getQueryHints()
Return the query hints for this AST node.

Returns:
The query hints -or- null if none have been declared.

getQueryHint

public String getQueryHint(String name)
Return the value of the query hint.

Parameters:
name - The name of the query hint.
Returns:
The value of the query hint and null if the query hint is not defined.

getQueryHint

public String getQueryHint(String name,
                           String defaultValue)
Return the value of the query hint.

Parameters:
name - The name of the query hint.
defaultValue - The default value to use if the query hint is not defined.
Returns:
The value of the query hint and defaultValue if the query hint is not defined.

getQueryHintAsBoolean

public boolean getQueryHintAsBoolean(String name,
                                     String defaultValue)
Return the boolean value of the query hint.

Parameters:
name - The name of the query hint.
defaultValue - The default value to use if the query hint is not defined.

getQueryHintAsBoolean

public boolean getQueryHintAsBoolean(String name,
                                     boolean defaultValue)
Return the boolean value of the query hint.

Parameters:
name - The name of the query hint.
defaultValue - The default value to use if the query hint is not defined.

setQueryHints

public void setQueryHints(Properties queryHints)
Set the query hints.

Parameters:
queryHints - The query hints (may be null).
See Also:
QueryHints

setQueryHint

public void setQueryHint(String name,
                         String value)
Set a query hint.

Parameters:
name - The property name for the query hint.
value - The property value for the query hint.

replaceAllWith

public int replaceAllWith(BOp oldVal,
                          BOp newVal)
Replace all occurrences of the old value with the new value in both the arguments and annotations of this operator (recursive). A match is identified by reference CoreBaseBOp.equals(Object).

Parameters:
oldVal - The old value.
newVal - The new value.
Returns:
The #of changes made.


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