Coverage Report - net.spy.digg.parsers.GalleriesParser
 
Classes in this File Line Coverage Branch Coverage Complexity
GalleriesParser
100%
7/7
100%
2/2
0
 
 1  
 package net.spy.digg.parsers;
 2  
 
 3  
 import java.io.IOException;
 4  
 
 5  
 import org.w3c.dom.Document;
 6  
 import org.w3c.dom.NodeList;
 7  
 import org.xml.sax.SAXException;
 8  
 
 9  
 import net.spy.digg.GalleryPhoto;
 10  
 
 11  3
 public class GalleriesParser extends TimePagedItemParser<GalleryPhoto> {
 12  
 
 13  
         @Override
 14  
         protected String getRootElementName() {
 15  3
                 return "gallery";
 16  
         }
 17  
 
 18  
         @Override
 19  
         protected void handleDocument(Document doc) throws SAXException,
 20  
                         IOException {
 21  
 
 22  3
                 parseCommonFields(doc);
 23  
 
 24  3
                 NodeList nl=doc.getElementsByTagName("galleryphoto");
 25  12
                 for(int i=0; i<nl.getLength(); i++) {
 26  9
                         addItem(new GalleryPhotoImpl(nl.item(i)));
 27  
                 }
 28  3
         }
 29  
 
 30  
 }