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 voiddeleteMany(org.bson.conversions.Bson filter) Delete all documents matching a given filter.static org.bson.DocumentfindMany(MongoDBFilters filters) Retrieve one or more documents from the database given aMongoDBFiltersobject.static org.bson.DocumentRetrieve a document by its id.static booleanisActive(org.texttechnologylab.DockerUnifiedUIMAInterface.document_handler.DUUIDocument document) Check if the document's status matches one of the statuses classified as active.static voidupdateMany(String processId, Set<org.texttechnologylab.DockerUnifiedUIMAInterface.document_handler.DUUIDocument> documents) Update the status of documents in the database.static StringvalidateDocumentProviders(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- ABsonfilter 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 aMongoDBFiltersobject.- Parameter:
filters- AMongoDBFiltersobject 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 ofDUUIDocuments to update.
-