image mime types are now set automatically. Although this is a bit of a hack.
authorn.hoffmann <n.hoffmann@localhost>
Thu, 19 May 2011 12:33:38 +0000 (12:33 +0000)
committern.hoffmann <n.hoffmann@localhost>
Thu, 19 May 2011 12:33:38 +0000 (12:33 +0000)
13 files changed:
.gitattributes
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/CdmFormFactory.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/KeyValueViewerElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/MediaDetailsSection.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/ImageFileElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/ImageFileElement.java with 89% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/MediaElement.java with 97% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaRepresentationElement.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/MediaRepresentationElement.java with 65% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaRepresentationPartSection.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/MediaRepresentationPartSection.java with 78% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaRepresentationSection.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/MediaRepresentationSection.java with 92% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaSection.java [moved from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/MediaSection.java with 96% similarity]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewer.java
eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/CdmStoreTest.java [deleted file]
eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/operations/AbstractTaxeditorOperationTestBase.java [moved from eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/operations/AbstractTaxeditorOperationTest.java with 94% similarity]

index d995aa4e5f09e15d86071f1605a09de8c09b3cd6..b84a2833b547419fd36d4bc5a3a33136585dad7e 100644 (file)
@@ -1015,6 +1015,12 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/PolytomousKeyNodeDetailSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/ScopeRestrictionSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/key/TaxonomicScopeSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/ImageFileElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaRepresentationElement.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaRepresentationPartSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaRepresentationSection.java -text
+eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AbstractTypeDesignationElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AuthorshipDetailElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AuthorshipDetailSection.java -text
@@ -1081,14 +1087,8 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/sup
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/ExtensionSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/HeadlineSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/IdentifiableSourceElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/ImageFileElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/MarkerElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/MarkerSection.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/MediaElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/MediaRepresentationElement.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/MediaRepresentationPartSection.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/MediaRepresentationSection.java -text
-eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/MediaSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/RightsElement.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/RightsSection.java -text
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/SourceSection.java -text
@@ -1187,9 +1187,8 @@ eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplemen
 eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewer.java -text
 eu.etaxonomy.taxeditor.store/src/main/resources/eu/etaxonomy/cdm/editorApplicationContext.xml -text
 eu.etaxonomy.taxeditor.store/src/main/resources/log4j.properties -text
-eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/CdmStoreTest.java -text
 eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/NameProtectTitleCacheTest.java -text
-eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/operations/AbstractTaxeditorOperationTest.java -text
+eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/operations/AbstractTaxeditorOperationTestBase.java -text
 eu.etaxonomy.taxeditor.store/src/test/resources/eu/etaxonomy/cdm/applicationContext-test.xml -text
 eu.etaxonomy.taxeditor.store/src/test/resources/eu/etaxonomy/cdm/cdm.datasources.xml -text
 eu.etaxonomy.taxeditor.store/src/test/resources/eu/etaxonomy/cdm/cdmfs.xml -text
index 0913abb03643d2a441d8ebce36790e23b335b6ed..c39545b48168a6319210edb3471b726241c6fb59 100644 (file)
@@ -186,6 +186,12 @@ import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.key.ScopeRestrictionSection;
 import eu.etaxonomy.taxeditor.ui.section.key.TaxonomicScopeSection;
+import eu.etaxonomy.taxeditor.ui.section.media.ImageFileElement;
+import eu.etaxonomy.taxeditor.ui.section.media.MediaElement;
+import eu.etaxonomy.taxeditor.ui.section.media.MediaRepresentationElement;
+import eu.etaxonomy.taxeditor.ui.section.media.MediaRepresentationPartSection;
+import eu.etaxonomy.taxeditor.ui.section.media.MediaRepresentationSection;
+import eu.etaxonomy.taxeditor.ui.section.media.MediaSection;
 import eu.etaxonomy.taxeditor.ui.section.name.AuthorshipDetailElement;
 import eu.etaxonomy.taxeditor.ui.section.name.AuthorshipDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.name.HybridDetailElement;
