root / org.gvsig.proj / branches / refactor2018 / org.gvsig.proj / org.gvsig.proj.catalog / org.gvsig.proj.catalog.api / src / test / java / org / gvsig / proj / catalog / CRSCatalogLocatorTest.java @ 827
History | View | Annotate | Download (6.09 KB)
1 |
/* gvSIG. Desktop Geographic Information System.
|
---|---|
2 |
*
|
3 |
* Copyright ? 2007-2012 gvSIG Association
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU General Public License
|
7 |
* as published by the Free Software Foundation; either version 2
|
8 |
* 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 |
* You should have received a copy of the GNU General Public License
|
16 |
* along with this program; if not, write to the Free Software
|
17 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
18 |
* MA 02110-1301, USA.
|
19 |
*
|
20 |
* For any additional information, do not hesitate to contact us
|
21 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
22 |
*/
|
23 |
package org.gvsig.proj.catalog; |
24 |
|
25 |
import java.io.File; |
26 |
import java.text.ParseException; |
27 |
import java.util.List; |
28 |
|
29 |
import org.gvsig.proj.catalog.CRSCatalogLocator; |
30 |
import org.gvsig.proj.catalog.CRSCatalogManager; |
31 |
import org.gvsig.proj.catalog.CRSDefinition; |
32 |
import org.gvsig.proj.catalog.TextSerialization.Format; |
33 |
import org.gvsig.proj.catalog.TransformationDefinition; |
34 |
import org.gvsig.proj.catalog.exception.UnsupportedCoordinateReferenceSystemException; |
35 |
import org.gvsig.proj.catalog.exception.UnsupportedFormatException; |
36 |
import org.gvsig.tools.dynobject.DynObject; |
37 |
|
38 |
import junit.framework.TestCase; |
39 |
|
40 |
/**
|
41 |
* {@link CRSCatalogLocator} unit tests.
|
42 |
*
|
43 |
* @author gvSIG Team
|
44 |
*/
|
45 |
public class CRSCatalogLocatorTest extends TestCase { |
46 |
|
47 |
/**
|
48 |
* Test method for
|
49 |
* {@link org.gvsig.proj.catalogue.CRSCatalogLocator#registerManager(java.lang.Class)}
|
50 |
* .
|
51 |
*/
|
52 |
public void testRegisterManager() { |
53 |
CRSCatalogLocator |
54 |
.registerManager(DummyCRSCatalogueManager.class); |
55 |
CRSCatalogManager manager = |
56 |
CRSCatalogLocator.getManager(); |
57 |
assertTrue(manager instanceof DummyCRSCatalogueManager);
|
58 |
} |
59 |
|
60 |
public static class DummyCRSCatalogueManager implements |
61 |
CRSCatalogManager { |
62 |
|
63 |
public List getAuthorityNames() { |
64 |
// Nothing to do
|
65 |
return null; |
66 |
} |
67 |
|
68 |
public List getCodes(String authorityName) { |
69 |
// Nothing to do
|
70 |
return null; |
71 |
} |
72 |
|
73 |
public CRSDefinition getCRSDefinition(String authorityName, |
74 |
String code) {
|
75 |
// Nothing to do
|
76 |
return null; |
77 |
} |
78 |
|
79 |
public DynObject createParameters() {
|
80 |
// Nothing to do
|
81 |
return null; |
82 |
} |
83 |
|
84 |
public void initialize(DynObject parameters) { |
85 |
// Nothing to do
|
86 |
} |
87 |
|
88 |
@Override
|
89 |
public List<String> getCodes() { |
90 |
// TODO Auto-generated method stub
|
91 |
return null; |
92 |
} |
93 |
|
94 |
@Override
|
95 |
public List<String> search(String searchString) { |
96 |
// TODO Auto-generated method stub
|
97 |
return null; |
98 |
} |
99 |
|
100 |
@Override
|
101 |
public List<String> search(String authority, String searchString) { |
102 |
// TODO Auto-generated method stub
|
103 |
return null; |
104 |
} |
105 |
|
106 |
@Override
|
107 |
public CRSDefinition getCRSDefinition(String code) { |
108 |
// TODO Auto-generated method stub
|
109 |
return null; |
110 |
} |
111 |
|
112 |
@Override
|
113 |
public TransformationDefinition getTransformationDefinition(String code) { |
114 |
// TODO Auto-generated method stub
|
115 |
return null; |
116 |
} |
117 |
|
118 |
@Override
|
119 |
public String registerCoordinateReferenceSystem(String wktDefinition, String description) { |
120 |
// TODO Auto-generated method stub
|
121 |
return null; |
122 |
} |
123 |
|
124 |
@Override
|
125 |
public String registerCoordinateTransformationPVT(String sourceCRS, String targetCRS, String description, |
126 |
float xTraslation, float yTraslation, float zTraslation, float xRotation, float yRotation, |
127 |
float zRotation, float scaleDifference) { |
128 |
// TODO Auto-generated method stub
|
129 |
return null; |
130 |
} |
131 |
|
132 |
@Override
|
133 |
public String registerCoordinateTransformationCFR(String sourceCRS, String targetCRS, String description, |
134 |
float xTraslation, float yTraslation, float zTraslation, float xRotation, float yRotation, |
135 |
float zRotation, float scaleDifference) { |
136 |
// TODO Auto-generated method stub
|
137 |
return null; |
138 |
} |
139 |
|
140 |
@Override
|
141 |
public String registerCoordinateTransformation(String sourceCRS, String targetCRS, String description, |
142 |
File ntv2Grid) {
|
143 |
// TODO Auto-generated method stub
|
144 |
return null; |
145 |
} |
146 |
|
147 |
@Override
|
148 |
public List<TransformationDefinition> getCoordinateTransformations(CRSDefinition source, CRSDefinition target) { |
149 |
// TODO Auto-generated method stub
|
150 |
return null; |
151 |
} |
152 |
|
153 |
@Override
|
154 |
public List<TransformationDefinition> getCoordinateTransformations(String source, String target) { |
155 |
// TODO Auto-generated method stub
|
156 |
return null; |
157 |
} |
158 |
|
159 |
@Override
|
160 |
public String registerTransformation(String wktDefinition, String description) { |
161 |
// TODO Auto-generated method stub
|
162 |
return null; |
163 |
} |
164 |
|
165 |
@Override
|
166 |
public CRSDefinition getCompoundCRS(CRSDefinition... crsList) {
|
167 |
// TODO Auto-generated method stub
|
168 |
return null; |
169 |
} |
170 |
|
171 |
@Override
|
172 |
public void setSystemDataPath(File path) { |
173 |
// TODO Auto-generated method stub
|
174 |
|
175 |
} |
176 |
|
177 |
@Override
|
178 |
public void setUserDataPath(File path) { |
179 |
// TODO Auto-generated method stub
|
180 |
|
181 |
} |
182 |
|
183 |
@Override
|
184 |
public CRSDefinition parseCRSDefinition(String def) |
185 |
throws UnsupportedCoordinateReferenceSystemException, ParseException { |
186 |
// TODO Auto-generated method stub
|
187 |
return null; |
188 |
} |
189 |
|
190 |
@Override
|
191 |
public CRSDefinition parseCRSDefinition(String def, Format format) |
192 |
throws UnsupportedCoordinateReferenceSystemException, ParseException, UnsupportedFormatException { |
193 |
// TODO Auto-generated method stub
|
194 |
return null; |
195 |
} |
196 |
|
197 |
@Override
|
198 |
public TransformationDefinition parseTransformationDefinition(String def) |
199 |
throws ParseException { |
200 |
// TODO Auto-generated method stub
|
201 |
return null; |
202 |
} |
203 |
|
204 |
@Override
|
205 |
public TransformationDefinition parseTransformationDefinition(String def, Format format) |
206 |
throws ParseException, UnsupportedFormatException { |
207 |
// TODO Auto-generated method stub
|
208 |
return null; |
209 |
} |
210 |
|
211 |
@Override
|
212 |
public List<Format> getSupportedFormats() { |
213 |
// TODO Auto-generated method stub
|
214 |
return null; |
215 |
} |
216 |
|
217 |
} |
218 |
|
219 |
} |