public void CreateDocument()
        {
            docTree = featureCreator.CreateFeatures();

            styleCreator.AddStyles(docTree);

            xmlWriter.WriteXml(docTree);
        }
Exemplo n.º 2
0
 public FeatureCreator(ConfigFacade configuration, IDataProvider dataProvider, Randomizer randomGen)
 {
     docTree = new DocumentTree();
     randomNumberGen = new Random();
     this.configuration = configuration;
     this.DataProvider = dataProvider;
     this.randomGen = randomGen;
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 5
0
 public void AddStyles(DocumentTree document)
 {
     this.document = document;
     AddRandomStyles();
     AddSpecificStyles();
 }