org.xwiki.rendering.internal.parser
Class PlainTextStreamParser

java.lang.Object
  extended by org.xwiki.rendering.internal.parser.PlainTextStreamParser
All Implemented Interfaces:
StreamParser

@Component
@Named(value="plain/1.0")
@Singleton
public class PlainTextStreamParser
extends Object
implements StreamParser

Plain Text Parser to convert a text source into a events.

Since:
2.1M1
Version:
$Id$

Field Summary
static Pattern SPECIALSYMBOL_PATTERN
          The characters which are considered as "special" symbols for SpecialSymbolBlock .
 
Constructor Summary
PlainTextStreamParser()
           
 
Method Summary
 Syntax getSyntax()
          
 void parse(Reader source, Listener listener)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPECIALSYMBOL_PATTERN

public static final Pattern SPECIALSYMBOL_PATTERN
The characters which are considered as "special" symbols for SpecialSymbolBlock .

Constructor Detail

PlainTextStreamParser

public PlainTextStreamParser()
Method Detail

getSyntax

public Syntax getSyntax()

Specified by:
getSyntax in interface StreamParser
Returns:
the wiki syntax the parser is implementing
See Also:
Parser.getSyntax()

parse

public void parse(Reader source,
                  Listener listener)
           throws ParseException

Specified by:
parse in interface StreamParser
Parameters:
source - the content to parse
listener - receive event for each element
Throws:
ParseException - if the source cannot be read or an unexpected error happens during the parsing. Parsers should be written to not generate any error as much as possible.
See Also:
StreamParser.parse(java.io.Reader, org.xwiki.rendering.listener.Listener)


Copyright © 2004-2011 XWiki. All Rights Reserved.