Search in sources :

Example 11 with XMLElement

use of org.freeplane.n3.nanoxml.XMLElement in project freeplane by freeplane.

the class PresentationWriter method writeContent.

void writeContent(ITreeWriter writer, IExtension extension) throws IOException {
    MapPresentations mapPresentations = (MapPresentations) extension;
    NamedElementCollection<Presentation> presentations = mapPresentations.presentations;
    if (presentations.getSize() > 0) {
        XMLElement xmlPresentations = new XMLElement(HOOK);
        xmlPresentations.setAttribute(NAME, PresentationBuilder.PRESENTATIONS);
        for (int i = 0; i < presentations.getSize(); i++) {
            Presentation p = presentations.getElement(i);
            writePresentation(xmlPresentations, p);
        }
        writer.addElement(null, xmlPresentations);
    }
}
Also used : XMLElement(org.freeplane.n3.nanoxml.XMLElement)

Example 12 with XMLElement

use of org.freeplane.n3.nanoxml.XMLElement in project freeplane by freeplane.

the class PresentationWriter method writePresentation.

private void writePresentation(XMLElement xmlPresentations, Presentation p) {
    XMLElement xmlPresentation = xmlPresentations.createElement(PRESENTATION);
    xmlPresentation.setAttribute(NAME, p.getName());
    for (int i = 0; i < p.slides.getSize(); i++) writeSlide(xmlPresentation, p.slides.getElement(i));
    xmlPresentations.addChild(xmlPresentation);
}
Also used : XMLElement(org.freeplane.n3.nanoxml.XMLElement)

Example 13 with XMLElement

use of org.freeplane.n3.nanoxml.XMLElement in project freeplane by freeplane.

the class AddOnProperties method addDefaultPropertiesAsChild.

private void addDefaultPropertiesAsChild(XMLElement parent) {
    final XMLElement xmlElement = new XMLElement("default.properties");
    for (Entry<String, String> entry : defaultProperties.entrySet()) {
        xmlElement.setAttribute(entry.getKey(), entry.getValue());
    }
    parent.addChild(xmlElement);
}
Also used : XMLElement(org.freeplane.n3.nanoxml.XMLElement)

Example 14 with XMLElement

use of org.freeplane.n3.nanoxml.XMLElement in project freeplane by freeplane.

the class AddOnProperties method addImagesAsChild.

private void addImagesAsChild(XMLElement parent) {
    final XMLElement xmlElement = new XMLElement("images");
    if (images != null) {
        for (String image : images) {
            final XMLElement imageElement = new XMLElement("image");
            imageElement.setAttribute("name", image);
            xmlElement.addChild(imageElement);
        }
    }
    parent.addChild(xmlElement);
}
Also used : XMLElement(org.freeplane.n3.nanoxml.XMLElement)

Example 15 with XMLElement

use of org.freeplane.n3.nanoxml.XMLElement in project freeplane by freeplane.

the class AddOnProperties method addAsChildWithContent.

private void addAsChildWithContent(XMLElement parent, String name, String content) {
    final XMLElement xmlElement = new XMLElement(name);
    xmlElement.setContent(content);
    parent.addChild(xmlElement);
}
Also used : XMLElement(org.freeplane.n3.nanoxml.XMLElement)

Aggregations

XMLElement (org.freeplane.n3.nanoxml.XMLElement)63 IOException (java.io.IOException)8 IXMLParser (org.freeplane.n3.nanoxml.IXMLParser)7 IXMLReader (org.freeplane.n3.nanoxml.IXMLReader)7 StdXMLReader (org.freeplane.n3.nanoxml.StdXMLReader)7 BufferedInputStream (java.io.BufferedInputStream)5 File (java.io.File)5 FileInputStream (java.io.FileInputStream)5 ASelectableCondition (org.freeplane.features.filter.condition.ASelectableCondition)5 NodeModel (org.freeplane.features.map.NodeModel)5 XMLWriter (org.freeplane.n3.nanoxml.XMLWriter)4 Color (java.awt.Color)3 FileWriter (java.io.FileWriter)3 Writer (java.io.Writer)3 IXMLElement (net.n3.nanoxml.IXMLElement)3 XMLElement (net.n3.nanoxml.XMLElement)3 XMLException (org.freeplane.n3.nanoxml.XMLException)3 Point (java.awt.Point)2 FilenameFilter (java.io.FilenameFilter)2 HashMap (java.util.HashMap)2