Search in sources :

Example 1 with DxlExporter

use of lotus.domino.DxlExporter in project org.openntf.domino by OpenNTF.

the class NotesRunner method run3.

public void run3(final Session session) throws NotesException {
    Database db = session.getDatabase("", "index.ntf");
    NoteCollection nc = db.createNoteCollection(false);
    nc.setSelectIcon(true);
    nc.setSelectAcl(true);
    nc.selectAllDesignElements(true);
    nc.buildCollection();
    DxlExporter export = session.createDxlExporter();
    export.setForceNoteFormat(true);
    export.setRichTextOption(DxlExporter.DXLRICHTEXTOPTION_RAW);
    String dxl = export.exportDxl(nc);
    nc.recycle();
    export.recycle();
    db.recycle();
    try {
        PrintWriter out = new PrintWriter("c:\\data\\index.dxl");
        out.println(dxl);
        out.close();
    } catch (Throwable t) {
        t.printStackTrace();
    }
}
Also used : DxlExporter(lotus.domino.DxlExporter) NoteCollection(lotus.domino.NoteCollection) Database(lotus.domino.Database) PrintWriter(java.io.PrintWriter)

Aggregations

PrintWriter (java.io.PrintWriter)1 Database (lotus.domino.Database)1 DxlExporter (lotus.domino.DxlExporter)1 NoteCollection (lotus.domino.NoteCollection)1