private lineType getLineType ( SpanManager sm , Span lineSpan ) { switch ( lineSpan . charAt ( 0 , sm ) ) { case ' ' : if ( lineSpan . charAt ( 1 , sm ) == ' ' ) { return lineType . TABLE ; } else { return lineType . PARAGRAPH ; } case ' ' : if ( lineSpan . length ( ) > 2 && sm . charAt ( lineSpan . getEnd ( ) - 1 ) == ' ' ) { return lineType . SECTION ; } else { return lineType . PARAGRAPH ; } case ' ' : if ( lineSpan . charAt ( 1 , sm ) == ' ' && lineSpan . charAt ( 2 , sm ) == ' ' && lineSpan . charAt ( 3 , sm ) == ' ' ) { return lineType . HR ; } else { return lineType . PARAGRAPH ; } case ' ' : return lineType . NESTEDLIST ; case ' ' : return lineType . NESTEDLIST_NR ; case ' ' : return lineType . DEFINITIONLIST ; case ' ' : if ( lineSpan . length ( ) > 1 ) { if ( lineSpan . length ( ) > 2 && lineSpan . charAt ( 1 , sm ) == ' ' && lineSpan . charAt ( 2 , sm ) == ' ' ) { return lineType . TABLE ; } else { return lineType . PARAGRAPH_INDENTED ; } } else { return lineType . PARAGRAPH ; } case ' ' : int nonWSPos = lineSpan . nonWSCharPos ( sm ) ; switch ( lineSpan . charAt ( nonWSPos , sm ) ) { case Span . ERRORCHAR : return lineType . EMPTYLINE ; case ' ' : if ( lineSpan . charAt ( nonWSPos + 1 , sm ) == ' ' ) { return lineType . TABLE ; } default : return lineType . PARAGRAPH_BOXED ; } case Span . ERRORCHAR : return lineType . EMPTYLINE ; default : return lineType . PARAGRAPH ; } }
Retunrns the Type of a line this is mainly done by the First Char of the Line ...