Ticket #659 (closed Enhancement: fixed)

Opened 10 years ago

Last modified 10 years ago

expose fetchRelatedComposite=true of Association REST API

Reported by: Malte Owned by: jri
Priority: Major Milestone: Release 4.6
Component: DeepaMehta Standard Distribution Version: 4.3
Keywords: Cc: dgf, carolina
Complexity: 3 Area: Application Framework / API
Module: deepamehta-webservice

Description

..see "false, false" in line 320 in WebservicePlugin?

This is needed to enhance the custom page renderer of the wikidata-search plugin. Thanks for your support!

Change History

comment:1 Changed 10 years ago by Malte

Background: The custom renderer wants to present the "related topics/What's related area" by the composite-Values of the respective Association (in this case: AssocType? Wikidata Claim is of type Composite).

comment:2 Changed 10 years ago by jri

  • Cc dgf, carolina added
  • Status changed from new to accepted

comment:3 Changed 10 years ago by Jörg Richter

Core: extend REST API with fetchComposite (#659).

Core REST API: the topic's and association's "get related topics" request takes 2 optional query parameters (boolean): fetch_composite and fetch_relating_composite. As usual they respectively indicate weather the child topics should be included in the response.

  1. The related topic's child topics (fetch_composite).
  2. The child topics of the association that connects the related topic (fetch_relating_composite).

Default value for both parameters is false.

GET /core/topic/{id}/related_topics?...&fetch_composite=true&fetch_relating_composite=true

GET /core/association/{id}/related_topics?...&fetch_composite=true&fetch_relating_composite=true

See #659.

comment:4 Changed 10 years ago by jri

Unfortunately in the final 4.4 release the fetch_relating_composite query parameter has been dropped again (in the course of globally removing the fetchComposite parameters from the Core APIs). Currently (as of DM 4.5) the REST API only supports the include_childs query parameter but not an include_assoc_childs query parameter.

The REST API should support an include_assoc_childs query parameter (with the same semantics as the former fetch_relating_composite query parameter).

Last edited 10 years ago by jri (previous) (diff)

comment:5 Changed 10 years ago by jri

  • Priority changed from Minor to Major
  • Milestone set to Release 4.6

comment:6 Changed 10 years ago by Jörg Richter <jri@…>

In d4727dd05aec54610f0f540c40ef9646614fc6cc/deepamehta:

REST API: add "include_assoc_childs" param (#659).

The REST API supports 1 new query parameter:

include_assoc_childs=true|false

It can be used for every resource method which returns a DeepaMehtaObject or an Iterable of DeepaMehtaObject. If set to true the child topics of the object's Relating Associations are included in the response. This works only if include_childs=true is present as well.

BREAKING CHANGES

Core API

1 method removed from ChildTopics:

Iterable<String> childTypeUris()

Instead a ChildTopics object is itself an Iterable<String> now (analogous to ChildTopicsModel).

See #659.

comment:7 Changed 10 years ago by jri

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