TNO / knowledge-engine

Improves interoperability between systems (i.e. devices, platforms, apps, databases) by exchanging data based on their semantics
https://knowledge-engine.eu
Apache License 2.0
33 stars 4 forks source link

Add operation to REST API that returns Knowledge Gaps for an Ask KI #523

Open JackJackie opened 2 months ago

JackJackie commented 2 months ago

For V2310 a requirement is that the Knowledge Engine can be queried for possible new knowledge. When this knowledge (or part of it) is not available in the network, the user (= human data analist) should receive an overview of knowledge gaps. With that overview the user can decide how to deal with the knowledge gap, either by adding a new KB or extending an existing KB with a new KI, or another measure.

This issue is concerned with making the knowledge gaps available via the REST API.

JackJackie commented 1 month ago

@bnouwt: I placed the getKnowledgeGaps method in the ReasonerProcessor of this branch.

I introduced two new classes KnowledgeGap.java and KnowledgeGapSet.java in package smart-connector-api I replaced parts of the code to change from Set<Set<TriplePattern>> to KnowledgeGapSet which is a set of KnowledgeGaps. New variables are exactly the same as the ones they replace except that they are extended with '1' at the end. As far as I can see, the method still provides the same functionality, but can you please check for its correct behavior by looking at the code?

Thx, Jack