Package com.laamella.snelxml.generator.immutablemodelmapper

Examples of com.laamella.snelxml.generator.immutablemodelmapper.ImmutableModelMapperGenerator


            if (xsds.isEmpty()) {
                log.warn("No xsd's selected for generation.");
            }
            final CodeGenerator readerGenerator = new ReaderGenerator("com.bla.bla", new FileOutputStreamFactory(sourceGenerationDirectory));
            final CodeGenerator gatherMapperGenerator = new MapperTemplateGenerator("com.bla.bla", new FileOutputStreamFactory(sourceGenerationDirectory));
            final CodeGenerator immutableModelMapperGenerator = new ImmutableModelMapperGenerator("com.bla.bla", new FileOutputStreamFactory(sourceGenerationDirectory));
            final CodeGenerator immutableModelGenerator = new ImmutableModelGenerator("com.bla.bla", new FileOutputStreamFactory(sourceGenerationDirectory));
//            final CodeGenerator mutableModelMapperGenerator = new MutableModelMapperGenerator("com.bla.bla", new FileOutputStreamFactory(sourceGenerationDirectory));
            final SampleXmlGenerator sampleXmlGenerator = new SampleXmlGenerator(new FileOutputStreamFactory(sourceGenerationDirectory));
            final XSLoader schemaLoader = xsdReader.createSchemaLoader();
            final ModelTransformer modelTransformer = new ModelTransformer();

            for (String xsd : xsds) {
                log.info("Processing: {}", xsd);
                final XSModel xsModel = schemaLoader.loadURI(new File(schemaDirectory, xsd).toURI().toString());
                Schema schema = xsdReader.readXsd(xsd, xsModel);
                final Model model = modelTransformer.transform(schema);
                readerGenerator.generate(model);
                gatherMapperGenerator.generate(model);
                immutableModelGenerator.generate(model);
                immutableModelMapperGenerator.generate(model);
                sampleXmlGenerator.writeSample(schema);
            }
        } catch (Exception e) {
            throw new MojoExecutionException("Failed to run generators", e);
        }
View Full Code Here

TOP

Related Classes of com.laamella.snelxml.generator.immutablemodelmapper.ImmutableModelMapperGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.