Package com.attivio.sdk.search
Class SearchFieldValue
- java.lang.Object
-
- com.attivio.sdk.search.SearchFieldValue
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,java.lang.Cloneable
public class SearchFieldValue extends java.lang.Object implements java.lang.Cloneable, java.io.Externalizable
A field value for aSearchDocument
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SearchFieldValue()
SearchFieldValue(Point value)
Construct a new SearchFieldValue with aPoint
value.SearchFieldValue(Shape value)
Construct a new SearchFieldValue with aShape
value.SearchFieldValue(java.lang.Boolean value)
Construct a new SearchFieldValue with aBoolean
value.SearchFieldValue(java.lang.Number value)
Construct a new SearchFieldValue with anumeric
value.SearchFieldValue(java.lang.String value)
Construct a new SearchFieldValue with aString
value.SearchFieldValue(java.util.Date value)
Construct a new SearchFieldValue with aDate
value.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
booleanValue()
Gets the value as aboolean
.SearchFieldValue
clone()
java.util.Date
dateValue()
Gets the value as aDate
.java.math.BigDecimal
decimalValue()
Gets the value as aBigDecimal
.double
doubleValue()
Gets the value as adouble
.boolean
equals(java.lang.Object other)
float
floatValue()
Gets the value as afloat
.RelevancyFeatureVector
getFeatures()
Get the feature vector for this field (if available).java.lang.Object
getValue()
Get the field value.int
hashCode()
int
intValue()
Gets the value as anint
.long
longValue()
Gets the value as along
.Point
pointValue()
Gets the value as aPoint
.SearchFieldValue
readExternal(java.io.DataInput in)
void
readExternal(java.io.ObjectInput in)
void
setFeatures(RelevancyFeatureVector value)
Set the feature vector for this field.void
setValue(Point value)
Set aPoint
value.void
setValue(Shape value)
Set aShape
value.void
setValue(java.lang.Boolean value)
Set aBoolean
value.void
setValue(java.lang.Number value)
Set anumeric
value.void
setValue(java.lang.String value)
Set aString
value.void
setValue(java.util.Date value)
Set aDate
value.Shape
shapeValue()
Gets the value as aShape
.java.lang.String
stringValue()
Gets the value as a string.java.lang.String
toString()
boolean
valueEquals(java.lang.Object other)
static SearchFieldValue
valueOf(java.lang.Object value)
Get aSearchFieldValue
forvalue
.void
writeExternal(java.io.DataOutput out)
void
writeExternal(java.io.ObjectOutput out)
-
-
-
Constructor Detail
-
SearchFieldValue
public SearchFieldValue()
-
SearchFieldValue
public SearchFieldValue(java.lang.String value)
Construct a new SearchFieldValue with aString
value.- Throws:
java.lang.IllegalArgumentException
- ifvalue
is null.
-
SearchFieldValue
public SearchFieldValue(java.lang.Number value)
Construct a new SearchFieldValue with anumeric
value.- Throws:
java.lang.IllegalArgumentException
- ifvalue
is null.
-
SearchFieldValue
public SearchFieldValue(java.util.Date value)
Construct a new SearchFieldValue with aDate
value.- Throws:
java.lang.IllegalArgumentException
- ifvalue
is null.
-
SearchFieldValue
public SearchFieldValue(java.lang.Boolean value)
Construct a new SearchFieldValue with aBoolean
value.- Throws:
java.lang.IllegalArgumentException
- ifvalue
is null.
-
SearchFieldValue
public SearchFieldValue(Point value)
Construct a new SearchFieldValue with aPoint
value.- Throws:
java.lang.IllegalArgumentException
- ifvalue
is null.
-
-
Method Detail
-
getFeatures
public RelevancyFeatureVector getFeatures()
Get the feature vector for this field (if available).
-
setFeatures
public void setFeatures(RelevancyFeatureVector value)
Set the feature vector for this field.
-
getValue
public java.lang.Object getValue()
Get the field value.
-
stringValue
public java.lang.String stringValue()
Gets the value as a string.
-
intValue
public int intValue()
Gets the value as anint
.- Throws:
java.lang.IllegalArgumentException
- if this value cannot be represented as anint
.
-
longValue
public long longValue()
Gets the value as along
.- Throws:
java.lang.IllegalArgumentException
- if this value cannot be represented as along
.
-
doubleValue
public double doubleValue()
Gets the value as adouble
.- Throws:
java.lang.IllegalArgumentException
- if this value cannot be represented as adouble
.
-
floatValue
public float floatValue()
Gets the value as afloat
.- Throws:
java.lang.IllegalArgumentException
- if this value cannot be represented as afloat
.
-
dateValue
public java.util.Date dateValue()
Gets the value as aDate
.- Throws:
java.lang.IllegalArgumentException
- if this value cannot be represented as aDate
.
-
booleanValue
public boolean booleanValue()
Gets the value as aboolean
.- Throws:
java.lang.IllegalArgumentException
- if this value cannot be represented as aboolean
.
-
pointValue
public Point pointValue()
Gets the value as aPoint
.- Throws:
java.lang.IllegalArgumentException
- if this value cannot be represented as aPoint
.
-
shapeValue
public Shape shapeValue()
Gets the value as aShape
.- Throws:
java.lang.IllegalArgumentException
- if this value cannot be represented as aShape
.
-
decimalValue
public java.math.BigDecimal decimalValue()
Gets the value as aBigDecimal
.- Throws:
java.lang.IllegalArgumentException
- if this value cannot be represented as aBigDecimal
.
-
setValue
public void setValue(java.lang.String value)
Set aString
value.- Throws:
java.lang.IllegalArgumentException
- ifvalue
is null.
-
setValue
public void setValue(java.lang.Number value)
Set anumeric
value.- Throws:
java.lang.IllegalArgumentException
- ifvalue
is null.
-
setValue
public void setValue(java.util.Date value)
Set aDate
value.- Throws:
java.lang.IllegalArgumentException
- ifvalue
is null.
-
setValue
public void setValue(java.lang.Boolean value)
Set aBoolean
value.- Throws:
java.lang.IllegalArgumentException
- ifvalue
is null.
-
setValue
public void setValue(Point value)
Set aPoint
value.- Throws:
java.lang.IllegalArgumentException
- ifvalue
is null.
-
setValue
public void setValue(Shape value)
Set aShape
value.- Throws:
java.lang.IllegalArgumentException
- ifvalue
is null.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
valueEquals
public boolean valueEquals(java.lang.Object other)
-
clone
public SearchFieldValue clone()
- Overrides:
clone
in classjava.lang.Object
-
valueOf
public static SearchFieldValue valueOf(java.lang.Object value)
- Throws:
java.lang.IllegalArgumentException
- ifvalue
is not a legal value.
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
readExternal
public SearchFieldValue readExternal(java.io.DataInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
writeExternal
public void writeExternal(java.io.DataOutput out) throws java.io.IOException
- Throws:
java.io.IOException
-
-