Package com.yahoo.searchlib.expression
Class DocumentFieldNode
- java.lang.Object
-
- com.yahoo.vespa.objects.Selectable
-
- com.yahoo.vespa.objects.Identifiable
-
- com.yahoo.searchlib.expression.ExpressionNode
-
- com.yahoo.searchlib.expression.DocumentAccessorNode
-
- com.yahoo.searchlib.expression.DocumentFieldNode
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class DocumentFieldNode extends DocumentAccessorNode
The node is a request to retrieve the content of a document field.- Author:
- baldersheim, Simon Thoresen Hult
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
classId
-
Constructor Summary
Constructors Constructor Description DocumentFieldNode()
Constructs an empty result node.DocumentFieldNode(String fieldName)
Constructs an instance of this class with given field name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentFieldNode
clone()
protected boolean
equalsExpression(ExpressionNode obj)
String
getDocumentFieldName()
Returns the name of the field whose value to retrieve.ResultNode
getResult()
Get the result of this expression.int
hashCode()
protected void
onDeserialize(com.yahoo.vespa.objects.Deserializer buf)
protected int
onGetClassId()
protected void
onSerialize(com.yahoo.vespa.objects.Serializer buf)
DocumentFieldNode
setDocumentFieldName(String fieldName)
Sets the name of the field whose value to retrieve.void
visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
-
Methods inherited from class com.yahoo.searchlib.expression.ExpressionNode
equals, execute, executeIterative, onArgument, onExecute, onPrepare, prepare
-
-
-
-
Constructor Detail
-
DocumentFieldNode
public DocumentFieldNode()
Constructs an empty result node. NOTE: This instance is broken until non-optional member data is set.
-
DocumentFieldNode
public DocumentFieldNode(String fieldName)
Constructs an instance of this class with given field name.- Parameters:
fieldName
- The field whose value to retrieve.
-
-
Method Detail
-
getDocumentFieldName
public String getDocumentFieldName()
Returns the name of the field whose value to retrieve.- Returns:
- The field name.
-
setDocumentFieldName
public DocumentFieldNode setDocumentFieldName(String fieldName)
Sets the name of the field whose value to retrieve.- Parameters:
fieldName
- The field name to set.- Returns:
- This, to allow chaining.
-
getResult
public ResultNode getResult()
Description copied from class:ExpressionNode
Get the result of this expression.- Specified by:
getResult
in classExpressionNode
- Returns:
- the result as a ResultNode.
-
onGetClassId
protected int onGetClassId()
- Overrides:
onGetClassId
in classDocumentAccessorNode
-
onSerialize
protected void onSerialize(com.yahoo.vespa.objects.Serializer buf)
- Overrides:
onSerialize
in classExpressionNode
-
onDeserialize
protected void onDeserialize(com.yahoo.vespa.objects.Deserializer buf)
- Overrides:
onDeserialize
in classExpressionNode
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.yahoo.vespa.objects.Identifiable
-
equalsExpression
protected boolean equalsExpression(ExpressionNode obj)
- Specified by:
equalsExpression
in classExpressionNode
-
clone
public DocumentFieldNode clone()
- Overrides:
clone
in classExpressionNode
-
visitMembers
public void visitMembers(com.yahoo.vespa.objects.ObjectVisitor visitor)
- Overrides:
visitMembers
in classExpressionNode
-
-