This PR attempts to fix querying with multiple attributes, when these attributes can be subconcepts of the original concept.
This is done by creating a function which can be called recursively, i.e. if there's a subconcept within a subconcept within a concept etc.
The function is made to take an instance, and add attributes to the instance depending on the type.
We check if the attribute is of type ConceptDesc. After that, the first key is the subconcept ID, and the value is the instance. We then extract the instance key-value pairs, and call the function recursively to construct the instance of the subconcept.
Finally, the attribute (instance) is added to the original query, customized depending on whether it is multiple or not.
Note: all new changes are in Query.java. The other changes, are formatting of files.
This PR attempts to fix querying with multiple attributes, when these attributes can be subconcepts of the original concept. This is done by creating a function which can be called recursively, i.e. if there's a subconcept within a subconcept within a concept etc.
The function is made to take an instance, and add attributes to the instance depending on the type.
We check if the attribute is of type
ConceptDesc
. After that, the first key is the subconcept ID, and the value is the instance. We then extract the instance key-value pairs, and call the function recursively to construct the instance of the subconcept.Finally, the attribute (instance) is added to the original query, customized depending on whether it is multiple or not.
Note: all new changes are in
Query.java
. The other changes, are formatting of files.