org.apache.abdera.parser
Interface Parser

All Known Subinterfaces:
NamedParser

public interface Parser


Method Summary
 ParserOptions getDefaultParserOptions()
          Return the default parser options for this Parser.
<T extends Element>
Document<T>
parse(InputStream in)
          Parse the input stream using the default character set encoding (UTF-8)
<T extends Element>
Document<T>
parse(InputStream in, ParserOptions options)
          Parse the input stream using the default character set encoding (UTF-8).
<T extends Element>
Document<T>
parse(InputStream in, String base)
          Parse the input stream using the default character set encoding (UTF-8).
<T extends Element>
Document<T>
parse(InputStream in, String base, ParserOptions options)
          Parse the input stream using using the specified Parse options.
<T extends Element>
Document<T>
parse(ReadableByteChannel buf)
          Parse the channel using using the specified Parse options.
<T extends Element>
Document<T>
parse(ReadableByteChannel buf, ParserOptions options)
          Parse the channel using using the specified Parse options.
<T extends Element>
Document<T>
parse(ReadableByteChannel buf, String base)
          Parse the channel using using the specified Parse options.
<T extends Element>
Document<T>
parse(ReadableByteChannel buf, String base, ParserOptions options)
          Parse the channel using using the specified Parse options.
<T extends Element>
Document<T>
parse(Reader in)
          Parse the reader using the default Base URI and options
<T extends Element>
Document<T>
parse(Reader in, ParserOptions options)
          Parse the reader using the specified Base URI
<T extends Element>
Document<T>
parse(Reader in, String base)
          Parse the reader using the specified Base URI
<T extends Element>
Document<T>
parse(Reader in, String base, ParserOptions options)
          Parse the reader using using the specified Parse options.
<T extends Element>
Document<T>
parse(javax.xml.stream.XMLStreamReader reader)
          Parse the input stream using the default character set encoding (UTF-8)
<T extends Element>
Document<T>
parse(javax.xml.stream.XMLStreamReader reader, String base, ParserOptions options)
          Parse the channel using using the specified Parse options.
 Parser setDefaultParserOptions(ParserOptions options)
          Set the default parser options for this Parser.
 

Method Detail

parse

<T extends Element> Document<T> parse(InputStream in)
                                  throws ParseException
Parse the input stream using the default character set encoding (UTF-8)

Parameters:
in - The input stream to parse
Returns:
The parsed Abdera Document
Throws:
ParseException - if the parse failed

parse

<T extends Element> Document<T> parse(javax.xml.stream.XMLStreamReader reader)
                                  throws ParseException
Parse the input stream using the default character set encoding (UTF-8)

Parameters:
reader - The XMLStreamReader to use to parse
Returns:
The parsed Abdera Document
Throws:
ParseException - if the parse failed

parse

<T extends Element> Document<T> parse(InputStream in,
                                      String base)
                                  throws ParseException
Parse the input stream using the default character set encoding (UTF-8). The specified Base URI is used to resolve relative references contained in the document

Parameters:
in - The input stream to parse
base - The Base URI of the document
Returns:
The parsed Abdera Document
Throws:
ParseException - if the parse failed

parse

<T extends Element> Document<T> parse(InputStream in,
                                      ParserOptions options)
                                  throws ParseException
Parse the input stream using the default character set encoding (UTF-8). The specified Base URI is used to resolve relative references contained in the document

Parameters:
in - The input stream to parse
options - The Parse options
Returns:
The parsed Abdera Document
Throws:
ParseException - if the parse failed

parse

<T extends Element> Document<T> parse(InputStream in,
                                      String base,
                                      ParserOptions options)
                                  throws ParseException
Parse the input stream using using the specified Parse options. The parse options can be used to control various aspects of the parsing process such as the character set encoding to use and whether certain elements should be ignored. The specified Base URI is used to resolve relative references contained in the document.

Parameters:
in - The input stream to parse
base - The Base URI of the document
options - The Parse Options
Returns:
The parsed Abdera Document
Throws:
ParseException - if the parse failed

parse

<T extends Element> Document<T> parse(Reader in)
                                  throws ParseException
Parse the reader using the default Base URI and options

