DocumentFormatConfiguration

Inheritance: java.lang.Object

public class DocumentFormatConfiguration

Represents a type reference for DocumentFormatInstance -derived class and supported file extensions list for faster format detection.


Learn more

The following example demonstrates how to set properties for a custom format configuration.


  DocumentFormatConfiguration adobePhotoshopSettings = new DocumentFormatConfiguration();
 adobePhotoshopSettings.setExtensionFilter(".psd");
 adobePhotoshopSettings.setDocumentType(MyAdobePhotoshopFormatInstance.class);
 

Constructors

Constructor Description
DocumentFormatConfiguration() Initializes a new instance of DocumentFormatConfiguration class.

Methods

Method Description
getExtensionFilter() Gets or sets a comma (",") delimited list of file extensions (for example “.pdf”), case insensitive.
setExtensionFilter(String value) Gets or sets a comma (",") delimited list of file extensions (for example “.pdf”), case insensitive.
getDocumentType() Gets or sets the type of a class, inheriting from DocumentFormatInstance.
setDocumentType(Class value) Gets or sets the type of a class, inheriting from DocumentFormatInstance.
getInitializationData() Gets or sets data, required for DocumentFormatInstance initialization.
setInitializationData(System.Collections.Generic.Dictionary<String,String> value) Gets or sets data, required for DocumentFormatInstance initialization.
supportsExtension(String fileExtension) Checks if a given file extension can be handled as DocumentType.

DocumentFormatConfiguration()

public DocumentFormatConfiguration()

Initializes a new instance of DocumentFormatConfiguration class.

getExtensionFilter()

public final String getExtensionFilter()

Gets or sets a comma (",") delimited list of file extensions (for example “.pdf”), case insensitive.

Returns: java.lang.String

setExtensionFilter(String value)

public final void setExtensionFilter(String value)

Gets or sets a comma (",") delimited list of file extensions (for example “.pdf”), case insensitive.

Parameters:

Parameter Type Description
value java.lang.String

getDocumentType()

public final Class getDocumentType()

Gets or sets the type of a class, inheriting from DocumentFormatInstance.

Returns: java.lang.Class

setDocumentType(Class value)

public final void setDocumentType(Class value)

Gets or sets the type of a class, inheriting from DocumentFormatInstance.

Parameters:

Parameter Type Description
value java.lang.Class

getInitializationData()

public final System.Collections.Generic.Dictionary<String,String> getInitializationData()

Gets or sets data, required for DocumentFormatInstance initialization.

Returns: com.aspose.ms.System.Collections.Generic.Dictionary<java.lang.String,java.lang.String>

setInitializationData(System.Collections.Generic.Dictionary<String,String> value)

public final void setInitializationData(System.Collections.Generic.Dictionary<String,String> value)

Gets or sets data, required for DocumentFormatInstance initialization.

Parameters:

Parameter Type Description
value com.aspose.ms.System.Collections.Generic.Dictionary<java.lang.String,java.lang.String>

supportsExtension(String fileExtension)

public final boolean supportsExtension(String fileExtension)

Checks if a given file extension can be handled as DocumentType.

Parameters:

Parameter Type Description
fileExtension java.lang.String File extension, format is “.ext”

Returns: boolean - True if the extension is listed in ExtensionFilter