Author: lemovice
Date: Mon Oct 28 23:16:04 2013
New Revision: 4637

Log:
update according to api.place modifications

Modified:
   
trunk/AncestrisExtensions/place.geonames/src/ancestris/modules/place/geonames/GeonamesPlacesList.java

Modified: 
trunk/AncestrisExtensions/place.geonames/src/ancestris/modules/place/geonames/GeonamesPlacesList.java
==============================================================================
--- 
trunk/AncestrisExtensions/place.geonames/src/ancestris/modules/place/geonames/GeonamesPlacesList.java
       (original)
+++ 
trunk/AncestrisExtensions/place.geonames/src/ancestris/modules/place/geonames/GeonamesPlacesList.java
       Mon Oct 28 23:16:04 2013
@@ -19,30 +19,17 @@
     private final static Logger logger = 
Logger.getLogger(GeonamesPlacesList.class.getName(), null);
 
     @Override
-    public List<Place> findPlace(PropertyPlace place) {
+    public List<Place> findPlace(String place) {
 
         ToponymSearchResult toponymSearchResult;
-        String[] jurisdictions = place.getJurisdictions();
 
         try {
             WebService.setUserName("lemovice");
-            int index = 0;
 
-            do {
-                // parse format
-                StringBuilder result = new StringBuilder();
-                for (int i = index; i < jurisdictions.length; i++) {
-                    result.append(jurisdictions[i].trim());
-                    if (i < jurisdictions.length) {
-                        result.append(" ");
-                    }
-                }
-                index += 1;
-                ToponymSearchCriteria toponymSearchCriteria = new 
ToponymSearchCriteria();
-                toponymSearchCriteria.setQ(result.toString());
-                toponymSearchResult = WebService.search(toponymSearchCriteria);
+            ToponymSearchCriteria toponymSearchCriteria = new 
ToponymSearchCriteria();
+            toponymSearchCriteria.setQ(place);
+            toponymSearchResult = WebService.search(toponymSearchCriteria);
 
-            } while (index < jurisdictions.length && 
toponymSearchResult.getToponyms().isEmpty());
 
             for (Toponym toponym : toponymSearchResult.getToponyms()) {
                 PostalCodeSearchCriteria postalCodeSearchCriteria = new 
PostalCodeSearchCriteria();

---------------------------------------------------------------------
Site Web Ancestris : http://www.ancestris.org

<*> Pour vous desinscrire de cette liste, envoyez un mail a :
              [email protected]
<*> Pour obtenir de l'aide sur les commandes de la liste :
              [email protected]

Pour obtenir tous les messages lies a ce fil de discussion, cliquez sur le 
lien ci-dessous, cela ouvrira votre logiciel de messagerie. Il vous suffira 
d'envoyer le message :
              [email protected]

Reply via email to