Ticket #931 (closed Enhancement: fixed)
Association Auto-Typing
Reported by: | jri | Owned by: | jri |
---|---|---|---|
Priority: | Major | Milestone: | Release 4.8 |
Component: | DeepaMehta Standard Distribution | Version: | 4.7 |
Keywords: | Cc: | dgf, Malte, JuergeN | |
Complexity: | 3 | Area: | Application Framework / API |
Module: | deepamehta-core |
Description
The Core should provide plugin developers support for auto-typing of manually created associations, including setting the role types. Auto-typing would be driven by inspecting the types of the associated topics.
E.g. when the user creates an association between a Person and an Event, DM could type the association into "Participant" automatically. This would simplify data input substantially.
Change History
comment:2 Changed 9 years ago by jri
In 34492bef4af6d7fa973299664818982a99ab5bed/deepamehta:
Core: support for association auto-typing (#931).
DeepaMehtaUtils has a new method that supports plugin developers with auto-typing of manually created associations, including setting the role types. Auto-typing is driven by inspecting the types of the associated topics.
RoleModel[] associationAutoTyping(AssociationModel assoc, String topicTypeUri1, String topicTypeUri2, String assocTypeUri, String roleTypeUri1, String roleTypeUri2, DeepaMehtaService dms)
This method can be used for both, defined associations, and free associations.
A plugin typically calls this method from its preCreateAssociation() listener.
See the Events plugin (#902) for an example.
See #931.
comment:3 Changed 9 years ago by jri
In 0abd17ec44b977acbf5a6c83d9c5b4b90ad48f73/deepamehta:
Share Address topics for Events (#931).
To assign an existing Address topic (e.g. of an Institution) to an Event:
- reveal the Address topic
- associate the Address topic with the Event topic. DM sets the association's type and role types automatically then.
If an Address has been assigned to the Event already that association is deleted automatically. (The Address topic is not.)
Thus you can now share Address topics between e.g. Institutions and Events. You must not re-enter an Event address again if the Event takes place at an Institution for which an Address has been entered already.
However, its not yet perfect: the association that is deleted automatically disappears from the canvas only after reloading.
See #931.