Skip to content

Commit

Permalink
Merge pull request #24 from vigne-laas/pull_request/subscription_issue
Browse files Browse the repository at this point in the history
subscription issue
  • Loading branch information
sarthou authored Jan 6, 2025
2 parents e8bad84 + 3be24e2 commit 6d26a12
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions include/ontologenius/core/ontoGraphs/Graphs/OntoGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ namespace ontologenius {
{
std::shared_lock<std::shared_timed_mutex> lock(Graph<B>::mutex_);
auto* b = this->findBranch(branch);
if(b == nullptr)
return false;
return existInInheritance(b, selector);
}

Expand Down
9 changes: 6 additions & 3 deletions src/API/ontologenius/OntologyManipulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ namespace onto {
actions(name),
reasoners(name),
feeder(name),
sparql(name)
sparql(name),
subscriber(name)
{
sparql.client_.wait(-1);
}
Expand All @@ -25,7 +26,8 @@ namespace onto {
actions(other.name_),
reasoners(other.name_),
feeder(other.name_),
sparql(other.name_)
sparql(other.name_),
subscriber(other.name_)
{
sparql.client_.wait(-1);
}
Expand All @@ -38,7 +40,8 @@ namespace onto {
actions(other.name_),
reasoners(other.name_),
feeder(other.name_),
sparql(other.name_)
sparql(other.name_),
subscriber(other.name_)
{
sparql.client_.wait(-1);
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/subscription/Subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ namespace ontologenius {
return false;
}

if(pattern.isSubjectIndividual() == false)
if((pattern.isSubjectIndividual() == false) && !pattern.isSubjectUndefined())
{
if(onto_->individual_graph_.isA(triplet.subject, pattern.subject()) == false)
return false;
}
// subject match

if(pattern.isObjectIndividual() == false)
if((pattern.isObjectIndividual() == false) && !pattern.isObjectUndefined())
{
if((onto_->individual_graph_.isA(triplet.object, pattern.object()) == false) &&
(onto_->class_graph_.isA(triplet.object, pattern.object()) == false))
Expand Down

0 comments on commit 6d26a12

Please sign in to comment.