Search in sources :

Example 1 with ITemplate

use of org.whole.lang.templates.ITemplate in project whole by wholeplatform.

the class AbstractXsiPersistenceKit method doWriteModel.

@Override
protected void doWriteModel(IEntity model, IPersistenceProvider pp) throws Exception {
    PrintWriter printWriter = new PrintWriter(new OutputStreamWriter(pp.getOutputStream(), pp.getEncoding()));
    XmlPrettyPrinterBuilderOperation op = new XmlPrettyPrinterBuilderOperation(printWriter);
    ITemplate template = getXsiModelTemplate(model, pp.getEncoding());
    template.apply(op);
    printWriter.flush();
}
Also used : XmlPrettyPrinterBuilderOperation(org.whole.lang.xml.codebase.XmlPrettyPrinterBuilderOperation) OutputStreamWriter(java.io.OutputStreamWriter) ITemplate(org.whole.lang.templates.ITemplate) PrintWriter(java.io.PrintWriter)

Aggregations

OutputStreamWriter (java.io.OutputStreamWriter)1 PrintWriter (java.io.PrintWriter)1 ITemplate (org.whole.lang.templates.ITemplate)1 XmlPrettyPrinterBuilderOperation (org.whole.lang.xml.codebase.XmlPrettyPrinterBuilderOperation)1