// Summary: // Generates the poem schema. Parses the syntax rules from the file // and uses the repository objects to access the database and retrieve // the schema by id. // // Parameters: // schemaId: // The id by which to find the poem schema. // Returns: // The string containing the generated poem. public string GeneratePoem(int schemaId) { IPoemSyntaxRuleDocument doc = parser.Parse(config.SyntaxConfigFile); PoemSchema schema = poemRepository.GetSchemaById(schemaId); string generatedPoem = poemGenerator.GeneratePoem(schema, doc); return(generatedPoem); }