Search in sources :

Example 1 with SchemaValidatorTask

use of org.eclipse.vorto.codegen.ditto.schema.SchemaValidatorTask in project vorto by eclipse.

the class EclipseDittoGenerator method generate.

@Override
public IGenerationResult generate(InformationModel infomodel, InvocationContext invocationContext, IVortoCodeGenProgressMonitor monitor) throws VortoCodeGeneratorException {
    GenerationResultZip zipOutputter = new GenerationResultZip(infomodel, getServiceKey());
    ChainedCodeGeneratorTask<InformationModel> generator = new ChainedCodeGeneratorTask<InformationModel>();
    generator.addTask(new SchemaValidatorTask());
    generator.generate(infomodel, invocationContext, zipOutputter);
    GenerationResultBuilder result = GenerationResultBuilder.from(zipOutputter);
    return result.build();
}
Also used : GenerationResultZip(org.eclipse.vorto.codegen.api.GenerationResultZip) SchemaValidatorTask(org.eclipse.vorto.codegen.ditto.schema.SchemaValidatorTask) InformationModel(org.eclipse.vorto.core.api.model.informationmodel.InformationModel) ChainedCodeGeneratorTask(org.eclipse.vorto.codegen.api.ChainedCodeGeneratorTask) GenerationResultBuilder(org.eclipse.vorto.codegen.utils.GenerationResultBuilder)

Aggregations

ChainedCodeGeneratorTask (org.eclipse.vorto.codegen.api.ChainedCodeGeneratorTask)1 GenerationResultZip (org.eclipse.vorto.codegen.api.GenerationResultZip)1 SchemaValidatorTask (org.eclipse.vorto.codegen.ditto.schema.SchemaValidatorTask)1 GenerationResultBuilder (org.eclipse.vorto.codegen.utils.GenerationResultBuilder)1 InformationModel (org.eclipse.vorto.core.api.model.informationmodel.InformationModel)1