Example #1
0
 /// <summary>
 /// Default-ctor to build a taxonomy entry with the given subject, predicate and object resources
 /// </summary>
 internal RDFOntologyTaxonomyEntry(RDFOntologyResource taxonomySubject,
                                   RDFOntologyResource taxonomyPredicate,
                                   RDFOntologyResource taxonomyObject)
 {
     if (taxonomySubject != null)
     {
         if (taxonomyPredicate != null)
         {
             if (taxonomyObject != null)
             {
                 this.TaxonomySubject   = taxonomySubject;
                 this.TaxonomyPredicate = taxonomyPredicate;
                 this.TaxonomyObject    = taxonomyObject;
                 this.InferenceType     = RDFSemanticsEnums.RDFOntologyInferenceType.None;
                 this.TaxonomyEntryID   = RDFModelUtilities.CreateHash(this.ToString());
             }
             else
             {
                 throw new RDFSemanticsException("Cannot create RDFOntologyTaxonomyEntry because given \"taxonomyObject\" parameter is null.");
             }
         }
         else
         {
             throw new RDFSemanticsException("Cannot create RDFOntologyTaxonomyEntry because given \"taxonomyPredicate\" parameter is null.");
         }
     }
     else
     {
         throw new RDFSemanticsException("Cannot create RDFOntologyTaxonomyEntry because given \"taxonomySubject\" parameter is null.");
     }
 }
Example #2
0
 /// <summary>
 /// Marks this taxonomy entry as a semantic inference, depending on the given parameter
 /// </summary>
 internal RDFOntologyTaxonomyEntry SetInference(RDFSemanticsEnums.RDFOntologyInferenceType inferenceType)
 {
     this.InferenceType = inferenceType;
     return(this);
 }