Package org.apache.sis.internal.metadata
Class MetadataTypes
java.lang.Object
org.apache.sis.internal.jaxb.TypeRegistration
org.apache.sis.internal.metadata.MetadataTypes
- All Implemented Interfaces:
Function<Object,
,Object> UnaryOperator<Object>
Declares the classes of objects to be marshalled using a default
MarshallerPool
.
This class is declared in the META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration
file.- Since:
- 0.3
- Version:
- 1.0
-
Field Summary
Fields inherited from class org.apache.sis.internal.jaxb.TypeRegistration
ROOT_ADAPTERS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionEnsures that the given value is an instance of a class that can be marshalled, or returnsnull
if the type of the given value is not handled by this method.protected UnaryOperator<Object>
Returns the converter to apply before marshalling objects.protected void
getTypes
(Collection<Class<?>> addTo) Adds to the given collection the metadata types that should be given to the initial JAXB context.Methods inherited from class org.apache.sis.internal.jaxb.TypeRegistration
getPrivateInfo, getRenameFileLoader, getSharedContext, hasRenameFile
-
Constructor Details
-
MetadataTypes
public MetadataTypes()
-
-
Method Details
-
getTypes
Adds to the given collection the metadata types that should be given to the initial JAXB context.- Specified by:
getTypes
in classTypeRegistration
- Parameters:
addTo
- the collection in which to add new types.
-
beforeMarshal
Returns the converter to apply before marshalling objects.- Overrides:
beforeMarshal
in classTypeRegistration
- Returns:
this
.
-
apply
Ensures that the given value is an instance of a class that can be marshalled, or returnsnull
if the type of the given value is not handled by this method. Current implementation handles all types that may need to be put in the ISO 19115-3 namespace; we have to do that ourself because those classes are not public. Other types may be added if needed, but we do not want to handle too many of them (for performance reasons). However, the list or recognized types shall contain at leastMetadata
.
-