import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
import eu.etaxonomy.cdm.model.description.PolytomousKey;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.cdm.model.description.SpecimenDescription;
import eu.etaxonomy.cdm.model.media.Media;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
createTeamOrPersonBaseDetailSection(rootElement);
} else if (input instanceof DescriptionBase) {
- Set<Marker> descriptionMarkers = ((DescriptionBase) input).getMarkers();
- MarkerType useMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(
- UsageTermCollection.uuidUseMarkerType);
- Boolean isUseDescription = false;
- for (Marker marker : descriptionMarkers) {
- if (marker.getMarkerType().equals(useMarkertype)) {
- isUseDescription = true;
- }
- }
- if (((DescriptionBase) input).isImageGallery()) {
- createImageGallerySection(rootElement);
-
- } else if (isUseDescription) {
- createUseDescriptionSection(rootElement);
- } else {
- createDescriptionSection(rootElement);
-
- }
+ if(input instanceof SpecimenDescription){
+ //TODO: add more sections to DetailsView for SpecimenDescription
+ createSpecimenDescriptionSection(rootElement);
+ }
+ else{
+ Set<Marker> descriptionMarkers = ((DescriptionBase) input).getMarkers();
+ MarkerType useMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(
+ UsageTermCollection.uuidUseMarkerType);
+ Boolean isUseDescription = false;
+ for (Marker marker : descriptionMarkers) {
+ if (marker.getMarkerType().equals(useMarkertype)) {
+ isUseDescription = true;
+ }
+ }
+ if (((DescriptionBase) input).isImageGallery()) {
+ createImageGallerySection(rootElement);
+
+ } else if (isUseDescription) {
+ createUseDescriptionSection(rootElement);
+ } else {
+ createDescriptionSection(rootElement);
+
+ }
+ }
} else if (input instanceof DescriptionElementBase) {
Set<Marker> descriptionMarkers = ((DescriptionElementBase) input).getInDescription().getMarkers();
MarkerType useMarkertype = (MarkerType) CdmStore.getService(ITermService.class).find(
addPart(scopeSection);
}
+ /**
+ * createDescriptionSection
+ *
+ * @param parent
+ */
+ private void createSpecimenDescriptionSection(RootElement parent) {
+ destroySections();
+ DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ addPart(descriptionDetailSection);
+ }
+
/**
* Creates the use Description section
*