Verified Owner
Top Description Methods
org.jabref.logic.ai.ingestion.repositories

public Interface IngestedDocumentsRepository

extends AutoCloseable
Known Direct Implementers
org.jabref.logic.ai.ingestion.repositories.MVStoreIngestedDocumentsRepository
Imports
java.util.Optional

This class is responsible for recording the information about which documents (or documents) have been fully ingested.

The class tracks files by their SHA-256 hash to detect if a file has been modified since ingestion.

Method Summary

Modifier and TypeMethod and Description
public Optional<String>
getEmbeddingModel()

The embedding model the documents were ingested with.

public boolean

Returns:

true if the file has been ingested, false otherwise
isDocumentIngested
(String
the SHA-256 hash of the file
fileHash
)

Checks if a file has been fully ingested.

public void
markDocumentAsFullyIngested(String
the SHA-256 hash of the file
fileHash
)

Marks a file as fully ingested using its hash.

public void
public void
setEmbeddingModel(String embeddingModel)

public void
unmarkDocumentAsFullyIngested(String
the SHA-256 hash of the file
fileHash
)

Removes a file from the ingested documents record.

Inherited from java.lang.AutoCloseable:
close

Method Detail

getEmbeddingModelback to summary
public Optional<String> getEmbeddingModel()

The embedding model the documents were ingested with. Empty for repositories written before this was recorded.

isDocumentIngestedback to summary
public boolean isDocumentIngested(String fileHash)

Checks if a file has been fully ingested.

Parameters
fileHash:String

the SHA-256 hash of the file

Returns:boolean

true if the file has been ingested, false otherwise

markDocumentAsFullyIngestedback to summary
public void markDocumentAsFullyIngested(String fileHash)

Marks a file as fully ingested using its hash.

Parameters
fileHash:String

the SHA-256 hash of the file

removeAllback to summary
public void removeAll()
setEmbeddingModelback to summary
public void setEmbeddingModel(String embeddingModel)
unmarkDocumentAsFullyIngestedback to summary
public void unmarkDocumentAsFullyIngested(String fileHash)

Removes a file from the ingested documents record.

Parameters
fileHash:String

the SHA-256 hash of the file