final String avroFileLocalPath = ServletContextParameterMap.getParameterValue(ContextParameter.AVRO_PUBLISH_DIR) +
avroFileName;
try {
FileOutputStream fos = new FileOutputStream(new File(avroFileLocalPath));
AvroKR2RMLRDFWriter writer = new AvroKR2RMLRDFWriter(fos);
writer.addPrefixes(mapping.getPrefixes());
RootStrategy strategy = new UserSpecifiedRootStrategy(rootTriplesMapId, new SteinerTreeRootStrategy(new WorksheetDepthRootStrategy()));
KR2RMLWorksheetRDFGenerator generator = new KR2RMLWorksheetRDFGenerator(worksheet, f, ontMgr, writer,
false, strategy, mapping, errorReport, selection);
try {
generator.generateRDF(true);