Package com.sap.ai.sdk.grounding.model
Class DocumentWithoutChunks
java.lang.Object
com.sap.ai.sdk.grounding.model.DocumentWithoutChunks
A single document stored in a collection by ID without exposing its chunks.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static interfaceBuilder helper class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for DocumentWithoutChunks. -
Method Summary
Modifier and TypeMethodDescriptionaddMetadataItem(VectorDocumentKeyValueListPair metadataItem) Add one metadata instance to thisDocumentWithoutChunks.create()Create a type-safe, fluent-api builder object to construct a newDocumentWithoutChunksinstance with all required arguments.booleangetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theDocumentWithoutChunks.getId()Unique identifier of a document.Get metadatainthashCode()Set the id of thisDocumentWithoutChunksinstance and return the same instance.metadata(List<VectorDocumentKeyValueListPair> metadata) Set the metadata of thisDocumentWithoutChunksinstance and return the same instance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisDocumentWithoutChunksinstance.voidSet the id of thisDocumentWithoutChunksinstance.voidsetMetadata(List<VectorDocumentKeyValueListPair> metadata) Set the metadata of thisDocumentWithoutChunksinstance.toMap()Get the value of all properties of thisDocumentWithoutChunksinstance including unrecognized properties.toString()
-
Constructor Details
-
DocumentWithoutChunks
protected DocumentWithoutChunks()Default constructor for DocumentWithoutChunks.
-
-
Method Details
-
metadata
@Nonnull public DocumentWithoutChunks metadata(@Nonnull List<VectorDocumentKeyValueListPair> metadata) Set the metadata of thisDocumentWithoutChunksinstance and return the same instance.- Parameters:
metadata- The metadata of thisDocumentWithoutChunks- Returns:
- The same instance of this
DocumentWithoutChunksclass
-
addMetadataItem
@Nonnull public DocumentWithoutChunks addMetadataItem(@Nonnull VectorDocumentKeyValueListPair metadataItem) Add one metadata instance to thisDocumentWithoutChunks.- Parameters:
metadataItem- The metadata that should be added- Returns:
- The same instance of type
DocumentWithoutChunks
-
getMetadata
Get metadata- Returns:
- metadata The metadata of this
DocumentWithoutChunksinstance.
-
setMetadata
Set the metadata of thisDocumentWithoutChunksinstance.- Parameters:
metadata- The metadata of thisDocumentWithoutChunks
-
id
Set the id of thisDocumentWithoutChunksinstance and return the same instance.- Parameters:
id- Unique identifier of a document.- Returns:
- The same instance of this
DocumentWithoutChunksclass
-
getId
Unique identifier of a document.- Returns:
- id The id of this
DocumentWithoutChunksinstance.
-
setId
Set the id of thisDocumentWithoutChunksinstance.- Parameters:
id- Unique identifier of a document.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theDocumentWithoutChunks.- Returns:
- The set of properties names
-
getCustomField
@Nullable @Deprecated public Object getCustomField(@Nonnull String name) throws NoSuchElementException Deprecated.UsetoMap()instead.Get the value of an unrecognizable property of thisDocumentWithoutChunksinstance.- Parameters:
name- The name of the property- Returns:
- The value of the property
- Throws:
NoSuchElementException- If no property with the given name could be found.
-
toMap
Get the value of all properties of thisDocumentWithoutChunksinstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisDocumentWithoutChunksinstance. If the map previously contained a mapping for the key, the old value is replaced by the specified value.- Parameters:
customFieldName- The name of the propertycustomFieldValue- The value of the property
-
equals
-
hashCode
public int hashCode() -
toString
-
create
Create a type-safe, fluent-api builder object to construct a newDocumentWithoutChunksinstance with all required arguments.
-
toMap()instead.