From 4bb01ed4d177132d9d153b718f377235fbee1ff4 Mon Sep 17 00:00:00 2001 From: Aron Roberts Date: Thu, 22 Aug 2013 16:34:54 -0700 Subject: [PATCH] CSPACE-6130: Add more comments outlining how preferred and non-preferred terms are emitted in authority item list results. --- .../AuthorityItemDocumentModelHandler.java | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java b/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java index 3c4bc12d4..8bdf05473 100644 --- a/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java +++ b/services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java @@ -275,10 +275,16 @@ public abstract class AuthorityItemDocumentModelHandler } ListResultField field; + + // Certain fields in authority item list results + // are handled specially here + + // Term display name + // // Ignore (throw out) any configuration entries that // specify how the termDisplayName field should be // emitted in authority item lists. This field will - // be handled specially (see block below). + // be handled in a standardized manner (see block below). if (termDisplayNamePositionsInList.isEmpty() == false) { // Remove matching items starting at the end of the list // and moving towards the start, so that reshuffling of @@ -288,21 +294,29 @@ public abstract class AuthorityItemDocumentModelHandler list.remove(i); } } - // Specially handle termDisplayName values in authority - // item lists, by invoking code that emits display names - // for both preferred and non-preferred terms + // termDisplayName values in authority item lists + // will be handled via code that emits display names + // for both the preferred term and all non-preferred + // terms (if any). The following is a placeholder + // entry that will trigger this code. See the + // getListResultValue() method in this class. field = getListResultsDisplayNameField(); list.add(field); + + // Short identifier if (!hasShortId) { field = new ListResultField(); field.setElement(AuthorityItemJAXBSchema.SHORT_IDENTIFIER); field.setXpath(AuthorityItemJAXBSchema.SHORT_IDENTIFIER); list.add(field); } + + // Term status if (!hasTermStatus) { field = getListResultsTermStatusField(); list.add(field); } + } setListItemArrayExtended(true); -- 2.47.3