org.apache.maven.doxia.module.fml
Class FmlParser

java.lang.Object
  extended by org.apache.maven.doxia.module.fml.FmlParser
All Implemented Interfaces:
Parser

public class FmlParser
extends java.lang.Object
implements Parser

Parse a fml model and emit events into the specified doxia Sink.

Since:
1.0
Version:
$Id: FmlParser.java 566992 2007-08-17 09:55:05Z ltheussl $
Author:
Emmanuel Venisse

Field Summary
 
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
FmlParser()
           
 
Method Summary
 int getType()
          The parser type value could be Parser.UNKNOWN_TYPE, Parser.TXT_TYPE or Parser.XML_TYPE.
 void parse(java.io.Reader reader, Sink sink)
          Parses the given source model and emits Doxia events into the given sink.
 Faqs parseFml(org.codehaus.plexus.util.xml.pull.XmlPullParser parser, Sink sink)
          Parses an fml and emits the events into the given sink.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FmlParser

public FmlParser()
Method Detail

parse

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

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

getType

public int getType()
The parser type value could be Parser.UNKNOWN_TYPE, Parser.TXT_TYPE or Parser.XML_TYPE.

Specified by:
getType in interface Parser
Returns:
the type of Parser

parseFml

public Faqs parseFml(org.codehaus.plexus.util.xml.pull.XmlPullParser parser,
                     Sink sink)
              throws java.io.IOException,
                     org.codehaus.plexus.util.xml.pull.XmlPullParserException
Parses an fml and emits the events into the given sink.

Parameters:
parser - The parser to use.
sink - The sink to consume the event.
Returns:
Faqs The parsed faqs model.
Throws:
java.io.IOException - if the model cannot be read.
org.codehaus.plexus.util.xml.pull.XmlPullParserException - if the model cannot be parsed.


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