/** * Returns the display name of the data store, or {@code null} if none. * This is a convenience method for formatting error messages in subclasses. * * @return the data store display name, or {@code null}. * * @see DataStore#getDisplayName() */ protected final String getStoreName() { return (listeners != null) ? listeners.getSource().getDisplayName() : null; }
/** * Returns the display name of the data store, or {@code null} if none. * This is a convenience method for formatting error messages in subclasses. * * @return the data store display name, or {@code null}. * * @see DataStore#getDisplayName() */ protected final String getStoreName() { return (listeners != null) ? listeners.getSource().getDisplayName() : null; }
/** * Reports a warning in the {@code "org.apache.sis.io.wkt"} logger. This method pretends that the * warning come from {@code getMetadata()} method, which is the public facade for the parsing method. * * @param record the warning to report. */ private void log(final LogRecord record) { record.setSourceClassName(listeners.getSource().getClass().getName()); record.setSourceMethodName("getMetadata"); record.setLoggerName(Loggers.WKT); listeners.warning(record); } }
/** * Reports a warning in the {@code "org.apache.sis.io.wkt"} logger. This method pretends that the * warning come from {@code getMetadata()} method, which is the public facade for the parsing method. * * @param record the warning to report. */ private void log(final LogRecord record) { record.setSourceClassName(listeners.getSource().getClass().getName()); record.setSourceMethodName("getMetadata"); record.setLoggerName(Loggers.WKT); listeners.warning(record); } }
/** * Reports a warning for a WKT that can not be read. This method should be invoked only when the CRS * can not be created at all; it should not be invoked if the CRS has been created with some warnings. */ final void log(final Exception e) { final DataStore store = listeners.getSource(); listeners.warning(Resources.forLocale(store.getLocale()) .getString(Resources.Keys.CanNotReadCRS_WKT_1, store.getDisplayName()), e); }
/** * Reports a warning for a WKT that can not be read. This method should be invoked only when the CRS * can not be created at all; it should not be invoked if the CRS has been created with some warnings. */ final void log(final Exception e) { final DataStore store = listeners.getSource(); listeners.warning(Resources.forLocale(store.getLocale()) .getString(Resources.Keys.CanNotReadCRS_WKT_1, store.getDisplayName()), e); }