コード例 #1
0
        public static SeriesMetaList GetSeriesMetaList()
        {
            SeriesMetaList list = new SeriesMetaList();

            string data = GetRequest("https://fundalytics.argusmedia.com/datatypes/2013-01-01/00.00");

            XmlDocument xml = new XmlDocument();
            xml.LoadXml(data);

            foreach (XmlNode xmlMeta in xml.SelectNodes("/ArgusFundamentals/DataTypes/DataType")) {

                data = GetRequest("https://fundalytics.argusmedia.com/datatypes/" + xmlMeta.ChildNodes[0].InnerText);

                XmlDocument tagsXML = new XmlDocument();
                tagsXML.LoadXml(data);

                SeriesTagList tags = new SeriesTagList();
                foreach (XmlNode xmlTag in tagsXML.SelectNodes("/ArgusFundamentals/DataType/DataTypeTags/DataTypeTag")) {

                    tags.Add(new SeriesTag(xmlTag.ChildNodes[0].InnerText, xmlTag.ChildNodes[1].InnerText));
                };

                list.Add(new SeriesMeta(Convert.ToInt32(xmlMeta.ChildNodes[0].InnerText), xmlMeta.ChildNodes[1].InnerText, xmlMeta.ChildNodes[2].InnerText, tags));
            };

            return list;
        }
コード例 #2
0
        public static SeriesMeta GetSeriesMeta(int id)
        {
            SeriesMeta meta;
            SeriesTagList metaTagList = new SeriesTagList();

            string data = GetRequest("https://fundalytics.argusmedia.com/datatypes/" + id.ToString());

            XmlDocument xml = new XmlDocument();
            xml.LoadXml(data);

            foreach (XmlNode xmlTag in xml.SelectNodes("/ArgusFundamentals/DataType/DataTypeTags/DataTypeTag")) {

                metaTagList.Add(new SeriesTag(xmlTag.ChildNodes[0].InnerText, xmlTag.ChildNodes[1].InnerText));
            };

            meta =
                new SeriesMeta(
                    Convert.ToInt32(xml.SelectSingleNode("/ArgusFundamentals/DataType/Id").InnerText),
                    xml.SelectSingleNode("/ArgusFundamentals/DataType/Source").InnerText,
                    xml.SelectSingleNode("/ArgusFundamentals/DataType/Name").InnerText,
                    metaTagList
                );

            return meta;
        }
コード例 #3
0
        public static SeriesTagList GetSeriesTags(IList<string> tagTypes)
        {
            SeriesTagList _tags = new SeriesTagList();

            var db = new Database();
            string sql =
                "SELECT " +
                    "DISTINCT TAG_TYPE, TAG_VALUE " +
                    "FROM " +
                        "CORE.DATUM_TYPE_TAG " +
                    "WHERE " +
                        "TAG_TYPE IN " + GetTagTypeInClauseValues(tagTypes) + " " +
                    "ORDER BY " +
                        "TAG_TYPE, TAG_VALUE ";

            DataTable table = db.GetDataTable(sql);
            foreach (DataRow record in table.Rows) {

                _tags.Add(new SeriesTag(record["TAG_TYPE"].ToString(), record["TAG_VALUE"].ToString()));
            };

            return _tags;
        }
コード例 #4
0
        private SeriesTagList ParentNodes()
        {
            SeriesTagList parentNodes = new SeriesTagList();

            string [] tag_type = Request.QueryString["tagtype"].Split(new char[] { ',' });
            string [] tag_value = Request.QueryString["tagvalue"].Split(new char[] { ',' });

            for (int ix = 0; ix < tag_type.Length; ix++) {

                parentNodes.Add(new SeriesTag(tag_type[ix], tag_value[ix]));
            };

            return parentNodes;
        }
コード例 #5
0
        public static IList<SeriesTag> GetTags()
        {
            SeriesTagList tags = new SeriesTagList();

            string data = GetRequest("https://fundalytics.argusmedia.com/tags/");

            XmlDocument xml = new XmlDocument();
            xml.LoadXml(data);

            foreach (XmlNode xmlTag in xml.SelectNodes("/ArgusFundamentals/Tags/Tag")) {

                tags.Add(new SeriesTag(xmlTag.ChildNodes[1].InnerText, xmlTag.ChildNodes[2].InnerText));
            };

            List<SeriesTag> sortedTags = tags.OrderBy(x => x.Value).OrderBy(x => x.Type).ToList();
            return sortedTags;
        }