com.bigdata.bop
Interface BOp

All Superinterfaces:
Cloneable, IPropertySet, Serializable
All Known Subinterfaces:
BooleanValueExpression, IAggregate<E>, IBind<E>, IConstant<E>, IConstraint, IPredicate<E>, IStarJoin<E>, IValueExpression<E>, IValueExpressionConstraint<X>, IVariable<E>, IVariableOrConstant<E>
All Known Implementing Classes:
AbstractAccessPathOp, AbstractAddRemoveStatementsOp, AbstractFromToGraphManagement, AbstractGraphDataUpdate, AbstractHashJoinOp, AbstractMergeJoin, AbstractOneGraphManagement, AbstractStatementContainer, AbstractSubqueryOp, AddGraph, AggregateBase, AND, AndBOp, AssignmentNode, ASTBase, ASTContainer, AVERAGE, Bind, BindingConstraint, BindingsClause, BNodeBOp, BOpBase, BOpFilter, BOpFilterBase, BOpFilterNOP, BOpResolver, BOpTupleFilter, CacheValueFilter, ChunkedMaterializationOp, ChunkedResolutionOp, ClearGraph, CoalesceBOp, CommitOp, CompareBOp, ComputedIN, ConcatBOp, ConditionalBind, ConditionalRoutingOp, Constant, ConstantNode, Constraint, ConstructNode, CopyGraph, CopyOp, CoreBaseBOp, COUNT, CreateGraph, DataSetJoin, DatasetNode, DatatypeBOp, DateBOp, DeleteData, DeleteInsertGraph, DigestBOp, DistinctFilter, DropGraph, DropOp, DummyConstantNode, EBVBOp, EncodeForURIBOp, EndOp, EQ, EQConstant, ExistsNode, FalseBOp, FilterNode, FuncBOp, FunctionNode, GraphManagement, GraphPatternGroup, GraphUpdate, GROUP_CONCAT, GroupByNode, GroupByOp, GroupMemberNodeBase, GroupMemberValueExpressionNodeBase, GroupNodeBase, HavingNode, HTreeDistinctBindingSetsOp, HTreeHashIndexOp, HTreeHashJoinOp, HTreeMergeJoin, HTreeNamedSubqueryOp, HTreeSolutionSetHashJoinOp, IfBOp, ImmutableBOp, InBinaryBOp, INBinarySearch, InBOp, INConstraint, InferenceBVE, InHashBOp, INHashMap, InlineMaterializeOp, InsertData, InsertDataOp, InsertOp, InsertStatementsOp, IriBOp, IsBNodeBOp, IsBoundBOp, IsInlineBOp, IsLiteralBOp, IsMaterializedBOp, IsNumericBOp, IsURIBOp, IVValueExpression, JoinGraph, JoinGroupNode, JVMDistinctBindingSetsOp, JVMHashIndexOp, JVMHashJoinOp, JVMMergeJoin, JVMNamedSubqueryOp, JVMSolutionSetHashJoinOp, LangBOp, LangMatchesBOp, LcaseBOp, LexPredicate, LoadGraph, MathBOp, MAX, MemoryGroupByOp, MemorySortOp, MIN, ModifiableBOpBase, MoveGraph, NamedSolutionSetScanOp, NamedSubqueriesNode, NamedSubqueryInclude, NamedSubqueryRoot, NativeDistinctFilter, NE, NEConstant, NeedsMaterializationBOp, NotBOp, NotExistsNode, NumericBOp, OR, OrBOp, OrderByExpr, OrderByNode, ParseOp, PipelinedAggregationOp, PipelineJoin, PipelineOp, Predicate, ProjectedConstraint, ProjectionNode, ProjectionOp, QuadData, QuadsDataOrNamedSolutionSet, QueryBase, QueryNodeBase, QueryNodeListBaseNode, QueryRoot, RandBOp, RangeBOp, RangeNode, RegexBOp, RejectAnythingSameAsItself, RemoveStatementsOp, ReplaceBOp, SameTermBOp, SAMPLE, SampleIndex, ServiceCallJoin, ServiceNode, SliceNode, SliceOp, SolutionModifierBase, SortOp, SPARQLConstraint, SparqlTypeErrorBOp, SPOPredicate, SPOStarJoin, StartOp, StatementPatternNode, Steps, StrAfterBOp, StrBeforeBOp, StrBOp, StrcontainsBOp, StrdtBOp, StrendsBOp, StripContextFilter, StrlangBOp, StrlenBOp, StrstartsBOp, SubqueryBase, SubqueryFunctionNodeBase, SubqueryOp, SubqueryRoot, SubstrBOp, SUM, Tee, TermNode, TrueBOp, TryBeforeMaterializationConstraint, UcaseBOp, Union, UnionNode, Update, UpdateRoot, ValueExpressionListBaseNode, ValueExpressionNode, Var, VarNode, XSDBooleanIVValueExpression, XsdStrBOp

