svn-gvsig-desktop / branches / v2_0_0_prep / libraries / org.gvsig.geocoding / src-test / org / gvsig / geocoding / massive / TestMassiveGeocoding.java @ 32479
History | View | Annotate | Download (16.5 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
|
23 |
/*
|
24 |
* AUTHORS (In addition to CIT):
|
25 |
* 2008 Prodevelop S.L main development
|
26 |
*/
|
27 |
|
28 |
package org.gvsig.geocoding.massive; |
29 |
|
30 |
import java.io.File; |
31 |
import java.io.IOException; |
32 |
import java.util.ArrayList; |
33 |
import java.util.Iterator; |
34 |
import java.util.List; |
35 |
import java.util.Map; |
36 |
import java.util.Set; |
37 |
import java.util.TreeMap; |
38 |
|
39 |
import org.gvsig.LayerServer; |
40 |
import org.gvsig.fmap.dal.DALLocator; |
41 |
import org.gvsig.fmap.dal.DataManager; |
42 |
import org.gvsig.fmap.dal.DataServerExplorer; |
43 |
import org.gvsig.fmap.dal.DataTypes; |
44 |
import org.gvsig.fmap.dal.NewDataStoreParameters; |
45 |
import org.gvsig.fmap.dal.exception.DataException; |
46 |
import org.gvsig.fmap.dal.feature.EditableFeature; |
47 |
import org.gvsig.fmap.dal.feature.EditableFeatureType; |
48 |
import org.gvsig.fmap.dal.feature.Feature; |
49 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
50 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
51 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
52 |
import org.gvsig.fmap.dal.feature.FeatureType; |
53 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemServerExplorer; |
54 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemServerExplorerParameters; |
55 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemStoreParameters; |
56 |
import org.gvsig.fmap.dal.store.dbf.DBFNewStoreParameters; |
57 |
import org.gvsig.fmap.dal.store.dbf.DBFStoreParameters; |
58 |
import org.gvsig.fmap.dal.store.dbf.DBFStoreProvider; |
59 |
import org.gvsig.fmap.dal.store.shp.SHPNewStoreParameters; |
60 |
import org.gvsig.fmap.dal.store.shp.SHPStoreProvider; |
61 |
import org.gvsig.fmap.geom.Geometry; |
62 |
import org.gvsig.fmap.geom.GeometryLocator; |
63 |
import org.gvsig.fmap.geom.GeometryManager; |
64 |
import org.gvsig.fmap.geom.exception.CreateGeometryException; |
65 |
import org.gvsig.fmap.geom.primitive.Point; |
66 |
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect; |
67 |
import org.gvsig.geocoding.Geocoder; |
68 |
import org.gvsig.geocoding.GeocodingLocator; |
69 |
import org.gvsig.geocoding.address.Address; |
70 |
import org.gvsig.geocoding.address.ComposedAddress; |
71 |
import org.gvsig.geocoding.address.Literal; |
72 |
import org.gvsig.geocoding.address.impl.DefaultAddress; |
73 |
import org.gvsig.geocoding.address.impl.DefaultLiteral; |
74 |
import org.gvsig.geocoding.impl.DataGeocoderImpl; |
75 |
import org.gvsig.geocoding.impl.DefaultGeocodingLibrary; |
76 |
import org.gvsig.geocoding.pattern.GeocodingPattern; |
77 |
import org.gvsig.geocoding.pattern.GeocodingSource; |
78 |
import org.gvsig.geocoding.pattern.impl.DefaultGeocodingPattern; |
79 |
import org.gvsig.geocoding.pattern.impl.DefaultGeocodingSource; |
80 |
import org.gvsig.geocoding.result.GeocodingResult; |
81 |
import org.gvsig.geocoding.styles.AbstractGeocodingStyle; |
82 |
import org.gvsig.geocoding.styles.impl.SimpleCentroid; |
83 |
import org.gvsig.tools.library.Library; |
84 |
import org.slf4j.Logger; |
85 |
import org.slf4j.LoggerFactory; |
86 |
|
87 |
/**
|
88 |
* Test
|
89 |
*
|
90 |
* @author <a href="mailto:jsanz@prodevelop.es"> Jorge Gaspar Sanz Salinas</a>
|
91 |
* @author <a href="mailto:vsanjaime@prodevelop.es"> Vicent Sanjaime Calvet</a>
|
92 |
*/
|
93 |
|
94 |
public class TestMassiveGeocoding extends |
95 |
org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase { |
96 |
private static DataManager dataManager = DALLocator.getDataManager(); |
97 |
private static final Logger log = LoggerFactory |
98 |
.getLogger(TestMassiveGeocoding.class); |
99 |
private GeocodingPattern pat = null; |
100 |
private List<Set<GeocodingResult>> listResults; |
101 |
|
102 |
/**
|
103 |
* tearDown
|
104 |
*/
|
105 |
public void tearDown() { |
106 |
|
107 |
} |
108 |
|
109 |
/**
|
110 |
* geocoding Massive
|
111 |
*
|
112 |
* @throws DataException
|
113 |
* @throws CreateGeometryException
|
114 |
* @throws IOException
|
115 |
*/
|
116 |
public void testMassive() throws Exception { |
117 |
|
118 |
Geocoder geocoder = GeocodingLocator.getInstance().getGeocoder(); |
119 |
((DataGeocoderImpl) geocoder).setPattern(pat); |
120 |
((DataGeocoderImpl) geocoder).setStore(LayerServer.getSHPStore(LayerServer.getStreetsFile())); |
121 |
|
122 |
// Get addresses
|
123 |
List<Address> addresses = getAddresses();
|
124 |
|
125 |
for (Address addr : addresses) {
|
126 |
Set<GeocodingResult> results = null; |
127 |
try {
|
128 |
results = geocoder.geocode(addr); |
129 |
} catch (Exception e) { |
130 |
log.error("Geocoding", e);
|
131 |
} |
132 |
listResults.add(results); |
133 |
} |
134 |
assertEquals(6, listResults.size());
|
135 |
|
136 |
// Create DBF file
|
137 |
FeatureStore allResults = createDBFAllResults(); |
138 |
|
139 |
// Create Layer select results
|
140 |
FeatureStore selResults = createGeocodingResultsLayer(); |
141 |
fillSelectedResultsStore(selResults, allResults); |
142 |
} |
143 |
|
144 |
/**
|
145 |
* geocoding Massive
|
146 |
*
|
147 |
* @throws DataException
|
148 |
* @throws IOException
|
149 |
*/
|
150 |
private FeatureStore createDBFAllResults() throws DataException, |
151 |
IOException {
|
152 |
|
153 |
File dbfFile = File.createTempFile("allresults", ".dbf"); |
154 |
log.debug("Creating temp file at " + dbfFile.getAbsolutePath());
|
155 |
|
156 |
FeatureStore store = null;
|
157 |
DataManager manager = DALLocator.getDataManager(); |
158 |
|
159 |
if (dbfFile != null) { |
160 |
// build DBF store
|
161 |
File parentfile = dbfFile.getParentFile();
|
162 |
|
163 |
FilesystemServerExplorerParameters exParam = null;
|
164 |
try {
|
165 |
exParam = (FilesystemServerExplorerParameters) manager |
166 |
.createServerExplorerParameters(FilesystemServerExplorer.NAME); |
167 |
|
168 |
exParam.setRoot(parentfile.getAbsolutePath()); |
169 |
|
170 |
DataServerExplorer serverExplorer = manager |
171 |
.createServerExplorer(exParam); |
172 |
|
173 |
NewDataStoreParameters newParams = serverExplorer |
174 |
.getAddParameters(DBFStoreProvider.NAME); |
175 |
((FilesystemStoreParameters) newParams).setFile(dbfFile); |
176 |
EditableFeatureType featureType = generateFeatureTypeAllResults( |
177 |
store, listResults.get(0));
|
178 |
((DBFNewStoreParameters) newParams) |
179 |
.setDefaultFeatureType(featureType); |
180 |
serverExplorer.add(newParams, true);
|
181 |
|
182 |
// fill DBF store
|
183 |
int max = 10; |
184 |
|
185 |
DBFStoreParameters dbfParameters = (DBFStoreParameters) manager |
186 |
.createStoreParameters(DBFStoreProvider.NAME); |
187 |
dbfParameters.setFile(dbfFile); |
188 |
|
189 |
store = (FeatureStore) manager.createStore(dbfParameters); |
190 |
store.edit(); |
191 |
|
192 |
int id = 0; |
193 |
int idres = 0; |
194 |
|
195 |
Integer[] sels = { 0, 0, 0, 0, 0, 0 }; |
196 |
for (Set<GeocodingResult> set : listResults) { |
197 |
int sel = sels[idres];
|
198 |
int i = 0; |
199 |
int selec = 0; |
200 |
for (GeocodingResult res : set) {
|
201 |
if (i >= max) {
|
202 |
break;
|
203 |
} |
204 |
EditableFeature feature = store.createNewFeature(); |
205 |
// FIRST fields
|
206 |
feature.setInt("gID", id);
|
207 |
feature.setInt("gID_RESUL", idres);
|
208 |
if (selec == sel) {
|
209 |
feature.setInt("gSELECT", 1); |
210 |
} else {
|
211 |
feature.setInt("gSELECT", 0); |
212 |
} |
213 |
feature.setDouble("gSCORE", res.getScore());
|
214 |
Point pto = (Point) res.getGeometry(); |
215 |
feature.setDouble("gX", pto.getX());
|
216 |
feature.setDouble("gY", pto.getY());
|
217 |
// Dynamic address fields
|
218 |
Map<String, String> comps = getMapAddressElements(res |
219 |
.getAddress()); |
220 |
for (String key : comps.keySet()) { |
221 |
feature.setString(key, comps.get(key)); |
222 |
} |
223 |
store.insert(feature); |
224 |
id++; |
225 |
i++; |
226 |
selec++; |
227 |
} |
228 |
idres++; |
229 |
} |
230 |
store.finishEditing(); |
231 |
store.dispose(); |
232 |
|
233 |
} catch (Exception e) { |
234 |
log.error("Creating dbf store", e);
|
235 |
} |
236 |
} |
237 |
assertTrue(dbfFile.exists()); |
238 |
return store;
|
239 |
} |
240 |
|
241 |
/**
|
242 |
* get pattern
|
243 |
*
|
244 |
* @return
|
245 |
*/
|
246 |
private GeocodingPattern getPattern() {
|
247 |
|
248 |
GeocodingPattern pat = new DefaultGeocodingPattern();
|
249 |
|
250 |
try {
|
251 |
pat.setPatternName("SimpleCentroidLines");
|
252 |
|
253 |
GeocodingSource source = new DefaultGeocodingSource();
|
254 |
source.setLayerName("Streets.shp");
|
255 |
source.setLayerProvider("Shape file");
|
256 |
|
257 |
AbstractGeocodingStyle style = new SimpleCentroid();
|
258 |
Literal relations = new DefaultLiteral();
|
259 |
relations.put("Calle", "STREET_NAM"); |
260 |
|
261 |
style.setRelationsLiteral(relations); |
262 |
source.setStyle(style); |
263 |
|
264 |
pat.setSource(source); |
265 |
|
266 |
} catch (Exception e) { |
267 |
log.error("Building a pattern", e);
|
268 |
} |
269 |
|
270 |
return pat;
|
271 |
} |
272 |
|
273 |
private List<Address> getAddresses() throws Exception { |
274 |
List<Address> list = new ArrayList<Address>(); |
275 |
FeatureStore store = LayerServer.getDBFStore(LayerServer |
276 |
.getStreetsMassiveFile()); |
277 |
try {
|
278 |
FeatureSet features = store.getFeatureSet(); |
279 |
for (int i = 0; i < features.getSize(); i++) { |
280 |
list.add(getTableAddress(i)); |
281 |
} |
282 |
} catch (Exception e) { |
283 |
log.error("", e);
|
284 |
} |
285 |
|
286 |
return list;
|
287 |
|
288 |
} |
289 |
|
290 |
public Address getTableAddress(int row) throws Exception { |
291 |
|
292 |
Address address = null;
|
293 |
FeatureStore store = LayerServer.getDBFStore(LayerServer |
294 |
.getStreetsMassiveFile()); |
295 |
try {
|
296 |
FeatureType type = store.getDefaultFeatureType(); |
297 |
FeatureAttributeDescriptor nameDesc = type |
298 |
.getAttributeDescriptor("tcalle");
|
299 |
|
300 |
// Get store from Gmodel and the feature
|
301 |
FeatureSet features = null;
|
302 |
Feature feature = null;
|
303 |
|
304 |
features = store.getFeatureSet(); |
305 |
Iterator<Feature> it = features.iterator(row);
|
306 |
feature = it.next(); |
307 |
|
308 |
// Create the address
|
309 |
address = new DefaultAddress();
|
310 |
DefaultLiteral literal = new DefaultLiteral();
|
311 |
|
312 |
for (int i = 0; i < features.getSize(); i++) { |
313 |
if (row == i) {
|
314 |
String key = "calle"; |
315 |
Object obj = feature.get(nameDesc.getName());
|
316 |
String value = obj.toString();
|
317 |
literal.put(key, value); |
318 |
} |
319 |
|
320 |
} |
321 |
address.setMainLiteral(literal); |
322 |
|
323 |
} catch (DataException e) {
|
324 |
log.error("Get the feature of FeatureStore", e);
|
325 |
} |
326 |
|
327 |
return address;
|
328 |
} |
329 |
|
330 |
/**
|
331 |
* Build feature type dbf all results
|
332 |
*
|
333 |
* @return
|
334 |
* @throws DataException
|
335 |
*/
|
336 |
private EditableFeatureType generateFeatureTypeAllResults(
|
337 |
FeatureStore store, Set<GeocodingResult> result)
|
338 |
throws DataException {
|
339 |
|
340 |
boolean compose = false; |
341 |
boolean cross = true; |
342 |
|
343 |
// address fields
|
344 |
Address address = null;
|
345 |
for (GeocodingResult res : result) {
|
346 |
address = res.getAddress(); |
347 |
break;
|
348 |
} |
349 |
Literal mainLiteral = address.getMainLiteral(); |
350 |
int cant = mainLiteral.size();
|
351 |
Set<String> fields = mainLiteral.keySet(); |
352 |
int i = 0; |
353 |
|
354 |
if (address instanceof ComposedAddress) { |
355 |
compose = true;
|
356 |
ComposedAddress caddress = (ComposedAddress) address; |
357 |
List<Literal> inter = caddress.getIntersectionLiterals();
|
358 |
if (inter.size() == 2) { |
359 |
cross = false;
|
360 |
} |
361 |
} |
362 |
|
363 |
EditableFeatureType eFType = store.getDefaultFeatureType() |
364 |
.getEditable(); |
365 |
eFType.add("gID", DataTypes.INT).setSize(10); |
366 |
eFType.add("gID_RESUL", DataTypes.INT).setSize(10); |
367 |
eFType.add("gSELECT", DataTypes.INT).setSize(10); |
368 |
eFType.add("gSCORE", DataTypes.DOUBLE).setSize(10); |
369 |
eFType.add("gX", DataTypes.DOUBLE).setSize(14); |
370 |
eFType.add("gY", DataTypes.DOUBLE).setSize(14); |
371 |
|
372 |
// no compose address
|
373 |
if (!compose) {
|
374 |
for (String field : fields) { |
375 |
eFType.add(field, DataTypes.STRING).setSize(20);
|
376 |
} |
377 |
} |
378 |
// compose address
|
379 |
else {
|
380 |
for (String field : fields) { |
381 |
eFType.add(field + "_1", DataTypes.STRING).setSize(20); |
382 |
} |
383 |
for (String field : fields) { |
384 |
eFType.add(field + "_2", DataTypes.STRING).setSize(20); |
385 |
} |
386 |
// compose between address
|
387 |
if (!cross) {
|
388 |
for (String field : fields) { |
389 |
eFType.add(field + "_3", DataTypes.STRING).setSize(20); |
390 |
} |
391 |
} |
392 |
} |
393 |
return eFType;
|
394 |
} |
395 |
|
396 |
/**
|
397 |
* get list address elements
|
398 |
*
|
399 |
* @param address
|
400 |
* @return
|
401 |
*/
|
402 |
private Map<String, String> getMapAddressElements(Address address) { |
403 |
|
404 |
TreeMap<String, String> map = new TreeMap<String, String>(); |
405 |
|
406 |
Literal lit = address.getMainLiteral(); |
407 |
for (String mKey : lit.keySet()) { |
408 |
map.put("0_" + mKey, lit.get(mKey));
|
409 |
} |
410 |
|
411 |
if (address instanceof ComposedAddress) { |
412 |
ComposedAddress cAddress = (ComposedAddress) address; |
413 |
|
414 |
List<Literal> interLit = cAddress.getIntersectionLiterals();
|
415 |
String iKey;
|
416 |
for (int i = 0; i < interLit.size(); i++) { |
417 |
lit = interLit.get(i); |
418 |
for (String mKey : lit.keySet()) { |
419 |
iKey = Integer.toString(i + 1); |
420 |
map.put(iKey + "_" + mKey, lit.get(mKey));
|
421 |
} |
422 |
} |
423 |
} |
424 |
|
425 |
return map;
|
426 |
} |
427 |
|
428 |
/**
|
429 |
*
|
430 |
* @param shpFile
|
431 |
* @return
|
432 |
*/
|
433 |
private FeatureStore createGeocodingResultsLayer() {
|
434 |
|
435 |
FeatureStore lyrstore = null;
|
436 |
|
437 |
File shpFile = new File("c:/geoco/shpresults.shp"); |
438 |
|
439 |
FLyrVect lyr = null;
|
440 |
FilesystemServerExplorerParameters explorerParam = null;
|
441 |
|
442 |
DataManager manager = DALLocator.getDataManager(); |
443 |
|
444 |
File directory = shpFile.getParentFile();
|
445 |
|
446 |
try {
|
447 |
explorerParam = (FilesystemServerExplorerParameters) manager |
448 |
.createServerExplorerParameters(FilesystemServerExplorer.NAME); |
449 |
explorerParam.setRoot(directory.getAbsolutePath()); |
450 |
|
451 |
DataServerExplorer serverExplorer = manager |
452 |
.createServerExplorer(explorerParam); |
453 |
|
454 |
SHPNewStoreParameters newShpParams = (SHPNewStoreParameters) serverExplorer |
455 |
.getAddParameters(SHPStoreProvider.NAME); |
456 |
newShpParams.setSHPFileName(shpFile.getName()); |
457 |
newShpParams.setFile(shpFile); |
458 |
|
459 |
EditableFeatureType featureType = generateFeatureTypeSelectedResult(lyrstore); |
460 |
newShpParams.setDefaultFeatureType(featureType); |
461 |
serverExplorer.add(newShpParams, true);
|
462 |
|
463 |
lyrstore = (FeatureStore) dataManager.createStore(newShpParams); |
464 |
|
465 |
// LayerFactory factory = LayerFactory.getInstance();
|
466 |
// String name = shpFile.getName();
|
467 |
// lyr = (FLyrVect) factory.createLayer(name, newShpParams);
|
468 |
// lyrstore = lyr.getFeatureStore();
|
469 |
|
470 |
} catch (Exception e) { |
471 |
log.error("ERROR building FLayer");
|
472 |
} |
473 |
|
474 |
return lyrstore;
|
475 |
} |
476 |
|
477 |
/**
|
478 |
* Build feature type of the selected results store
|
479 |
*
|
480 |
* @return
|
481 |
* @throws DataException
|
482 |
*/
|
483 |
private EditableFeatureType generateFeatureTypeSelectedResult(
|
484 |
FeatureStore store) throws DataException {
|
485 |
|
486 |
EditableFeatureType eFType = store.getDefaultFeatureType() |
487 |
.getEditable(); |
488 |
|
489 |
eFType.add("gID_RESUL", DataTypes.INT).setSize(10); |
490 |
eFType.add("id", DataTypes.STRING).setSize(10); |
491 |
eFType.add("gSCORE", DataTypes.DOUBLE).setSize(10); |
492 |
eFType.add("gX", DataTypes.DOUBLE).setSize(14); |
493 |
eFType.add("gY", DataTypes.DOUBLE).setSize(14); |
494 |
// GEOM field
|
495 |
eFType.add("gGEOMETRY", DataTypes.GEOMETRY).setSize(14); |
496 |
eFType.setDefaultGeometryAttributeName("gGEOMETRY");
|
497 |
|
498 |
return eFType;
|
499 |
} |
500 |
|
501 |
/**
|
502 |
* Fill selected results store
|
503 |
*
|
504 |
* @param newstore
|
505 |
* @throws DataException
|
506 |
* @throws CreateGeometryException
|
507 |
*/
|
508 |
private void fillSelectedResultsStore(FeatureStore newstore, |
509 |
FeatureStore allResults) throws DataException,
|
510 |
CreateGeometryException { |
511 |
|
512 |
Integer[] sels = { 0, 0, 0, 0, 0, 0 }; |
513 |
|
514 |
newstore.edit(FeatureStore.MODE_APPEND); |
515 |
int i = 0; |
516 |
for (Set<GeocodingResult> set : listResults) { |
517 |
int sel = sels[i];
|
518 |
|
519 |
GeocodingResult resu = null;
|
520 |
int j = 0; |
521 |
for (GeocodingResult res : set) {
|
522 |
if (j == sel) {
|
523 |
resu = res; |
524 |
break;
|
525 |
} |
526 |
j++; |
527 |
} |
528 |
|
529 |
EditableFeature feature = newstore.createNewFeature(); |
530 |
|
531 |
String fieldname = "id"; |
532 |
// feature.setInt(GeocodingTags.gID, i);
|
533 |
|
534 |
if (resu != null) { |
535 |
|
536 |
FeatureSet feats = allResults.getFeatureSet(); |
537 |
Iterator<Feature> it = feats.iterator(i);
|
538 |
Feature tableFeat = it.next(); |
539 |
Object obj = tableFeat.get(fieldname);
|
540 |
|
541 |
feature.setInt("gID_RESUL", i);
|
542 |
|
543 |
feature.set(fieldname, obj); |
544 |
|
545 |
feature.setDouble("gSCORE", resu.getScore());
|
546 |
Point pto = (Point) resu.getGeometry(); |
547 |
feature.setDouble("gX", pto.getX());
|
548 |
feature.setDouble("gY", pto.getY());
|
549 |
GeometryManager geomManager = GeometryLocator |
550 |
.getGeometryManager(); |
551 |
Point geom = (Point) geomManager.createPoint(pto.getX(), pto |
552 |
.getY(), Geometry.SUBTYPES.GEOM2D); |
553 |
|
554 |
feature.setGeometry("gGEOMETRY", geom);
|
555 |
} |
556 |
newstore.insert(feature); |
557 |
i++; |
558 |
} |
559 |
newstore.finishEditing(); |
560 |
newstore.dispose(); |
561 |
} |
562 |
|
563 |
@Override
|
564 |
protected void doSetUp() throws Exception { |
565 |
|
566 |
Library geocoLib = new DefaultGeocodingLibrary();
|
567 |
geocoLib.initialize(); |
568 |
geocoLib.postInitialize(); |
569 |
|
570 |
listResults = new ArrayList<Set<GeocodingResult>>(); |
571 |
pat = getPattern(); |
572 |
|
573 |
} |
574 |
|
575 |
} |