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

net.sourceforge.plantuml.cucadiagram.GroupPrinter Maven / Gradle / Ivy

There is a newer version: 1.2024.8
Show newest version
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.cucadiagram;

import java.io.IOException;
import java.io.PrintWriter;

import net.sourceforge.plantuml.abel.Entity;
import net.sourceforge.plantuml.log.Logme;
import net.sourceforge.plantuml.security.SFile;

public class GroupPrinter {
	// ::remove file when __CORE__

	private final PrintWriter pw;

	private GroupPrinter(PrintWriter pw) {
		this.pw = pw;
	}

	private void printGroup(Entity group) {
		pw.println("");
		pw.println("");
		pw.println("");
		pw.println("");
		pw.println("");
		if (group.groups().size() > 0) {
			pw.println("");
			pw.println("");
			pw.println("");
		}
		pw.println("
"); pw.println(group.getName()); pw.println("
"); if (group.leafs().size() == 0) { pw.println("No direct leaf"); } else { for (Entity leaf : group.leafs()) { pw.println("
    "); printLeaf(leaf); pw.println("
"); } } pw.println("
"); for (Entity g : group.groups()) { pw.println("
"); printGroup(g); pw.println("
"); } pw.println("
"); } private void printLeaf(Entity leaf) { pw.println("
  • " + leaf.getName()); } public static void print(SFile f, Entity rootGroup) { try (PrintWriter pw = f.createPrintWriter()) { pw.println(""); new GroupPrinter(pw).printGroup(rootGroup); pw.println(""); } catch (IOException e) { Logme.error(e); } } }




  • © 2015 - 2024 Weber Informatics LLC | Privacy Policy