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; }
try { Class c = CommonCodeTable.class; ios = c.getResourceAsStream(version.getResourceName()); if (ios == null) { throw new IllegalStateException("CommonCodeTable cant open " + version.getResourceName()); CommonCodeTable ct = new CommonCodeTable(version.name(), version.getTableType()); String[] elems = version.getElemNames(); List<Element> featList = root.getChildren(version.getRootElemName()); for (Element elem : featList) { if (version.type == 1) {
try { Class c = CommonCodeTable.class; ios = c.getResourceAsStream(version.getResourceName()); if (ios == null) { throw new IllegalStateException("CommonCodeTable cant open " + version.getResourceName()); CommonCodeTable ct = new CommonCodeTable(version.name(), version.getTableType()); String[] elems = version.getElemNames(); List<Element> featList = root.getChildren(version.getRootElemName()); for (Element elem : featList) { if (version.type == 1) {
try { Class c = CommonCodeTable.class; ios = c.getResourceAsStream(version.getResourceName()); if (ios == null) { throw new IllegalStateException("CommonCodeTable cant open " + version.getResourceName()); CommonCodeTable ct = new CommonCodeTable(version.name(), version.getTableType()); String[] elems = version.getElemNames(); List<Element> featList = root.getChildren(version.getRootElemName()); for (Element elem : featList) { if (version.type == 1) {
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 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; }