]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5130: Commenting out implementations of handleComputedDisplayNames() method.
authorRichard Millet <remillet@berkeley.edu>
Thu, 3 May 2012 20:17:34 +0000 (13:17 -0700)
committerRichard Millet <remillet@berkeley.edu>
Thu, 3 May 2012 20:17:34 +0000 (13:17 -0700)
services/place/service/src/main/java/org/collectionspace/services/place/nuxeo/PlaceDocumentModelHandler.java
services/taxonomy/service/src/main/java/org/collectionspace/services/taxonomy/nuxeo/TaxonDocumentModelHandler.java

index db09a5658597564cad2983be0463fe76cacd0b0f..e3ef851cb9d867ec865809068406c6a67c7ab2f7 100644 (file)
@@ -63,33 +63,33 @@ public class PlaceDocumentModelHandler
      * @param docModel the doc model
      * @throws Exception the exception
      */
-    @Override
-    protected void handleComputedDisplayNames(DocumentModel docModel) throws Exception {
-        String commonPartLabel = getServiceContext().getCommonPartLabel("places");
-       Boolean displayNameComputed = (Boolean) docModel.getProperty(commonPartLabel,
-                       PlaceJAXBSchema.DISPLAY_NAME_COMPUTED);
-       Boolean shortDisplayNameComputed = (Boolean) docModel.getProperty(commonPartLabel,
-                       PlaceJAXBSchema.SHORT_DISPLAY_NAME_COMPUTED);
-       if(displayNameComputed==null)
-               displayNameComputed = true;
-       if(shortDisplayNameComputed==null)
-               shortDisplayNameComputed = true;
-       if (displayNameComputed || shortDisplayNameComputed) {
-                // Obtain the primary place name from the list of place names, for computing the display name.
-               String xpathToPlaceName = PlaceJAXBSchema.PLACE_NAME_GROUP_LIST 
-                        + "/[0]/" + PlaceJAXBSchema.PLACE_NAME;
-               String placeName = getXPathStringValue(docModel, COMMON_PART_LABEL, xpathToPlaceName);
-               String displayName = prepareDefaultDisplayName(placeName);
-               if (displayNameComputed) {
-                       docModel.setProperty(commonPartLabel, PlaceJAXBSchema.DISPLAY_NAME,
-                                       displayName);
-               }
-               if (shortDisplayNameComputed) {
-                       docModel.setProperty(commonPartLabel, PlaceJAXBSchema.SHORT_DISPLAY_NAME,
-                                       displayName);
-               }
-       }
-    }
+//    @Override
+//    protected void handleComputedDisplayNames(DocumentModel docModel) throws Exception {
+//        String commonPartLabel = getServiceContext().getCommonPartLabel("places");
+//     Boolean displayNameComputed = (Boolean) docModel.getProperty(commonPartLabel,
+//                     PlaceJAXBSchema.DISPLAY_NAME_COMPUTED);
+//     Boolean shortDisplayNameComputed = (Boolean) docModel.getProperty(commonPartLabel,
+//                     PlaceJAXBSchema.SHORT_DISPLAY_NAME_COMPUTED);
+//     if(displayNameComputed==null)
+//             displayNameComputed = true;
+//     if(shortDisplayNameComputed==null)
+//             shortDisplayNameComputed = true;
+//     if (displayNameComputed || shortDisplayNameComputed) {
+//                // Obtain the primary place name from the list of place names, for computing the display name.
+//             String xpathToPlaceName = PlaceJAXBSchema.PLACE_NAME_GROUP_LIST 
+//                        + "/[0]/" + PlaceJAXBSchema.PLACE_NAME;
+//             String placeName = getXPathStringValue(docModel, COMMON_PART_LABEL, xpathToPlaceName);
+//             String displayName = prepareDefaultDisplayName(placeName);
+//             if (displayNameComputed) {
+//                     docModel.setProperty(commonPartLabel, PlaceJAXBSchema.DISPLAY_NAME,
+//                                     displayName);
+//             }
+//             if (shortDisplayNameComputed) {
+//                     docModel.setProperty(commonPartLabel, PlaceJAXBSchema.SHORT_DISPLAY_NAME,
+//                                     displayName);
+//             }
+//     }
+//    }
        
     /**
      * Produces a default displayName from one or more supplied fields.
index b7c5ba99ed21ae149c5d105bbf6912ad008c9350..83ef981005911512fdb0d8b1f449966a0f2a68cf 100644 (file)
@@ -62,32 +62,32 @@ public class TaxonDocumentModelHandler
      * @param docModel the doc model
      * @throws Exception the exception
      */
-    @Override
-    protected void handleComputedDisplayNames(DocumentModel docModel) throws Exception {
-        String commonPartLabel = getServiceContext().getCommonPartLabel("taxon");
-        Boolean displayNameComputed = (Boolean) docModel.getProperty(commonPartLabel,
-                TaxonJAXBSchema.DISPLAY_NAME_COMPUTED);
-        Boolean shortDisplayNameComputed = (Boolean) docModel.getProperty(commonPartLabel,
-                TaxonJAXBSchema.SHORT_DISPLAY_NAME_COMPUTED);
-        if (displayNameComputed == null) {
-            displayNameComputed = true;
-        }
-        if (shortDisplayNameComputed == null) {
-            shortDisplayNameComputed = true;
-        }
-        if (displayNameComputed || shortDisplayNameComputed) {
-            String displayName = prepareDefaultDisplayName(
-                    (String) docModel.getProperty(commonPartLabel, TaxonJAXBSchema.NAME));
-            if (displayNameComputed) {
-                docModel.setProperty(commonPartLabel, TaxonJAXBSchema.DISPLAY_NAME,
-                        displayName);
-            }
-            if (shortDisplayNameComputed) {
-                docModel.setProperty(commonPartLabel, TaxonJAXBSchema.SHORT_DISPLAY_NAME,
-                        displayName);
-            }
-        }
-    }
+//    @Override
+//    protected void handleComputedDisplayNames(DocumentModel docModel) throws Exception {
+//        String commonPartLabel = getServiceContext().getCommonPartLabel("taxon");
+//        Boolean displayNameComputed = (Boolean) docModel.getProperty(commonPartLabel,
+//                TaxonJAXBSchema.DISPLAY_NAME_COMPUTED);
+//        Boolean shortDisplayNameComputed = (Boolean) docModel.getProperty(commonPartLabel,
+//                TaxonJAXBSchema.SHORT_DISPLAY_NAME_COMPUTED);
+//        if (displayNameComputed == null) {
+//            displayNameComputed = true;
+//        }
+//        if (shortDisplayNameComputed == null) {
+//            shortDisplayNameComputed = true;
+//        }
+//        if (displayNameComputed || shortDisplayNameComputed) {
+//            String displayName = prepareDefaultDisplayName(
+//                    (String) docModel.getProperty(commonPartLabel, TaxonJAXBSchema.NAME));
+//            if (displayNameComputed) {
+//                docModel.setProperty(commonPartLabel, TaxonJAXBSchema.DISPLAY_NAME,
+//                        displayName);
+//            }
+//            if (shortDisplayNameComputed) {
+//                docModel.setProperty(commonPartLabel, TaxonJAXBSchema.SHORT_DISPLAY_NAME,
+//                        displayName);
+//            }
+//        }
+//    }
 
     /**
      * Produces a default displayName from the basic name and dates fields.