Class GenericJaxbIO<T>
- java.lang.Object
-
- org.optaplanner.core.impl.io.jaxb.GenericJaxbIO<T>
-
-
Constructor Summary
Constructors Constructor Description GenericJaxbIO(Class<T> rootClass)
GenericJaxbIO(Class<T> rootClass, int indentation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Document
parseXml(Reader reader)
T
read(Reader reader)
T
readAndValidate(Reader reader, String schemaResource)
T
readAndValidate(Reader reader, Schema schema)
T
readAndValidate(Document document, String schemaResource)
T
readAndValidate(Document document, Schema schema)
T
readOverridingNamespace(Reader reader, ElementNamespaceOverride... elementNamespaceOverrides)
Reads the input XML using theReader
overriding elements namespaces.T
readOverridingNamespace(Document document, ElementNamespaceOverride... elementNamespaceOverrides)
Reads the input XMLDocument
overriding namespaces.void
validate(Document document, String schemaResource)
void
validate(Document document, Schema schema)
void
write(T root, Writer writer)
void
writeWithoutNamespaces(T root, Writer writer)
-
-
-
Method Detail
-
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.
-
-