Clover coverage report - dom4j - 1.6.1
Coverage timestamp: ma mei 16 2005 14:23:01 GMT+01:00
file stats: LOC: 111   Methods: 7
NCLOC: 26   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ElementDecl.java - 71,4% 57,1% 64,3%
coverage coverage
 1    /*
 2    * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
 3    *
 4    * This software is open source.
 5    * See the bottom of this file for the licence.
 6    */
 7   
 8    package org.dom4j.dtd;
 9   
 10    /**
 11    * <p>
 12    * <code>AttributeDecl</code> represents an element declaration in a DTD.
 13    * </p>
 14    *
 15    * @author <a href="mailto:james.strachan@metastuff.com">James Strachan </a>
 16    * @version $Revision: 1.6 $
 17    */
 18    public class ElementDecl {
 19    /** Holds value of property name. */
 20    private String name;
 21   
 22    /** Holds value of property model. */
 23    private String model;
 24   
 25  0 public ElementDecl() {
 26    }
 27   
 28  11 public ElementDecl(String name, String model) {
 29  11 this.name = name;
 30  11 this.model = model;
 31    }
 32   
 33    /**
 34    * Getter for property name.
 35    *
 36    * @return Value of property name.
 37    */
 38  11 public String getName() {
 39  11 return name;
 40    }
 41   
 42    /**
 43    * Setter for property name.
 44    *
 45    * @param name
 46    * New value of property name.
 47    */
 48  0 public void setName(String name) {
 49  0 this.name = name;
 50    }
 51   
 52    /**
 53    * Getter for property model.
 54    *
 55    * @return Value of property model.
 56    */
 57  11 public String getModel() {
 58  11 return model;
 59    }
 60   
 61    /**
 62    * Setter for property model.
 63    *
 64    * @param model
 65    * New value of property model.
 66    */
 67  0 public void setModel(String model) {
 68  0 this.model = model;
 69    }
 70   
 71  18 public String toString() {
 72  18 return "<!ELEMENT " + name + " " + model + ">";
 73    }
 74    }
 75   
 76    /*
 77    * Redistribution and use of this software and associated documentation
 78    * ("Software"), with or without modification, are permitted provided that the
 79    * following conditions are met:
 80    *
 81    * 1. Redistributions of source code must retain copyright statements and
 82    * notices. Redistributions must also contain a copy of this document.
 83    *
 84    * 2. Redistributions in binary form must reproduce the above copyright notice,
 85    * this list of conditions and the following disclaimer in the documentation
 86    * and/or other materials provided with the distribution.
 87    *
 88    * 3. The name "DOM4J" must not be used to endorse or promote products derived
 89    * from this Software without prior written permission of MetaStuff, Ltd. For
 90    * written permission, please contact dom4j-info@metastuff.com.
 91    *
 92    * 4. Products derived from this Software may not be called "DOM4J" nor may
 93    * "DOM4J" appear in their names without prior written permission of MetaStuff,
 94    * Ltd. DOM4J is a registered trademark of MetaStuff, Ltd.
 95    *
 96    * 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org
 97    *
 98    * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND
 99    * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 100    * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 101    * ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE
 102    * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 103    * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 104    * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 105    * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 106    * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 107    * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 108    * POSSIBILITY OF SUCH DAMAGE.
 109    *
 110    * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
 111    */