Package com.sap.ai.sdk.grounding.model
Class MetadataItem
java.lang.Object
com.sap.ai.sdk.grounding.model.MetadataItem
MetadataItem
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMetadataItem(VectorKeyValueListPair metadataItem) Add one metadata instance to thisMetadataItem.static MetadataItem.Buildercreate()Create a type-safe, fluent-api builder object to construct a newMetadataIteminstance with all required arguments.booleangetCustomField(String name) Deprecated.Get the names of the unrecognizable properties of theMetadataItem.getId()ID of collectionList of metadata of the collections or documents or chunksinthashCode()Set the id of thisMetadataIteminstance and return the same instance.metadata(List<VectorKeyValueListPair> metadata) Set the metadata of thisMetadataIteminstance and return the same instance.voidsetCustomField(String customFieldName, Object customFieldValue) Set an unrecognizable property of thisMetadataIteminstance.voidSet the id of thisMetadataIteminstance.voidsetMetadata(List<VectorKeyValueListPair> metadata) Set the metadata of thisMetadataIteminstance.toMap()Get the value of all properties of thisMetadataIteminstance including unrecognized properties.toString()
-
Constructor Details
-
MetadataItem
protected MetadataItem()Default constructor for MetadataItem.
-
-
Method Details
-
id
Set the id of thisMetadataIteminstance and return the same instance.- Parameters:
id- ID of collection- Returns:
- The same instance of this
MetadataItemclass
-
getId
ID of collection- Returns:
- id The id of this
MetadataIteminstance.
-
setId
Set the id of thisMetadataIteminstance.- Parameters:
id- ID of collection
-
metadata
Set the metadata of thisMetadataIteminstance and return the same instance.- Parameters:
metadata- List of metadata of the collections or documents or chunks- Returns:
- The same instance of this
MetadataItemclass
-
addMetadataItem
Add one metadata instance to thisMetadataItem.- Parameters:
metadataItem- The metadata that should be added- Returns:
- The same instance of type
MetadataItem
-
getMetadata
List of metadata of the collections or documents or chunks- Returns:
- metadata The metadata of this
MetadataIteminstance.
-
setMetadata
Set the metadata of thisMetadataIteminstance.- Parameters:
metadata- List of metadata of the collections or documents or chunks
-
getCustomFieldNames
Get the names of the unrecognizable properties of theMetadataItem.- 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 thisMetadataIteminstance.- 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 thisMetadataIteminstance including unrecognized properties.- Returns:
- The map of all properties
-
setCustomField
Set an unrecognizable property of thisMetadataIteminstance. 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 newMetadataIteminstance with all required arguments.
-
toMap()instead.