|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LocationVo | Line # 30 | 11 | 10 | 100% |
1.0
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
(12) | |||
Result | |||
0.9166667
|
org.qedeq.kernel.se.test.AbstractValueObjectTestCase.testAll
![]() |
1 PASS | |
0.7916667
|
org.qedeq.kernel.se.test.AbstractValueObjectTestCase.testAll
![]() |
1 PASS | |
0.7083333
|
org.qedeq.kernel.se.test.AbstractValueObjectTestCase.testAll
![]() |
1 PASS | |
0.7083333
|
org.qedeq.kernel.se.test.AbstractValueObjectTestCase.testAll
![]() |
1 PASS | |
0.7083333
|
org.qedeq.kernel.se.test.AbstractValueObjectTestCase.testAll
![]() |
1 PASS | |
0.7083333
|
org.qedeq.kernel.se.test.AbstractValueObjectTestCase.testAll
![]() |
1 PASS | |
0.7083333
|
org.qedeq.kernel.se.test.AbstractValueObjectTestCase.testAll
![]() |
1 PASS | |
0.7083333
|
org.qedeq.kernel.se.test.AbstractValueObjectTestCase.testAll
![]() |
1 PASS | |
0.16666667
|
org.qedeq.kernel.se.common.DefaultModuleAddressTest.testGetModulePaths2
![]() |
1 PASS | |
0.16666667
|
org.qedeq.kernel.se.common.DefaultModuleAddressTest.testGetModulePaths3
![]() |
1 PASS | |
0.16666667
|
org.qedeq.kernel.se.common.DefaultModuleAddressTest.testGetModulePaths1
![]() |
1 PASS | |
0.041666668
|
org.qedeq.kernel.se.visitor.QedeqNotNullTraverserTest.testQedeq
![]() |
1 PASS | |
1 | /* This file is part of the project "Hilbert II" - http://www.qedeq.org | |
2 | * | |
3 | * Copyright 2000-2014, 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 | 6 |
![]() |
47 | 6 | this.location = location; |
48 | } | |
49 | ||
50 | /** | |
51 | * Constructs an empty location description for a module. | |
52 | */ | |
53 | 172 |
![]() |
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 | 161 |
![]() |
68 | 161 | this.location = location; |
69 | } | |
70 | ||
71 | 1786 |
![]() |
72 | 1786 | return location; |
73 | } | |
74 | ||
75 | 282 |
![]() |
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 |
![]() |
84 | 375 | return (getLocation() != null ? getLocation().hashCode() : 0); |
85 | } | |
86 | ||
87 | 246 |
![]() |
88 | 246 | if (getLocation() == null) { |
89 | 12 | return ""; |
90 | } | |
91 | 234 | return getLocation(); |
92 | } | |
93 | ||
94 | } |
|