public abstract class ReadConfiguration extends Object
read configurations
.Constructor and Description |
---|
ReadConfiguration() |
Modifier and Type | Method and Description |
---|---|
protected void |
add(ReadConfiguration... readConfigurations)
Add additional
ReadConfiguration s. |
void |
configure(ReadConfigurer rc)
Configure the
ReadConfiguration for the given ReadConfigurer . |
protected <T extends ReaderSettings> |
defaultControls(Class<T> settingsClass)
Access
ReaderSettings which will be used by subsequent task
creations. |
protected LayerMappingBuilder<ReadConfigurer> |
defaultLayerMapping(DocumentLayer from)
Generate a default
layer mapping which will be used by subsequent
task creations. |
protected LayerMappingBuilder<ReadConfigurer> |
defaultLayerMapping(String from)
Generate a default
layer mapping which will be used by subsequent
task creations. |
protected abstract void |
doConfigure()
doConfigure() implementations may configure the reading process using the methods
defined in this base class (except configure(ReadConfigurer) and
doConfigure() ). |
protected DocumentBuilder |
into(Document doc)
Configure a
Document as the target for reading. |
protected DocumentBuilder |
newDocument()
Create a new
Document . |
protected DocumentBuilder |
newDocument(String documentName)
|
protected TaskBuilder |
skip(int pageCountToBeSkipped)
Start a
task which skips the given number of pages. |
protected TaskBuilder |
task(InputStream source)
|
protected TaskBuilder |
task(Provider<? extends InputStream,IOException> sourceProvider)
|
public final void configure(ReadConfigurer rc)
ReadConfiguration
for the given ReadConfigurer
. This method is
synchronized by intention, as during the configuration a ReadConfiguration
is stateful.
Once configure(ReadConfigurer)
is left, the ReadConfiguration
is stateless
again.rc
- the ReadConfigurer
which shall be configured.protected abstract void doConfigure()
doConfigure()
implementations may configure the reading process using the methods
defined in this base class (except configure(ReadConfigurer)
and
doConfigure()
).protected final DocumentBuilder into(Document doc)
Document
as the target for reading. Unlike the newDocument()
and
newDocument(String)
methods, this method uses an existing Document
and adds
all loaded Page
s to the end.doc
- the Document
to append Page
s to.DocumentBuilder
instance to allow fluent API use. For details please
see Read
protected final DocumentBuilder newDocument()
Document
. The returned DocumentBuilder
will be liked to that newly
created Document
and all instructions on DocumentBuilder
will affect the
generated Document
.DocumentBuilder
instance to allow fluent API use. For details please
see Read
protected final DocumentBuilder newDocument(String documentName)
Document
and set a name
. The returned
DocumentBuilder
will be liked to that newly created Document
and all
instructions on DocumentBuilder
will affect the generated Document
.documentName
- the name
of the new Document
DocumentBuilder
instance to allow fluent API use. For details please
see Read
protected TaskBuilder skip(int pageCountToBeSkipped)
task
which skips the given number of pages. For details about the
behavior of skip(int)
please see TaskBuilder.skip(int)
.
The resulting task will inherit all previously via defaultControls(Class)
and
defaultLayerMapping(DocumentLayer)
configured defaults.
pageCountToBeSkipped
- the number of pages to be skipped.TaskBuilder
instance to allow fluent API use. For details please see
Read
protected TaskBuilder task(InputStream source)
task
which uses the given source
to load pages
from. A task
can be configured further using the methods of
TaskBuilder
.
The resulting task will inherit all previously via defaultControls(Class)
and
defaultLayerMapping(DocumentLayer)
configured defaults.
source
- the source
to load pages from.TaskBuilder
instance to allow fluent API use. For details please see
Read
protected TaskBuilder task(Provider<? extends InputStream,IOException> sourceProvider)
task
which uses the given source
to load pages
from. A task
can be configured further using the methods of
TaskBuilder
.
The resulting task will inherit all previously via defaultControls(Class)
and
defaultLayerMapping(DocumentLayer)
configured defaults.
sourceProvider
- provides an InputStream
to load pages from.TaskBuilder
instance to allow fluent API use. For details please see
Read
protected void add(ReadConfiguration... readConfigurations)
ReadConfiguration
s.readConfigurations
- the ReadConfiguration
s to includeprotected <T extends ReaderSettings> T defaultControls(Class<T> settingsClass)
ReaderSettings
which will be used by subsequent task
creations. This method works like ProcessingControls.getSettings(Class)
.T
- the target RenderSettings
type to be configured.settingsClass
- the target RenderSettings
class to configureRenderSettings
implementationprotected LayerMappingBuilder<ReadConfigurer> defaultLayerMapping(DocumentLayer from)
layer mapping
which will be used by subsequent
task
creations.from
- the source layer to build the mapping fromLayerMappingBuilder
instanceprotected LayerMappingBuilder<ReadConfigurer> defaultLayerMapping(String from)
layer mapping
which will be used by subsequent
task
creations.from
- the source layer to build the mapping fromLayerMappingBuilder
instanceIllegalArgumentException
- if from
is null
Copyright © 2024 levigo holding gmbh. All rights reserved.