public class BindyFixedLengthFactory extends BindyAbstractFactory implements BindyFactory
annotatedLinkFields, crlf, eol, formatFactory, modelClassNames, models
Constructor and Description |
---|
BindyFixedLengthFactory(Class<?> type) |
Modifier and Type | Method and Description |
---|---|
void |
bind(org.apache.camel.CamelContext camelContext,
List<String> data,
Map<String,Object> model,
int line)
The bind allow to read the content of a record (expressed as a List
|
void |
bind(org.apache.camel.CamelContext camelContext,
String recordStr,
Map<String,Object> model,
int line) |
Class<?> |
footer()
Gets the type of the footer record.
|
boolean |
hasFooter()
Flag indicating if we have a footer
|
boolean |
hasHeader()
Flag indicating if we have a header
|
Class<?> |
header()
Gets the type of the header record.
|
void |
initAnnotatedFields()
Find fields annotated in each class of the model
|
void |
initFixedLengthModel()
method uses to initialize the model representing the classes who will bind the data.
|
boolean |
isCountGrapheme()
Flag indicating whether graphemes or codepoints are counted.
|
boolean |
isFooter()
Flag indicating whether this factory is for a footer
|
boolean |
isHeader()
Flag indicating whether this factory is for a header
|
boolean |
isIgnoreMissingChars()
Flag indicating whether too short lines are ignored
|
boolean |
isIgnoreTrailingChars()
Flag indicating whether trailing characters beyond the last declared field may be ignored
|
char |
paddingchar()
Padding char used to fill the field
|
int |
recordLength()
Expected fixed length of the record
|
boolean |
skipFooter()
Flag indicating whether to skip the footer processing
|
boolean |
skipHeader()
Flag indicating whether to skip the header parsing
|
String |
unbind(org.apache.camel.CamelContext camelContext,
Map<String,Object> model)
The unbind is used to transform the content of the classes model objects into a string.
|
factory, formatString, generateKey, getCarriageReturn, getDefaultValueForPrimitive, getEndOfLine, getLocale, initModel, link, setFormatFactory, setLocale, supportsModel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initModel
public void initFixedLengthModel() throws Exception
Exception
public void initAnnotatedFields()
BindyAbstractFactory
initAnnotatedFields
in class BindyAbstractFactory
public void bind(org.apache.camel.CamelContext camelContext, List<String> data, Map<String,Object> model, int line) throws Exception
BindyFactory
bind
in interface BindyFactory
bind
in class BindyAbstractFactory
data
- Listmodel
- Mapline
- is the position of the record into the fileException
- can be thrownpublic void bind(org.apache.camel.CamelContext camelContext, String recordStr, Map<String,Object> model, int line) throws Exception
Exception
public String unbind(org.apache.camel.CamelContext camelContext, Map<String,Object> model) throws Exception
BindyFactory
unbind
in interface BindyFactory
unbind
in class BindyAbstractFactory
model
- MapException
- can be thrownpublic Class<?> header()
void.class
.public boolean hasHeader()
public Class<?> footer()
void.class
.public boolean hasFooter()
public boolean skipHeader()
public boolean skipFooter()
public boolean isHeader()
public boolean isFooter()
public char paddingchar()
public int recordLength()
public boolean isIgnoreTrailingChars()
public boolean isIgnoreMissingChars()
public boolean isCountGrapheme()
Apache Camel