use of com.structurizr.io.plantuml.BasicPlantUMLWriter in project cia by Hack23.
the class AppPublicSystemDocumentation method printPlantUml.
/**
* Prints the plant uml.
*
* @param workspace
* the workspace
* @throws WorkspaceWriterException
* the workspace writer exception
* @throws IOException
* Signals that an I/O exception has occurred.
* @throws InterruptedException
* the interrupted exception
*/
private static void printPlantUml(final Workspace workspace) throws WorkspaceWriterException, IOException, InterruptedException {
final StringWriter stringWriter = new StringWriter();
final PlantUMLWriter plantUMLWriter = new BasicPlantUMLWriter();
// plantUMLWriter.setSizeLimit(16384);
plantUMLWriter.write(workspace, stringWriter);
String allPlantUmlsString = stringWriter.toString();
final String systemUml2 = allPlantUmlsString.substring(allPlantUmlsString.lastIndexOf("@startuml"), allPlantUmlsString.lastIndexOf("@enduml") + "@enduml".length());
allPlantUmlsString = allPlantUmlsString.replace(systemUml2, "");
writePlantUml("Citizen-Intelligence-Agency-System-System-Deployment", systemUml2);
final String componentUml = allPlantUmlsString.substring(allPlantUmlsString.lastIndexOf("@startuml"), allPlantUmlsString.lastIndexOf("@enduml") + "@enduml".length());
allPlantUmlsString = allPlantUmlsString.replace(componentUml, "");
writePlantUml("Citizen-Intelligence-Agency-System-Web-Application-Components", componentUml);
final String containersUml = allPlantUmlsString.substring(allPlantUmlsString.lastIndexOf("@startuml"), allPlantUmlsString.lastIndexOf("@enduml") + "@enduml".length());
allPlantUmlsString = allPlantUmlsString.replace(containersUml, "");
writePlantUml("Citizen-Intelligence-Agency-System-Containers", containersUml);
final String systemUml = allPlantUmlsString.substring(allPlantUmlsString.lastIndexOf("@startuml"), allPlantUmlsString.lastIndexOf("@enduml") + "@enduml".length());
allPlantUmlsString = allPlantUmlsString.replace(systemUml, "");
writePlantUml("Citizen-Intelligence-Agency-System-System-Context", systemUml);
final String enterpriseUml = allPlantUmlsString.substring(allPlantUmlsString.lastIndexOf("@startuml"), allPlantUmlsString.lastIndexOf("@enduml") + "@enduml".length());
allPlantUmlsString = allPlantUmlsString.replace(enterpriseUml, "");
writePlantUml("Enterprise-Context-for-Hack23", enterpriseUml);
}
use of com.structurizr.io.plantuml.BasicPlantUMLWriter in project cia by Hack23.
the class AwsPublicSystemDocumentation method printPlantUml.
/**
* Prints the plant uml.
*
* @param workspace
* the workspace
* @throws WorkspaceWriterException
* the workspace writer exception
* @throws IOException
* Signals that an I/O exception has occurred.
* @throws InterruptedException
* the interrupted exception
*/
private static void printPlantUml(final Workspace workspace) throws WorkspaceWriterException, IOException, InterruptedException {
final StringWriter stringWriter = new StringWriter();
final PlantUMLWriter plantUMLWriter = new BasicPlantUMLWriter();
plantUMLWriter.write(workspace, stringWriter);
final String allPlantUmlsString = stringWriter.toString();
final String awsSystem = allPlantUmlsString.substring(allPlantUmlsString.lastIndexOf("@startuml"), allPlantUmlsString.lastIndexOf("@enduml") + "@enduml".length());
writePlantUml("Citizen-Intelligence-Agency-Prod-Aws-Account-Structure", awsSystem);
}
use of com.structurizr.io.plantuml.BasicPlantUMLWriter in project moduliths by moduliths.
the class Documenter method render.
private String render(ComponentView view, Options options) {
switch(options.style) {
case C4:
C4PlantUMLExporter exporter = new C4PlantUMLExporter();
Diagram diagram = exporter.export(view);
return diagram.getDefinition();
case UML:
default:
Writer writer = new StringWriter();
PlantUMLWriter umlWriter = new BasicPlantUMLWriter();
umlWriter.addSkinParam("componentStyle", "uml1");
umlWriter.write(view, writer);
return writer.toString();
}
}
Aggregations