Clover coverage report - JBind Project
Coverage timestamp: Fr Mai 28 2004 11:17:36 CEST
file stats: LOC: 57   Methods: 6
NCLOC: 38   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
Import.java 75% 86,7% 83,3% 84%
 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 org.jbind.xml.base.IAttribute;
 13   
 import org.jbind.xml.base.IBindingAttributes;
 14   
 import org.jbind.xml.base.INamespaces;
 15   
 import org.jbind.xml.msg.XmlException;
 16   
 import org.jbind.xml.schema.instantiation.IHasTopLevelJobs;
 17   
 
 18   
 public class Import extends AdditionalSource implements IImport {
 19   
 
 20   
   private String myNamespace = INamespaces.NO;
 21   
 
 22  26
   public Import(CreationParams aCreationParams) {
 23  26
     super(aCreationParams);
 24   
   }
 25   
 
 26  50
   protected IAttribute doCreateAttribute(ACParams anACParams) throws XmlException {
 27  50
     IAttribute res = null;
 28  50
     String an = NameUtil.getSchemaAttributeName(anACParams);
 29  50
     String upan = NameUtil.getBindingAttributeName(anACParams);
 30  50
     if (IBindingAttributes.PACKAGE.equals(upan)) {
 31  0
       res = new Attribute(anACParams);
 32  50
     } else if ("namespace".equals(an)) {
 33  24
       res = new Attribute(anACParams);
 34  24
       myNamespace = res.getStringValue();
 35   
     } else {
 36  26
       res = super.doCreateAttribute(anACParams);
 37   
     }
 38  50
     return res;
 39   
   }
 40   
 
 41  26
   public String getNamespace() {
 42  26
     return myNamespace;
 43   
   }
 44   
 
 45  26
   public void createAndAddJob(IHasTopLevelJobs aSchemaJob) {
 46  26
     aSchemaJob.addImportJob(this);
 47   
   }
 48   
 
 49  0
   public String getStringBindingAttribute(String aName) {
 50  0
     return super.getStringBindingAttribute(aName);
 51   
   }
 52   
 
 53  24
   public String getLocalStringBindingAttribute(String aName) {
 54  24
     return super.getLocalStringBindingAttribute(aName);
 55   
   }
 56   
 }
 57