Changeset 16743 in osm for applications


Ignore:
Timestamp:
2009-07-31T12:16:51+02:00 (15 years ago)
Author:
rcernoch
Message:

Patch applied

Location:
applications/editors/josm/plugins/czechaddress
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/czechaddress

    • Property svn:ignore
      •  

        old new  
        11build
        22.log.xsl.swp
         3.git
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/PrimUtils.java

    r15585 r16743  
    1414    public static final String KEY_PLACE        = "place";
    1515
    16     public static final String KEY_ADDR_CP      = "addr:alternatenumber";
    17     public static final String KEY_ADDR_CO      = "addr:housenumber";
     16    public static final String KEY_ADDR_CP      = "addr:conscriptionnumber";
     17    public static final String KEY_ADDR_CO      = "addr:streetnumber";
     18    public static final String KEY_ADDR_HOUSE_N = "addr:housenumber";
    1819    public static final String KEY_ADDR_STREET  = "addr:street";
    1920    public static final String KEY_ADDR_CITY    = "addr:city";
  • applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/House.java

    r15649 r16743  
    9393    public static String generateName(String cp, String co) {
    9494
    95         if ((cp != null) && (co != null))
    96             return cp + "/" + co;
    97 
    98         if (co != null) return co;
    99         if (cp != null) return cp;
    100 
    101         assert false;
    102         return ""; // <-- just to make compiler happy.
     95        if (co == null)
     96            return cp;
     97        else {
     98            if (cp == null)
     99                return "?/"+co;
     100            else
     101                return cp+"/"+co;
     102        }
    103103    }
    104104
     
    153153    @Override
    154154    protected int[] getFieldMatchList(OsmPrimitive prim) {
    155         int[] result = {0, 0};
     155        int[] result = {0, 0, 0};
    156156        if (!isMatchable(prim)) return result;
    157157
    158158        // First field is the AlternateNubmer
    159159        result[0] = matchField(this.cp, prim.get(PrimUtils.KEY_ADDR_CP));
     160        result[2] = matchField(name,    prim.get(PrimUtils.KEY_ADDR_HOUSE_N));
    160161       
    161162        // Second field is the Housenumber
     
    191192        ParentResolver resolver = new ParentResolver(this);
    192193
     194        props.add(getStringFieldDiff(PrimUtils.KEY_ADDR_HOUSE_N, prim.get(PrimUtils.KEY_ADDR_HOUSE_N), name));
     195
    193196        props.add(getStringFieldDiff(PrimUtils.KEY_ADDR_CP, prim.get(PrimUtils.KEY_ADDR_CP), getCP()));
    194197        props.add(getStringFieldDiff(PrimUtils.KEY_ADDR_CO, prim.get(PrimUtils.KEY_ADDR_CO), getCO()));
Note: See TracChangeset for help on using the changeset viewer.