throw new ResourceInitializationException(
ResourceInitializationException.UNDEFINED_TYPE_FOR_INDEX, new Object[] {
aIndexes[i].getTypeName(), aIndexes[i].getLabel(),
aIndexes[i].getSourceUrlString() });
}
FSIndexComparator comparator = irm.createComparator();
comparator.setType(type);
FsIndexKeyDescription[] keys = aIndexes[i].getKeys();
if (keys != null) {
for (int j = 0; j < keys.length; j++) {
if (keys[j].isTypePriority()) {
comparator.addKey(irm.getDefaultTypeOrder(), FSIndexComparator.STANDARD_COMPARE);
} else {
Feature feature = type.getFeatureByBaseName(keys[j].getFeatureName());
if (feature == null) {
throw new ResourceInitializationException(
ResourceInitializationException.INDEX_KEY_FEATURE_NOT_FOUND, new Object[] {
keys[j].getFeatureName(), aIndexes[i].getLabel(),
aIndexes[i].getSourceUrlString() });
}
comparator.addKey(feature, keys[j].getComparator());
}
}
}
irm.createIndex(comparator, aIndexes[i].getLabel(), kind);