TAMULib / CAP

MIT License
3 stars 2 forks source link

Item B-03904: Maintain bi-directional support #99

Closed kaladay closed 5 years ago

kaladay commented 5 years ago

My preferred design of using an array map is not achievable due to the loss of bi-directional support. This means that create, update, and delete do not refresh as desired.

As a compromise, partially revert the original behavior of looping over the triple set while applying a filter on the predicate.

Unlike the original design, this utilizes a count map representing the total triples per predicate. This count map is iterated over in the outer loop instead of iterating the entire triple set. The inner loop utilizes the original behavior by looping over the entire triples set and applying a filter against the predicate.

Though the design is not ideal, it preserves the bi-directional mapping, provides the requested feature, and does not require major design changes in back-end or front-end.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 50.849% when pulling 8205e0f39d455b81c17c585cb7c8f1e9fdfc5996 on sprint-tcdl-b03904-collapse_individual into 1d5aa9a15210fef22885c49cc9ca6329e69852cd on sprint-tcdl-staging.