Class StaxDataStore.Config

java.lang.Object
org.apache.sis.internal.util.AbstractMap<String,Object>
org.apache.sis.internal.storage.xml.stream.StaxDataStore.Config
All Implemented Interfaces:
Filter, Map<String,Object>, XMLReporter
Enclosing class:
StaxDataStore

private final class StaxDataStore.Config extends AbstractMap<String,Object> implements XMLReporter, Filter
Holds information that can be used for (un)marshallers configuration, and opportunistically implement various listeners used by JAXB (actually the SIS wrappers) or StAX.
  • Constructor Details

    • Config

      Config()
      Fetches configuration information from the given object.
  • Method Details

    • get

      public Object get(Object key)
      Returns configuration associated to the given key, or null if none.
      Specified by:
      get in interface Map<String,Object>
      Parameters:
      key - one of XML.LOCALE, XML.TIMEZONE or XML.WARNING_FILTER.
      Returns:
      the configuration for the given key, or null if none or if the given key is invalid.
    • entryIterator

      protected AbstractMap.EntryIterator<String,Object> entryIterator()
      Returns an iterator over all entries in this map.
      Specified by:
      entryIterator in class AbstractMap<String,Object>
      Returns:
      an iterator over the entries in this map, or null.
    • report

      public void report(String message, String errorType, Object info, Location location)
      Forwards StAX warnings to DataStore listeners. This method is invoked by XMLStreamReader when needed.
      Specified by:
      report in interface XMLReporter
      Parameters:
      message - the message to put in a logging record.
      errorType - ignored.
      info - ignored.
      location - ignored.
    • isLoggable

      public boolean isLoggable(LogRecord warning)
      Reports a warning represented by the given log record.
      Specified by:
      isLoggable in interface Filter
      Parameters:
      warning - the warning as a log record.
    • toString

      public String toString()
      Do not format all properties for avoiding a never-ending loop.
      Overrides:
      toString in class AbstractMap<String,Object>
      Returns:
      a string representation of this map.