Skip to content

Commit

Permalink
Do not automatically add classes/facts in new APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
mdesalvo committed Aug 18, 2020
1 parent 1340b40 commit 76aaae5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
9 changes: 2 additions & 7 deletions RDFSharp/Semantics/OWL/Ontology/Data/RDFOntologyData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -358,13 +358,8 @@ public RDFOntologyData AddDifferentFromRelation(RDFOntologyFact aFact, RDFOntolo
/// Foreach of the given list of facts, adds the "aFact -> owl:differentFrom -> bFact" relation to the data [OWL2]
/// </summary>
public RDFOntologyData AddAllDifferentRelation(List<RDFOntologyFact> ontologyFacts) {
ontologyFacts?.ForEach(outerFact => {
this.AddFact(outerFact);
ontologyFacts?.ForEach(innerFact => {
this.AddFact(innerFact);
this.AddDifferentFromRelation(innerFact, outerFact);
});
});
ontologyFacts?.ForEach(outerFact =>
ontologyFacts?.ForEach(innerFact => this.AddDifferentFromRelation(innerFact, outerFact)));
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,13 +490,8 @@ public RDFOntologyClassModel AddDisjointUnionRelation(RDFOntologyUnionClass onto
/// Foreach of the given classes, adds the "ontologyClassA -> owl:disjointWith -> ontologyClassB" relations to the class model [OWL2]
/// </summary>
public RDFOntologyClassModel AddAllDisjointClassesRelation(List<RDFOntologyClass> ontologyClasses) {
ontologyClasses?.ForEach(outerClass => {
this.AddClass(outerClass);
ontologyClasses?.ForEach(innerClass => {
this.AddClass(innerClass);
this.AddDisjointWithRelation(outerClass, innerClass);
});
});
ontologyClasses?.ForEach(outerClass =>
ontologyClasses?.ForEach(innerClass => this.AddDisjointWithRelation(outerClass, innerClass)));
return this;
}
#endregion
Expand Down

0 comments on commit 76aaae5

Please sign in to comment.