private DateTime GetLatestUpdate(LinkBiDefinitionDimension variable) { DateTime result = new DateTime(); // Run through all scores of the filter. foreach (LinkBiDefinitionDimensionScore score in variable.Scores) { // Get all category linkings of the score. List <object[]> links = this.Core.CategoryLinks.GetValues( new string[] { "CreationDate" }, new string[] { "IdTaxonomyCategory" }, new object[] { score.Identity } ); // Run through all category links. foreach (object[] link in links) { if (((DateTime)link[0]) > result) { result = (DateTime)link[0]; } } } return(result); }
public LinkBiSelector(int idLanguage, LinkBiDefinitionDimension selectedItem, bool isTaxonomy) { this.IdLanguage = idLanguage; this.SelectedItem = selectedItem; this.SelectedItemIsTaxonomy = isTaxonomy; this.Load += LinkBiSelector_Load; }
public LinkBiDefinitionScoreGroup(LinkBiDefinitionDimension owner, XmlNode xmlNode) : base(owner, xmlNode) { this.Scores = new List <LinkBiDefinitionDimensionScore>(); foreach (XmlNode xmlNodeScore in this.XmlNode.ChildNodes) { LinkBiDefinitionDimensionScore score = null; switch (xmlNodeScore.Name) { case "TaxonomyCategory": // Create a new taxonomy category as score by the xml node. score = new LinkBiDefinitionTaxonomyCategory(this.Owner, xmlNodeScore); break; case "Category": // Create a new category as score by the xml node. score = new LinkBiDefinitionCategory(this.Owner, xmlNodeScore); break; case "ScoreGroup": score = new LinkBiDefinitionScoreGroup(this.Owner, xmlNodeScore); break; } // Check if it was possible to parse the score. if (score == null) { continue; } // Add the filter score to the filter's filter scores. this.Scores.Add(score); } }
public LinkBiDefinitionTaxonomyCategory(LinkBiDefinitionDimension owner, XmlNode xmlNode) : base(owner, xmlNode) { }
public LinkBiDefinitionDimensionScore(LinkBiDefinitionDimension owner, XmlNode xmlNode) { this.Owner = owner; this.XmlNode = xmlNode; }
public override void Parse() { this.Dimensions = new List <LinkBiDefinitionDimension>(); this.Measures = new List <LinkBiDefinitionDimension>(); // Get all filter xml nodes. XmlNodeList xmlNodesDimensions = this.XmlDocument.DocumentElement.SelectNodes("Dimensions/*"); // Run through all filter xml nodes. foreach (XmlNode xmlNodeDimension in xmlNodesDimensions) { LinkBiDefinitionDimension filter = null; switch (xmlNodeDimension.Name) { case "Variable": if (xmlNodeDimension.Attributes["IsTaxonomy"] != null && bool.Parse(xmlNodeDimension.Attributes["IsTaxonomy"].Value) == false) { // Create a new variable as filter by the xml node. filter = new LinkBiDefinitionVariable(this, xmlNodeDimension); } else { // Create a new taxonomy variable as filter by the xml node. filter = new LinkBiDefinitionTaxonomyVariable(this, xmlNodeDimension); } break; } // Check if it was possible to parse the filter. if (filter == null) { continue; } // Add the filter to the LinkBi definition's filters. this.Dimensions.Add(filter); } // Get all measure xml nodes. XmlNodeList xmlNodesMeasures = this.XmlDocument.DocumentElement.SelectNodes("Measures/*"); // Run through all measure xml nodes. foreach (XmlNode xmlNodeMeasure in xmlNodesMeasures) { LinkBiDefinitionDimension measures = null; switch (xmlNodeMeasure.Name) { case "Variable": if (xmlNodeMeasure.Attributes["IsTaxonomy"] != null && bool.Parse(xmlNodeMeasure.Attributes["IsTaxonomy"].Value) == false) { // Create a new taxonomy variable as filter by the xml node. measures = new LinkBiDefinitionVariable(this, xmlNodeMeasure); } else { // Create a new taxonomy variable as filter by the xml node. measures = new LinkBiDefinitionTaxonomyVariable(this, xmlNodeMeasure); } break; } // Check if it was possible to parse the filter. if (measures == null) { continue; } // Add the filter to the LinkBi definition's filters. this.Measures.Add(measures); } XmlNode xmlNodeProperties = this.XmlDocument.DocumentElement.SelectSingleNode("Properties"); this.Properties = new LinkBiDefinitionProperties(this, xmlNodeProperties); this.Settings = new LinkBiSettings(this, this.XmlDocument.DocumentElement.SelectSingleNode("Settings")); }