Adapt to cdmlib formatter interface change
authorp.plitzner <p.plitzner@bgbm.org>
Mon, 22 Feb 2016 15:23:24 +0000 (16:23 +0100)
committerp.plitzner <p.plitzner@bgbm.org>
Mon, 22 Feb 2016 15:31:51 +0000 (16:31 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/derivateSearch/DerivateLabelProvider.java

index 14265f1d5f179233886d219201d6128b78435e42..42d538a0c97d8745eb389eae500a7216a923d14a 100644 (file)
@@ -27,7 +27,7 @@ import org.hibernate.LazyInitializationException;
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.api.service.molecular.ISequenceService;
-import eu.etaxonomy.cdm.format.CdmFormatter;
+import eu.etaxonomy.cdm.format.CdmFormatterFactory;
 import eu.etaxonomy.cdm.format.ICdmFormatter.FormatKey;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.common.CdmBase;
@@ -135,7 +135,7 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
         if(element instanceof TreeNode){
             element = ((TreeNode) element).getValue();
         }
-        CdmFormatter formatter = new CdmFormatter(
+        return CdmFormatterFactory.format(element,
                 FormatKey.GATHERING_COUNTRY, FormatKey.SPACE,
                 FormatKey.GATHERING_LOCALITY_TEXT, FormatKey.SPACE,
                 FormatKey.GATHERING_DATE, FormatKey.SPACE,
@@ -151,7 +151,6 @@ public class DerivateLabelProvider extends ColumnLabelProvider {
                 FormatKey.MEDIA_TITLE, FormatKey.SPACE,
                 FormatKey.MEDIA_ARTIST, FormatKey.SPACE
                 );
-        return formatter.format(element);
     }
 
     /** {@inheritDoc} */