public class CsvLayoutProcessor extends Object implements LayoutProcessor
Constructor and Description |
---|
CsvLayoutProcessor() |
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.
|
public String format(Map<String,Object> dados) throws LayoutException
LayoutProcessor
format
in interface LayoutProcessor
dados
- The data to be formated.LayoutException
public Map<String,Object> parse(Reader registro) throws LayoutException
LayoutProcessor
parse
in interface LayoutProcessor
registro
- The source of the data to be read and parsed.LayoutException
public <T> T parse(Reader registro, T obj) throws LayoutException
LayoutProcessor
parse
in interface LayoutProcessor
registro
- The data source.obj
- The object to be populated.LayoutException
public String format(Object obj) throws LayoutException
LayoutProcessor
format
in interface LayoutProcessor
obj
- The object to be written.LayoutException
public void setLayout(LayoutTO layout)
LayoutProcessor
setLayout
in interface LayoutProcessor
layout
- 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 LayoutProcessor
LayoutException
LayoutProcessor.validate(net.sf.layoutParser.to.LayoutTO)
Copyright © 2014. All Rights Reserved.