public void CreateDocument() { docTree = featureCreator.CreateFeatures(); styleCreator.AddStyles(docTree); xmlWriter.WriteXml(docTree); }
public FeatureCreator(ConfigFacade configuration, IDataProvider dataProvider, Randomizer randomGen) { docTree = new DocumentTree(); randomNumberGen = new Random(); this.configuration = configuration; this.DataProvider = dataProvider; this.randomGen = randomGen; }
public void WriteXml(DocumentTree document) { outDocument = new XDocument(); XElement root = new XElement(document.Root.Name); outDocument.Add(root); AddToXml(document.Root, outDocument.Root); outDocument.Save(outputFile); }
public DocumentCreator(IDataProvider dataProvider, String outputFilePath, String runConfigPath, String docFeaturesPath) { docTree = new DocumentTree(); randomNumberGen = new Random(); defualts = new Defaults(); xmlWriter = new XmlWriter(outputFilePath); runConfig = new RunConfig(runConfigPath, defualts); docFeatures = new DocFeatures(docFeaturesPath); config = new ConfigFacade(runConfig, docFeatures, defualts); randomGen = new Randomizer(config); styleCreator = new StyleCreator(config, randomGen); featureCreator = new FeatureCreator(config, dataProvider, randomGen); }
public void AddStyles(DocumentTree document) { this.document = document; AddRandomStyles(); AddSpecificStyles(); }