Ignore:
Timestamp:
2012-08-15T13:40:27+02:00 (12 years ago)
Author:
donvip
Message:

[josm_tag2link] fix #josm7961 - Adding sources & links for ref:(FR:)?FINESS and ref:(FR:)?INSEE

Location:
applications/editors/josm/plugins/tag2link
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/tag2link/resources/tag2link_sources.xml

    r27304 r28546  
    6464            <condition k="ref:(FR:)?INSEE" v="(\p{Digit}{2})(\p{Digit}{3})" id="ref"/>
    6565            <link name="View %name% municipality sheet" href="http://www.insee.fr/fr/methodes/nomenclatures/cog/fichecommunale.asp?codedep=%ref.v.1%&amp;codecom=%ref.v.2%" />
     66            <link name="View %name% sheet on osm.fr" href="http://openstreetmap.fr/outils/etat-commune?insee=%ref.v%" />
    6667        </rule>
    6768        <rule>
     
    144145        </rule>
    145146    </source>
     147
     148    <!-- social facility -->
     149    <source name="FINESS" country-code="FR">
     150        <rule>
     151            <condition k="ref:(FR:)?FINESS" v="[A-Z0-9-]{9}" />
     152            <link name="View %name% sheet of hospital/home" href="http://finess.sante.gouv.fr/finess/jsp/actionDetailEtablissement.do?noFiness=%v%" />
     153        </rule>
     154    </source>
    146155   
    147156</tag2link>
  • applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/action/OpenLinkAction.java

    r26980 r28546  
    7979                               
    8080                        System.out.println("Opening "+filename);
    81                         OpenBrowser.displayUrl("file://"+filename);
    82                                
     81                        String result = OpenBrowser.displayUrl("file://"+filename);
     82                        if (result != null) {
     83                                System.err.println(result);
     84                        }
     85                       
    8386                        } catch (MalformedURLException ex) {
    8487                                ex.printStackTrace();
     
    8891        } else {
    8992                System.out.println("Opening "+link.url);
    90                 OpenBrowser.displayUrl(link.url);
     93                String result = OpenBrowser.displayUrl(link.url);
     94                if (result != null) {
     95                        System.err.println(result);
     96                }
    9197        }
    9298    }
Note: See TracChangeset for help on using the changeset viewer.