@@ -236,14 +242,8 @@ import eu.etaxonomy.taxeditor.ui.section.supplemental.ExtensionElement;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.ExtensionSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.IdentifiableSourceElement;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.ImageFileElement;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.MarkerElement;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.MarkerSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.MediaElement;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.MediaRepresentationElement;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.MediaRepresentationPartSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.MediaRepresentationSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.MediaSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.RightsElement;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.RightsSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.SourceSection;
index 386b748a36e6ae9be0cc5733d96ffefa3445b8d0..d6ad4f35003ff594f620c8ea4818a83d83378a9c 100644 (file)
@@ -42,7 +42,7 @@ public class KeyValueViewerElement extends AbstractCdmFormElement {
                super(formFactory, formElement);
                
                label = formFactory.createLabel(getLayoutComposite(), "Meta Data");
-               label.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY());
+               label.setLayoutData(CdmFormFactory.FILL(2, 1));
                addControl(label);
                
                tableViewer = new TableViewer(formElement.getLayoutComposite(), SWT.MULTI | SWT.H_SCROLL
@@ -51,7 +51,7 @@ public class KeyValueViewerElement extends AbstractCdmFormElement {
                
                createColumns(tableViewer, keyHeading, valueHeading);
                
-               TableWrapData layoutData = CdmFormFactory.FILL_HORIZONTALLY();
+               TableWrapData layoutData = CdmFormFactory.FILL(2, 1);
                layoutData.heightHint = 100;
                
                tableViewer.getControl().setLayoutData(layoutData);
index dd04a3bf67646d7c974b14075b71ae8362538227..53749d28a32fff258647e755f6efaa915bc3b78b 100644 (file)
@@ -21,7 +21,7 @@ import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.DetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.MediaElement;
+import eu.etaxonomy.taxeditor.ui.section.media.MediaElement;
 
 /**
  * <p>MediaDetailsSection class.</p>
similarity index 89%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/ImageFileElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/ImageFileElement.java
index d249bcd00f98eabd43d1806bd6f92d2eabd79284..df7949b5882cb1685cec513959bbcb9fd8a2bab1 100644 (file)
@@ -8,13 +8,14 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.section.supplemental;
+package eu.etaxonomy.taxeditor.ui.section.media;
 
 import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
 
 import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
 import org.eclipse.swt.events.SelectionListener;
 
 import eu.etaxonomy.cdm.api.service.IMediaService;
@@ -24,10 +25,12 @@ import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
 import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
 import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
 import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.forms.ImageElement;
 import eu.etaxonomy.taxeditor.ui.forms.KeyValueViewerElement;
 import eu.etaxonomy.taxeditor.ui.forms.NumberWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractMediaRepresentationPartElement;
 
 /**
  * <p>ImageFileElement class.</p>
@@ -94,7 +97,7 @@ public class ImageFileElement extends AbstractMediaRepresentationPartElement<Ima
                }
                try {
                        
-                       Integer size = CdmStore.getService(IMediaService.class).getImageSize(uri, 10000);
+                       Integer size = CdmStore.getService(IMediaService.class).getImageSize(uri, 10000);                       
                        
                        if(size != null){
                                text_size.setText(FileUtils.byteCountToDisplaySize(size));
@@ -140,11 +143,17 @@ public class ImageFileElement extends AbstractMediaRepresentationPartElement<Ima
        public void handleEvent(Object eventSource) {
                if(eventSource == text_uri){
                        try {
-                               getEntity().setUri(new URI(text_uri.getText()));
+                               String uriString = text_uri.getText();
+                               URI uri = StringUtils.isNotEmpty(uriString) ? new URI(uriString) : null;
+                               getEntity().setUri(uri);
+                               
+                               showImage(getEntity().getUri());
+
+                               firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
                        } catch (URISyntaxException e) {
                                StoreUtil.warningDialog("Could not parse URI", getClass(), e.getMessage());
-                       }
-                       showImage(getEntity().getUri());
+                       }                       
                }
+               
        }
 }
similarity index 97%
rename from eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/MediaElement.java
rename to eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaElement.java
index ff328b904b6f7d62a2f49632f64c63ddb1e44101..e473b32bfabcadbb5f20296293191fdd2fa9d8a5 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * 
  */
-package eu.etaxonomy.taxeditor.ui.section.supplemental;
+package eu.etaxonomy.taxeditor.ui.section.media;
 
 import org.eclipse.swt.events.SelectionListener;
 
@@ -122,7 +122,7 @@ public class MediaElement extends AbstractEntityCollectionElement<Media> {
                } else if (eventSource == text_description) {
                        getEntity().addDescription(text_description.getLanguageString());
                } else if (eventSource == text_title) {
-                       getEntity().addTitle(text_title.getLanguageString());
+                       getEntity().putTitle(text_title.getLanguageString());
                        if (getParentElement() instanceof AbstractCdmDetailSection) {
                                ((AbstractCdmDetailSection) getParentElement()).updateTitle();
                        }
@@ -8,17 +8,28 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.section.supplemental;
+package eu.etaxonomy.taxeditor.ui.section.media;
 
-import org.apache.log4j.Logger;
+import java.io.IOException;
+import java.net.URI;
+import java.util.Collection;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.http.HttpException;
 import org.eclipse.swt.events.SelectionListener;
 
+import eu.etaxonomy.cdm.api.service.IMediaService;
+import eu.etaxonomy.cdm.common.mediaMetaData.ImageMetaData;
+import eu.etaxonomy.cdm.model.media.ImageFile;
 import eu.etaxonomy.cdm.model.media.MediaRepresentation;
+import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
 import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
 import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
 import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
 
 /**
@@ -30,8 +41,6 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
  */
 public class MediaRepresentationElement extends AbstractEntityCollectionElement<MediaRepresentation> {
 
-       private static final Logger logger = Logger
-                       .getLogger(MediaRepresentationElement.class);
        private MediaRepresentationPartSection section_mediaRepresentationPart;
        private TextWithLabelElement text_mimeType;
        private TextWithLabelElement text_suffix;
@@ -86,5 +95,39 @@ public class MediaRepresentationElement extends AbstractEntityCollectionElement<
                else if(eventSource == text_suffix){
                        getEntity().setSuffix(text_suffix.getText());
                }
+               // FIXME HACK automatically set the mime type to the first mediaRepresentationPart's mimetype
+               else if(eventSource == section_mediaRepresentationPart){
+                       Collection<MediaRepresentationPart> imageFileElements = section_mediaRepresentationPart.getCollection(section_mediaRepresentationPart.getEntity());
+                       
+                       MediaRepresentationPart mediaRepresentationPart = imageFileElements.iterator().next();
+                       if(mediaRepresentationPart == null || !(mediaRepresentationPart instanceof ImageFile)){
+                               return;
+                       }
+                       ImageFile imageFile = (ImageFile) mediaRepresentationPart;
+
+                       URI uri = imageFile.getUri();
+                       if(uri == null){
+                               return;
+                       }
+                       try {
+                               ImageMetaData imageInfo = CdmStore.getService(IMediaService.class).getImageInfo(uri, 10000);
+                               String mimeType = imageInfo.getMimeType();
+                               text_mimeType.setText(mimeType);
+                               
+                               
+                       } catch (IOException e) {
+                               StoreUtil.error(getClass(), e);
+                       } catch (HttpException e) {
+                               StoreUtil.error(getClass(), e);
+                       }
+                       String path = uri.getPath();
+                       
+                       String suffix = path.substring(StringUtils.lastIndexOf(path, '.')+1);
+                       text_suffix.setText(suffix);
+               }
+       }
+       
+       private String getMimeType(URI uri){
+               return null;
        }
 }
@@ -1,15 +1,16 @@
 
-package eu.etaxonomy.taxeditor.ui.section.supplemental;
+package eu.etaxonomy.taxeditor.ui.section.media;
 
 import java.util.Collection;
 
-import org.apache.log4j.Logger;
+import org.eclipse.jface.util.PropertyChangeEvent;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.media.ImageFile;
 import eu.etaxonomy.cdm.model.media.MediaRepresentation;
 import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
 import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
 import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 
@@ -22,9 +23,6 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
 public class MediaRepresentationPartSection extends
                AbstractEntityCollectionSection<MediaRepresentation, MediaRepresentationPart> {
        
-       private static final Logger logger = Logger
-                       .getLogger(MediaRepresentationPartSection.class);
-       
        /**
         * <p>Constructor for MediaRepresentationPartSection.</p>
         *
@@ -36,6 +34,7 @@ public class MediaRepresentationPartSection extends
        public MediaRepresentationPartSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation,
                        ICdmFormElement parentElement, int style) {
                super(cdmFormFactory, conversation, parentElement, "Media Representation Part", style);
+               formFactory.addPropertyChangeListener(this);
        }
 
        /** {@inheritDoc} */
@@ -47,7 +46,7 @@ public class MediaRepresentationPartSection extends
        /** {@inheritDoc} */
        @Override
        public MediaRepresentationPart createNewElement() {
-               // we are suporting image only at the moment
+               // FIXME we are supporting image only at the moment
                return ImageFile.NewInstance(null, null);
        }
 
@@ -76,5 +75,18 @@ public class MediaRepresentationPartSection extends
                getEntity().removeRepresentationPart(element);
        }
 
+       @Override
+       public void propertyChange(PropertyChangeEvent event) {
+               if(event == null){
+                       return;
+               }
+               Object eventSource = event.getSource();
+               if(eventSource != this && getElements().contains(eventSource)){
+                       firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
+                       super.propertyChange(event);
+               }
+               
+               
+       }
        
 }
@@ -8,12 +8,10 @@
 * See LICENSE.TXT at the top of this package for the full license terms.
 */
 
-package eu.etaxonomy.taxeditor.ui.section.supplemental;
+package eu.etaxonomy.taxeditor.ui.section.media;
 
 import java.util.Collection;
 
-import org.apache.log4j.Logger;
-
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.model.media.Media;
 import eu.etaxonomy.cdm.model.media.MediaRepresentation;
@@ -30,9 +28,6 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
  */
 public class MediaRepresentationSection extends AbstractEntityCollectionSection<Media, MediaRepresentation> {
 
-       private static final Logger logger = Logger
-                       .getLogger(MediaRepresentationSection.class);
-
        /**
         * <p>Constructor for MediaRepresentationSection.</p>
         *
index 373191faea9462d6f8bd62b365cc8053e87c3861..dc6e56fa3eb1cb275e404661e6e8f59ba5fb4362 100644 (file)
@@ -26,12 +26,12 @@ import eu.etaxonomy.taxeditor.model.IElementHasDetails;
 import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.forms.RootElement;
 import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.section.media.MediaSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.AnnotationSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.CreditSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.ExtensionSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.MarkerSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.MediaSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.RightsSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.SourceSection;
 import eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection;
diff --git a/eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/CdmStoreTest.java b/eu.etaxonomy.taxeditor.store/src/test/java/eu/etaxonomy/taxeditor/store/CdmStoreTest.java
deleted file mode 100644 (file)
index f83f596..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.store;
-
-
-import java.util.List;
-
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
-
-/**
- * @author n.hoffmann
- * @created 17.03.2009
- * @version 1.0
- */
-//@Transactional(TransactionMode.DISABLED)
-public class CdmStoreTest /*extends CdmIntegrationTest */{
-
-//     @SpringBeanByType
-       private static CdmStore cdmStore;// = CdmStore.getDefault();
-       
-       private static ConversationHolder conversation;
-       
-       /**
-        * @throws java.lang.Exception
-        */
-       @BeforeClass
-       public static void setUp() throws Exception {
-               cdmStore = CdmStore.getDefault();
-               conversation = CdmStore.createConversation();
-       }
-       
-       /**
-        * 
-        */
-       @Test
-       //@DataSet("CdmStoreTest.xml")
-       @Ignore
-       public void testExistenceOfConversation(){
-               Assert.assertNotNull(conversation);
-       }
-       
-       @Test
-       //@DataSet("CdmStoreTest.xml")
-       @Ignore
-       public void testGetTaxonomicTrees(){
-
-       }
-       
-       /**
-        * 
-        */
-       @Test
-       //@DataSet("CdmStoreTest.xml")
-       @Ignore
-       public void testGetConceptRelationshipTypes(){
-               conversation.bind();
-               List<TaxonRelationshipType> conceptRelationshipTypes = TermStore.getTaxonRelationshipTypes();
-               Assert.assertNotNull(conceptRelationshipTypes);
-       }
-}
@@ -23,7 +23,7 @@ import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
  * @created 15.04.2009
  * @version 1.0
  */
-public class AbstractTaxeditorOperationTest {
+public abstract class AbstractTaxeditorOperationTestBase {
        
        public static final IUndoContext undoContext = null;