/** * Returns a string in the specified locale. * * @param locale The locale to look for, or {@code null} for the default locale. * @return The string in the specified locale, or in a default locale. * @throws MissingResourceException is the key given to the constructor is invalid. */ public String toString(Locale locale) throws MissingResourceException { if (locale == null) { locale = Locale.getDefault(); } final ResourceBundle resources = operation.getResourceBundle(locale); String name = resources.getString(key); if (prefixKey != null) { name = trimPrefix(name, resources.getString(prefixKey)); } return name; }
final ResourceBundle bundle = op.getResourceBundle(Locale.getDefault()); String vendor = op.getResourceBundle(Locale.US).getString("Vendor"); Citation authority = null; if (vendor != null) {
public OperationItem(OperationDescriptor op) { this.op = op; this.opName = op.getName(); this.vendor = op.getResourceBundle(null).getString(VENDOR_NAME); this.isMediaLibPreferred = false; }
public OperationItem(OperationDescriptor op) { this.op = op; this.opName = op.getName(); this.vendor = op.getResourceBundle(null).getString(VENDOR_NAME); this.isMediaLibPreferred = false; }
/** * Returns the localized name for the given descriptor. The name will be fecth from the * "{@link OperationDescriptor#getResourceBundle LocalName}" resource, if available. * Otherwise, the {@linkplain RegistryElementDescriptor#getName non-localized name} is returned. */ private static String getName(final RegistryElementDescriptor descriptor, final Locale locale) { if (descriptor instanceof OperationDescriptor) { ResourceBundle resources = ((OperationDescriptor)descriptor).getResourceBundle(locale); if (resources != null) try { return resources.getString("LocalName"); } catch (MissingResourceException exception) { // No localized name. Fallback on the default (non-localized) descriptor name. // No warning to report here, this exception is really not a problem. } } return descriptor.getName(); }
final String key; final Locale locale = getLocale(); final ResourceBundle resources = operation.getResourceBundle(locale); if (param >= 0) { key = "arg"+param+"Desc";
&& op.getResourceBundle(null) .getString(ConcurrentOperationRegistry.VENDOR_NAME) .equalsIgnoreCase(vendor) || op == null) {
&& op.getResourceBundle(null) .getString(ConcurrentOperationRegistry.VENDOR_NAME) .equalsIgnoreCase(vendor) || op == null) {
if (descriptor instanceof OperationDescriptor) { final ResourceBundle bundle; bundle = ((OperationDescriptor) descriptor).getResourceBundle(locale); name = bundle .getString("LocalName"); description = bundle .getString("Description");
String vendor = op.getResourceBundle(null).getString(VENDOR_NAME); jaiext = vendor.equalsIgnoreCase(JAIEXT_PRODUCT);
String vendor = op.getResourceBundle(null).getString(VENDOR_NAME); jaiext = vendor.equalsIgnoreCase(JAIEXT_PRODUCT);
final String key; final OperationDescriptor descriptor = (OperationDescriptor) element; final ResourceBundle resources = descriptor.getResourceBundle(getLocale()); if (index >= 0) { key = "arg" + index + "Desc";