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;
}
Aggregations