public class UnmarshallerFactory
extends java.lang.Object
Unmarshallers that can be used to convert W3C DOM
elements into XMLObjects. Unmarshallers are stored and retrieved by a
QName key. This key is either the XML Schema Type or element QName of the XML element
being unmarshalled.| Modifier and Type | Field and Description |
|---|---|
private org.slf4j.Logger |
log
Class logger.
|
private java.util.Map<javax.xml.namespace.QName,Unmarshaller> |
unmarshallers
Map of unmarshallers to the elements they are for.
|
| Constructor and Description |
|---|
UnmarshallerFactory()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Unmarshaller |
deregisterUnmarshaller(javax.xml.namespace.QName key)
Deregisters the unmarshaller for the given element.
|
Unmarshaller |
getUnmarshaller(org.w3c.dom.Element domElement)
Retrieves the unmarshaller for the given element.
|
Unmarshaller |
getUnmarshaller(javax.xml.namespace.QName key)
Gets the Unmarshaller for a particular element or null if no unmarshaller is registered for an element.
|
java.util.Map<javax.xml.namespace.QName,Unmarshaller> |
getUnmarshallers()
Gets an immutable listing of all the Unarshallers currently registered.
|
void |
registerUnmarshaller(javax.xml.namespace.QName key,
Unmarshaller unmarshaller)
Registers an Unmarshaller with this factory.
|
private final org.slf4j.Logger log
private final java.util.Map<javax.xml.namespace.QName,Unmarshaller> unmarshallers
@Nullable public Unmarshaller getUnmarshaller(@Nullable javax.xml.namespace.QName key)
key - the key the unmarshaller was registered under@Nullable public Unmarshaller getUnmarshaller(@Nullable org.w3c.dom.Element domElement)
domElement - the element to retrieve the unmarshaller for@Nonnull public java.util.Map<javax.xml.namespace.QName,Unmarshaller> getUnmarshallers()
public void registerUnmarshaller(@Nonnull
javax.xml.namespace.QName key,
@Nonnull
Unmarshaller unmarshaller)
key - the key the unmarshaller was registered underunmarshaller - the Unmarshaller@Nullable public Unmarshaller deregisterUnmarshaller(@Nonnull javax.xml.namespace.QName key)
key - the key the unmarshaller was registered under