You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add config-driven "virtual catalogue" entries to the search dropdown. A virtual catalogue is a named search context that queries Solr child documents using ChildOfFilterParameter, returning results as IndexedAIP (children carry their specific fields in indexedAip.getFields()). No new Java result type is needed — ConfigurableAsyncTableCell already reads object.getFields().get(c.getField()) for non-default columns.
Note
Key architectural insight: Child documents returned by ChildOfFilterParameter are deserialized as IndexedAIP objects. Mandatory AIP fields (permissions, ancestors, etc.) come from the parent or are empty/null. Child-specific dynamic Solr fields (e.g. subject_txt, sender_s) appear in indexedAip.getFields(). ConfigurableAsyncTableCell.configureDisplay() at line ~337 already calls object.getFields().get(c.getField()) for any non-default_ column — meaning the email-specific columns work through existing infrastructure without any new table class.
Warning
SearchWrapper.Components is currently keyed by Class<? extends IsIndexed>. Two virtual catalogues both using IndexedAIP would overwrite each other. The Components inner class must be extended to support a parallel string-keyed map for virtual catalogues (keyed by listId).
Part of:#3382 Depends on:#3660 (Phase 0 — content_type values referenced in config)
How Virtual Catalogues Work
The API call for a virtual catalogue uses ChildOfFilterParameter:
// Registered as a click handler on each row in the virtual catalogue list:StringchildUUID = object.getUUID();
StringparentUUID = childUUID.contains("/") ? childUUID.split("/")[0] : childUUID;
History.newItem(HistoryUtils.getHistoryBrowse(parentUUID));
i18n Keys Required
ui.catalogue.Search_emails.label = Emails
ui.lists.Search_emails.columns.subject_txt = Subject
ui.lists.Search_emails.columns.sender_s = From
ui.lists.Search_emails.columns.sentDate_dt = Sent Date
Overview
Add config-driven "virtual catalogue" entries to the search dropdown. A virtual catalogue is a named search context that queries Solr child documents using
ChildOfFilterParameter, returning results asIndexedAIP(children carry their specific fields inindexedAip.getFields()). No new Java result type is needed —ConfigurableAsyncTableCellalready readsobject.getFields().get(c.getField())for non-default columns.Note
Key architectural insight: Child documents returned by
ChildOfFilterParameterare deserialized asIndexedAIPobjects. Mandatory AIP fields (permissions,ancestors, etc.) come from the parent or are empty/null. Child-specific dynamic Solr fields (e.g.subject_txt,sender_s) appear inindexedAip.getFields().ConfigurableAsyncTableCell.configureDisplay()at line ~337 already callsobject.getFields().get(c.getField())for any non-default_column — meaning the email-specific columns work through existing infrastructure without any new table class.Warning
SearchWrapper.Componentsis currently keyed byClass<? extends IsIndexed>. Two virtual catalogues both usingIndexedAIPwould overwrite each other. TheComponentsinner class must be extended to support a parallel string-keyed map for virtual catalogues (keyed bylistId).Part of: #3382
Depends on: #3660 (Phase 0 —
content_typevalues referenced in config)How Virtual Catalogues Work
The API call for a virtual catalogue uses
ChildOfFilterParameter:{ "filter": { "parameters": [{ "type": "ChildOfFilterParameter", "childrenOfFilter": { "type": "SimpleFilterParameter", "name": "content_type", "value": "emailarchive" } }] }, "fieldsToReturn": ["uuid", "subject_txt", "sender_s", "sentDate_dt"] }Results are
IndexedAIPobjects where child-specific fields are in thefieldsmap:{ "id": "5f28e162-.../emails#42", "fields": { "subject_txt": ["Re: Quarterly Report"], "sender_s": ["joao.silva@empresa.pt"], "sentDate_dt": ["2021-03-15T09:42:00Z"] } }Clicking a row navigates to
browse/{parentUUID}— the parent UUID is extracted from the child UUID by splitting on/and taking the first segment.Configuration Schema
File:
roda-ui/roda-wui/src/main/resources/config/roda-wui.propertiesVirtual catalogues are declared at a top-level key and configured under
ui.lists.{listId}.*— the same mechanism asSearch_AIPs:New
RodaConstantsentriesSearchWrapperChangesFile:
roda-ui/roda-wui/src/main/java/org/roda/wui/client/common/search/SearchWrapper.javaExtend
Componentsinner classThe current
Componentsclass usesMap<Class<? extends IsIndexed>, ...>. Add parallel string-keyed maps for virtual catalogues:Components changes
New
createListAndSearchPaneloverload for virtual cataloguesUses
listIdas thedropdownValue(notclassSimpleName) so each virtual catalogue gets a unique dropdown slot:CatalogueSearchChangesFile:
roda-ui/roda-wui/src/main/java/org/roda/wui/client/common/search/CatalogueSearch.javaRead virtual catalogue configs
Build virtual list builders
For each virtual catalogue listId:
Row click — navigate to parent AIP
Child UUID format:
{parentUUID}/{fieldName}#{index}(e.g.5f28e162-.../emails#42).i18n Keys Required
Files to Change
roda-core/roda-common-data/.../data/common/RodaConstants.javaroda-ui/.../resources/config/roda-wui.propertiesroda-ui/.../client/common/search/SearchWrapper.javaComponents, add virtual list supportroda-ui/.../client/common/search/CatalogueSearch.java.propertiesfiles