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
ConstructorDescriptionDUUINextcloudDocumentHandler
(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 void
readDocument
(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.void
writeDocument
(DUUIDocument document, String path) Write the document to the specified path.void
writeDocuments
(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, wait
Methods 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:IDUUIDocumentHandler
Write the document to the specified path.- Specified by:
writeDocument
in 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:IDUUIDocumentHandler
Write a Collection of documents to the specified path.- Specified by:
writeDocuments
in 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:IDUUIDocumentHandler
Read the content from the specified path and return a document.- Specified by:
readDocument
in interfaceIDUUIDocumentHandler
- Parameters:
path
- The full paths to the document that should be read.- Throws:
IOException
-
readDocuments
Description copied from interface:IDUUIDocumentHandler
Read the content from all given paths and return a List of documents.- Specified by:
readDocuments
in interfaceIDUUIDocumentHandler
- Parameters:
paths
- A list of full paths to the documents that should be read.- Throws:
IOException
-
listDocuments
Description copied from interface:IDUUIDocumentHandler
Retrieve a List of documents containing only metadata like name, path and size.- Specified by:
listDocuments
in 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:
getFolderStructure
in interfaceIDUUIFolderPickerApi
-