Coverage Report - de.glossmaker.bib.datastructure.Booklet
 
Classes in this File Line Coverage Branch Coverage Complexity
Booklet
100%
11/11
75%
6/8
1,5
 
 1  
 package de.glossmaker.bib.datastructure;
 2  
 
 3  
 import de.glossmaker.gloss.datastructure.IItem;
 4  
 
 5  
 /**
 6  
  * <p>This class implements the BibTeX <code>BOOKLET</code> item.</p>
 7  
  * Required fields:
 8  
  * <ul>
 9  
  *   <li>title</li>
 10  
  *  </ul>
 11  
  *  Optional fields:
 12  
  *  <ul>
 13  
  *    <li>author,</li>
 14  
  *    <li>howpublished,</li>
 15  
  *    <li>address,</li>
 16  
  *    <li>month,</li>
 17  
  *    <li>year,</li>
 18  
  *    <li>note.</li>
 19  
  *  </ul> 
 20  
  *  
 21  
  * @author Markus Flingelli
 22  
  *
 23  
  */
 24  
 public class Booklet extends ABibItem {
 25  
 
 26  
         Booklet(String key, EBibTeXReference reference) {
 27  50
                 super(key, reference);
 28  50
         }
 29  
         
 30  
         public Booklet(String key, String title) {
 31  17
                 super(key, EBibTeXReference.BOOKLET);
 32  17
                 setTitle(title);
 33  17
         }
 34  
         
 35  
         
 36  
         @Override
 37  
         public boolean isItemValid() {
 38  3
                 boolean result = getKey() != null && getKey().length() > 0;
 39  3
                 result &= getTitle() != null && getTitle().length() > 0;
 40  3
                 return result;
 41  
         }
 42  
         
 43  
         @Override
 44  
         public IItem cloneItem() {
 45  4
                 Booklet clone = new Booklet(getKey(), getTitle());
 46  4
                 clone.setItemValues(this);
 47  4
                 return clone;
 48  
         }
 49  
 }