Class FileContentGeneratorManager


  • public class FileContentGeneratorManager
    extends Object
    Generic file generator.

    By default the manager is able to generate :

    • XML Schema from a given XML.
    • DTD from a given XML.

    • Constructor Detail

      • FileContentGeneratorManager

        public FileContentGeneratorManager​(IXMLFullFormatter formatter)
    • Method Detail

      • registerGenerator

        public void registerGenerator​(IFileContentGenerator<?,​?> generator,
                                      Class<? extends FileContentGeneratorSettings> generatorKey)
        Register the given generator by using settings class as key generator.
        Parameters:
        generator - the generator.
        generatorKey - the key of the generator identified by the settings class.
      • generate

        public <Source,​Settings extends FileContentGeneratorSettingsString generate​(Source document,
                                                                                            SharedSettings sharedSettings,
                                                                                            Settings generatorSettings,
                                                                                            org.eclipse.lsp4j.jsonrpc.CancelChecker cancelChecker)
        Generates a file content (ex : XSD, DTD) from the given document source document (ex: XML) by using the given settings generatorSettings.
        Parameters:
        document - the document source (ex : XML).
        sharedSettings - the shared settings.
        generatorSettings - the generator settings.
        formatter - the formatter.
        Returns:
        the result of the generation of the file content (ex : XSD, DTD) from the given document source document (ex: XML) by using the given settings generatorSettings.