org.apache.abdera.parser.stax
Class FOMParser

java.lang.Object
  extended by org.apache.abdera.util.AbstractParser
      extended by org.apache.abdera.parser.stax.FOMParser
All Implemented Interfaces:
Parser

public class FOMParser
extends AbstractParser
implements Parser


Field Summary
 
Fields inherited from class org.apache.abdera.util.AbstractParser
abdera, options
 
Constructor Summary
FOMParser()
           
FOMParser(Abdera abdera)
           
 
Method Summary
static javax.xml.stream.XMLStreamReader createXMLStreamReader(InputStream in)
           
static javax.xml.stream.XMLStreamReader createXMLStreamReader(InputStream in, String encoding)
           
protected  ParserOptions initDefaultParserOptions()
           
<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(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, String base, ParserOptions options)
          Parse the channel using using the specified Parse options.
 
Methods inherited from class org.apache.abdera.util.AbstractParser
getAbdera, getDefaultParserOptions, getFactory, parse, parse, parse, parse, parse, parse, parse, parse, parse, parse, parse, setAbdera, setDefaultParserOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.abdera.parser.Parser
getDefaultParserOptions, parse, parse, parse, parse, parse, parse, parse, parse, parse, parse, parse, setDefaultParserOptions
 

Constructor Detail

FOMParser

public FOMParser()

FOMParser

public FOMParser(Abdera abdera)
Method Detail

parse

public <T extends Element> Document<T> parse(InputStream in,
                                             String base,
                                             ParserOptions options)
                                  throws ParseException
Description copied from interface: Parser
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.

Specified by:
parse in interface Parser
Overrides:
parse in class AbstractParser
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

public <T extends Element> Document<T> parse(Reader in,
                                             String base,
                                             ParserOptions options)
                                  throws ParseException
Description copied from interface: Parser
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.

Specified by:
parse in interface Parser
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

createXMLStreamReader

public static javax.xml.stream.XMLStreamReader createXMLStreamReader(InputStream in,
                                                                     String encoding)
                                                              throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

createXMLStreamReader

public static javax.xml.stream.XMLStreamReader createXMLStreamReader(InputStream in)
                                                              throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

parse

public <T extends Element> Document<T> parse(javax.xml.stream.XMLStreamReader reader,
                                             String base,
                                             ParserOptions options)
                                  throws ParseException
Description copied from interface: Parser
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.

Specified by:
parse in interface Parser
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

initDefaultParserOptions

protected ParserOptions initDefaultParserOptions()
Specified by:
initDefaultParserOptions in class AbstractParser


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