Package com.attivio.sdk.search.fields
Class ClauseContext
- java.lang.Object
-
- com.attivio.sdk.search.fields.FieldExpression
-
- com.attivio.sdk.search.fields.UnaryFieldExpression
-
- com.attivio.sdk.search.fields.ClauseContext
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class ClauseContext extends UnaryFieldExpression
Selects a clause that fields should be extracted for.Clauses can be named by setting the alias on a
JoinClause
. When clauses are named, fields for child documents from those clauses can be selected by wrapping aFieldExpression
with a ClauseContext.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.attivio.sdk.search.fields.FieldExpression
FieldExpression.StringMode
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ALL_CONTEXT
Context to request field from all clauses.static java.lang.String
DEFAULT_CLAUSE_CONTEXT
Default context name for clauses.static java.lang.String
ROOT_CONTEXT
Context for root clause.-
Fields inherited from class com.attivio.sdk.search.fields.UnaryFieldExpression
expression
-
Fields inherited from class com.attivio.sdk.search.fields.FieldExpression
EMPTY_ARRAY
-
-
Constructor Summary
Constructors Constructor Description ClauseContext(FieldExpression expression, java.lang.String clause)
ClauseContext(java.lang.String field, java.lang.String clause)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClauseContext
clone()
boolean
equals(java.lang.Object other)
java.lang.String
getClauseName()
Get the name of the clause to select fields for.SchemaField.Type
getType(Schema schema)
Resolve the type for this expression.int
hashCode()
boolean
isConstant()
Returnstrue
if this field expression evaluates to a constant value.void
setClauseName(java.lang.String value)
Set the name of the clause to select fields for.protected void
toString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)
Writes the string representation of this field expression tobuffer
.static ClauseContext
valueOf(StringParser reader)
-
Methods inherited from class com.attivio.sdk.search.fields.UnaryFieldExpression
clone, forEachField, getExpression, getFieldName, hasChildren, rewrite, setExpression
-
Methods inherited from class com.attivio.sdk.search.fields.FieldExpression
apply, copyOf, forEachPhrase, forEachQuery, getDefaultName, isConstant, parse, quote, rewrite, rewriteChildren, toString, toString, valueOf
-
-
-
-
Field Detail
-
ROOT_CONTEXT
public static final java.lang.String ROOT_CONTEXT
Context for root clause.- See Also:
- Constant Field Values
-
DEFAULT_CLAUSE_CONTEXT
public static final java.lang.String DEFAULT_CLAUSE_CONTEXT
Default context name for clauses.- See Also:
- Constant Field Values
-
ALL_CONTEXT
public static final java.lang.String ALL_CONTEXT
Context to request field from all clauses.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ClauseContext
public ClauseContext(java.lang.String field, java.lang.String clause)
-
ClauseContext
public ClauseContext(FieldExpression expression, java.lang.String clause)
-
-
Method Detail
-
isConstant
public boolean isConstant()
Returnstrue
if this field expression evaluates to a constant value.- Overrides:
isConstant
in classUnaryFieldExpression
-
getClauseName
public java.lang.String getClauseName()
Get the name of the clause to select fields for.A clause name of
*
ornull
will select fields for all clauses.
-
setClauseName
public void setClauseName(java.lang.String value)
Set the name of the clause to select fields for.
-
getType
public SchemaField.Type getType(Schema schema)
Resolve the type for this expression.- Specified by:
getType
in classFieldExpression
-
toString
protected void toString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)
Writes the string representation of this field expression tobuffer
.- Specified by:
toString
in classFieldExpression
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classUnaryFieldExpression
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classUnaryFieldExpression
-
clone
public ClauseContext clone()
- Overrides:
clone
in classUnaryFieldExpression
-
valueOf
public static ClauseContext valueOf(StringParser reader)
-
-