Esempio n. 1
0
 /// <summary>
 /// Adds a 'skos:semanticRelation' relation between the given concepts within the conceptScheme
 /// </summary>
 public static RDFSKOSConceptScheme AddSemanticRelation(this RDFSKOSConceptScheme conceptScheme,
                                                        RDFSKOSConcept aConcept,
                                                        RDFSKOSConcept bConcept)
 {
     if (conceptScheme != null && aConcept != null && bConcept != null && !aConcept.Equals(bConcept))
     {
         //Add skos:semanticRelation relation to the scheme
         conceptScheme.Relations.SemanticRelation.AddEntry(new RDFOntologyTaxonomyEntry(aConcept, RDFVocabulary.SKOS.SEMANTIC_RELATION.ToRDFOntologyObjectProperty(), bConcept));
     }
     return(conceptScheme);
 }
Esempio n. 2
0
 /// <summary>
 /// Adds a 'skos:narrowMatch' relation between the given concepts within the conceptScheme
 /// </summary>
 public static RDFSKOSConceptScheme AddNarrowMatchRelation(this RDFSKOSConceptScheme conceptScheme,
                                                           RDFSKOSConcept aConcept,
                                                           RDFSKOSConcept bConcept)
 {
     if (conceptScheme != null && aConcept != null && bConcept != null && !aConcept.Equals(bConcept))
     {
         if (RDFSKOSChecker.CheckNarrowerRelation(conceptScheme, aConcept, bConcept))
         {
             //Add skos:narrowMatch relation to the scheme
             conceptScheme.Relations.NarrowMatch.AddEntry(new RDFOntologyTaxonomyEntry(aConcept, RDFVocabulary.SKOS.NARROW_MATCH.ToRDFOntologyObjectProperty(), bConcept));
         }
     }
     return(conceptScheme);
 }
Esempio n. 3
0
 /// <summary>
 /// Adds a 'skos:broaderTransitive' relation between the given concepts within the conceptScheme
 /// </summary>
 public static RDFSKOSConceptScheme AddBroaderTransitiveRelation(this RDFSKOSConceptScheme conceptScheme,
                                                                 RDFSKOSConcept aConcept,
                                                                 RDFSKOSConcept bConcept)
 {
     if (conceptScheme != null && aConcept != null && bConcept != null && !aConcept.Equals(bConcept))
     {
         if (RDFSKOSChecker.CheckBroaderRelation(conceptScheme, aConcept, bConcept))
         {
             //Add skos:broaderTransitive relation to the scheme
             conceptScheme.Relations.BroaderTransitive.AddEntry(new RDFOntologyTaxonomyEntry(aConcept, RDFVocabulary.SKOS.BROADER_TRANSITIVE.ToRDFOntologyObjectProperty(), bConcept));
         }
     }
     return(conceptScheme);
 }
Esempio n. 4
0
 /// <summary>
 /// Adds a 'skos:related' relation between the given concepts within the conceptScheme
 /// </summary>
 public static RDFSKOSConceptScheme AddRelatedRelation(this RDFSKOSConceptScheme conceptScheme,
                                                       RDFSKOSConcept aConcept,
                                                       RDFSKOSConcept bConcept)
 {
     if (conceptScheme != null && aConcept != null && bConcept != null && !aConcept.Equals(bConcept))
     {
         if (RDFSKOSChecker.CheckRelatedRelation(conceptScheme, aConcept, bConcept))
         {
             //Add skos:related relations to the scheme
             conceptScheme.Relations.Related.AddEntry(new RDFOntologyTaxonomyEntry(aConcept, RDFVocabulary.SKOS.RELATED.ToRDFOntologyObjectProperty(), bConcept));
             conceptScheme.Relations.Related.AddEntry(new RDFOntologyTaxonomyEntry(bConcept, RDFVocabulary.SKOS.RELATED.ToRDFOntologyObjectProperty(), aConcept)
                                                      .SetInference(RDFSemanticsEnums.RDFOntologyInferenceType.API));
         }
     }
     return(conceptScheme);
 }
Esempio n. 5
0
 /// <summary>
 /// Adds a 'skos:exactMatch' relation between the given concepts within the conceptScheme
 /// </summary>
 public static RDFSKOSConceptScheme AddExactMatchRelation(this RDFSKOSConceptScheme conceptScheme,
                                                          RDFSKOSConcept aConcept,
                                                          RDFSKOSConcept bConcept)
 {
     if (conceptScheme != null && aConcept != null && bConcept != null && !aConcept.Equals(bConcept))
     {
         if (RDFSKOSChecker.CheckCloseOrExactMatchRelation(conceptScheme, aConcept, bConcept))
         {
             //Add skos:exactMatch relation to the scheme
             conceptScheme.Relations.ExactMatch.AddEntry(new RDFOntologyTaxonomyEntry(aConcept, RDFVocabulary.SKOS.EXACT_MATCH.ToRDFOntologyObjectProperty(), bConcept));
             conceptScheme.Relations.ExactMatch.AddEntry(new RDFOntologyTaxonomyEntry(bConcept, RDFVocabulary.SKOS.EXACT_MATCH.ToRDFOntologyObjectProperty(), aConcept)
                                                         .SetInference(RDFSemanticsEnums.RDFOntologyInferenceType.API));
         }
     }
     return(conceptScheme);
 }