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