net.sourceforge.plantuml.api.PlantumlUtils 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.api;
import java.util.List;
import net.sourceforge.plantuml.BlockUml;
import net.sourceforge.plantuml.SourceStringReader;
import net.sourceforge.plantuml.core.Diagram;
public class PlantumlUtils {
public static boolean hasCMapData(String uml) {
List blocks = new SourceStringReader(uml).getBlocks();
if (blocks.size() == 0) {
uml = "@startuml\n" + uml + "\n@enduml";
blocks = new SourceStringReader(uml).getBlocks();
if (blocks.size() == 0) {
return false;
}
}
final BlockUml block = blocks.get(0);
final Diagram diagram = block.getDiagram();
return diagram.hasUrl();
}
}