public static OIndexFactory getFactory(String indexType, String algorithm) { if (algorithm == null) { algorithm = chooseDefaultIndexAlgorithm(indexType); } algorithm = algorithm.toUpperCase(Locale.ENGLISH); final Iterator<OIndexFactory> ite = getAllFactories(); while (ite.hasNext()) { final OIndexFactory factory = ite.next(); if (factory.getTypes().contains(indexType) && factory.getAlgorithms().contains(algorithm)) { return factory; } } throw new OIndexException("Index with type " + indexType + " and algorithm " + algorithm + " does not exist."); }
type = type.toUpperCase(locale); if (algorithm == null) { algorithm = OIndexes.chooseDefaultIndexAlgorithm(type);