All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.xmind.core.Test2 Maven / Gradle / Ivy

Go to download

Plugin that manages JBehave stories storage in XMind mindmap file, which allows design jBehave tests right after the brainstorm

The newest version!
package org.xmind.core;

import org.xmind.core.io.ByteArrayStorage;
import org.xmind.core.io.IStorage;

import java.io.IOException;

/**
 * Created by Ilya Evlampiev on 06.03.15.
 */
public class Test2 {
    public static void main(String[] args) throws IOException, CoreException {
        String workbookString = "new.xmind";
        //String oldWorkbook = "C:`*`path`*`to`*`oldWorkbook.xmind";
        IWorkbookBuilder builder = Core.getWorkbookBuilder();
        IWorkbook workbook = builder.createWorkbook(workbookString);

        //IWorkbook Workbook = builder.createWorkbook(workbookString);
        IStorage ist = new ByteArrayStorage();
        IEncryptionHandler iench = new IEncryptionHandler() {
            @Override
            public String retrievePassword() throws CoreException {
                return "privet";
            }
        };

        //IWorkbook workbook = builder.loadFromPath(workbookString, ist, iench);

        for (ISheet isheet : workbook.getSheets()) {
            System.out.println(isheet.getId());
            ITopic root = isheet.getRootTopic();
            IPlainNotesContent plainContent = (IPlainNotesContent) workbook.createNotesContent(INotes.PLAIN);
            plainContent.setTextContent("This is the note");
            INotes notes = root.getNotes();
            notes.setContent(INotes.PLAIN, plainContent);
          //  iterateOverTopic(root, "","src\\test\\resources");
        }
        workbook.save("new.xmind");
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy