org.apache.maven.doxia.module.xdoc
Class XdocParser

java.lang.Object
  extended by org.apache.maven.doxia.parser.AbstractParser
      extended by org.apache.maven.doxia.parser.AbstractXmlParser
          extended by org.apache.maven.doxia.module.xdoc.XdocParser
All Implemented Interfaces:
Markup, XmlMarkup, XdocMarkup, Parser

public class XdocParser
extends AbstractXmlParser
implements XdocMarkup

Parse an xdoc model and emit events into the specified doxia Sink.

Since:
1.0
Version:
$Id: XdocParser.java 586737 2007-10-20 14:57:01Z dennisl $
Author:
Jason van Zyl

Field Summary
 
Fields inherited from class org.apache.maven.doxia.parser.AbstractParser
macroManager, secondParsing
 
Fields inherited from interface org.apache.maven.doxia.module.xdoc.XdocMarkup
AUTHOR_TAG, DATE_TAG, DOCUMENT_TAG, MACRO_TAG, PROPERTIES_TAG, SECTION_TAG, SOURCE_TAG, SUBSECTION_TAG
 
Fields inherited from interface org.apache.maven.doxia.markup.XmlMarkup
BANG, CDATA
 
Fields inherited from interface org.apache.maven.doxia.markup.Markup
EOL, EQUAL, GREATER_THAN, LEFT_CURLY_BRACKET, LEFT_SQUARE_BRACKET, LESS_THAN, MINUS, PLUS, QUOTE, RIGHT_CURLY_BRACKET, RIGHT_SQUARE_BRACKET, SLASH, SPACE, STAR
 
Fields inherited from interface org.apache.maven.doxia.parser.Parser
JUSTIFY_CENTER, JUSTIFY_LEFT, JUSTIFY_RIGHT, ROLE, TXT_TYPE, UNKNOWN_TYPE, XML_TYPE
 
Constructor Summary
XdocParser()
           
 
Method Summary
protected  void handleEndTag(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, Sink sink)
          Goes through the possible end tags.
protected  void handleStartTag(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, Sink sink)
          Goes through the possible start tags.
protected  void handleText(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, Sink sink)
          Handles text events.
 void parse(java.io.Reader source, Sink sink)
          Parses the given source model and emits Doxia events into the given sink.
 
Methods inherited from class org.apache.maven.doxia.parser.AbstractXmlParser
getType
 
Methods inherited from class org.apache.maven.doxia.parser.AbstractParser
executeMacro, getBasedir, setSecondParsing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XdocParser

public XdocParser()
Method Detail

parse

public void parse(java.io.Reader source,
                  Sink sink)
           throws ParseException
Parses the given source model and emits Doxia events into the given sink.

Specified by:
parse in interface Parser
Overrides:
parse in class AbstractXmlParser
Parameters:
source - A reader that provides the source document.
sink - A sink that consumes the Doxia events.
Throws:
ParseException - if the model could not be parsed.

handleStartTag

protected void handleStartTag(org.codehaus.plexus.util.xml.pull.XmlPullParser parser,
                              Sink sink)
                       throws org.codehaus.plexus.util.xml.pull.XmlPullParserException,
                              MacroExecutionException
Goes through the possible start tags.

Specified by:
handleStartTag in class AbstractXmlParser
Parameters:
parser - A parser.
sink - the sink to receive the events.
Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException - if there's a problem parsing the model
MacroExecutionException - if there's a problem executing a macro

handleEndTag

protected void handleEndTag(org.codehaus.plexus.util.xml.pull.XmlPullParser parser,
                            Sink sink)
                     throws org.codehaus.plexus.util.xml.pull.XmlPullParserException,
                            MacroExecutionException
Goes through the possible end tags.

Specified by:
handleEndTag in class AbstractXmlParser
Parameters:
parser - A parser.
sink - the sink to receive the events.
Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException - if there's a problem parsing the model
MacroExecutionException - if there's a problem executing a macro

handleText

protected void handleText(org.codehaus.plexus.util.xml.pull.XmlPullParser parser,
                          Sink sink)
                   throws org.codehaus.plexus.util.xml.pull.XmlPullParserException
Handles text events.

Specified by:
handleText in class AbstractXmlParser
Parameters:
parser - A parser.
sink - the sink to receive the events.
Throws:
org.codehaus.plexus.util.xml.pull.XmlPullParserException - if there's a problem parsing the model


Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.