Changeset 30992 in osm for applications/editors/josm/plugins/seachart/src/s57/S57att.java
- Timestamp:
- 2015-02-15T19:38:42+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/seachart/src/s57/S57att.java
r30894 r30992 363 363 } 364 364 365 public static Att decodeAttribute(long attribute) { // Convert S57 attribute code to OSeaM attribute enumeration365 public static Att decodeAttribute(long attribute) { // Convert S57 attribute code to SCM attribute enumeration 366 366 Att att = S57Att.get((int)attribute); 367 367 return (att != null) ? att : Att.UNKATT; 368 368 } 369 369 370 public static Integer encodeAttribute(String attribute) { // Convert OSeaM attribute enumeration to S57 attribute code370 public static Integer encodeAttribute(String attribute) { // Convert SCM attribute enumeration to S57 attribute code 371 371 if (AttS57.containsKey(attribute)) 372 372 return AttS57.get(attribute); … … 376 376 } 377 377 378 public static Integer encodeAttribute(Att attribute) { // Convert OSeaM attribute enumeration to S57 attribute code378 public static Integer encodeAttribute(Att attribute) { // Convert SCM attribute enumeration to S57 attribute code 379 379 return AttS57.get(attribute) != 0 ? AttS57.get(attribute) : AttIENC.get(attribute); 380 380 } 381 381 382 public static String stringAttribute(Att attribute) { // Convert OSeaM enumeration to OSeaM attribute string382 public static String stringAttribute(Att attribute) { // Convert SCM enumeration to OSM attribute string 383 383 String str = AttStr.get(attribute); 384 384 return str != null ? str : ""; 385 385 } 386 386 387 public static Att enumAttribute(String attribute, Obj obj) { // Convert OS eaM attribute string toOSeaM enumeration387 public static Att enumAttribute(String attribute, Obj obj) { // Convert OSM attribute string to SCM enumeration 388 388 if ((attribute != null) && !attribute.isEmpty()) { 389 389 EnumMap<Obj, Att> map = StrAtt.get(attribute);
Note:
See TracChangeset
for help on using the changeset viewer.
