public class ClassicLayoutProcessor extends Object implements LayoutProcessor
| Constructor and Description |
|---|
ClassicLayoutProcessor() |
| Modifier and Type | Method and Description |
|---|---|
String |
format(Map<String,Object> dados)
Format the data to its string format so it can be written out.
|
String |
format(Object obj)
Format the data to its string format so it can be written out.
|
Map<String,Object> |
parse(Reader registro)
Read data from the reader formatting it according to the layout.
|
<T> T |
parse(Reader registro,
T obj)
Read data from the reader formatting it according to the layout,
and return the appropriate object populated.
|
void |
setLayout(LayoutTO layout)
Allow configure the processor with a layout.
|
void |
validate(LayoutTO layout)
Validate the layout inspecting it for conformity with this rules:
All entries must have an index.
The indexes must be contiguous.
All items must have a filler.
|
public String format(Map<String,Object> dados) throws LayoutException
LayoutProcessorformat in interface LayoutProcessordados - The data to be formated.LayoutExceptionpublic Map<String,Object> parse(Reader registro) throws LayoutException
LayoutProcessorparse in interface LayoutProcessorregistro - The source of the data to be read and parsed.LayoutExceptionpublic <T> T parse(Reader registro, T obj) throws LayoutException
LayoutProcessorparse in interface LayoutProcessorregistro - The data source.obj - The object to be populated.LayoutExceptionpublic String format(Object obj) throws LayoutException
LayoutProcessorformat in interface LayoutProcessorobj - The object to be written.LayoutExceptionpublic void setLayout(LayoutTO layout)
LayoutProcessorsetLayout in interface LayoutProcessorlayout - The layout to be used with the processor.public void validate(LayoutTO layout) throws LayoutException
Validate the layout inspecting it for conformity with this rules:
validate in interface LayoutProcessorLayoutExceptionLayoutProcessor.validate(net.sf.layoutParser.to.LayoutTO)Copyright © 2014. All Rights Reserved.