|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TaskBuilder
Constructs a self contained part of the Document
reading process. The TaskBuilder
will construct a completely configured and independent reading task which may be used in
conjunction with DocumentBuilder
and Read
IMPORTANT: This interface is used as a public part of the fluent read API. It is not designed to be implemented and must not be implemented by clients.
Method Summary | |
---|---|
TaskBuilder |
add(InputStream stream)
|
TaskBuilder |
add(Provider<? extends InputStream,IOException> stream)
|
LayerMappingBuilder<TaskBuilder> |
map(DocumentLayer from)
Initiate a layer mapping definition using the given from DocumentLayer . |
LayerMappingBuilder<TaskBuilder> |
map(String from)
Initiate a layer mapping definition using the given from layer name. |
LayerMappingBuilder<TaskBuilder> |
mapAnnotationsLayer()
Initiate a layer mapping definition using the annotation
layer . |
LayerMappingBuilder<TaskBuilder> |
mapBackgroundLayer()
Initiate a layer mapping definition using the background layer
. |
LayerMappingBuilder<TaskBuilder> |
mapDefaultLayer()
Initiate a layer mapping definition using the default layer . |
LayerMappingBuilder<TaskBuilder> |
mapFormLayer()
Initiate a layer mapping definition using the form layer . |
TaskBuilder |
property(String key,
Object value)
Associate a property with the task being constructed. |
TaskBuilder |
skip(int pageCountToBeSkipped)
Skips the given number of pages. |
TaskBuilder |
using(Class<? extends Format> clazz)
Specifies the Format which shall be used. |
TaskBuilder |
using(Format format)
Specifies the Format which shall be used. |
TaskBuilder |
with(ReaderControls controls)
Specify the ReaderControls to be used for this task. |
Method Detail |
---|
TaskBuilder add(Provider<? extends InputStream,IOException> stream)
TaskBuilder add(InputStream stream)
LayerMappingBuilder<TaskBuilder> map(DocumentLayer from)
from
DocumentLayer
.
LayerMappingBuilder
will provide to*
methods to specify the mapping
target.
from
- the source DocumentLayer
to map from.
LayerMappingBuilder
instance to allow fluent API use. For details
please see Read
IllegalArgumentException
- if from
is null
LayerMappingBuilder<TaskBuilder> mapDefaultLayer()
default layer
.
LayerMappingBuilder
will provide to*
methods to specify the mapping
target.
LayerMappingBuilder
instance to allow fluent API use. For details
please see Read
LayerMappingBuilder<TaskBuilder> mapBackgroundLayer()
background layer
. LayerMappingBuilder
will provide to*
methods to specify the mapping
target.
LayerMappingBuilder
instance to allow fluent API use. For details
please see Read
LayerMappingBuilder<TaskBuilder> mapAnnotationsLayer()
annotation
layer
. LayerMappingBuilder
will provide to*
methods to specify the
mapping target.
LayerMappingBuilder
instance to allow fluent API use. For details
please see Read
LayerMappingBuilder<TaskBuilder> mapFormLayer()
form layer
.
LayerMappingBuilder
will provide to*
methods to specify the mapping
target.
LayerMappingBuilder
instance to allow fluent API use. For details
please see Read
LayerMappingBuilder<TaskBuilder> map(String from)
from
layer name.
LayerMappingBuilder
will provide to*
methods to specify the mapping
target. This method is a shortcut for
map
(DocumentLayer
.get
(from))
from
- the source DocumentLayer
to map from.
LayerMappingBuilder
instance to allow fluent API use. For details
please see Read
IllegalArgumentException
- if from
is null
TaskBuilder using(Format format)
Format
which shall be used.
format
- the format to be used.
TaskBuilder
instance to allow fluent API use. For details please see
Read
TaskBuilder using(Class<? extends Format> clazz)
Format
which shall be used. Format
Class
is done in two
steps:
Format
in the FormatRegistry
Format
Class
using the default constructor.
clazz
- the Class
of the Format
to be used.
TaskBuilder
instance to allow fluent API use. For details please see
Read
IllegalArgumentException
- if clazz
is null
or no
Format
instance could be found in the FormatRegistry
and
instantiating using the default constructor failed.TaskBuilder with(ReaderControls controls)
ReaderControls
to be used for this task. This will override the inherited
defaults
from ReadConfigurer
.
controls
- the controls to be used.
TaskBuilder
instance to allow fluent API use. For details please see
Read
TaskBuilder skip(int pageCountToBeSkipped)
Example:
add(...)
.skip(5)
.add(...)
The code above will load all pages of the data specified in the first add(...)
, leave five pages unattended (not adding any content), and finally adding the data of
the second add(...)
.
This is particularly useful if page-wise annotation loading is required and some pages are not annotated at all.
pageCountToBeSkipped
- the number of pages to be skipped.
TaskBuilder
instance to allow fluent API use. For details please see
Read
TaskBuilder property(String key, Object value)
PageSegmentSource
instanced of all PageSegment
s created during the execution of
this task and may therefore be used to transport integration internal properties
key
- value
-
TaskBuilder
instance to allow fluent API use. For details please see
Read
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |