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.ExternalizableA field value for aSearchDocument.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SearchFieldValue()SearchFieldValue(Point value)Construct a new SearchFieldValue with aPointvalue.SearchFieldValue(Shape value)Construct a new SearchFieldValue with aShapevalue.SearchFieldValue(java.lang.Boolean value)Construct a new SearchFieldValue with aBooleanvalue.SearchFieldValue(java.lang.Number value)Construct a new SearchFieldValue with anumericvalue.SearchFieldValue(java.lang.String value)Construct a new SearchFieldValue with aStringvalue.SearchFieldValue(java.util.Date value)Construct a new SearchFieldValue with aDatevalue.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanbooleanValue()Gets the value as aboolean.SearchFieldValueclone()java.util.DatedateValue()Gets the value as aDate.java.math.BigDecimaldecimalValue()Gets the value as aBigDecimal.doubledoubleValue()Gets the value as adouble.booleanequals(java.lang.Object other)floatfloatValue()Gets the value as afloat.RelevancyFeatureVectorgetFeatures()Get the feature vector for this field (if available).java.lang.ObjectgetValue()Get the field value.inthashCode()intintValue()Gets the value as anint.longlongValue()Gets the value as along.PointpointValue()Gets the value as aPoint.SearchFieldValuereadExternal(java.io.DataInput in)voidreadExternal(java.io.ObjectInput in)voidsetFeatures(RelevancyFeatureVector value)Set the feature vector for this field.voidsetValue(Point value)Set aPointvalue.voidsetValue(Shape value)Set aShapevalue.voidsetValue(java.lang.Boolean value)Set aBooleanvalue.voidsetValue(java.lang.Number value)Set anumericvalue.voidsetValue(java.lang.String value)Set aStringvalue.voidsetValue(java.util.Date value)Set aDatevalue.ShapeshapeValue()Gets the value as aShape.java.lang.StringstringValue()Gets the value as a string.java.lang.StringtoString()booleanvalueEquals(java.lang.Object other)static SearchFieldValuevalueOf(java.lang.Object value)Get aSearchFieldValueforvalue.voidwriteExternal(java.io.DataOutput out)voidwriteExternal(java.io.ObjectOutput out)
-
-
-
Constructor Detail
-
SearchFieldValue
public SearchFieldValue()
-
SearchFieldValue
public SearchFieldValue(java.lang.String value)
Construct a new SearchFieldValue with aStringvalue.- Throws:
java.lang.IllegalArgumentException- ifvalueis null.
-
SearchFieldValue
public SearchFieldValue(java.lang.Number value)
Construct a new SearchFieldValue with anumericvalue.- Throws:
java.lang.IllegalArgumentException- ifvalueis null.
-
SearchFieldValue
public SearchFieldValue(java.util.Date value)
Construct a new SearchFieldValue with aDatevalue.- Throws:
java.lang.IllegalArgumentException- ifvalueis null.
-
SearchFieldValue
public SearchFieldValue(java.lang.Boolean value)
Construct a new SearchFieldValue with aBooleanvalue.- Throws:
java.lang.IllegalArgumentException- ifvalueis null.
-
SearchFieldValue
public SearchFieldValue(Point value)
Construct a new SearchFieldValue with aPointvalue.- Throws:
java.lang.IllegalArgumentException- ifvalueis 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 aStringvalue.- Throws:
java.lang.IllegalArgumentException- ifvalueis null.
-
setValue
public void setValue(java.lang.Number value)
Set anumericvalue.- Throws:
java.lang.IllegalArgumentException- ifvalueis null.
-
setValue
public void setValue(java.util.Date value)
Set aDatevalue.- Throws:
java.lang.IllegalArgumentException- ifvalueis null.
-
setValue
public void setValue(java.lang.Boolean value)
Set aBooleanvalue.- Throws:
java.lang.IllegalArgumentException- ifvalueis null.
-
setValue
public void setValue(Point value)
Set aPointvalue.- Throws:
java.lang.IllegalArgumentException- ifvalueis null.
-
setValue
public void setValue(Shape value)
Set aShapevalue.- Throws:
java.lang.IllegalArgumentException- ifvalueis null.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
valueEquals
public boolean valueEquals(java.lang.Object other)
-
clone
public SearchFieldValue clone()
- Overrides:
clonein classjava.lang.Object
-
valueOf
public static SearchFieldValue valueOf(java.lang.Object value)
- Throws:
java.lang.IllegalArgumentException- ifvalueis not a legal value.
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException- Specified by:
readExternalin 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:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
writeExternal
public void writeExternal(java.io.DataOutput out) throws java.io.IOException- Throws:
java.io.IOException
-
-