Class GenericJaxbIO<T>
java.lang.Object
org.optaplanner.core.impl.io.jaxb.GenericJaxbIO<T>
- All Implemented Interfaces:
JaxbIO<T>
-
Constructor Summary
ConstructorDescriptionGenericJaxbIO
(Class<T> rootClass) GenericJaxbIO
(Class<T> rootClass, int indentation) -
Method Summary
Modifier and TypeMethodDescriptionreadAndValidate
(Reader reader, String schemaResource) readAndValidate
(Reader reader, Schema schema) readAndValidate
(Document document, String schemaResource) readAndValidate
(Document document, Schema schema) readOverridingNamespace
(Reader reader, ElementNamespaceOverride... elementNamespaceOverrides) Reads the input XML using theReader
overriding elements namespaces.readOverridingNamespace
(Document document, ElementNamespaceOverride... elementNamespaceOverrides) Reads the input XMLDocument
overriding namespaces.void
void
void
void
writeWithoutNamespaces
(T root, Writer writer)
-
Constructor Details
-
GenericJaxbIO
-
GenericJaxbIO
-
-
Method Details
-
read
-
readAndValidate
-
readAndValidate
-
readAndValidate
-
readAndValidate
-
readOverridingNamespace
public T readOverridingNamespace(Reader reader, ElementNamespaceOverride... elementNamespaceOverrides) Reads the input XML using theReader
overriding elements namespaces. If an element already has a namespace and aElementNamespaceOverride
is defined for this element, its namespace is overridden. In case the element has no namespace, new namespace defined in theElementNamespaceOverride
is added.- Parameters:
reader
- input XMLReader
; never nullelementNamespaceOverrides
- never null- Returns:
- deserialized object representation of the XML.
-
readOverridingNamespace
public T readOverridingNamespace(Document document, ElementNamespaceOverride... elementNamespaceOverrides) Reads the input XMLDocument
overriding namespaces. If an element already has a namespace and aElementNamespaceOverride
is defined for this element, its namespace is overridden. In case the element has no namespace a new namespace defined in theElementNamespaceOverride
is added.- Parameters:
document
- input XMLDocument
; never nullelementNamespaceOverrides
- never null- Returns:
- deserialized object representation of the XML.
-
parseXml
-
validate
-
validate
-
write
-
writeWithoutNamespaces
-