Ticket #1002 (closed Defect: fixed)
Facets API: FacetValueModel interface is incomplete
Reported by: | jri | Owned by: | jri |
---|---|---|---|
Priority: | Major | Milestone: | Release 4.8.3 |
Component: | DeepaMehta Standard Distribution | Version: | 4.8.2 |
Keywords: | Cc: | dgf, Malte | |
Complexity: | 2 | Area: | Application Framework / API |
Module: | deepamehta-facets |
Description
The FacetValueModel interface should have delegates to all the manipulator methods of the underlying ChildTopicsModel. At the moment the missing methods include:
putDeletionRef(long refTopicId) putDeletionRef(String refTopicUri) addDeletionRef(String refTopicUri)
Change History
comment:4 Changed 8 years ago by jri
- Status changed from closed to reopened
- Resolution fixed deleted
Another method is missing the FacetValueModel interface:
FacetValueModel put(TopicModel value);
This convenience method takes a sole TopicModel instead of a RelatedTopicModel.
The lack of this method causes the dm4-kiezatlas module to throw an error when updating a facetted geo object:
Caused by: java.lang.IllegalArgumentException: Tried to build a SimpleValue from a de.deepamehta.core.impl.RelatedTopicModelImpl (expected are String, Integer, Long, Double, or Boolean) at de.deepamehta.core.model.SimpleValue.<init>(SimpleValue.java:59) at de.deepamehta.core.impl.ChildTopicsModelImpl.put(ChildTopicsModelImpl.java:308) ... 61 more
This is because dm4-kiezatlas passes a sole TopicModel when constructing the facet value (see updatesFacets() in KiezatlasPlugin) causing the wrong put() method of the underlying ChildTopicsModel to be called.
Thank you, Malte, for reporting!
See also #985.