Package org.apache.sis.internal.jaxb
Interface AdapterReplacement
- All Known Implementing Classes:
SC_VerticalCRS
public interface AdapterReplacement
An interface for
XmlAdapter
to be used in replacement of the instance created by JAXB.
This interface provides a way to replace default adapters by configured
ones. It does not allow the addition of new adapters (i.e. it cannot be used in replacement of
the XmlJavaTypeAdapter
annotation).
This interface is mostly for handling extensions to metadata profile provided as extension,
like the FRA
extension for France provided in the sis-metadata-fra
module.
WARNING: there is currently no mechanism for ensuring that the registration performed
by an AdapterReplacement
instance does not overwrite the registration performed by an
other AdapterReplacement
instance. This is okay as long as the instances are defined
only in SIS. However, we will need to revisit this issue if we move this interface to public API.
- Since:
- 0.3
- Version:
- 0.3
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
register
(Marshaller marshaller) Invoked when a new adapter is created byMarshallerPool
.void
register
(Unmarshaller unmarshaller) Invoked when a new adapter is created byMarshallerPool
.
-
Method Details
-
register
Invoked when a new adapter is created byMarshallerPool
. Typical implementations will be as below:- Parameters:
marshaller
- The marshaller to be configured.- Throws:
JAXBException
- if the given marshaller cannot be configured.
-
register
Invoked when a new adapter is created byMarshallerPool
. Typical implementations will be as below:- Parameters:
unmarshaller
- The unmarshaller to be configured.- Throws:
JAXBException
- if the given unmarshaller cannot be configured.
-