ntnu-ai-lab / mycbr-rest

7 stars 5 forks source link

Can't add multiple instances in one call #12

Open dukefoss opened 5 years ago

dukefoss commented 5 years ago

Description: The method "addInstancesJSON" does not add the instances to the case base.

Steps to reproduce:

  1. Add Concept and Case Base with REST API.
  2. Add attributes.
  3. Add instances with method "addInstancesJSON". Method returns true.
  4. Instances are not returned when method "getAllInstancesInCaseBase" is called.

Expected and Actual Result: Expected result is to get instances with the method "getAllInstancesInCaseBase". Actual result is an empty array.

Note: Bug probably in class "InstanceServices" and method "convertJSONArray" because: "HashMap<> values" are never put into "HashSet<> ret".