Search in sources :

Example 1 with TrpPageMarshalListener

use of eu.transkribus.core.model.builder.TrpPageMarshalListener in project TranskribusCore by Transkribus.

the class PageXmlUtils method createMarshaller.

private static Marshaller createMarshaller(ValidationEventCollector vec) throws JAXBException {
    JAXBContext jc = createPageJAXBContext();
    Marshaller m = jc.createMarshaller();
    m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
    m.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
    m.setProperty(Marshaller.JAXB_SCHEMA_LOCATION, schemaLocStr);
    m.setEventHandler(vec);
    m.setListener(new TrpPageMarshalListener());
    return m;
}
Also used : Marshaller(javax.xml.bind.Marshaller) TrpPageMarshalListener(eu.transkribus.core.model.builder.TrpPageMarshalListener) JAXBContext(javax.xml.bind.JAXBContext)

Aggregations

TrpPageMarshalListener (eu.transkribus.core.model.builder.TrpPageMarshalListener)1 JAXBContext (javax.xml.bind.JAXBContext)1 Marshaller (javax.xml.bind.Marshaller)1