Class DUUINextcloudDocumentHandler
java.lang.Object
org.texttechnologylab.DockerUnifiedUIMAInterface.document_handler.DUUINextcloudDocumentHandler
- All Implemented Interfaces:
IDUUIDocumentHandler,IDUUIFolderPickerApi
public class DUUINextcloudDocumentHandler
extends Object
implements IDUUIDocumentHandler, IDUUIFolderPickerApi
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.texttechnologylab.DockerUnifiedUIMAInterface.document_handler.IDUUIFolderPickerApi
IDUUIFolderPickerApi.DUUIFolder -
Constructor Summary
ConstructorsConstructorDescriptionDUUINextcloudDocumentHandler(String serverName, String loginName, String password) Create a new NextCloudDocumentHandler -
Method Summary
Modifier and TypeMethodDescriptionlistDocuments(String path, String fileExtension, boolean recursive) Retrieve a List of documents containing only metadata like name, path and size.static voidreadDocument(String path) Read the content from the specified path and return a document.readDocuments(List<String> paths) Read the content from all given paths and return a List of documents.voidwriteDocument(DUUIDocument document, String path) Write the document to the specified path.voidwriteDocuments(List<DUUIDocument> documents, String path) Write a Collection of documents to the specified path.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.texttechnologylab.DockerUnifiedUIMAInterface.document_handler.IDUUIDocumentHandler
listDocuments, listDocuments
-
Constructor Details
-
DUUINextcloudDocumentHandler
Create a new NextCloudDocumentHandler- Parameters:
serverName- A URL containing the server address. (e.g.: "https://nextcloud.texttechnologylab.org/")loginName- The username used to log in to a NextCloud account.password- The password for the user.
-
-
Method Details
-
main
- Throws:
IOException
-
writeDocument
Description copied from interface:IDUUIDocumentHandlerWrite the document to the specified path.- Specified by:
writeDocumentin interfaceIDUUIDocumentHandler- Parameters:
document- The document to be written.path- The full path to the destination where the document should be written.
-
writeDocuments
Description copied from interface:IDUUIDocumentHandlerWrite a Collection of documents to the specified path.- Specified by:
writeDocumentsin interfaceIDUUIDocumentHandler- Parameters:
documents- The documents to be written.path- The full path to the destination where the documents should be written.
-
readDocument
Description copied from interface:IDUUIDocumentHandlerRead the content from the specified path and return a document.- Specified by:
readDocumentin interfaceIDUUIDocumentHandler- Parameters:
path- The full paths to the document that should be read.- Throws:
IOException
-
readDocuments
Description copied from interface:IDUUIDocumentHandlerRead the content from all given paths and return a List of documents.- Specified by:
readDocumentsin interfaceIDUUIDocumentHandler- Parameters:
paths- A list of full paths to the documents that should be read.- Throws:
IOException
-
listDocuments
Description copied from interface:IDUUIDocumentHandlerRetrieve a List of documents containing only metadata like name, path and size.- Specified by:
listDocumentsin interfaceIDUUIDocumentHandler- Parameters:
path- The full path to the folder to start the serach for matching documents.fileExtension- Specify a fileExtension to filter the list.recursive- Wether the search for files with the given extension should be recursive.
-
getFolderStructure
- Specified by:
getFolderStructurein interfaceIDUUIFolderPickerApi
-