Ticket #1002 (closed Defect: fixed)

Opened 8 years ago

Last modified 8 years ago

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


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:1 Changed 8 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 8 years ago by Jörg Richter <jri@…>

In cb01821e37525a5a87c47cc8af394d895098bc45/deepamehta:

Add del-ref methods to FacetValueModel (#1002).

3 new methods in FacetValueModel:

FacetValueModel putDeletionRef(long refTopicId);
FacetValueModel putDeletionRef(String refTopicUri);

FacetValueModel addDeletionRef(String refTopicUri);

See #1002.

comment:3 Changed 8 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed

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.

comment:5 Changed 8 years ago by Jörg Richter <jri@…>

In 25faffb472f1550f5cd87794bd9578373d10feb8/deepamehta:

Facets API: add missing put(TopicModel?) (#1002).

1 new method in FacetValueModel:

FacetValueModel put(TopicModel value);

See #1002.

comment:6 Changed 8 years ago by jri

  • Status changed from reopened to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.