/// <summary> /// Builds a new difference taxonomy from this taxonomy and a given one /// </summary> internal RDFOntologyTaxonomy DifferenceWith(RDFOntologyTaxonomy taxonomy) { var result = new RDFOntologyTaxonomy(this.Category); if (taxonomy != null) { //Add difference entries foreach (var te in this) { if (!taxonomy.ContainsEntry(te)) { result.AddEntry(te); } } } else { //Add entries from this taxonomy foreach (var te in this) { result.AddEntry(te); } } return(result); }
/// <summary> /// Builds a new intersection taxonomy from this taxonomy and a given one /// </summary> internal RDFOntologyTaxonomy IntersectWith(RDFOntologyTaxonomy taxonomy) { var result = new RDFOntologyTaxonomy(this.Category); if (taxonomy != null) { //Add intersection triples foreach (var te in this) { if (taxonomy.ContainsEntry(te)) { result.AddEntry(te); } } } return(result); }