uk.ac.ebi.intenz.tools.sib.writer
Class CC_LineFormatter

java.lang.Object
  extended by uk.ac.ebi.intenz.tools.sib.writer.DefaultLineFormatter
      extended by uk.ac.ebi.intenz.tools.sib.writer.CC_LineFormatter
All Implemented Interfaces:
LineFormatter

public class CC_LineFormatter
extends DefaultLineFormatter

Handles the special needs regarding the format of the CC line.

The CC line contains of sentences which are introduced by -!-. In some cases not all sentences are preceeded by this string, especially when it comes to ordered lists. These lists also have to be indented as shown in the example below.

Example:

Version:
$Revision: 1.2 $ $Date: 2008/01/28 11:43:23 $
Author:
Michael Darsow

Field Summary
 
Fields inherited from interface uk.ac.ebi.intenz.tools.sib.writer.LineFormatter
LINEWIDTH
 
Constructor Summary
CC_LineFormatter()
           
 
Method Summary
 String formatLines(String text, LineType lineType)
          Formats the CC lines according to the format described in the class description.
 List getCommentSentences(String commentText)
          Breaks the comment text into individual sentences.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CC_LineFormatter

public CC_LineFormatter()
Method Detail

formatLines

public String formatLines(String text,
                          LineType lineType)
                   throws EnzymeFlatFileWriteException
Formats the CC lines according to the format described in the class description.

Specified by:
formatLines in interface LineFormatter
Overrides:
formatLines in class DefaultLineFormatter
Parameters:
text - The text of the CC line(s).
lineType - Must always be LineType.CC.
Returns:
the formatted CC line(s).
Throws:
EnzymeFlatFileWriteException - if an error occured during this process.
NullPointerException - if any of the parameters is null.
IllegalArgumentException - if lineType is not LineType.CC.

getCommentSentences

public List getCommentSentences(String commentText)
Breaks the comment text into individual sentences.

Parameters:
commentText - The comment text.
Returns:
a list of sentences.


Copyright © 2013 EMBL-EBI. All Rights Reserved.