public interface LineWrapper
Unfortunately the line wrapping "rules" applied manually are sometimes following the sole rule:
if (looks nice) then wrap();
which makes it impossible to create an identical flat file in an
automated way.
Therefore the wrapping classes implementing this interface should try to cover all manual line wrapping rules which
do not follow this rule.
The line wrapping rules are defined in the following PDF file:
• enzyme_LW_rules.pdf (preliminary version, i.e. not approved by Amos)
Modifier and Type | Method and Description |
---|---|
int |
findPosition(String text,
int netLineWidth)
Returns the next position in the line where the wrapping should be performed.
|
int findPosition(String text, int netLineWidth) throws EnzymeFlatFileWriteException
This method is supposed to be used by a LineFormatter
implementation within
a loop as long as the text does not fit into one line.
text
- The text to be wrapped.netLineWidth
- Net line width (w/o line header in the begining).EnzymeFlatFileWriteException
- if an error occured during this process.Copyright © 2014 EMBL-EBI. All rights reserved.