Package com.attivio.sdk.search.fields
Class SubString
- java.lang.Object
-
- com.attivio.sdk.search.fields.FieldExpression
-
- com.attivio.sdk.search.fields.UnaryFieldExpression
-
- com.attivio.sdk.search.fields.SubString
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class SubString extends UnaryFieldExpression
Substring field expression.- 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 SubString(FieldExpression expression, int offset, int length)SubString(java.lang.String fieldName, int offset, int length)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SubStringclone()protected SubStringclone(FieldExpression e)Create a new instance of this FieldExpression, with a different argument.booleanequals(java.lang.Object other)intgetLength()Get the max length of the substring.intgetOffset()Get the offset for the start of the substring.SchemaField.TypegetType(Schema schema)Resolve the type for this expression.inthashCode()voidsetLength(int value)Set the max length of the substring.voidsetOffset(int value)Set the offset for the start of the substring.protected voidtoString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)Writes the string representation of this field expression tobuffer.static SubStringvalueOf(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
-
SubString
public SubString(java.lang.String fieldName, int offset, int length)
-
SubString
public SubString(FieldExpression expression, int offset, int length)
-
-
Method Detail
-
getType
public SchemaField.Type getType(Schema schema)
Resolve the type for this expression.- Specified by:
getTypein classFieldExpression
-
getOffset
public int getOffset()
Get the offset for the start of the substring.If offset is negative, the actual start offset will be computed on a per value basis to be valueLength + offset. For example, setting the offset to -4 and the length to 4 will extract the last for characters of each value.
-
setOffset
public void setOffset(int value)
Set the offset for the start of the substring.
-
getLength
public int getLength()
Get the max length of the substring.
-
setLength
public void setLength(int value)
Set the max length of the substring.
-
toString
protected void toString(java.lang.StringBuilder buffer, FieldExpression.StringMode mode)Writes the string representation of this field expression tobuffer.- Specified by:
toStringin classFieldExpression
-
hashCode
public int hashCode()
- Overrides:
hashCodein classUnaryFieldExpression
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classUnaryFieldExpression
-
clone
public SubString clone()
- Overrides:
clonein classUnaryFieldExpression
-
clone
protected SubString clone(FieldExpression e)
Create a new instance of this FieldExpression, with a different argument.- Overrides:
clonein classUnaryFieldExpression
-
valueOf
public static SubString valueOf(StringParser reader)
-
-