Interface RetrievedContext.Builder

  • Method Details

    • nodeId

      Identifier of the node. Set when this result is a node (one of nodeId, edgeId, or documentId).

      Parameters:
      nodeId - Identifier of the node. Set when this result is a node (one of nodeId, edgeId, or documentId).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • edgeId

      Identifier of the edge. Set when this result is an edge (one of nodeId, edgeId, or documentId).

      Parameters:
      edgeId - Identifier of the edge. Set when this result is an edge (one of nodeId, edgeId, or documentId).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • edgeId

      Identifier of the edge. Set when this result is an edge (one of nodeId, edgeId, or documentId).

      This is a convenience method that creates an instance of the EdgeIdentifier.Builder avoiding the need to create one manually via EdgeIdentifier.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to edgeId(EdgeIdentifier).

      Parameters:
      edgeId - a consumer that will call methods on EdgeIdentifier.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • documentId

      RetrievedContext.Builder documentId(String documentId)

      Identifier of the document. Set when this result is a document (one of nodeId, edgeId, or documentId).

      Parameters:
      documentId - Identifier of the document. Set when this result is a document (one of nodeId, edgeId, or documentId).
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • entityType

      RetrievedContext.Builder entityType(String entityType)

      Specifies whether this result is a node, an edge, or a document. Valid values:

      • NODE - The result is a node.

      • EDGE - The result is an edge.

      • DOCUMENT - The result is a document.

      Parameters:
      entityType - Specifies whether this result is a node, an edge, or a document. Valid values:

      • NODE - The result is a node.

      • EDGE - The result is an edge.

      • DOCUMENT - The result is a document.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • entityType

      Specifies whether this result is a node, an edge, or a document. Valid values:

      • NODE - The result is a node.

      • EDGE - The result is an edge.

      • DOCUMENT - The result is a document.

      Parameters:
      entityType - Specifies whether this result is a node, an edge, or a document. Valid values:

      • NODE - The result is a node.

      • EDGE - The result is an edge.

      • DOCUMENT - The result is a document.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • summary

      RetrievedContext.Builder summary(String summary)

      Human-readable description or summary of the entity.

      Parameters:
      summary - Human-readable description or summary of the entity.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • content

      The retrieved content of the entity.

      Parameters:
      content - The retrieved content of the entity.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • content

      The retrieved content of the entity.

      This is a convenience method that creates an instance of the RetrievedContextContent.Builder avoiding the need to create one manually via RetrievedContextContent.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to content(RetrievedContextContent).

      Parameters:
      content - a consumer that will call methods on RetrievedContextContent.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • properties

      RetrievedContext.Builder properties(Map<String,AnyValue> properties)

      Arbitrary key-value properties stored on the entity.

      Parameters:
      properties - Arbitrary key-value properties stored on the entity.
      Returns:
      Returns a reference to this object so that method calls can be chained together.