Klasse DUUIDocumentProvider
java.lang.Object
org.texttechnologylab.duui.analysis.document.DUUIDocumentProvider
This class is a utility to have easier access to input and output settings of an
IDUUIProcessHandler
. Providers include Dropbox, Minio and Text but is
designed to support any future cloud or database providers.- Autor:
- Cedric Borkowski
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungDUUIDocumentProvider
(String provider, String providerId, String path, String content, String fileExtension) Constructs a DUUIDocumentProvider with the specified parameters.DUUIDocumentProvider
(org.bson.Document document) Constructs a DUUIDocumentProvider from a BSON Document. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
Checks if this DUUIDocumentProvider is equal to another object.Returns the content to be analyzed if the provider is plain text.Returns the file extension filter to only select matching file extensions.getPath()
Returns the path from where to read data if the provider is notProvider
.Returns the name of the data provider.Returns the ID of the data provider connection.int
hashCode()
Returns the hash code value for this DUUIDocumentProvider.boolean
Checks if this DUUIDocumentProvider has no output.boolean
Checks if this DUUIDocumentProvider is a cloud provider.boolean
Checks if this DUUIDocumentProvider is a database provider.boolean
isText()
Checks if this DUUIDocumentProvider is a text provider.org.bson.Document
Converts this DUUIDocumentProvider to a BSON Document.
-
Konstruktordetails
-
DUUIDocumentProvider
public DUUIDocumentProvider(org.bson.Document document) Constructs a DUUIDocumentProvider from a BSON Document.- Parameter:
document
- the BSON Document containing the provider information
-
DUUIDocumentProvider
public DUUIDocumentProvider(String provider, String providerId, String path, String content, String fileExtension) Constructs a DUUIDocumentProvider with the specified parameters.- Parameter:
provider
- the name of the data providerproviderId
- the ID of the data provider connectionpath
- the path from where to read datacontent
- the content to be analyzed if the provider is plain textfileExtension
- the file extension filter
-
-
Methodendetails
-
getProvider
Returns the name of the data provider.- Gibt zurück:
- the name of the data provider
-
getPath
Returns the path from where to read data if the provider is notProvider
.- Gibt zurück:
- the path from where to read data
-
getContent
Returns the content to be analyzed if the provider is plain text.- Gibt zurück:
- the content to be analyzed
-
getFileExtension
Returns the file extension filter to only select matching file extensions.- Gibt zurück:
- the file extension filter
-
toDocument
public org.bson.Document toDocument()Converts this DUUIDocumentProvider to a BSON Document.- Gibt zurück:
- a BSON Document representing this DUUIDocumentProvider
-
equals
Checks if this DUUIDocumentProvider is equal to another object. -
hashCode
public int hashCode()Returns the hash code value for this DUUIDocumentProvider. -
hasNoOutput
public boolean hasNoOutput()Checks if this DUUIDocumentProvider has no output.- Gibt zurück:
- true if this DUUIDocumentProvider has no output, false otherwise
-
isText
public boolean isText()Checks if this DUUIDocumentProvider is a text provider.- Gibt zurück:
- true if this DUUIDocumentProvider is a text provider, false otherwise
-
isCloudProvider
public boolean isCloudProvider()Checks if this DUUIDocumentProvider is a cloud provider.- Gibt zurück:
- true if this DUUIDocumentProvider is a cloud provider, false otherwise
-
isDatabaseProvider
public boolean isDatabaseProvider()Checks if this DUUIDocumentProvider is a database provider.- Gibt zurück:
- true if this DUUIDocumentProvider is a database provider, false otherwise
-
getProviderId
Returns the ID of the data provider connection.- Gibt zurück:
- the ID of the data provider connection
-