/// <summary>
 /// Checks if the given "aFact -> objectProperty -> bFact" has transitive assertions
 /// which would cause transitive cycles (unallowed concept in OWL-DL)
 /// </summary>
 internal static Boolean CheckTransitiveAssertionCompatibility(RDFOntologyData ontologyData,
                                                               RDFOntologyFact aFact,
                                                               RDFOntologyObjectProperty objectProperty,
                                                               RDFOntologyFact bFact)
 {
     return(!ontologyData.CheckIsTransitiveAssertionOf(bFact, objectProperty, aFact));
 }
 /// <summary>
 /// Default-ctor to build an "owl:HasValue" ontology restriction with the given name on the given property and the given requiredValue
 /// </summary>
 public RDFOntologyHasValueRestriction(RDFResource restrictionName,
                                       RDFOntologyProperty onProperty,
                                       RDFOntologyFact requiredValue) : base(restrictionName, onProperty)
 {
     if (requiredValue != null)
     {
         this.RequiredValue = requiredValue;
     }
     else
     {
         throw new RDFSemanticsException("Cannot create RDFOntologyHasValueRestriction because given \"requiredValue\" parameter is null.");
     }
 }
Beispiel #3
0
 /// <summary>
 /// Builds a data lens for the given fact on the given ontology
 /// </summary>
 public RDFOntologyDataLens(RDFOntologyFact ontologyFact, RDFOntology ontology)
 {
     if (ontologyFact != null)
     {
         if (ontology != null)
         {
             this.OntologyFact = ontologyFact;
             this.Ontology     = ontology.UnionWith(RDFBASEOntology.Instance);
         }
         else
         {
             throw new RDFSemanticsException("Cannot create data lens because given \"ontology\" parameter is null");
         }
     }
     else
     {
         throw new RDFSemanticsException("Cannot create data lens because given \"ontologyFact\" parameter is null");
     }
 }
 /// <summary>
 /// Checks if the given afact can be set differentfrom the given bfact
 /// </summary>
 internal static Boolean CheckDifferentFromCompatibility(RDFOntologyData ontologyData,
                                                         RDFOntologyFact aFact,
                                                         RDFOntologyFact bFact)
 {
     return(!ontologyData.CheckIsSameFactAs(aFact, bFact));
 }