biweekly
Class Biweekly.ParserChainXmlReader

java.lang.Object
  extended by biweekly.Biweekly.ParserChainXmlReader
Enclosing class:
Biweekly

public static class Biweekly.ParserChainXmlReader
extends Object

Chainer class for parsing XML-encoded iCalendar objects (xCal).

See Also:
Biweekly.parseXml(InputStream), Biweekly.parseXml(File), Biweekly.parseXml(Reader)

Constructor Summary
Biweekly.ParserChainXmlReader(File file)
           
Biweekly.ParserChainXmlReader(Reader reader)
           
 
Method Summary
 List<ICalendar> all()
          Reads all iCalendar objects from the data stream.
 ICalendar first()
          Reads the first iCalendar object from the data stream.
 Biweekly.ParserChainXmlReader register(ICalComponentMarshaller<? extends ICalComponent> marshaller)
          Registers a component marshaller.
 Biweekly.ParserChainXmlReader register(ICalPropertyMarshaller<? extends ICalProperty> marshaller)
          Registers a property marshaller.
 T warnings(List<List<String>> warnings)
          Provides a list for putting the parser warnings into.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Biweekly.ParserChainXmlReader

public Biweekly.ParserChainXmlReader(Reader reader)

Biweekly.ParserChainXmlReader

public Biweekly.ParserChainXmlReader(File file)
Method Detail

register

public Biweekly.ParserChainXmlReader register(ICalPropertyMarshaller<? extends ICalProperty> marshaller)
Registers a property marshaller.

Parameters:
marshaller - the marshaller
Returns:
this

register

public Biweekly.ParserChainXmlReader register(ICalComponentMarshaller<? extends ICalComponent> marshaller)
Registers a component marshaller.

Parameters:
marshaller - the marshaller
Returns:
this

first

public ICalendar first()
                throws IOException,
                       SAXException
Reads the first iCalendar object from the data stream.

Returns:
the first iCalendar object or null if there are none
Throws:
IOException - if there a problem reading from the data stream
SAXException - if there's a problem parsing the XML

all

public List<ICalendar> all()
                    throws IOException,
                           SAXException
Reads all iCalendar objects from the data stream.

Returns:
the parsed iCalendar objects
Throws:
IOException - if there's a problem reading from the data stream
SAXException - if there's a problem parsing the XML

warnings

public T warnings(List<List<String>> warnings)
Provides a list for putting the parser warnings into.

Parameters:
warnings - the list object to populate (it is a "list of lists"--each parsed ICalendar object has its own warnings list)
Returns:
this


Copyright © 2013 Michael Angstadt. All Rights Reserved.