]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-6130: Add more comments outlining how preferred and non-preferred terms are...
authorAron Roberts <aron@socrates.berkeley.edu>
Thu, 22 Aug 2013 23:34:54 +0000 (16:34 -0700)
committerAron Roberts <aron@socrates.berkeley.edu>
Thu, 22 Aug 2013 23:34:54 +0000 (16:34 -0700)
services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityItemDocumentModelHandler.java

index 3c4bc12d43df45e2eb1f3baa4187a9ac50107b0b..8bdf054735be816bb663073ad876127feda2a9c2 100644 (file)
@@ -275,10 +275,16 @@ public abstract class AuthorityItemDocumentModelHandler<AICommon>
                        }
                                
                        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<AICommon>
                                 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);