public class C4Graph extends Object
It relies on JAXB for the XML marshalling.
| Constructor and Description |
|---|
C4Graph(Charset charset,
boolean formatOutput)
A constructor that turns on a strict validation of the XML output and that turns off the C4 parsing errors.
|
C4Graph(Charset charset,
boolean formatOutput,
boolean thrownOnParseError)
A constructor that turns on a strict validation of the XML output.
|
C4Graph(Charset charset,
boolean formatOutput,
boolean validateOutput,
boolean strictValidation,
boolean thrownOnParseError)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
C4Graph |
addAndProcessC4Files(List<Path> c4Files)
Adds a
List of C4 files to parse and returns the current instance to allow method chaining. |
Optional<String> |
export()
Transforms the parsed C4 files to a single GraphML output and returns the result as a string.
|
public C4Graph(Charset charset, boolean formatOutput)
charset - the Charset to use to read the C4 files.formatOutput - a flag to tell whether the output XML should fit on a single line or not.public C4Graph(Charset charset, boolean formatOutput, boolean thrownOnParseError)
charset - the Charset to use to read the C4 files.formatOutput - a flag to tell whether the output XML should fit on a single line or not.thrownOnParseError - a flag to tell whether a parsing error should fail the transformation.public C4Graph(Charset charset, boolean formatOutput, boolean validateOutput, boolean strictValidation, boolean thrownOnParseError)
charset - the Charset to use to read the C4 files.formatOutput - a flag to tell whether the output XML should fit on a single line or not.validateOutput - a flag to tell whether the output XML should be validated against the GraphML XSDs.strictValidation - a flag to tell whether a validation error should fail the transformation.thrownOnParseError - a flag to tell whether a parsing error should fail the transformation.public C4Graph addAndProcessC4Files(List<Path> c4Files)
List of C4 files to parse and returns the current instance to allow method chaining.
It is better to call that method with every C4 file to parse at once, because they will be sorted alphabetically, while if you call that method more than once per generation, you should take responsibility of the ordering of these source files.
public Optional<String> export() throws Throwable
Throwable - on parsing errors and/or validation errors, depending on the values of the flags in the
constructor.Copyright © 2020. All rights reserved.