Clover coverage report - JBind Project
Coverage timestamp: Fr Mai 28 2004 11:17:36 CEST
file stats: LOC: 41   Methods: 4
NCLOC: 23   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
SchemaDocument.java 50% 88,9% 75% 76,5%
 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.schema.element;
 11   
 
 12   
 import java.util.Iterator;
 13   
 
 14   
 import org.jbind.util.other.StrBuffer;
 15   
 
 16   
 public class SchemaDocument extends Parent implements ISchemaDocument {
 17   
 
 18  243
   public SchemaDocument() {}
 19   
 
 20  14278
   public SchemaElement getSchemaElement() {
 21  14278
     return (SchemaElement)getRootElement();
 22   
   }
 23   
 
 24  14278
   public IElement getRootElement() {
 25  14278
     IElement res = null;
 26  14278
     for (Iterator i = iterChildren(); i.hasNext(); ) {
 27  14278
       Object o = i.next();
 28  14278
       if (o instanceof IElement) {
 29  14278
         res = (IElement)o;
 30  14278
         break;
 31   
       }
 32   
     }
 33  14278
     return res;
 34   
   }
 35   
 
 36  0
   public String toString() {
 37  0
     return new StrBuffer("document:\n").append(getRootElement()).toString();
 38   
   }
 39   
 
 40   
 }
 41