Clover coverage report - JBind Project
Coverage timestamp: Fr Mai 28 2004 11:17:36 CEST
file stats: LOC: 44   Methods: 3
NCLOC: 25   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
IncludeJob.java 50% 100% 100% 92,3%
 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.reader;
 11   
 
 12   
 import java.net.URL;
 13   
 
 14   
 import org.jbind.xml.msg.IConstraintViolations;
 15   
 import org.jbind.xml.msg.XmlException;
 16   
 import org.jbind.xml.schema.instantiation.IIncludeJobHelper;
 17   
 import org.jbind.xml.schema.instantiation.ISchemaElement;
 18   
 
 19   
 public class IncludeJob extends SourceJob {
 20   
 
 21  10
   public IncludeJob(IIncludeJobHelper aHelper, ISchemaElement aSchemaElement) {
 22  10
     super(aHelper, aSchemaElement);
 23   
   }
 24   
 
 25  10
   protected void doExecuteCreation(IConstraintViolations aViolations) {
 26  10
     try {
 27  10
       URL url = getUrl();
 28  10
       if (!getInstantiator().hasBeenParsed(url)) {
 29  10
         ISchemaElement schemaElement = getInstantiator().parseSchema(url, getSchemaElement());
 30   
         // Uses the same instantiator to allow forward references inside the included
 31   
         // schema.
 32  9
         getInstantiator().add(new SchemaJob(getInstantiator(), schemaElement, url));
 33   
       }
 34   
     } catch (XmlException e) {
 35  1
       aViolations.add(e.getXmlMessage());
 36   
     }
 37   
   }
 38   
 
 39  1
   public String getDescription() {
 40  1
     return "includeJob: " + getLocation();
 41   
   }
 42   
 
 43   
 }
 44