org.apache.maven.doxia.parser
Interface Parser

All Known Implementing Classes:
AbstractParser

public interface Parser

A Parser is responsible for parsing any document in a supported front-end format, and emitting the standard Doxia events, which can then be consumed by any Doxia Sink.

Since:
1.0
Version:
$Id: Parser.java 564180 2007-08-09 12:15:44Z vsiveton $
Author:
Jason van Zyl

Field Summary
static int JUSTIFY_CENTER
          Used for table cells: justify center.
static int JUSTIFY_LEFT
          Used for table cells: justify left.
static int JUSTIFY_RIGHT
          Used for table cells: justify right.
static String ROLE
          The Plexus lookup role.
static int TXT_TYPE
          Text parser type
static int UNKNOWN_TYPE
          Unknown parser type
static int XML_TYPE
          XML parser type
 
Method Summary
 int getType()
          The parser type value could be UNKNOWN_TYPE, TXT_TYPE or XML_TYPE.
 void parse(Reader source, org.apache.maven.doxia.sink.Sink sink)
          Parses the given source model and emits Doxia events into the given sink.
 

Field Detail

ROLE

public static final String ROLE
The Plexus lookup role.


UNKNOWN_TYPE

public static final int UNKNOWN_TYPE
Unknown parser type

See Also:
Constant Field Values

TXT_TYPE

public static final int TXT_TYPE
Text parser type

See Also:
Constant Field Values

XML_TYPE

public static final int XML_TYPE
XML parser type

See Also:
Constant Field Values

JUSTIFY_CENTER

public static final int JUSTIFY_CENTER
Used for table cells: justify center.

See Also:
Constant Field Values

JUSTIFY_LEFT

public static final int JUSTIFY_LEFT
Used for table cells: justify left.

See Also:
Constant Field Values

JUSTIFY_RIGHT

public static final int JUSTIFY_RIGHT
Used for table cells: justify right.

See Also:
Constant Field Values
Method Detail

parse

public void parse(Reader source,
                  org.apache.maven.doxia.sink.Sink sink)
           throws ParseException
Parses the given source model and emits Doxia events into the given sink.

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.

getType

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

Returns:
the type of Parser


Copyright © 2002-2007 The Apache Software Foundation. All Rights Reserved.