org.apache.maven.doxia.parser
Interface Parser

All Known Implementing Classes:
AbstractParser, AbstractTextParser, AbstractXmlParser

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 java.lang.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(java.io.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

static final java.lang.String ROLE
The Plexus lookup role.


UNKNOWN_TYPE

static final int UNKNOWN_TYPE
Unknown parser type

See Also:
Constant Field Values

TXT_TYPE

static final int TXT_TYPE
Text parser type

See Also:
Constant Field Values

XML_TYPE

static final int XML_TYPE
XML parser type

See Also:
Constant Field Values

JUSTIFY_CENTER

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

See Also:
Constant Field Values

JUSTIFY_LEFT

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

See Also:
Constant Field Values

JUSTIFY_RIGHT

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

See Also:
Constant Field Values
Method Detail

parse

void parse(java.io.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

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

Returns:
the type of Parser


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