![JAR search and dependency download from the Maven repository](/logo.png)
net.sourceforge.plantuml.directdot.PSystemDotFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml-mit Show documentation
Show all versions of plantuml-mit Show documentation
PlantUML is a component that allows to quickly write diagrams from text.
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.directdot;
import net.sourceforge.plantuml.command.PSystemBasicFactory;
import net.sourceforge.plantuml.core.DiagramType;
import net.sourceforge.plantuml.core.UmlSource;
public class PSystemDotFactory extends PSystemBasicFactory {
private StringBuilder data;
public PSystemDotFactory(DiagramType diagramType) {
super(diagramType);
}
@Override
public PSystemDot initDiagram(UmlSource source, String startLine) {
data = null;
return null;
}
@Override
public PSystemDot executeLine(UmlSource source, PSystemDot system, String line) {
if (system == null && line.matches("(strict\\s+)?(di)?graph\\s+\"?[-\\w]+\"?\\s*\\{")) {
data = new StringBuilder(line);
data.append("\n");
return new PSystemDot(source, data.toString());
}
if (data == null || system == null)
return null;
data.append(line);
data.append("\n");
return new PSystemDot(source, data.toString());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy