Klasse DUUIDocumentController
java.lang.Object
org.texttechnologylab.duui.api.controllers.documents.DUUIDocumentController
A Controller for database operations related to the documents collection.
- Autor:
- Cedric Borkowski
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic void
deleteMany
(org.bson.conversions.Bson filter) Delete all documents matching a given filter.static org.bson.Document
findMany
(MongoDBFilters filters) Retrieve one or more documents from the database given aMongoDBFilters
object.static org.bson.Document
Retrieve a document by its id.static boolean
isActive
(org.texttechnologylab.DockerUnifiedUIMAInterface.document_handler.DUUIDocument document) Check if the document's status matches one of the statuses classified as active.static void
updateMany
(String processId, Set<org.texttechnologylab.DockerUnifiedUIMAInterface.document_handler.DUUIDocument> documents) Update the status of documents in the database.static String
validateDocumentProviders
(DUUIDocumentProvider input, DUUIDocumentProvider output) Validates both input and output settings for a process.
-
Konstruktordetails
-
DUUIDocumentController
public DUUIDocumentController()
-
-
Methodendetails
-
validateDocumentProviders
public static String validateDocumentProviders(DUUIDocumentProvider input, DUUIDocumentProvider output) Validates both input and output settings for a process.- Parameter:
input
- The input settings.output
- The output settings.- Gibt zurück:
- The missing field or an empty string if the settings are valid.
-
isActive
public static boolean isActive(org.texttechnologylab.DockerUnifiedUIMAInterface.document_handler.DUUIDocument document) Check if the document's status matches one of the statuses classified as active.- Parameter:
document
- The document to be checked.- Gibt zurück:
- If the document's status matches one of the active ones.
-
deleteMany
public static void deleteMany(org.bson.conversions.Bson filter) Delete all documents matching a given filter.- Parameter:
filter
- ABson
filter to delete only selected documents.
-
findOne
Retrieve a document by its id.- Parameter:
id
- The id of the document.- Gibt zurück:
- a document or null.
-
findMany
Retrieve one or more documents from the database given aMongoDBFilters
object.- Parameter:
filters
- AMongoDBFilters
object that contains filter options.- Gibt zurück:
- A Document containing a list of matched documents.
-
updateMany
public static void updateMany(String processId, Set<org.texttechnologylab.DockerUnifiedUIMAInterface.document_handler.DUUIDocument> documents) Update the status of documents in the database.- Parameter:
processId
- the id of the process associated with the documents.documents
- a list ofDUUIDocument
s to update.
-