Clover coverage report - JBind Project
Coverage timestamp: Fr Mai 28 2004 11:17:36 CEST
file stats: LOC: 57   Methods: 6
NCLOC: 36   Classes: 1
This license of Clover is provided to support the development of JBind only. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover.
 
 Source file Conditionals Statements Methods TOTAL
DocumentImpl.java 50% 81,8% 66,7% 73,7%
 1   
 /*
 2   
  * JBind
 3   
  *
 4   
  * Copyright (c) by Stefan Wachter. All rights reserved.
 5   
  *
 6   
  * Usage, modification, and redistribution is subject to license terms that are
 7   
  * available at 'http://www.jbind.org'. The JBind license is like the
 8   
  * 'Apache Software License V 1.1'.
 9   
  */
 10   
 package org.jbind.xml.instance.impl;
 11   
 
 12   
 import java.util.Iterator;
 13   
 import java.util.ListIterator;
 14   
 import java.util.Map;
 15   
 
 16   
 import org.jbind.xml.base.ILocation;
 17   
 import org.jbind.xml.core.bridge.IDocumentImpl;
 18   
 import org.jbind.xml.core.bridge.IElementImpl;
 19   
 import org.jbind.xml.core.bridge.ITextImpl;
 20   
 import org.jbind.xml.core.data.IAnyTypeData;
 21   
 
 22   
 public class DocumentImpl implements IDocumentImpl {
 23   
 
 24   
   private ImplList myImplList;
 25   
 
 26  225
   public DocumentImpl() {
 27  225
     myImplList = new ImplList(this);
 28   
   }
 29   
 
 30  0
   public IElementImpl addElement(String aNamespace, String aQName) {
 31  0
     return myImplList.addElement(aNamespace, aQName);
 32   
   }
 33   
 
 34  225
   public IElementImpl addElement(String aNamespace, String aQName, Map aPrefixMappings, ILocation aLocation) {
 35  225
     return myImplList.addElement(aNamespace, aQName, aPrefixMappings, aLocation);
 36   
   }
 37   
 
 38  0
   public ITextImpl addText(String aText, ILocation aLocation) {
 39  0
     return myImplList.addText(aText, aLocation);
 40   
   }
 41   
 
 42  170
   public IAnyTypeData getRootData() {
 43  170
     IAnyTypeData res = null;
 44  170
     Iterator i = myImplList.iterElementImpls(null, null);
 45  170
     if (i.hasNext()) {
 46  170
       IElementImpl e = (IElementImpl)i.next();
 47  170
       res = e.getData();
 48   
     }
 49  170
     return res;
 50   
   }
 51   
 
 52  8
   public ListIterator iterChildren() {
 53  8
     return myImplList.iterImpls();
 54   
   }
 55   
 
 56   
 }
 57