public static final class DocumentFormat.Builder
extends java.lang.Object
DocumentFormat
.DocumentFormat
Modifier and Type | Method and Description |
---|---|
DocumentFormat |
build()
Creates the converter that is specified by this builder.
|
DocumentFormat.Builder |
extension(java.lang.String extension)
Specifies the extension associated with the document format.
|
DocumentFormat.Builder |
from(DocumentFormat sourceFormat)
Initializes the builder by copying the properties of the specified document format.
|
DocumentFormat.Builder |
inputFamily(DocumentFamily inputFamily)
Specifies the input (when a document is loaded) DocumentFamily associated with the document
format.
|
DocumentFormat.Builder |
loadProperty(java.lang.String name,
java.lang.Object value)
Adds a property to the builder that will be applied when loading (open) a document of this
format.
|
DocumentFormat.Builder |
mediaType(java.lang.String mediaType)
Specifies the media (mime) type of the document format.
|
DocumentFormat.Builder |
name(java.lang.String name)
Specifies the name of the document format.
|
DocumentFormat.Builder |
storeProperty(DocumentFamily family,
java.lang.String name,
java.lang.Object value)
Adds a property to the builder that will be applied when storing (save) a document to this
format from a document of the specified family.
|
DocumentFormat.Builder |
unmodifiable(boolean unmodifiable)
Specifies whether the document format is unmodifiable after creation.
|
public DocumentFormat build()
public DocumentFormat.Builder from(DocumentFormat sourceFormat)
sourceFormat
- The source document format, cannot be null.public DocumentFormat.Builder extension(java.lang.String extension)
extension
- The extension, cannot be null.public DocumentFormat.Builder inputFamily(DocumentFamily inputFamily)
inputFamily
- The DocumentFamily, cannot be null.public DocumentFormat.Builder loadProperty(java.lang.String name, java.lang.Object value)
name
- The property name, cannot be null.value
- The property value, may be null. If null, it will REMOVE the property from the
map.public DocumentFormat.Builder mediaType(java.lang.String mediaType)
mediaType
- A string that represents the media type, cannot be null.public DocumentFormat.Builder name(java.lang.String name)
name
- The name of the document format, cannot be null.public DocumentFormat.Builder unmodifiable(boolean unmodifiable)
true
.unmodifiable
- true
if the created document format cannot be modified after
creation, false
otherwise.public DocumentFormat.Builder storeProperty(DocumentFamily family, java.lang.String name, java.lang.Object value)
family
- The document family of the source (loaded) document, cannot be null.name
- The property name, cannot be null.value
- The property value, may be null. If null, it will REMOVE the property from the
map.