/** * Subcenter name, from table C-12 * * @param center_id center id * @param subcenter_id subcenter id * @return subcenter name, or null if not found */ static public String getSubCenterName(int center_id, int subcenter_id) { return getTableValue(12, center_id, subcenter_id); }
public static void main(String arg[]) throws IOException { CommonCodeTable ct = readCommonCodes(Table.C1); for (TableEntry entry : ct.entries) System.out.printf("%s%n", entry); System.out.printf("%n%s%n", ct.state()); } }
CommonCodeTable ct = new CommonCodeTable(version.name(), version.getTableType()); String[] elems = version.getElemNames(); String status = (statusElem == null) ? null : statusElem.getTextNormalize(); if (value != null && value.equals(")")) value = previousValue; ct.add(line, code, code2, value, status); previousValue = value; Element statusElem = elem.getChild("Status"); String status = (statusElem == null) ? null : statusElem.getTextNormalize(); ct.add(line, code, value, code2, value2, status);
static private CodeFlagTables useCC(short fxy, int cc) { CodeFlagTables cft = tableMap.get(fxy); if (cft == null) { CommonCodeTable cct = CommonCodeTable.getTable(cc); cft = new CodeFlagTables(fxy, cct.getTableName(), cct.getMap()); tableMap.put(fxy, cft); } return cft; }
public static CommonCodeTable getTable(int tableNo) { CommonCodeTable cct = tableMap.get(tableNo); if (cct == null) { Table want = null; for (Table t : Table.values()) if (t.num == tableNo) { want = t; break; } if (want == null) throw new IllegalStateException("Unknown wmo common code table number= "+tableNo); try { cct = readCommonCodes(want); tableMap.put(tableNo, cct); } catch (IOException e) { throw new IllegalStateException("Cant open wmo common code table "+want); } } return cct; }
public String getCenterName() { String name = CommonCodeTable.getCenterNameBufr(getCenter(), getBufrEdition()); String subname = CommonCodeTable.getSubCenterName(getCenter(), getSubCenter()); if (subname != null) name = name +" / " + subname; return getCenter() + "." + getSubCenter() + " (" + name + ")"; }
@Override public String getSubCenterName(int center_id, int subcenter_id) { return CommonCodeTable.getSubCenterName(center_id, subcenter_id); }
CommonCodeTable ct = new CommonCodeTable(version.name(), version.getTableType()); String[] elems = version.getElemNames(); String status = (statusElem == null) ? null : statusElem.getTextNormalize(); if (value != null && value.equals(")")) value = previousValue; ct.add(line, code, code2, value, status); previousValue = value; Element statusElem = elem.getChild("Status"); String status = (statusElem == null) ? null : statusElem.getTextNormalize(); ct.add(line, code, value, code2, value2, status);
public static CommonCodeTable getTable(int tableNo) { CommonCodeTable cct = tableMap.get(tableNo); if (cct == null) { Table want = null; for (Table t : Table.values()) if (t.num == tableNo) { want = t; break; } if (want == null) throw new IllegalStateException("Unknown wmo common code table number= "+tableNo); try { cct = readCommonCodes(want); tableMap.put(tableNo, cct); } catch (IOException e) { throw new IllegalStateException("Cant open wmo common code table "+want); } } return cct; }
@Override public String getSubCenterName(int center, int subcenter) { return CommonCodeTable.getSubCenterName(center, subcenter); }
public static void main(String arg[]) throws IOException { CommonCodeTable ct = readCommonCodes(Table.C1); for (TableEntry entry : ct.entries) System.out.printf("%s%n", entry); System.out.printf("%n%s%n", ct.state()); } }
/** * Subcenter name, from table C-12 * * @param center_id center id * @param subcenter_id subcenter id * @return subcenter name, or null if not found */ static public String getSubCenterName(int center_id, int subcenter_id) { return getTableValue(12, center_id, subcenter_id); }
CommonCodeTable ct = new CommonCodeTable(version.name(), version.getTableType()); String[] elems = version.getElemNames(); String status = (statusElem == null) ? null : statusElem.getTextNormalize(); if (value != null && value.equals(")")) value = previousValue; ct.add(line, code, code2, value, status); previousValue = value; Element statusElem = elem.getChild("Status"); String status = (statusElem == null) ? null : statusElem.getTextNormalize(); ct.add(line, code, value, code2, value2, status);
public static CommonCodeTable getTable(int tableNo) { CommonCodeTable cct = tableMap.get(tableNo); if (cct == null) { Table want = null; for (Table t : Table.values()) if (t.num == tableNo) { want = t; break; } if (want == null) throw new IllegalStateException("Unknown wmo common code table number= "+tableNo); try { cct = readCommonCodes(want); tableMap.put(tableNo, cct); } catch (IOException e) { throw new IllegalStateException("Cant open wmo common code table "+want); } } return cct; }
public String getSubCenterName(int subcenter) { return CommonCodeTable.getSubCenterName(center, subcenter); }
public static void main(String arg[]) throws IOException { CommonCodeTable ct = readCommonCodes(Table.C1); for (TableEntry entry : ct.entries) System.out.printf("%s%n", entry); System.out.printf("%n%s%n", ct.state()); } }
/** * Subcenter name, from table C-12 * * @param center_id center id * @param subcenter_id subcenter id * @return subcenter name, or null if not found */ static public String getSubCenterName(int center_id, int subcenter_id) { return getTableValue(12, center_id, subcenter_id); }