Package com.sap.ai.sdk.grounding.model
Class Collection
java.lang.Object
com.sap.ai.sdk.grounding.model.Collection
A logical grouping of content.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceBuilder helper class.static interfaceBuilder helper class. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMetadataItem(VectorKeyValueListPair metadataItem) Add one metadata instance to thisCollection.static Collection.Buildercreate()Create a type-safe, fluent-api builder object to construct a newCollectioninstance with all required arguments.embeddingConfig(EmbeddingConfig embeddingConfig) Set the embeddingConfig of thisCollectioninstance and return the same instance.booleangetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theCollection.Get embeddingConfiggetId()Unique identifier of a collection.Metadata attached to collection.getTitle()Get titleinthashCode()Set the id of thisCollectioninstance and return the same instance.metadata(List<VectorKeyValueListPair> metadata) Set the metadata of thisCollectioninstance and return the same instance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisCollectioninstance.voidsetEmbeddingConfig(EmbeddingConfig embeddingConfig) Set the embeddingConfig of thisCollectioninstance.voidSet the id of thisCollectioninstance.voidsetMetadata(List<VectorKeyValueListPair> metadata) Set the metadata of thisCollectioninstance.voidSet the title of thisCollectioninstance.Set the title of thisCollectioninstance and return the same instance.toMap()Get the value of all properties of thisCollectioninstance including unrecognized properties.toString()
-
Constructor Details
-
Collection
protected Collection()Default constructor for Collection.
-
-
Method Details
-
title
Set the title of thisCollectioninstance and return the same instance.- Parameters:
title- The title of thisCollection- Returns:
- The same instance of this
Collectionclass
-
getTitle
Get title- Returns:
- title The title of this
Collectioninstance.
-
setTitle
Set the title of thisCollectioninstance.- Parameters:
title- The title of thisCollection
-
embeddingConfig
Set the embeddingConfig of thisCollectioninstance and return the same instance.- Parameters:
embeddingConfig- The embeddingConfig of thisCollection- Returns:
- The same instance of this
Collectionclass
-
getEmbeddingConfig
Get embeddingConfig- Returns:
- embeddingConfig The embeddingConfig of this
Collectioninstance.
-
setEmbeddingConfig
Set the embeddingConfig of thisCollectioninstance.- Parameters:
embeddingConfig- The embeddingConfig of thisCollection
-
metadata
Set the metadata of thisCollectioninstance and return the same instance.- Parameters:
metadata- Metadata attached to collection. Useful to restrict search to a subset of collections.- Returns:
- The same instance of this
Collectionclass
-
addMetadataItem
Add one metadata instance to thisCollection.- Parameters:
metadataItem- The metadata that should be added- Returns:
- The same instance of type
Collection
-
getMetadata
Metadata attached to collection. Useful to restrict search to a subset of collections.- Returns:
- metadata The metadata of this
Collectioninstance.
-
setMetadata
Set the metadata of thisCollectioninstance.- Parameters:
metadata- Metadata attached to collection. Useful to restrict search to a subset of collections.
-
id
Set the id of thisCollectioninstance and return the same instance.- Parameters:
id- Unique identifier of a collection.- Returns:
- The same instance of this
Collectionclass
-
getId
Unique identifier of a collection.- Returns:
- id The id of this
Collectioninstance.
-
setId
Set the id of thisCollectioninstance.- Parameters:
id- Unique identifier of a collection.
-
getCustomFieldNames
Get the names of the unrecognizable properties of theCollection.- 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 thisCollectioninstance.- 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 thisCollectioninstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisCollectioninstance. 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 newCollectioninstance with all required arguments.
-
toMap()instead.