Exemple #1
0
 /// <summary>
 /// Adds the given collection to the collection
 /// </summary>
 public RDFSKOSCollection AddCollection(RDFSKOSCollection collection)
 {
     if (collection != null)
     {
         if (!this.Collections.ContainsKey(collection.PatternMemberID))
         {
             this.Collections.Add(collection.PatternMemberID, collection);
         }
     }
     return(this);
 }
Exemple #2
0
 /// <summary>
 /// Removes the given collection from the collection
 /// </summary>
 public RDFSKOSCollection RemoveCollection(RDFSKOSCollection collection)
 {
     if (collection != null)
     {
         if (this.Collections.ContainsKey(collection.PatternMemberID))
         {
             this.Collections.Remove(collection.PatternMemberID);
         }
     }
     return(this);
 }
 /// <summary>
 /// Adds the given collection to the scheme
 /// </summary>
 public RDFSKOSConceptScheme AddCollection(RDFSKOSCollection collection)
 {
     if (collection != null)
     {
         if (!this.Collections.ContainsKey(collection.PatternMemberID))
         {
             this.Collections.Add(collection.PatternMemberID, collection);
             //Also add concepts of the collection
             foreach (var cn in collection.Concepts.Values)
             {
                 this.AddConcept(cn);
             }
             //Also adds collections of the collection
             foreach (var cl in collection.Collections.Values)
             {
                 this.AddCollection(cl);
             }
         }
     }
     return(this);
 }