org.thewonderlemming.c4plantuml.graphml.export

## Class GraphMLModelExporter

- java.lang.Object
- - org.thewonderlemming.c4plantuml.graphml.export.GraphMLModelExporter

-     public class GraphMLModelExporter
      extends Object

  An exporter to transform a JAXB `GraphMLModel` to a GraphML string.
  Author:
    thewonderlemming

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Optional<String>` | `export(GraphMLModel graphml)` Exports a JAXB `GraphMLModel` instance to a valid GraphML string, using `UTF-8` as a default `Charset`, turning off the formatting and turning on the strict XML validation on the output.
    `static Optional<String>` | `export(GraphMLModel graphml, boolean formatOutput)` Exports a JAXB `GraphMLModel` instance to a valid GraphML string, using `UTF-8` as a default `Charset`, and turning on the strict XML validation on the output.
    `static Optional<String>` | `export(GraphMLModel graphml, Charset charset, boolean formatOutput)` Exports a JAXB `GraphMLModel` instance to a valid GraphML string, turning on the strict XML validation on the output.
    `static Optional<String>` | `export(GraphMLModel graphml, Charset charset, boolean formatOutput, boolean validate, boolean strictValidation)` Exports a JAXB `GraphMLModel` instance to a valid GraphML string.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### export

          public static final Optional<String> export(GraphMLModel graphml)

      Exports a JAXB `GraphMLModel` instance to a valid GraphML string, using `UTF-8` as a default `Charset`, turning off the formatting and turning on the strict XML validation on the output.
      Parameters:
        `graphml` - the JAXB model instance.
      Returns:
        the generated GraphML as a string if no silent error occurred, or empty else.

    - #### export

          public static final Optional<String> export(GraphMLModel graphml,
                                                      boolean formatOutput)

      Exports a JAXB `GraphMLModel` instance to a valid GraphML string, using `UTF-8` as a default `Charset`, and turning on the strict XML validation on the output.
      Parameters:
        `graphml` - the JAXB model instance.
        `formatOutput` - a flag to tell whether or not the output should fit on a single line.
      Returns:
        the generated GraphML as a string if no silent error occurred, or empty else.

    - #### export

          public static final Optional<String> export(GraphMLModel graphml,
                                                      Charset charset,
                                                      boolean formatOutput)

      Exports a JAXB `GraphMLModel` instance to a valid GraphML string, turning on the strict XML validation on the output.
      Parameters:
        `graphml` - the JAXB model instance.
        `charset` - the `Charset` to use for the GraphML output.
        `formatOutput` - a flag to tell whether or not the output should fit on a single line.
      Returns:
        the generated GraphML as a string if no silent error occurred, or empty else.

    - #### export

          public static final Optional<String> export(GraphMLModel graphml,
                                                      Charset charset,
                                                      boolean formatOutput,
                                                      boolean validate,
                                                      boolean strictValidation)

      Exports a JAXB `GraphMLModel` instance to a valid GraphML string.
      Parameters:
        `graphml` - the JAXB model instance.
        `charset` - the `Charset` to use for the GraphML output.
        `formatOutput` - a flag to tell whether or not the output should fit on a single line.
        `validate` - a flag to tell whether or not the output should be validated against an XSD.
        `strictValidation` - a flag to tell whether or not a validation error should fail the export.
      Returns:
        the generated GraphML as a string if no silent error occurred, or empty else.

Copyright © 2020. All rights reserved.