Clover Coverage Report
Coverage timestamp: Sa Aug 2 2008 13:56:27 CEST
../../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
11   97   9   1,57
6   33   0,82   7
7     1,29  
1    
 
  LocationVo       Line # 33 11 9 100% 1.0
 
  (44)
 
1    /* $Id: LocationVo.java,v 1.8 2008/07/26 07:59:35 m31 Exp $
2    *
3    * This file is part of the project "Hilbert II" - http://www.qedeq.org
4    *
5    * Copyright 2000-2008, 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.base.utility.EqualsUtility;
21    import org.qedeq.kernel.base.module.Location;
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.8 $
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  363 toggle public LocationVo(final String location) {
50  363 this.location = location;
51    }
52   
53    /**
54    * Constructs an empty location description for a module.
55    */
 
56  469 toggle 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  461 toggle public final void setLocation(final String location) {
71  461 this.location = location;
72    }
73   
 
74  2165 toggle public final String getLocation() {
75  2165 return location;
76    }
77   
 
78  260 toggle public boolean equals(final Object obj) {
79  260 if (!(obj instanceof LocationVo)) {
80  4 return false;
81    }
82  256 final LocationVo other = (LocationVo) obj;
83  256 return EqualsUtility.equals(getLocation(), other.getLocation());
84    }
85   
 
86  251 toggle public int hashCode() {
87  251 return (getLocation() != null ? getLocation().hashCode() : 0);
88    }
89   
 
90  146 toggle public String toString() {
91  146 if (getLocation() == null) {
92  12 return "";
93    }
94  134 return getLocation();
95    }
96   
97    }