(String token, PObject po)
| 8064 | } |
| 8065 | |
| 8066 | public String getInfoToken(String token, PObject po) |
| 8067 | { |
| 8068 | // looking for a token in the form of RACE.INFO.TAG where |
| 8069 | // RACE indicate which token map to check for a INFO label of TAG to return |
| 8070 | int i = token.indexOf(".INFO."); |
| 8071 | String ts = token; |
| 8072 | if (i>-1) |
| 8073 | { |
| 8074 | ts = token.substring(i + 6); |
| 8075 | } |
| 8076 | else |
| 8077 | { |
| 8078 | return token; |
| 8079 | } |
| 8080 | Set<MapKey<?, ?>> keys = po.getMapKeys(); |
| 8081 | for (MapKey<?, ?> key : keys) |
| 8082 | { |
| 8083 | Map<?, ?> key2 = po.getMapFor(key); |
| 8084 | for(Object k : key2.keySet()) |
| 8085 | { |
| 8086 | if (k.toString().equalsIgnoreCase(ts)) |
| 8087 | { |
| 8088 | MessageFormat m = (MessageFormat) key2.get(k); |
| 8089 | return m.toPattern(); |
| 8090 | } |
| 8091 | } |
| 8092 | } |
| 8093 | return token; |
| 8094 | } |
| 8095 | |
| 8096 | |
| 8097 | /** |
no test coverage detected