@Override protected IndexedResourceBundle getBundle(final Locale locale) { return forLocale(locale); } }
@Override protected IndexedResourceBundle getBundle(final Locale locale) { return forLocale(locale); } }
/** * Minor shortcut for fetching the resources specific to the {@code sis-referencing} module. */ private Resources resources() { return Resources.forLocale(getLocale()); }
/** * Returns the message to put in an {@link UnavailableFactoryException} having the given cause. */ private String canNotUse(final String cause) { return Resources.forLocale(locale).getString(Resources.Keys.CanNotUseGeodeticParameters_2, Constants.EPSG, cause); }
/** * Minor shortcut for fetching the resources specific to the {@code sis-referencing} module. */ private Resources resources() { return Resources.forLocale(getLocale()); }
/** * Returns a human-readable text for this constant. * * @param locale the desired locale, or {@code null}. * @return a human-readable text in the given locale if possible. */ @Override public String toString(final Locale locale) { return Resources.forLocale(locale).getString(opposite ? Resources.Keys.InverseOperationUsesOppositeSign : Resources.Keys.InverseOperationUsesSameSign); }
/** * Returns resources in the locale specified in the given property map. This convenience method looks * for the {@link #LOCALE_KEY} entry. If the given map is null, or contains no entry for the locale key, * or the value is not an instance of {@link Locale}, then this method fallback on the default locale. * * @param properties the map of properties, or {@code null} if none. * @return resources in the given locale. * @throws MissingResourceException if resources can't be found. */ public static Resources forProperties(final Map<?,?> properties) throws MissingResourceException { return forLocale(getLocale(properties)); }
/** * Returns a human-readable text for this constant. * * @param locale the desired locale, or {@code null}. * @return a human-readable text in the given locale if possible. */ @Override public String toString(final Locale locale) { return Resources.forLocale(locale).getString(opposite ? Resources.Keys.InverseOperationUsesOppositeSign : Resources.Keys.InverseOperationUsesSameSign); }
/** * Returns resources in the locale specified in the given property map. This convenience method looks * for the {@link #LOCALE_KEY} entry. If the given map is null, or contains no entry for the locale key, * or the value is not an instance of {@link Locale}, then this method fallback on the default locale. * * @param properties the map of properties, or {@code null} if none. * @return resources in the given locale. * @throws MissingResourceException if resources can't be found. */ public static Resources forProperties(final Map<?,?> properties) throws MissingResourceException { return forLocale(getLocale(properties)); }
/** * Gets a string for the given key from this resource bundle or one of its parents. * * @param key the key for the desired string. * @return the string for the given key. * @throws MissingResourceException if no object for the given key can be found. */ public static String format(final short key) throws MissingResourceException { return forLocale(null).getString(key); }
/** * Returns the message to put in an {@link UnavailableFactoryException} having the given cause. */ private String canNotUse(final String cause) { return Resources.forLocale(locale).getString(Resources.Keys.CanNotUseGeodeticParameters_2, Constants.EPSG, cause); }
/** * Gets a string for the given key from this resource bundle or one of its parents. * * @param key the key for the desired string. * @return the string for the given key. * @throws MissingResourceException if no object for the given key can be found. */ public static String format(final short key) throws MissingResourceException { return forLocale(null).getString(key); }
/** * Gets a string for the given key are replace all occurrence of "{0}" * with values of {@code arg0}. * * @param key the key for the desired string. * @param arg0 value to substitute to "{0}". * @return the formatted string for the given key. * @throws MissingResourceException if no object for the given key can be found. */ public static String format(final short key, final Object arg0) throws MissingResourceException { return forLocale(null).getString(key, arg0); }
/** * Gets a string for the given key are replace all occurrence of "{0}" * with values of {@code arg0}. * * @param key the key for the desired string. * @param arg0 value to substitute to "{0}". * @return the formatted string for the given key. * @throws MissingResourceException if no object for the given key can be found. */ public static String format(final short key, final Object arg0) throws MissingResourceException { return forLocale(null).getString(key, arg0); }
/** * Logs a message about a grid which is about to be loaded. * * @param caller the provider to logs as the source class. * the source method will be set to {@code "createMathTransform"}. * @param file the grid file, as a {@link String} or a {@link Path}. */ static void log(final Class<?> caller, final Object file) { final LogRecord record = Resources.forLocale(null).getLogRecord(Level.FINE, Resources.Keys.LoadingDatumShiftFile_1, file); record.setLoggerName(Loggers.COORDINATE_OPERATION); Logging.log(caller, "createMathTransform", record); }
/** * Logs a message about a grid which is about to be loaded. * * @param caller the provider to logs as the source class. * the source method will be set to {@code "createMathTransform"}. * @param file the grid file, as a {@link String} or a {@link Path}. */ static void log(final Class<?> caller, final Object file) { final LogRecord record = Resources.forLocale(null).getLogRecord(Level.FINE, Resources.Keys.LoadingDatumShiftFile_1, file); record.setLoggerName(Loggers.COORDINATE_OPERATION); Logging.log(caller, "createMathTransform", record); }
/** * Logs a warning about a factory not found for the requested version, in which case * {@code AuthorityFactoryIdentifier} fallback on a default version. */ void logFallback() { log(Resources.forLocale(null).getLogRecord(Level.WARNING, Resources.Keys.FallbackDefaultFactoryVersion_2, authority, version)); }
/** * Logs a warning about a factory not found for the requested version, in which case * {@code AuthorityFactoryIdentifier} fallback on a default version. */ void logFallback() { log(Resources.forLocale(null).getLogRecord(Level.WARNING, Resources.Keys.FallbackDefaultFactoryVersion_2, authority, version)); }
/** * Logs a message reporting a conflict between the factory identified by this {@code AuthorityFactoryIdentifier} * and another factory, if this instance has not already logged a warning. This method assumes that it is invoked * by the {@code MultiAuthoritiesFactory.getAuthorityFactory(…)} method. * * @param used the factory which will be used. */ void logConflict(final AuthorityFactory used) { log(Resources.forLocale(null).getLogRecord(Level.WARNING, Resources.Keys.IgnoredServiceProvider_3, TYPES[type], getAuthorityAndVersion(), Classes.getClass(used))); }
/** * Logs a message reporting a conflict between the factory identified by this {@code AuthorityFactoryIdentifier} * and another factory, if this instance has not already logged a warning. This method assumes that it is invoked * by the {@code MultiAuthoritiesFactory.getAuthorityFactory(…)} method. * * @param used the factory which will be used. */ void logConflict(final AuthorityFactory used) { log(Resources.forLocale(null).getLogRecord(Level.WARNING, Resources.Keys.IgnoredServiceProvider_3, TYPES[type], getAuthorityAndVersion(), Classes.getClass(used))); }