private void buildDefinition(String definitionName,Model model){
  if (config.isSeparatedDefinitionsEnabled()) {
    MarkupDocBuilder defDocBuilder=copyMarkupDocBuilder();
    buildDefinition(definitionName,model,defDocBuilder);
    Path definitionFile=outputPath.resolve(resolveDefinitionDocument(definitionName));
    defDocBuilder.writeToFileWithoutExtension(definitionFile,StandardCharsets.UTF_8);
    if (logger.isInfoEnabled()) {
      logger.info("Separate definition file produced : '{}'",definitionFile);
    }
    definitionRef(definitionName,this.markupDocBuilder);
  }
 else {
    buildDefinition(definitionName,model,this.markupDocBuilder);
  }
}

private void buildDefinition ( String definitionName , Model model ) { if ( config . isSeparatedDefinitionsEnabled ( ) ) { MarkupDocBuilder defDocBuilder = copyMarkupDocBuilder ( ) ; buildDefinition ( definitionName , model , defDocBuilder ) ; Path definitionFile = outputPath . resolve ( resolveDefinitionDocument ( definitionName ) ) ; defDocBuilder . writeToFileWithoutExtension ( definitionFile , StandardCharsets . UTF_8 ) ; if ( logger . isInfoEnabled ( ) ) { logger . info ( "Separate definition file produced : '{}'" , definitionFile ) ; } definitionRef ( definitionName , this . markupDocBuilder ) ; } else { buildDefinition ( definitionName , model , this . markupDocBuilder ) ; } }
generate definition files depending on the generation mode
