Klasse DUUIDocumentController

java.lang.Object
org.texttechnologylab.duui.api.controllers.documents.DUUIDocumentController

public class DUUIDocumentController extends Object
A Controller for database operations related to the documents collection.
Autor:
Cedric Borkowski
  • 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 - A Bson filter to delete only selected documents.
    • findOne

      public static org.bson.Document findOne(String id)
      Retrieve a document by its id.
      Parameter:
      id - The id of the document.
      Gibt zurück:
      a document or null.
    • findMany

      public static org.bson.Document findMany(MongoDBFilters filters)
      Retrieve one or more documents from the database given aMongoDBFilters object.
      Parameter:
      filters - A MongoDBFilters 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 of DUUIDocuments to update.