org.xwiki.rendering.internal.parser
Class AbstractBlockParser

java.lang.Object
  extended by org.xwiki.rendering.internal.parser.AbstractBlockParser
All Implemented Interfaces:
Parser
Direct Known Subclasses:
PlainTextBlockParser

public abstract class AbstractBlockParser
extends java.lang.Object
implements Parser

Common code for Parser implementation that produce a XDOM from StreamParser.

Since:
2.1M1
Version:
$Id$

Constructor Summary
AbstractBlockParser()
           
 
Method Summary
protected  StreamParser getStreamParser()
           
 XDOM parse(java.io.Reader source)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xwiki.rendering.parser.Parser
getSyntax
 

Constructor Detail

AbstractBlockParser

public AbstractBlockParser()
Method Detail

getStreamParser

protected StreamParser getStreamParser()
Returns:
the StreamParser to use to parser the input content

parse

public XDOM parse(java.io.Reader source)
           throws ParseException

Specified by:
parse in interface Parser
Parameters:
source - the content to parse
Returns:
the tree representation of the content as Blocks
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:
Parser.parse(java.io.Reader)


Copyright © 2004-2011 XWiki. All Rights Reserved.