Changeset 3003 in josm
- Timestamp:
- 2010-02-17T18:51:36+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r2963 r3003 482 482 /** 483 483 * Contains a list of "uninteresting" keys that do not make an object 484 * "tagged". 485 * Initialized by checkTagged() 484 * "tagged". Entries that end with ':' are causing a whole namespace to be considered 485 * "uninteresting". Only the first level namespace is considered. 486 * Initialized by isUninterestingKey() 486 487 */ 487 488 public static Collection<String> getUninterestingKeys() { 488 489 if (uninteresting == null) { 489 490 uninteresting = Main.pref.getCollection("tags.uninteresting", 490 Arrays.asList(new String[]{"source","note","comment","converted_by","created_by"})); 491 Arrays.asList(new String[]{"source", "source_ref", "source:", "note", "comment", 492 "converted_by", "created_by", "watch", "watch:"})); 491 493 } 492 494 return uninteresting; 495 } 496 497 /** 498 * Returns true if key is considered "uninteresting". 499 */ 500 public static boolean isUninterestingKey(String key) { 501 getUninterestingKeys(); 502 if (uninteresting.contains(key)) 503 return true; 504 int pos = key.indexOf(':'); 505 if (pos > 0) 506 return uninteresting.contains(key.substring(0, pos + 1)); 507 return false; 493 508 } 494 509 … … 1070 1085 1071 1086 private void updateTagged() { 1072 getUninterestingKeys();1073 1087 if (keys != null) { 1074 for ( Entry<String,String> e : getKeys().entrySet()) {1075 if (! uninteresting.contains(e.getKey())) {1088 for (String key: keySet()) { 1089 if (!isUninterestingKey(key)) { 1076 1090 flags |= FLAG_TAGGED; 1077 1091 return;
Note:
See TracChangeset
for help on using the changeset viewer.