public class AmazonS3DocumentLoader extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AmazonS3DocumentLoader.Builder |
| Constructor and Description |
|---|
AmazonS3DocumentLoader(software.amazon.awssdk.services.s3.S3Client s3Client) |
| Modifier and Type | Method and Description |
|---|---|
static AmazonS3DocumentLoader.Builder |
builder() |
Document |
loadDocument(String bucket,
String key,
DocumentParser parser)
Loads a single document from the specified S3 bucket based on the specified object key.
|
List<Document> |
loadDocuments(String bucket,
DocumentParser parser)
Loads all documents from an S3 bucket.
|
List<Document> |
loadDocuments(String bucket,
String prefix,
DocumentParser parser)
Loads all documents from an S3 bucket.
|
public AmazonS3DocumentLoader(software.amazon.awssdk.services.s3.S3Client s3Client)
public Document loadDocument(String bucket, String key, DocumentParser parser)
bucket - S3 bucket to load from.key - The key of the S3 object which should be loaded.parser - The parser to be used for parsing text from the object.RuntimeException - If S3Exception occurs.public List<Document> loadDocuments(String bucket, DocumentParser parser)
bucket - S3 bucket to load from.parser - The parser to be used for parsing text from the object.RuntimeException - If S3Exception occurs.public List<Document> loadDocuments(String bucket, String prefix, DocumentParser parser)
bucket - S3 bucket to load from.prefix - Only keys with the specified prefix will be loaded.parser - The parser to be used for parsing text from the object.RuntimeException - If S3Exception occurs.public static AmazonS3DocumentLoader.Builder builder()
Copyright © 2023. All rights reserved.