From: Richard Millet Date: Thu, 3 May 2012 20:17:34 +0000 (-0700) Subject: CSPACE-5130: Commenting out implementations of handleComputedDisplayNames() method. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=10fef3d60f3a895a4cd3195bb6e43f181985d93b;p=tmp%2Fjakarta-migration.git CSPACE-5130: Commenting out implementations of handleComputedDisplayNames() method. --- diff --git a/services/place/service/src/main/java/org/collectionspace/services/place/nuxeo/PlaceDocumentModelHandler.java b/services/place/service/src/main/java/org/collectionspace/services/place/nuxeo/PlaceDocumentModelHandler.java index db09a5658..e3ef851cb 100644 --- a/services/place/service/src/main/java/org/collectionspace/services/place/nuxeo/PlaceDocumentModelHandler.java +++ b/services/place/service/src/main/java/org/collectionspace/services/place/nuxeo/PlaceDocumentModelHandler.java @@ -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. diff --git a/services/taxonomy/service/src/main/java/org/collectionspace/services/taxonomy/nuxeo/TaxonDocumentModelHandler.java b/services/taxonomy/service/src/main/java/org/collectionspace/services/taxonomy/nuxeo/TaxonDocumentModelHandler.java index b7c5ba99e..83ef98100 100644 --- a/services/taxonomy/service/src/main/java/org/collectionspace/services/taxonomy/nuxeo/TaxonDocumentModelHandler.java +++ b/services/taxonomy/service/src/main/java/org/collectionspace/services/taxonomy/nuxeo/TaxonDocumentModelHandler.java @@ -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.