Ignore:
Timestamp:
2015-02-15T19:38:42+01:00 (11 years ago)
Author:
malcolmh
Message:

Rules debugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/seachart/src/render/Signals.java

    r30894 r30992  
    107107                String str = "";
    108108                if (atts.containsKey(Att.CATFOG)) {
    109                         str += fogSignals.get(atts.get(Att.CATFOG).val);
     109                        str += fogSignals.get(((ArrayList<?>)(atts.get(Att.CATFOG).val)).get(0));
    110110                }
    111111                if (atts.containsKey(Att.SIGGRP)) {
     
    128128                Renderer.symbol(feature, Beacons.RadarStation);
    129129                String bstr = "";
    130                 CatRTB cat = (CatRTB) Rules.getAttVal(feature, Obj.RTPBCN, 0, Att.CATRTB);
    131                 String wal = (String) Rules.getAttVal(feature, Obj.RTPBCN, 0, Att.RADWAL);
     130                CatRTB cat = (CatRTB) Rules.getAttEnum(feature, Obj.RTPBCN, 0, Att.CATRTB);
     131                String wal = Rules.getAttStr(feature, Obj.RTPBCN, 0, Att.RADWAL);
    132132                switch (cat) {
    133133                case RTB_RAMK:
     
    136136                case RTB_RACN:
    137137                        bstr += " Racon";
    138                         String astr = (String) Rules.getAttVal(feature, Obj.RTPBCN, 0, Att.SIGGRP);
     138                        String astr = Rules.getAttStr(feature, Obj.RTPBCN, 0, Att.SIGGRP);
    139139                        if (!astr.isEmpty()) {
    140140                                bstr += "(" + astr + ")";
     
    142142                        Double per = (Double) Rules.getAttVal(feature, Obj.RTPBCN, 0, Att.SIGPER);
    143143                        Double mxr = (Double) Rules.getAttVal(feature, Obj.RTPBCN, 0, Att.VALMXR);
    144                         if ((per != 0) || (mxr != 0)) {
     144                        if ((per != null) || (mxr != null)) {
    145145                                bstr += (astr.isEmpty() ? " " : "");
    146                                 bstr += (per != 0) ? per.toString() + "s" : "";
    147                                 bstr += (mxr != 0) ? mxr.toString() + "M" : "";
     146                                if (per != null) bstr += (per != 0) ? per.toString() + "s" : "";
     147                                if (mxr != null) bstr += (mxr != 0) ? mxr.toString() + "M" : "";
    148148                        }
    149149                        break;
     
    151151                        break;
    152152                }
    153                 if (wal!= null) {
     153                if (!wal.isEmpty()) {
    154154                        switch (wal) {
    155155                        case "0.03-X":
     
    168168        public static void radioStations(Feature feature) {
    169169                Renderer.symbol(feature, Beacons.RadarStation);
    170                 ArrayList<CatROS> cats = (ArrayList<CatROS>)Rules.getAttVal(feature, Obj.RDOSTA, 0, Att.CATROS);
     170                ArrayList<CatROS> cats = (ArrayList<CatROS>)Rules.getAttList(feature, Obj.RDOSTA, 0, Att.CATROS);
    171171                boolean vais = false;
    172172                String bstr = "";
Note: See TracChangeset for help on using the changeset viewer.