/** Tests if the resource exists. */ public boolean exists() { try { // AbstractInternationalString.toString() never returns null. return toString().length() != 0; } catch (MissingResourceException exception) { return false; } }
/** * 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; }
if (vendor != null) { vendor = vendor.trim(); name = ImagingParameterDescription.trimPrefix(name, vendor); for (int i = 0; i < AUTHORITIES.length; i += 2) { if (vendor.equalsIgnoreCase((String) AUTHORITIES[i])) { description = new ImagingParameterDescription(op, "Description", null); try { final URI uri = new URI(bundle.getString("DocURL")); NameFactory.create( new InternationalString[] { new ImagingParameterDescription(op, "Vendor", null), // Scope name new ImagingParameterDescription( op, "LocalName", "Vendor") // Local name },
if (operation instanceof OperationDescriptor) { final ImagingParameterDescription remark = new ImagingParameterDescription((OperationDescriptor) operation, i); if (remark.exists()) { properties.put(REMARKS_KEY, remark);