Closed constnick closed 3 years ago
Hi, at first I had to draw a Venn diagram to depict this use case :) What you do is correct, I suggest you can optimize by directly checking situationData against fullContextOntology.Data:
RDFOntologyData dataDiff = situationData.DifferenceWith(fullContextOntology.Data);
// situation exists if situationData is entirely contained in fullContextOntology.Data (no differences remain):
bool situationExists = dataDiff.FactsCount == 0
&& dataDiff.LiteralsCount == 0
&& dataDiff.Relations.ClassType.EntriesCount == 0
&& dataDiff.Relations.SameAs.EntriesCount == 0
&& dataDiff.Relations.DifferentFrom.EntriesCount == 0
&& dataDiff.Relations.Assertions.EntriesCount == 0
&& dataDiff.Relations.NegativeAssertions.EntriesCount == 0;
OK, thanks!
Hi Marco,
imagine we have:
What is the best way to check whether the "situation" actually exists within the "world"? (I know it can be checked via sparql query, but it's not convenient in my case.)
Possible solution:
Is it correct and the most efficient way (also in terms of performance)? It looks a bit bulky.