Package jline.io

Class LQN2UML

  • All Implemented Interfaces:

    
    public class 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 Classes 
      Modifier and Type Class Description
      public enum LQN2UML.Format

      Output format for the sequence diagram.

      public class LQN2UML.Options

      Options for sequence diagram export.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      LQN2UML()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

      • LQN2UML

        LQN2UML()
    • 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 convert
        options - 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 convert
        diagramOptions - 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 display
        diagramOptions - Options for the diagram layout