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