* @throws InvalidResourceKeyException missing/invalid
*/
public Integer convertKey(ResourceKey key) throws InvalidResourceKeyException {
if (key == null) {
throw new InvalidResourceKeyException("resource key is missing");
}
if (!this.keyTypeName.equals(key.getName())) {
throw new InvalidResourceKeyException("key is wrong QName, " +
"must be '" + this.keyTypeName.toString() + "'");
}
try {
return new Integer((String) key.getValue());
} catch (NumberFormatException e) {
throw new InvalidResourceKeyException(
"key value is not integer based");
}
}