Package jline.io
Class LQN2UML
java.lang.Object
jline.io.LQN2UML
Converts a LayeredNetwork (LQN) model to a UML sequence diagram.
Default behavior exports to TEX (LaTeX/TikZ). Use options to specify other formats.
Example usage:
// Export to TEX (default)
File tex = LQN2UML.export(model);
// Export to PDF
LQN2UML.export(model, new LQN2UML.Options().setFormat(Format.PDF).setOutputPath("/tmp/diagram.pdf"));
// Export to PNG
LQN2UML.export(model, new LQN2UML.Options().setFormat(Format.PNG).setOutputPath("/tmp/diagram.png"));
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumOutput format for the sequence diagram.static classOptions for sequence diagram export. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Fileexport(LayeredNetwork model) Exports a LayeredNetwork model to a UML sequence diagram (TEX format by default).static Fileexport(LayeredNetwork model, LQN2UML.Options options) Exports a LayeredNetwork model to a UML sequence diagram with custom options.static StringtoTikZ(LayeredNetwork model) Generates the TikZ/LaTeX source code for the sequence diagram.static StringtoTikZ(LayeredNetwork model, SequenceDiagramOptions diagramOptions) Generates the TikZ/LaTeX source code with custom diagram options.static voidview(LayeredNetwork model) Displays the sequence diagram in a PDF viewer.static voidview(LayeredNetwork model, SequenceDiagramOptions diagramOptions) Displays the sequence diagram in a PDF viewer with custom options.
-
Constructor Details
-
LQN2UML
public LQN2UML()
-
-
Method Details
-
export
Exports a LayeredNetwork model to a UML sequence diagram (TEX format by default).- Parameters:
model- The LayeredNetwork model to convert- Returns:
- The generated TEX file
- Throws:
IOException- If export fails
-
export
Exports a LayeredNetwork model to a UML sequence diagram with custom options.- Parameters:
model- The LayeredNetwork model to convertoptions- Export options (format, output path, etc.)- Returns:
- The generated file (TEX, PDF, or PNG)
- Throws:
IOException- If export fails
-
toTikZ
Generates the TikZ/LaTeX source code for the sequence diagram.- Parameters:
model- The LayeredNetwork model to convert- Returns:
- The TikZ source code as a string
-
toTikZ
Generates the TikZ/LaTeX source code with custom diagram options.- Parameters:
model- The LayeredNetwork model to convertdiagramOptions- Options for the diagram layout- Returns:
- The TikZ source code as a string
-
view
Displays the sequence diagram in a PDF viewer.- Parameters:
model- The LayeredNetwork model to display
-
view
Displays the sequence diagram in a PDF viewer with custom options.- Parameters:
model- The LayeredNetwork model to displaydiagramOptions- Options for the diagram layout
-