Package com.attivio.sdk.search.fields
Class GeoBoost
- java.lang.Object
-
- com.attivio.sdk.search.fields.FieldExpression
-
- com.attivio.sdk.search.fields.UnaryFieldExpression
-
- com.attivio.sdk.search.fields.GeoBoost
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
public class GeoBoost extends UnaryFieldExpression
Computes a boost score based on the geographical distance from a center point.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.attivio.sdk.search.fields.FieldExpression
FieldExpression.StringMode
-
-
Field Summary
-
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 GeoBoost(FieldExpression expression, double latitude, double longitude)
Constructor.GeoBoost(java.lang.String fieldName, double latitude, double longitude)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GeoBoost
clone()
protected GeoBoost
clone(FieldExpression e)
Create a new instance of this FieldExpression, with a different argument.boolean
equals(java.lang.Object other)
double
getLatitude()
Get the center latitude to calculate distance to.double
getLongitude()
Get the center longitude to calculate distance to.SchemaField.Type
getType(Schema schema)
Resolve the type for this expression.int
hashCode()
void
setLatitude(double latitude)
Set the center latitude to calculate distance to.void
setLongitude(double longitude)
Set the center longitude to calculate distance to.protected void
toString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)
Writes the string representation of this field expression tobuffer
.static GeoBoost
valueOf(StringParser reader)
-
Methods inherited from class com.attivio.sdk.search.fields.UnaryFieldExpression
forEachField, getExpression, getFieldName, hasChildren, isConstant, 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
-
-
-
-
Constructor Detail
-
GeoBoost
public GeoBoost(java.lang.String fieldName, double latitude, double longitude)
Constructor.
-
GeoBoost
public GeoBoost(FieldExpression expression, double latitude, double longitude)
Constructor.
-
-
Method Detail
-
getType
public SchemaField.Type getType(Schema schema)
Resolve the type for this expression.- Specified by:
getType
in classFieldExpression
-
getLatitude
public double getLatitude()
Get the center latitude to calculate distance to.
-
setLatitude
public void setLatitude(double latitude)
Set the center latitude to calculate distance to.
-
getLongitude
public double getLongitude()
Get the center longitude to calculate distance to.
-
setLongitude
public void setLongitude(double longitude)
Set the center longitude to calculate distance to.
-
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 GeoBoost clone()
- Overrides:
clone
in classUnaryFieldExpression
-
clone
protected GeoBoost clone(FieldExpression e)
Create a new instance of this FieldExpression, with a different argument.- Overrides:
clone
in classUnaryFieldExpression
-
valueOf
public static GeoBoost valueOf(StringParser reader)
-
-