net.spy.digg.parsers
Class PagedItemParser<T>

java.lang.Object
  extended by net.spy.digg.parsers.BaseParser
      extended by net.spy.digg.parsers.PagedItemParser<T>
Direct Known Subclasses:
TimePagedItemParser, UsersParser

public abstract class PagedItemParser<T>
extends BaseParser

Base class for paged results.


Constructor Summary
PagedItemParser()
           
 
Method Summary
protected  void addItem(T item)
          Add an item.
 int getCount()
          Get the number of items returned.
 java.util.Collection<T> getItems()
          Get the items.
 int getOffset()
          Get the offset from which these results began.
 long getTimestamp()
          Get the timestamp.
 int getTotal()
          Get the total number of matches.
protected  void parseCommonFields(org.w3c.dom.Document doc)
          Extract the common paged stuff from the given document.
 
Methods inherited from class net.spy.digg.parsers.BaseParser
getAttr, getAttr, getDocument, getRootElementName, handleDocument, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PagedItemParser

public PagedItemParser()
Method Detail

parseCommonFields

protected void parseCommonFields(org.w3c.dom.Document doc)
Extract the common paged stuff from the given document.


addItem

protected void addItem(T item)
Add an item.


getCount

public int getCount()
Get the number of items returned.


getOffset

public int getOffset()
Get the offset from which these results began.


getTimestamp

public long getTimestamp()
Get the timestamp.


getTotal

public int getTotal()
Get the total number of matches.


getItems

public java.util.Collection<T> getItems()
Get the items.