Class LQN2UML
-
- All Implemented Interfaces:
public class LQN2UMLConverts 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 Classes Modifier and Type Class Description public enumLQN2UML.FormatOutput format for the sequence diagram.
public classLQN2UML.OptionsOptions for sequence diagram export.
-
Constructor Summary
Constructors Constructor Description LQN2UML()
-
Method Summary
Modifier and Type Method Description static 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. -
-
Method Detail
-
export
static File export(LayeredNetwork model)
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
-
export
static File export(LayeredNetwork model, LQN2UML.Options options)
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)
-
toTikZ
static String toTikZ(LayeredNetwork model)
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
static String toTikZ(LayeredNetwork model, SequenceDiagramOptions diagramOptions)
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
static void view(LayeredNetwork model)
Displays the sequence diagram in a PDF viewer.
- Parameters:
model- The LayeredNetwork model to display
-
view
static void view(LayeredNetwork model, SequenceDiagramOptions diagramOptions)
Displays the sequence diagram in a PDF viewer with custom options.
- Parameters:
model- The LayeredNetwork model to displaydiagramOptions- Options for the diagram layout
-
-
-
-