Coverage Report - com.buckosoft.PicMan.dom.ChainSetSizeListDom
 
Classes in this File Line Coverage Branch Coverage Complexity
ChainSetSizeListDom
0%
0/12
0%
0/2
2
 
 1  
 /******************************************************************************
 2  
  * ChainSetSizeListDom.java - XML Contacts 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.SetSize;
 19  
 
 20  
 /** XML SetSize for PicMan's Editors
 21  
  * @author Dick Balaska
 22  
  */
 23  0
 public class ChainSetSizeListDom {
 24  
         /** Create a DOM of the SetSizes for this set for this chain
 25  
          * @param pmf The PicMan Facade
 26  
          * @param cid The chain Id to query
 27  
          * @param sid The set Id to query
 28  
          * @return A Document of SetSizes
 29  
          */
 30  
         static public Document createDocument(PicManFacade pmf, int cid, int sid) {
 31  0
                 Document document = DocumentHelper.createDocument();
 32  0
                 Element root = document.addElement("PicManContactList");
 33  0
                 List<SetSize> list = pmf.getDB().getSetSizesInChain(cid, sid);
 34  0
                 Iterator<SetSize> iter = list.iterator();
 35  0
                 while (iter.hasNext()) {
 36  0
                         SetSize ss = iter.next();
 37  0
                         Element ele = DocumentHelper.createElement("SetSize");
 38  0
                         ele.addElement("setSize").addText(ss.getGuiSetSize());
 39  0
                         root.add(ele);
 40  0
                 }
 41  0
                 return document;
 42  
         }
 43  
 
 44  
 
 45  
 }