namespace ZionRobot.Models.Workflow
{
    public class RoadMap : ZionVault.Util.Xml
    {
        private string mainTag = @"workflow-settings";

        public string Path { get; }
        public string DictionaryName { get; set; }
        public Input.Settings InputSettings;
        public Output.Settings OutputSettings;
        public Sync.Settings SyncSettings;

        public RoadMap(string path)
        {
            this.Path = path;
            this.Load(path, mainTag, false, false);

            System.Xml.XmlNode root = this.SelectSingleNode(mainTag);

            InputSettings = new Input.Settings(root.SelectSingleNode(@"InputSettings"));
            OutputSettings = new Output.Settings(root.SelectSingleNode(@"OutputSettings"));
            SyncSettings = new Sync.Settings(root.SelectSingleNode(@"SyncSettings"));
        }
    }
}