Parameters:
in - The Reader to parse
Returns:
The parsed Abdera Document
Throws:
ParseException - if the parse failed

parse

<T extends Element> Document<T> parse(Reader in,
                                      String base)
                                  throws ParseException
Parse the reader using the specified Base URI

Parameters:
in - The Reader to parse
base - The Base URI
Returns:
The parsed Abdera Document
Throws:
ParseException - if the parse failed

parse

<T extends Element> Document<T> parse(Reader in,
                                      ParserOptions options)
                                  throws ParseException
Parse the reader using the specified Base URI

Parameters:
in - The Reader to parse
options - The Parse Options
Returns:
The parsed Abdera Document
Throws:
ParseException - if the parse failed

parse

<T extends Element> Document<T> parse(Reader in,
                                      String base,
                                      ParserOptions options)
                                  throws ParseException
Parse the reader using using the specified Parse options. The parse options can be used to control various aspects of the parsing process such as the character set encoding to use and whether certain elements should be ignored. The specified Base URI is used to resolve relative references contained in the document.

Parameters:
in - The reader to parse
base - The Base URI of the document
options - The Parse Options
Returns:
The parsed Abdera Document
Throws:
ParseException - if the parse failed

parse

<T extends Element> Document<T> parse(ReadableByteChannel buf)
                                  throws ParseException
Parse the channel using using the specified Parse options. The parse options can be used to control various aspects of the parsing process such as the character set encoding to use and whether certain elements should be ignored. The specified Base URI is used to resolve relative references contained in the document.

Parameters:
in - The ReadableByteChannel to parse
Returns:
The parsed Abdera Document
Throws:
ParseException - if the parse failed

parse

<T extends Element> Document<T> parse(ReadableByteChannel buf,
                                      String base)
                                  throws ParseException
Parse the channel using using the specified Parse options. The parse options can be used to control various aspects of the parsing process such as the character set encoding to use and whether certain elements should be ignored. The specified Base URI is used to resolve relative references contained in the document.

Parameters:
in - The ReadableByteChannel to parse
base - The Base URI of the document
Returns:
The parsed Abdera Document
Throws:
ParseException - if the parse failed

parse

<T extends Element> Document<T> parse(ReadableByteChannel buf,
                                      String base,
                                      ParserOptions options)
                                  throws ParseException
Parse the channel using using the specified Parse options. The parse options can be used to control various aspects of the parsing process such as the character set encoding to use and whether certain elements should be ignored. The specified Base URI is used to resolve relative references contained in the document.

Parameters:
in - The ReadableByteChannel to parse
base - The Base URI of the document
options - The Parse Options
Returns:
The parsed Abdera Document
Throws:
ParseException - if the parse failed

parse

<T extends Element> Document<T> parse(javax.xml.stream.XMLStreamReader reader,
                                      String base,
                                      ParserOptions options)
                                  throws ParseException
Parse the channel using using the specified Parse options. The parse options can be used to control various aspects of the parsing process such as the character set encoding to use and whether certain elements should be ignored. The specified Base URI is used to resolve relative references contained in the document.

Parameters:
reader - the XMLStreamReader parser to use to parse
base - The Base URI of the document
options - The Parse Options
Returns:
The parsed Abdera Document
Throws:
ParseException - if the parse failed

parse

<T extends Element> Document<T> parse(ReadableByteChannel buf,
                                      ParserOptions options)
                                  throws ParseException
Parse the channel using using the specified Parse options. The parse options can be used to control various aspects of the parsing process such as the character set encoding to use and whether certain elements should be ignored. The specified Base URI is used to resolve relative references contained in the document.

Parameters:
in - The ReadableByteChannel to parse
options - The Parse Options
Returns:
The parsed Abdera Document
Throws:
ParseException - if the parse failed

getDefaultParserOptions

ParserOptions getDefaultParserOptions()
Return the default parser options for this Parser. This method returns a copy of the default options. Changes to this instance will not affect the defaults returned by subsequent requests.

Returns:
The default ParserOptions

setDefaultParserOptions

Parser setDefaultParserOptions(ParserOptions options)
Set the default parser options for this Parser. This method copies the specified options.

Parameters:
options - The Parser Options to use as the default


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