Example #1
0
        public override void ProcessRows()
        {
            ColumnProcessor.MapColumns();

            FieldNameIndex  = ColumnProcessor.FieldNameIndex;
            FarmNameIndex   = ColumnProcessor.FarmNameIndex;
            IdIndex         = ColumnProcessor.IdIndex;
            RotationColumns = ColumnProcessor.RotationColumns;
            AcreageIndex    = ColumnProcessor.AcreageIndex;

            foreach (var row in Rows)
            {
                ProcessRow(row);
            }
        }
Example #2
0
        public void ProcessSamples()
        {
            ReadValues();
            PopHeaders();

            ColumnProcessor.MapColumns();

            NutrientMappings       = ColumnProcessor.NutrientMappings;
            RecommendationMappings = ColumnProcessor.RecommendationMappings;
            FieldIndex             = ColumnProcessor.FieldIndex;
            YearIndex = ColumnProcessor.YearIndex;

            foreach (var sampleRow in RawSamples)
            {
                ProcessSample(sampleRow);
            }
        }
Example #3
0
        private static void BuildDocumentation(string content, List <string> matches, PgTable table)
        {
            table.Columns          = ColumnProcessor.GetColumns(table);
            table.Triggers         = TableTriggerProcessor.GetTriggers(table);
            table.Indices          = IndexProcessor.GetIndices(table);
            table.CheckConstraints = CheckConstraintProcessor.GetCheckConstraints(table);

            content = content.Replace("[DBName]", Program.Database.ToUpperInvariant());
            content = content.Replace("[SchemaName]", table.SchemaName);
            content = content.Replace("[TableName]", table.Name);
            content = content.Replace("[TableComment]", table.Description);

            content = Parsers.ColumnParser.Parse(content, matches, table.Columns);
            content = Parsers.ForeignKeyParser.Parse(content, matches, table.Columns);
            content = Parsers.IndexParser.Parse(content, matches, table.Indices);
            content = Parsers.CheckConstraintParser.Parse(content, matches, table.CheckConstraints);
            content = Parsers.DefaultParser.Parse(content, matches, table.Columns);
            content = Parsers.TriggerParser.Parse(content, matches, table.Triggers);


            string targetPath = System.IO.Path.Combine(OutputPath, table.SchemaName, table.Name + ".html");

            FileHelper.WriteFile(content, targetPath);
        }