private static ArrayList<String> extractProductTypeBySeparatorChar(String s, ModisProductDb db, String delim) throws ProductIOException { final ArrayList<String> prodType = new ArrayList<String>(); final StringTokenizer tokenizer = new StringTokenizer(s, delim); while (tokenizer.hasMoreTokens()) { final String token = tokenizer.nextToken(); if (db.isSupportedProduct(token)) { prodType.add(token); } } return prodType; } }
/** * Checks the product type against the list of known types. Throws ProductIOException if it doesn't fit. */ private void checkProductType() throws IOException { final String productType = globalAttributes.getProductType(); final ModisProductDb db = ModisProductDb.getInstance(); if (!db.isSupportedProduct(productType)) { throw new ProductIOException("Unsupported product of type '" + productType + '\''); } } }
if (ModisProductDb.getInstance().isSupportedProduct(productType)) { if (modisAttributes.isImappFormat()) { return DecodeQualification.INTENDED;