Clover Coverage Report
Coverage timestamp: Fri May 24 2013 13:47:27 UTC
../../../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
11   94   10   1.57
6   33   0.91   7
7     1.43  
1    
 
  LocationVo       Line # 30 11 10 100% 1.0
 
  (107)
 
1    /* This file is part of the project "Hilbert II" - http://www.qedeq.org
2    *
3    * Copyright 2000-2013, Michael Meyling <mime@qedeq.org>.
4    *
5    * "Hilbert II" is free software; you can redistribute
6    * it and/or modify it under the terms of the GNU General Public
7    * License as published by the Free Software Foundation; either
8    * version 2 of the License, or (at your option) any later version.
9    *
10    * This program is distributed in the hope that it will be useful,
11    * but WITHOUT ANY WARRANTY; without even the implied warranty of
12    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13    * GNU General Public License for more details.
14    */
15   
16    package org.qedeq.kernel.se.dto.module;
17   
18    import org.qedeq.base.utility.EqualsUtility;
19    import org.qedeq.kernel.se.base.module.Location;
20   
21   
22    /**
23    * Describes the "physical" directory location for a module.
24    * This is a full or relative URL like:
25    * <code>http://www.qedeq.org/principia/0_01_06/</code> or <code>.</code>
26    * or <code>file:///qedeq/</code>
27    *
28    * @author Michael Meyling
29    */
 
30    public class LocationVo implements Location {
31   
32    /** URL to "physical" directory location of module. */
33    private String location;
34   
35   
36    /**
37    * Constructs a location description for a module. The <code>location</code>
38    * parameter contains an URL that points to a directory.
39    * This is a full or relative URL like:
40    * <code>http://www.qedeq.org/principia/0_01_06/</code> or <code>.</code>
41    * or <code>file:///qedeq/</code>
42    * Here it is not tested that it is a formal correct URL.
43    *
44    * @param location URL directory location.
45    */
 
46  1555 toggle public LocationVo(final String location) {
47  1555 this.location = location;
48    }
49   
50    /**
51    * Constructs an empty location description for a module.
52    */
 
53  1658 toggle public LocationVo() {
54    // nothing to do
55    }
56   
57    /**
58    * Set URL to "physical" directory location of module. The <code>location</code>
59    * parameter contains an URL that points to a directory.
60    * This is a full or relative URL like:
61    * <code>http://www.qedeq.org/principia/0_01_06/</code> or <code>.</code>
62    * or <code>file:///qedeq/</code>
63    * Here it is not tested that it is a formal correct URL.
64    *
65    * @param location URL directory location.
66    */
 
67  1647 toggle public final void setLocation(final String location) {
68  1647 this.location = location;
69    }
70   
 
71  5913 toggle public final String getLocation() {
72  5913 return location;
73    }
74   
 
75  282 toggle public boolean equals(final Object obj) {
76  282 if (!(obj instanceof LocationVo)) {
77  4 return false;
78    }
79  278 final LocationVo other = (LocationVo) obj;
80  278 return EqualsUtility.equals(getLocation(), other.getLocation());
81    }
82   
 
83  375 toggle public int hashCode() {
84  375 return (getLocation() != null ? getLocation().hashCode() : 0);
85    }
86   
 
87  246 toggle public String toString() {
88  246 if (getLocation() == null) {
89  12 return "";
90    }
91  234 return getLocation();
92    }
93   
94    }