Coverage Report - com.buckosoft.PicMan.dom.SetsInChainDom
 
Classes in this File Line Coverage Branch Coverage Complexity
SetsInChainDom
0%
0/10
0%
0/2
2
 
 1  
 /******************************************************************************
 2  
  * SetsInChainDom.java - XML Partial  for PicMan's Editors
 3  
  * 
 4  
  * PicMan - The BuckoSoft Picture Manager in Java
 5  
  * Copyright(c) 2008 - Dick Balaska
 6  
  * 
 7  
  */
 8  
 package com.buckosoft.PicMan.dom;
 9  
 
 10  
 import java.util.Iterator;
 11  
 import java.util.List;
 12  
 
 13  
 import org.dom4j.Document;
 14  
 import org.dom4j.DocumentHelper;
 15  
 import org.dom4j.Element;
 16  
 
 17  
 import com.buckosoft.PicMan.business.PicManFacade;
 18  
 import com.buckosoft.PicMan.domain.Set;
 19  
 
 20  
 /** XML Sets in a chain
 21  
  * @author Dick Balaska
 22  
  */
 23  0
 public class SetsInChainDom {
 24  
         /** Create a DOM of the Sets in this Chain
 25  
          * @param pmf The PicMan Facade
 26  
          * @param cid The chain Id to query
 27  
          * @return A Document of the Sets in this chain
 28  
          */
 29  
         static public Document createDocument(PicManFacade pmf, int cid) {
 30  0
                 Document document = DocumentHelper.createDocument();
 31  0
                 Element root = document.addElement("PicManSetsInChain");
 32  0
                 List<Set> sets = pmf.getDB().getSetsInChain(cid);
 33  0
                 Iterator<Set> iter = sets.iterator();
 34  0
                 while (iter.hasNext()) {
 35  0
                         Set set = iter.next();
 36  0
                         root.add(SetManDom.getSetElement(set));
 37  0
                 }
 38  0
                 return document;
 39  
         }
 40  
 
 41  
 }