Clover coverage report - QedeqKernelSe Coverage Report
Coverage timestamp: Do Mai 10 2007 03:16:40 CEST
file stats: LOC: 97   Methods: 7
NCLOC: 33   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
LocationVo.java 100% 100% 100% 100%
coverage
 1    /* $Id: LocationVo.java,v 1.6 2007/05/10 00:37:50 m31 Exp $
 2    *
 3    * This file is part of the project "Hilbert II" - http://www.qedeq.org
 4    *
 5    * Copyright 2000-2007, Michael Meyling <mime@qedeq.org>.
 6    *
 7    * "Hilbert II" is free software; you can redistribute
 8    * it and/or modify it under the terms of the GNU General Public
 9    * License as published by the Free Software Foundation; either
 10    * version 2 of the License, or (at your option) any later version.
 11    *
 12    * This program is distributed in the hope that it will be useful,
 13    * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 15    * GNU General Public License for more details.
 16    */
 17   
 18    package org.qedeq.kernel.dto.module;
 19   
 20    import org.qedeq.kernel.base.module.Location;
 21    import org.qedeq.kernel.utility.EqualsUtility;
 22   
 23   
 24    /**
 25    * Describes the "physical" directory location for a module.
 26    * This is a full or relative URL like:
 27    * <code>http://www.qedeq.org/principia/0_01_06/</code> or <code>.</code>
 28    * or <code>file:///qedeq/</code>
 29    *
 30    * @version $Revision: 1.6 $
 31    * @author Michael Meyling
 32    */
 33    public class LocationVo implements Location {
 34   
 35    /** URL to "physical" directory location of module. */
 36    private String location;
 37   
 38   
 39    /**
 40    * Constructs a location description for a module. The <code>location</code>
 41    * parameter contains an URL that points to a directory.
 42    * This is a full or relative URL like:
 43    * <code>http://www.qedeq.org/principia/0_01_06/</code> or <code>.</code>
 44    * or <code>file:///qedeq/</code>
 45    * Here it is not tested that it is a formal correct URL.
 46    *
 47    * @param location URL directory location.
 48    */
 49  114 public LocationVo(final String location) {
 50  114 this.location = location;
 51    }
 52   
 53    /**
 54    * Constructs an empty location description for a module.
 55    */
 56  257 public LocationVo() {
 57    // nothing to do
 58    }
 59   
 60    /**
 61    * Set URL to "physical" directory location of module. The <code>location</code>
 62    * parameter contains an URL that points to a directory.
 63    * This is a full or relative URL like:
 64    * <code>http://www.qedeq.org/principia/0_01_06/</code> or <code>.</code>
 65    * or <code>file:///qedeq/</code>
 66    * Here it is not tested that it is a formal correct URL.
 67    *
 68    * @param location URL directory location.
 69    */
 70  249 public final void setLocation(final String location) {
 71  249 this.location = location;
 72    }
 73   
 74  2031 public final String getLocation() {
 75  2031 return location;
 76    }
 77   
 78  386 public boolean equals(final Object obj) {
 79  386 if (!(obj instanceof LocationVo)) {
 80  4 return false;
 81    }
 82  382 final LocationVo other = (LocationVo) obj;
 83  382 return EqualsUtility.equals(getLocation(), other.getLocation());
 84    }
 85   
 86  320 public int hashCode() {
 87  320 return (getLocation() != null ? getLocation().hashCode() : 0);
 88    }
 89   
 90  215 public String toString() {
 91  215 if (getLocation() == null) {
 92  12 return "";
 93    }
 94  203 return getLocation();
 95    }
 96   
 97    }