public interface BOp
extends Cloneable, Serializable, IPropertySet

An operator, such as a constant, variable, join, sort, filter, etc. Abstract operations, such as the AST, are also described with this data structure.

Operators are organized in a tree of operators. The arity of an operator is the number of child operands declared by that operator class. The children of an operator are themselves operators. Parents reference their children, but back references to the parents are not maintained.

In addition to their arguments, operators may have a variety of annotations, including those specific to an operator (such as the maximum number of iterators for a closure operator), those shared by many operators (such as set of variables which are selected by a join or distributed hash table), or those shared by all operators (such as a cost model).

Version:
$Id: BOp.java 5214 2011-09-19 18:06:35Z thompsonbry $
Author:
Bryan Thompson

Nested Class Summary
static interface BOp.Annotations
          Interface declaring well known annotations.
 
Field Summary
static Map<String,Object> NOANNS
          An empty immutable annotations map.
static BOp[] NOARGS
          An empty array.
 
Method Summary
 Map<String,Object> annotations()
          The operator's annotations.
 Iterator<BOp> argIterator()
          An iterator visiting the operator's arguments.
 List<BOp> args()
          The operator's arguments as list.
 int arity()
          The #of arguments to the operation.
 BOp clone()
          Deep copy clone of the operator.
 BOp get(int index)
          Return an argument to the operation.
 BOpEvaluationContext getEvaluationContext()
          Return the evaluation context for the operator as specified by BOp.Annotations.EVALUATION_CONTEXT.
 int getId()
          Return the BOp.Annotations.BOP_ID.
<T> T
getProperty(String name, T defaultValue)
          Return the value of the named annotation.
 Object getRequiredProperty(String name)
          Return the value of the named annotation.
 boolean isController()
          Return true iff this operator is a controller.
 BOp setProperty(String name, Object value)
          Unconditionally sets the property.
 BOp[] toArray()
          A shallow copy of the operator's arguments.
<T> T[]
toArray(T[] a)
          A shallow copy of the operator's arguments using the generic type of the caller's array.
 String toShortString()
          Return a short (non-recursive) representation of the BOp.
 String toString()
          Return a
 
Methods inherited from interface cutthecrap.utils.striterators.IPropertySet
getProperty
 

Field Detail

NOARGS

static final BOp[] NOARGS
An empty array.


NOANNS

static final Map<String,Object> NOANNS
An empty immutable annotations map.

Method Detail

arity

int arity()
The #of arguments to the operation.


get

BOp get(int index)
Return an argument to the operation.

Parameters:
index - The argument index in [0:arity()-1].
Returns:
The argument.

args

List<BOp> args()
The operator's arguments as list.


argIterator

Iterator<BOp> argIterator()
An iterator visiting the operator's arguments.


toArray

BOp[] toArray()
A shallow copy of the operator's arguments.


toArray

<T> T[] toArray(T[] a)
A shallow copy of the operator's arguments using the generic type of the caller's array. If the array has sufficient room, then the arguments are copied into the caller's array. If there is space remaining, a null is appended to mark the end of the data.


annotations

Map<String,Object> annotations()
The operator's annotations.


getProperty

<T> T getProperty(String name,
                  T defaultValue)
Return the value of the named annotation.

Type Parameters:
T - The generic type of the annotation value.
Parameters:
name - The name of the annotation.
defaultValue - The default value.
Returns:
The annotation value -or- the defaultValue if the annotation was not bound.

setProperty

BOp setProperty(String name,
                Object value)
Unconditionally sets the property.

Parameters:
name - The name.
value - The value.
Returns:
A copy of this BOp on which the property has been set.

getRequiredProperty

Object getRequiredProperty(String name)
Return the value of the named annotation.

Parameters:
name - The name of the annotation.
Returns:
The value of the annotation.
Throws:
IllegalStateException - if the named annotation is not bound.
See Also:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6302954
TODO:
Note: This variant without generics is required for some java compiler versions.

clone

BOp clone()
Deep copy clone of the operator.


toShortString

String toShortString()
Return a short (non-recursive) representation of the BOp.


toString

String toString()
Return a

Overrides:
toString in class Object
Returns:

getId

int getId()
Return the BOp.Annotations.BOP_ID.

Throws:
IllegalStateException - if that annotation is not bound.

getEvaluationContext

BOpEvaluationContext getEvaluationContext()
Return the evaluation context for the operator as specified by BOp.Annotations.EVALUATION_CONTEXT.


isController

boolean isController()
Return true iff this operator is a controller.

See Also:
BOp.Annotations.CONTROLLER


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