for (int i=0; i<TABLES_INFO.length; i++) {
final Set codes = getAuthorityCodes0(TABLES_INFO[i].type);
if (codes instanceof AuthorityCodes) {
final String text = ((AuthorityCodes) codes).asMap().get(primaryKey);
if (text != null) {
return new SimpleInternationalString(text);
}
}
}
/*
* Maybe the user overridden some object creation
* methods with a value for the supplied code.
*/
final Identifier identifier = createObject(code).getName();
if (identifier instanceof GenericName) {
return ((GenericName) identifier).toInternationalString();
}
return new SimpleInternationalString(identifier.getCode());
}