public abstract class RelationProxy extends java.lang.Object implements IRelation
Constructor and Description |
---|
RelationProxy(SiraPriseServer host) |
Modifier and Type | Method and Description |
---|---|
AggregateProxy |
aggregate(java.util.Map<NameIdentifier,java.lang.String> expressions)
Computes the aggregation of this relation, per the given aggregation specs.
|
boolean |
contains(IRelation r)
Checks whether this relation contains all tuples of the given relation.
|
boolean |
contains(Tuple t)
Checks whether this relation contains the given tuple.
|
boolean |
containsUsing(IRelation r,
java.util.LinkedHashSet<NameIdentifier> usingAttributes)
Checks whether this relation contains all tuples of the given relation, with the given usingAttributes treated in 'USING' mode.
|
boolean |
containsUsing(Tuple t,
java.util.LinkedHashSet<NameIdentifier> usingAttributes)
Checks whether this relation contains the given tuple, with the given usingAttributes treated in 'USING' mode.
|
RelationProxy |
dividedyper(IRelation divisor,
IRelation per)
Computes the division of this relation by the given divisor, per the given 'per' relation.
|
ExtendProxy |
extend(java.util.Map<NameIdentifier,java.lang.String> extendExpressions)
Computes the extend of this relation, according to the specs provided in extendExpressions.
|
SiraPriseServer |
getHost()
Gets the host
|
abstract java.lang.String |
getHostExpressionEvaluationText()
Gets The expression text for the expression to be evaluated by the host
|
RelationBuffer |
getRelationBuffer()
Gets the RelationBuffer holding the tuples collection.
|
GroupProxy |
group(java.util.Map<NameIdentifier,java.util.Set<NameIdentifier>> groupAttributes)
Computes the grouping of this relation, according to the specs provided in groupAttributes.
|
GTCloseProxy |
gtclose(java.util.Map<NameIdentifier,NameIdentifier> matchby,
java.util.Map<NameIdentifier,java.lang.String> expressions)
Computes the generalized transitive closure of this relation, according to the specs provided in matchby and expressions.
|
IntersectProxy |
intersect(IRelation intersectWith)
Computes the intersection of this relation with the given one.
|
RelationProxy |
intersectUsing(IRelation intersectWith,
java.util.LinkedHashSet<NameIdentifier> usingAttributes)
Computes the intersection of this relation with the given one, with explicitly specified attributes (and only those) to be treated in 'USING' mode.
|
boolean |
isProxy()
Checks whether this object is a proxy for a relation.
|
JoinProxy |
join(IRelation joinWith)
Computes the join of this relation with the given one, with explicitly specified attributes (and only those) to be treated in 'USING' mode.
|
JoinUsingProxy |
joinUsing(IRelation joinWith,
java.util.LinkedHashSet<NameIdentifier> usingAttributes)
Computes the join of this relation with the given one, with explicitly specified attributes (and only those) to be treated in 'USING' mode.
|
UnionProxy |
leftJoin(IRelation leftjoinwith,
java.util.Map<NameIdentifier,java.lang.String> missingAttributeValueExpressions)
Computes the leftjoin of this relation with the given one.
|
RelationProxy |
leftJoinUsing(IRelation leftjoinwith,
java.util.Map<NameIdentifier,java.lang.String> missingAttributeValueExpressions,
java.util.LinkedHashSet<NameIdentifier> usingAttributes)
Computes the leftjoin of this relation with the given one.
|
MinusProxy |
minus(IRelation subtrahend)
Computes the difference of this relation with the given subtrahend, with explicitly specified attributes (and only those) to be treated in 'USING' mode.
|
MinusProxy |
minusFrom(IRelation minuend)
Computes the difference between the given relation and this one.
|
MinusUsingProxy |
minusUsing(IRelation subtrahend,
java.util.LinkedHashSet<NameIdentifier> usingAttributes)
Computes the difference of this relation with the given subtrahend, with explicitly specified attributes (and only those) to be treated in 'USING' mode.
|
MinusUsingProxy |
minusUsingFrom(IRelation minuend,
java.util.LinkedHashSet<NameIdentifier> usingAttributes)
Computes the difference between the given relation and this one, with the attributes mentioned in usingAttributes treated in 'USING' mode.
|
PackProxy |
pack(NameIdentifier... packAttributes)
Computes an pack of this relation.
|
ProjectProxy |
project(NameIdentifier... attributes)
Computes the projection of this relation over the attributes provided.
|
RenameProxy |
rename(java.util.Map<NameIdentifier,NameIdentifier> renames)
Computes the rename of this relation according to the provided rename specs.
|
RestrictProxy |
restrict(java.lang.String restrictExpression)
Computes the restriction of this relation to the set of tuples that satisfy the given boolean expression.
|
SemiJoinProxy |
semijoin(IRelation semiJoinWith)
Computes the semijoin between this relation and the given one.
|
SemiJoinProxy |
semiJoinFor(IRelation semiJoinLeftArg)
Computes the semijoin between the given relation and this one.
|
SemiJoinUsingProxy |
semijoinUsing(IRelation semiJoinWith,
java.util.LinkedHashSet<NameIdentifier> usingAttributes)
Computes the semijoin between this relation and the given one.
|
SemiJoinUsingProxy |
semijoinUsingFor(IRelation semiJoinLeftArg,
java.util.LinkedHashSet<NameIdentifier> usingAttributes)
Computes the semijoin between the given relation and this one, with the attributes mentioned in usingAttributes treated in 'USING' mode.
|
SemiMinusProxy |
semiminus(IRelation semiDiffWith)
Computes the semidifference between this relation and the given one.
|
SemiMinusProxy |
semiminusFor(IRelation semiMinusLeftArg)
Computes the semiminus between the given relation and this one.
|
SemiMinusUsingProxy |
semiminusUsing(IRelation semiDiffWith,
java.util.LinkedHashSet<NameIdentifier> usingAttributes)
Computes the semidifference between this relation and the given one.
|
SemiMinusUsingProxy |
semiminusUsingFor(IRelation semiMinusLeftArg,
java.util.LinkedHashSet<NameIdentifier> usingAttributes)
Computes the semiminus between the given relation and this one, with the attributes mentioned in usingAttributes treated in 'USING' mode.
|
SummarizebyProxy |
summarizeby(java.util.Set<NameIdentifier> byAttributes,
java.util.Map<NameIdentifier,java.lang.String> expressions)
Computes the summaries specified by expressions groups of tuples in this relation, with the grouping as specified in byAttributes.
|
TCloseProxy |
tclose(java.util.Map<NameIdentifier,NameIdentifier> matchby)
Computes the transitive closure of the given relation using the attribute matching as specified by matchby.
|
TransformProxy |
transform(java.util.Map<NameIdentifier,java.lang.String> transformSpecs)
Computes the specified transformation of this relation.
|
UngroupProxy |
ungroup(NameIdentifier... ungroupAttributes)
Computes the ungrouping of this relation using the specified ungroup attributes.
|
UnionProxy |
union(IRelation unionWith)
Computes the union of this relation with another one, with explicitly specified attributes (and only those) to be treated in 'USING' mode.
|
RelationProxy |
unionUsing(IRelation unionWith,
java.util.LinkedHashSet<NameIdentifier> usingAttributes)
Computes the union of this relation with another one, with explicitly specified attributes (and only those) to be treated in 'USING' mode.
|
UnpackProxy |
unpack(NameIdentifier... unpackAttributes)
Computes an unpack of this relation.
|
IRelation |
xminus(IRelation symdiffWith)
Computes the symmetric difference between this relation and the given one.
|
IRelation |
xminusUsing(IRelation symdiffWith,
java.util.LinkedHashSet<NameIdentifier> usingAttributes)
Computes the symmetric difference between this relation and the given one, with the attributes mentioned in usingAttributes treated in 'USING' mode.
|
public RelationProxy(SiraPriseServer host)
host
- the host to which this expression is targeted for evaluationpublic AggregateProxy aggregate(java.util.Map<NameIdentifier,java.lang.String> expressions)
IRelation
AGGREGATE
.aggregate
in interface IRelation
expressions
- the map defining the names for the attributes holding the computed aggregation values in the result, and the expressions texts of the expressions for computing thempublic RelationProxy dividedyper(IRelation divisor, IRelation per)
IRelation
DIVIDEBYPER
.dividedyper
in interface IRelation
divisor
- the divisor by which this relation is to be relationally dividedper
- the 'per' relation as per TTM dividepublic ExtendProxy extend(java.util.Map<NameIdentifier,java.lang.String> extendExpressions)
IRelation
EXTEND
.extend
in interface IRelation
extendExpressions
- the map defining the names for the attributes holding the computed extend values in the result, and the expressions texts of the expressions for computing thempublic final SiraPriseServer getHost()
public abstract java.lang.String getHostExpressionEvaluationText()
IRelation
getHostExpressionEvaluationText
in interface IRelation
public RelationBuffer getRelationBuffer() throws EvaluationException
IRelation
getRelationBuffer
in interface IRelation
EvaluationException
- If an expression evaluation on the server failed for any reason. The exception reflecting that reason will be contained as cause in the EvaluationException object.public final GroupProxy group(java.util.Map<NameIdentifier,java.util.Set<NameIdentifier>> groupAttributes)
IRelation
GROUP
.group
in interface IRelation
groupAttributes
- The specification of the groupings to be applied. Each entry consists of an attribute name for the relation-valued attribute in the result, and the set of attributes of this relation that that relation-typed attribute is to include.public final GTCloseProxy gtclose(java.util.Map<NameIdentifier,NameIdentifier> matchby, java.util.Map<NameIdentifier,java.lang.String> expressions)
IRelation
GTCLOSE
.gtclose
in interface IRelation
matchby
- The specification of the closure's matching schemeexpressions
- the specifications of the expressions for determining the values of all the attributes of the involved relation that are not part of the closure's matching scheme (i.e. the attributes not mentioned in matchby)public final IntersectProxy intersect(IRelation intersectWith)
IRelation
INTERSECT
.public final RelationProxy intersectUsing(IRelation intersectWith, java.util.LinkedHashSet<NameIdentifier> usingAttributes)
IRelation
INTERSECT
.intersectUsing
in interface IRelation
intersectWith
- the relation to intersect with this oneusingAttributes
- the in-order list of interval-typed attributes to be treated in 'USING' mode for the intersection and the packing of the resultpublic final boolean isProxy()
IRelation
IRelation.getRelationBuffer()
method.public final JoinProxy join(IRelation joinWith)
IRelation
JOIN
.public final JoinUsingProxy joinUsing(IRelation joinWith, java.util.LinkedHashSet<NameIdentifier> usingAttributes)
IRelation
JOIN
.public final UnionProxy leftJoin(IRelation leftjoinwith, java.util.Map<NameIdentifier,java.lang.String> missingAttributeValueExpressions)
IRelation
LEFTJOIN
.leftJoin
in interface IRelation
leftjoinwith
- the relation to leftjoin this one tomissingAttributeValueExpressions
- The map of attributeName to default value epxression texts for all the attributes that appear in the leftjoinwith argument and are not join attributespublic final RelationProxy leftJoinUsing(IRelation leftjoinwith, java.util.Map<NameIdentifier,java.lang.String> missingAttributeValueExpressions, java.util.LinkedHashSet<NameIdentifier> usingAttributes)
IRelation
LEFTJOIN
.leftJoinUsing
in interface IRelation
leftjoinwith
- the relation to leftjoin this one tomissingAttributeValueExpressions
- The map of attributeName to default value epxression texts for all the attributes that appear in the leftjoinwith argument and are not join attributesusingAttributes
- the names of the interval-typed attributes to be treated in 'USING' mode by the joinpublic final MinusProxy minus(IRelation subtrahend)
IRelation
MINUS
.public final MinusProxy minusFrom(IRelation minuend)
IRelation
MINUS
public final MinusUsingProxy minusUsing(IRelation subtrahend, java.util.LinkedHashSet<NameIdentifier> usingAttributes)
IRelation
MINUS
.minusUsing
in interface IRelation
subtrahend
- the relation to be 'subtracted' from this one, with the specified usingAttributes being treated in 'using' modeusingAttributes
- the in-order list of interval-typed attributes to be treated in 'USING' mode for the difference and the subsequent packing of the resultpublic final MinusUsingProxy minusUsingFrom(IRelation minuend, java.util.LinkedHashSet<NameIdentifier> usingAttributes)
IRelation
MINUSUSING
minusUsingFrom
in interface IRelation
minuend
- the relation that is the minuend in a relational difference in which we are the subtrahendusingAttributes
- the interval-typed attributes over which this relation is to be unpackedpublic final PackProxy pack(NameIdentifier... packAttributes) throws ValidationException
IRelation
PACK
.pack
in interface IRelation
packAttributes
- the interval-typed attributes over which this relation is to be packedValidationException
- If an invalid list of PACK attributes was providedpublic final ProjectProxy project(NameIdentifier... attributes) throws ValidationException
IRelation
PROJECT
.project
in interface IRelation
attributes
- the attributes to be retained in a projection of this relationValidationException
- If an invalid list of projection attribute names was providedpublic final RenameProxy rename(java.util.Map<NameIdentifier,NameIdentifier> renames)
IRelation
RENAME
.rename
in interface IRelation
renames
- the specification of the renames to be applied to this relation. Each entry consists of the attribute name for an attribute in this relation, and the attribute name for the corresponding attribute in the resulting relation.public final RestrictProxy restrict(java.lang.String restrictExpression)
IRelation
RESTRICT
.public final SemiJoinProxy semijoin(IRelation semiJoinWith)
IRelation
SEMIJOIN
.public final SemiJoinProxy semiJoinFor(IRelation semiJoinLeftArg)
IRelation
SEMIJOIN
semiJoinFor
in interface IRelation
semiJoinLeftArg
- the relation that is to be semijoined to this onepublic final SemiJoinUsingProxy semijoinUsing(IRelation semiJoinWith, java.util.LinkedHashSet<NameIdentifier> usingAttributes)
IRelation
SEMIJOIN
.semijoinUsing
in interface IRelation
semiJoinWith
- the relation to which this relation is to be semijoinedusingAttributes
- the interval-typed attributes that are to be treated in 'USING' mode by the semijoin. Must be a subset of the interval-typed attributes that are common between the heading of this relation and that of the semiJoinWith relation.public SemiJoinUsingProxy semijoinUsingFor(IRelation semiJoinLeftArg, java.util.LinkedHashSet<NameIdentifier> usingAttributes)
IRelation
SEMIJOIN
semijoinUsingFor
in interface IRelation
semiJoinLeftArg
- the relation that is to be semijoined to this oneusingAttributes
- the interval-typed attributes over which this relation is to be unpackedpublic final SemiMinusProxy semiminus(IRelation semiDiffWith)
IRelation
SEMIMINUS
.public final SemiMinusProxy semiminusFor(IRelation semiMinusLeftArg)
IRelation
SEMIMINUS
semiminusFor
in interface IRelation
semiMinusLeftArg
- the relation that is to be semijoined to this onepublic final SemiMinusUsingProxy semiminusUsing(IRelation semiDiffWith, java.util.LinkedHashSet<NameIdentifier> usingAttributes)
IRelation
SEMIMINUS
.semiminusUsing
in interface IRelation
semiDiffWith
- the relation to which this relation is to be semidiffedusingAttributes
- the interval-typed attributes that are to be treated in 'USING' mode by the semidifference. Must be a subset of the interval-typed attributes that are common between the heading of this relation and that of the semiDiffWith relation.public final SemiMinusUsingProxy semiminusUsingFor(IRelation semiMinusLeftArg, java.util.LinkedHashSet<NameIdentifier> usingAttributes)
IRelation
SEMIMINUS
semiminusUsingFor
in interface IRelation
semiMinusLeftArg
- the relation that is to be semijoined to this oneusingAttributes
- the interval-typed attributes over which this relation is to be unpackedpublic final SummarizebyProxy summarizeby(java.util.Set<NameIdentifier> byAttributes, java.util.Map<NameIdentifier,java.lang.String> expressions)
IRelation
SUMMARIZEBY
.summarizeby
in interface IRelation
byAttributes
- The set of attributes per which summaries are to be included in the result.expressions
- The map of summary attributes to be computed and the expressions for computing their values in the resultpublic final TCloseProxy tclose(java.util.Map<NameIdentifier,NameIdentifier> matchby)
IRelation
TCLOSE
.public final TransformProxy transform(java.util.Map<NameIdentifier,java.lang.String> transformSpecs)
IRelation
TRANSFORM
.public final UngroupProxy ungroup(NameIdentifier... ungroupAttributes) throws ValidationException
IRelation
UNGROUP
.ungroup
in interface IRelation
ungroupAttributes
- the relation-typed attributes of this relation that are to be ungrouped in the resultValidationException
- if an invalid list of ungroupAttributes was providedpublic final UnionProxy union(IRelation unionWith)
IRelation
UNION
public final RelationProxy unionUsing(IRelation unionWith, java.util.LinkedHashSet<NameIdentifier> usingAttributes)
IRelation
UNION
unionUsing
in interface IRelation
unionWith
- the relation to be unioned with this oneusingAttributes
- the in-order list of interval-typed attributes to be treated in 'USING' mode for the union and the packing of the resultpublic final UnpackProxy unpack(NameIdentifier... unpackAttributes) throws ValidationException
IRelation
UNPACK
unpack
in interface IRelation
unpackAttributes
- the interval-typed attributes over which this relation is to be unpackedValidationException
- If an invalid list of unpackAttributes was providedpublic final IRelation xminus(IRelation symdiffWith) throws EvaluationException
IRelation
XMINUS
xminus
in interface IRelation
symdiffWith
- the relation to be symdiffed with this oneEvaluationException
- If immediate evaluation was performed and that evaluation raised an exceptionpublic final IRelation xminusUsing(IRelation symdiffWith, java.util.LinkedHashSet<NameIdentifier> usingAttributes) throws EvaluationException
IRelation
XMINUS
xminusUsing
in interface IRelation
symdiffWith
- the relation to be symdiffed with this oneusingAttributes
- the interval-typed attributes over which this relation is to be unpackedEvaluationException
- If immediate evaluation was performed and that evaluation raised an exceptionpublic final boolean contains(IRelation r) throws EvaluationException
IRelation
contains
in interface IRelation
r
- the relation to be checked for containment within this relationEvaluationException
- If immediate evaluation was attempted and that evaluation failed for any reasonpublic final boolean contains(Tuple t) throws EvaluationException
IRelation
contains
in interface IRelation
t
- the tuple to be checked for containment in this relationEvaluationException
- If immediate evaluation was attempted and that evaluation failed for any reasonpublic final boolean containsUsing(IRelation r, java.util.LinkedHashSet<NameIdentifier> usingAttributes) throws EvaluationException
IRelation
containsUsing
in interface IRelation
r
- the relation to be checked for containment within this relationusingAttributes
- the in-order list of interval-typed attributes to be treated in 'USING' mode for the intersection and the packing of the resultEvaluationException
- If immediate evaluation was attempted and that evaluation failed for any reasonpublic final boolean containsUsing(Tuple t, java.util.LinkedHashSet<NameIdentifier> usingAttributes) throws EvaluationException
IRelation
containsUsing
in interface IRelation
t
- the tuple to be checked for containment in this relationusingAttributes
- the in-order list of interval-typed attributes to be treated in 'USING' mode for the intersection and the packing of the resultEvaluationException
- If immediate evaluation was attempted and that evaluation failed for any reason