Class StaxDataStoreProvider

Direct Known Subclasses:
StoreProvider

public abstract class StaxDataStoreProvider extends AbstractProvider
The provider of StaxStreamReader instances.
Since:
0.8
Version:
0.8
  • Field Details

    • jaxb

      private volatile MarshallerPool jaxb
      Pool of JAXB marshallers shared by all data stores created by this provider. This pool is created only when first needed; it will never be instantiated if the data stores do not use JAXB.
  • Constructor Details

    • StaxDataStoreProvider

      protected StaxDataStoreProvider(String name)
      Creates a new provider. Subclasses shall populate the AbstractProvider.mimeForNameSpaces map with a mapping from their namespace to the MIME type to declare.
      Parameters:
      name - the primary key to use for searching in the MD_Format table, or null if none.
  • Method Details

    • getJAXBContext

      protected JAXBContext getJAXBContext() throws JAXBException
      Returns the JAXB context for the data store, or null if the data stores created by this provided do not use JAXB.

      The default implementation returns null.

      Returns:
      the JAXB context, or null if none.
      Throws:
      JAXBException - if an error occurred while creating the JAXB context.
    • getMarshallerPool

      final MarshallerPool getMarshallerPool() throws JAXBException
      Returns the (un)marshaller pool, creating it when first needed. If the subclass does not define a JAXB context, then this method returns null.
      Throws:
      JAXBException