Changeset 16436 in osm for applications


Ignore:
Timestamp:
2009-07-11T15:42:48+02:00 (15 years ago)
Author:
stoecker
Message:

fix j2803

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

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/validator/ignoretags.cfg

    r16346 r16436  
    4848; Highway Key/Value Pairs
    4949;
     50K:highway=motorway_link
     51K:highway=trunk_link
     52K:highway=primary_link
    5053K:highway=secondary_link
    5154K:oneway=-1
     
    6669K:aeroway=apron
    6770K:aeroway=hanger
     71K:aeroway=helipad
    6872K:aeroway=runway
    6973K:aeroway=taxiway
     
    7276; Amenity Key/Value Pairs
    7377;
     78K:amenity=arts_centre
     79K:amenity=atm
     80K:amenity=baby_hatch
     81K:amenity=bank
    7482K:amenity=bbq
     83K:amenity=bench
     84K:amenity=biergarten
     85K:amenity=bicycle_parking
     86K:amenity=bicycle_rental
     87K:amenity=bureau_de_change
     88K:amenity=bus_station
     89K:amenity=brothel
     90K:amenity=cafe
     91K:amenity=car_rental
     92K:amenity=car_sharing
     93K:amenity=cinema
     94K:amenity=college
     95K:amenity=courthouse
     96K:amenity=crematorium
     97K:amenity=dentist
     98K:amenity=doctors
     99K:amenity=drinking_water
     100K:amenity=embassy
     101K:amenity=emergency_phone
     102K:amenity=fast_food
     103K:amenity=ferry_terminal
     104K:amenity=fire_station
     105K:amenity=food_court
     106K:amenity=fountain
     107K:amenity=fuel
     108K:amenity=grave_yard
     109K:amenity=grit_bin
     110K:amenity=hospital
     111K:amenity=hunting_stand
     112K:amenity=kindergarten
     113K:amenity=library
     114K:amenity=marketplace
     115K:amenity=nightclub
     116K:amenity=parking
     117K:amenity=pharmacy
     118K:amenity=place_of_worship
     119K:amenity=police
     120K:amenity=post_box
     121K:amenity=post_office
     122K:amenity=prison
     123K:amenity=pub
     124K:amenity=public_building
     125K:amenity=recycling
     126K:amenity=restaurant
     127K:amenity=school
     128K:amenity=shelter
     129K:amenity=signpost
     130K:amenity=studio
     131K:amenity=taxi
     132K:amenity=telephone
     133K:amenity=theatre
     134K:amenity=toilets
     135K:amenity=townhall
     136K:amenity=university
     137K:amenity=vending_machine
     138K:amenity=veterinary
     139K:amenity=waste_basket
     140K:amenity=waste_disposal
    75141;
    76142; Cycleway Tags
    77143;
     144K:cycleway=lane
    78145K:cycleway=track
     146K:cycleway=opposite_lane
     147K:cycleway=opposite
     148K:cycleway=opposite_track
     149;
     150; Historic Tags
     151;
     152K:historic=castle
     153K:historic=monument
     154K:historic=memorial
     155K:historic=archaeological_site
     156K:historic=ruins
     157K:historic=battlefield
     158K:historic=wreck
     159K:historic=yes
    79160;
    80161; Man_made Tags
     
    167248; Shop Key/Value Pairs
    168249;
     250K:shop=alcohol
     251K:shop=bakery
     252K:shop=beverages
     253K:shop=bicycle
     254K:shop=books
     255K:shop=butcher
     256K:shop=car
     257K:shop=car_repair
     258K:shop=chemist
     259K:shop=clothes
     260K:shop=computer
     261K:shop=confectionery
     262K:shop=convenience
     263K:shop=department_store
     264K:shop=dry_cleaning
     265K:shop=doityourself
     266K:shop=electronics
     267K:shop=florist
     268K:shop=furniture
     269K:shop=garden_centre
     270K:shop=greengrocer
     271K:shop=hairdresser
     272K:shop=hardware
     273K:shop=hifi
     274K:shop=kiosk
     275K:shop=laundry
    169276K:shop=mall
     277K:shop=motorcycle
     278K:shop=optician
     279K:shop=organic
     280K:shop=outdoor
     281K:shop=sports
     282K:shop=stationery
     283K:shop=supermarket
     284K:shop=shoes
     285K:shop=toys
     286K:shop=travel_agency
     287K:shop=video
    170288;
    171289; Sports Tags
     
    174292K:sport=netball
    175293;
     294; Tourism Tags
     295;
     296K:tourism=alpine_hut
     297K:tourism=attraction
     298K:tourism=artwork
     299K:tourism=camp_site
     300K:tourism=caravan_site
     301K:tourism=chalet
     302K:tourism=guest_house
     303K:tourism=hostel
     304K:tourism=hotel
     305K:tourism=information
     306K:tourism=motel
     307K:tourism=museum
     308K:tourism=picnic_site
     309K:tourism=theme_park
     310K:tourism=viewpoint
     311K:tourism=zoo
     312K:tourism=yes
     313;
    176314; Type Key/Value Pairs
    177315;
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java

    r16319 r16436  
    7979    protected static ArrayList<String> ignoreDataEndsWith = new ArrayList<String>();
    8080    protected static ArrayList<IgnoreKeyPair> ignoreDataKeyPair = new ArrayList<IgnoreKeyPair>();
     81    protected static ArrayList<IgnoreTwoKeyPair> ignoreDataTwoKeyPair = new ArrayList<IgnoreTwoKeyPair>();
    8182
    8283    /** The preferences prefix */
     
    253254                            ignoreDataKeyPair.add(tmp);
    254255                        }
     256                        else if(key.equals("T:"))
     257                        {
     258                            IgnoreTwoKeyPair tmp = new IgnoreTwoKeyPair();
     259                            int mid = line.indexOf("=");
     260                            int split = line.indexOf("|");
     261                            tmp.key1 = line.substring(0, mid);
     262                            tmp.value1 = line.substring(mid+1, split);
     263                            line = line.substring(split+1);
     264                            mid = line.indexOf("=");
     265                            tmp.key2 = line.substring(0, mid);
     266                            tmp.value2 = line.substring(mid+1);
     267                            ignoreDataTwoKeyPair.add(tmp);
     268                        }
    255269                        continue;
    256270                    }
     
    375389        if(checkComplex)
    376390        {
     391            Map<String, String> props = (p.keys == null) ? Collections.<String, String>emptyMap() : p.keys;
     392            for(Entry<String, String> prop: props.entrySet() )
     393            {
     394                boolean ignore = true;
     395                String key1 = prop.getKey();
     396                String value1 = prop.getValue();
     397
     398                for(IgnoreTwoKeyPair a : ignoreDataTwoKeyPair)
     399                {
     400                    if(key1.equals(a.key1) && value1.equals(a.value1))
     401                    {
     402                        ignore = false;
     403                        for(Entry<String, String> prop2: props.entrySet() )
     404                        {
     405                            String key2 = prop2.getKey();
     406                            String value2 = prop2.getValue();
     407                            for(IgnoreTwoKeyPair b : ignoreDataTwoKeyPair)
     408                            {
     409                                if(key2.equals(b.key2) && value2.equals(b.value2))
     410                                {
     411                                    ignore = true;
     412                                    break;
     413                                }
     414                            }
     415                            if(ignore)
     416                                break;
     417                        }
     418                    }
     419                    if(ignore)
     420                        break;
     421                }
     422
     423                if(!ignore)
     424                {
     425                    errors.add( new TestError(this, Severity.ERROR, tr("Illegal tag/value combinations"),
     426                    tr("Illegal tag/value combinations"), tr("Illegal tag/value combinations"), 1272, p) );
     427                    withErrors.add(p, "TC");
     428                }
     429            }
     430
    377431            for(CheckerData d : checkerData)
    378432            {
     
    469523                    {
    470524                        if(key.equals(a.key) && value.equals(a.value))
     525                            ignore = true;
     526                    }
     527
     528                    for(IgnoreTwoKeyPair a : ignoreDataTwoKeyPair)
     529                    {
     530                        if(key.equals(a.key2) && value.equals(a.value2))
    471531                            ignore = true;
    472532                    }
     
    778838    }
    779839
     840    private static class IgnoreTwoKeyPair {
     841        public String key1;
     842        public String value1;
     843        public String key2;
     844        public String value2;
     845    }
     846
    780847    private static class IgnoreKeyPair {
    781848        public String key;
Note: See TracChangeset for help on using the changeset viewer.