Project

General

Profile

« Previous | Next » 

Revision 9ad45667

Added by Katja Luther over 5 years ago

ref #7415: add external link section to original source part

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/EnumComboElement.java
22 22

  
23 23
import eu.etaxonomy.cdm.model.common.IEnumTerm;
24 24
import eu.etaxonomy.cdm.model.common.OriginalSourceType;
25
import eu.etaxonomy.cdm.model.media.ExternalLinkType;
25 26
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
26 27
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
27 28
import eu.etaxonomy.cdm.model.reference.ReferenceType;
......
56 57
				Collection<NomenclaturalCode> result = new ArrayList<>(Arrays.asList(NomenclaturalCode.values()));
57 58
            	result.remove(NomenclaturalCode.ICVCN);
58 59
                return  result;
59
				
60

  
60 61
			}
61 62

  
62 63
			@Override
......
101 102
			}
102 103

  
103 104
		},
105
		new CdmEnumDataHolder<ExternalLinkType>(){
106

  
107
            @Override
108
            public String getName() {
109
                return "External Link Type";
110
            }
111

  
112
            @Override
113
            public Collection<ExternalLinkType> getElements() {
114
                return Arrays.asList(ExternalLinkType.values());
115
            }
116

  
117
            @Override
118
            public Class<ExternalLinkType> getClazz() {
119
                return ExternalLinkType.class;
120
            }
121

  
122
        },
104 123
		new CdmEnumDataHolder<OriginalSourceType>(){
105 124

  
106 125
			@Override
......
149 168
		} else if(enumType.equals(SpecimenOrObservationType.class)) {
150 169
			return "Spec./Obs. Type";
151 170
		}
171
		else if(enumType.equals(ExternalLinkType.class)) {
172
            return "External Link Type";
173
        }
152 174
		return "No Label";
153 175
	}
154 176

  
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/CdmFormFactory.java
96 96
import eu.etaxonomy.cdm.model.location.NamedArea;
97 97
import eu.etaxonomy.cdm.model.location.NamedAreaLevel;
98 98
import eu.etaxonomy.cdm.model.location.Point;
99
import eu.etaxonomy.cdm.model.media.ExternalLink;
99 100
import eu.etaxonomy.cdm.model.media.ImageFile;
100 101
import eu.etaxonomy.cdm.model.media.Media;
101 102
import eu.etaxonomy.cdm.model.media.MediaRepresentation;
......
144 145
import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeAgentRelationCollectionSection;
145 146
import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeDetailElement;
146 147
import eu.etaxonomy.taxeditor.ui.section.classification.TaxonNodeDetailSection;
148
import eu.etaxonomy.taxeditor.ui.section.common.ExternalLinksElement;
149
import eu.etaxonomy.taxeditor.ui.section.common.ExternalLinksSection;
147 150
import eu.etaxonomy.taxeditor.ui.section.common.ReferenceEntityDetailElement;
148 151
import eu.etaxonomy.taxeditor.ui.section.common.ReferencedEntityDetailSection;
149 152
import eu.etaxonomy.taxeditor.ui.section.description.DerivedUnitElement;
......
2487 2490
        addAndAdaptSection(parentElement, section);
2488 2491
        return section;
2489 2492
    }
2493
    public ExternalLinksSection createExternalLinksSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
2494
        ExternalLinksSection section = new ExternalLinksSection(this, conversation, parentElement, style);
2495
        addAndAdaptSection(parentElement, section);
2496
        return section;
2497
    }
2490 2498

  
2491 2499
    public RightsSection createRightsSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
2492 2500
        RightsSection section = new RightsSection(this, conversation, parentElement, style);
......
2687 2695
            element = new CreditElement(this, parentElement, (Credit) entity, removeListener, style);
2688 2696
        } else if (entity instanceof Extension) {
2689 2697
            element = new ExtensionElement(this, parentElement, (Extension) entity, removeListener, style);
2698
        } else if (entity instanceof ExternalLink) {
2699
            element = new ExternalLinksElement(this, parentElement, (ExternalLink) entity, removeListener, style);
2690 2700
        } else if (entity instanceof Marker) {
2691 2701
            element = new MarkerElement(this, parentElement, (Marker) entity, removeListener, style);
2692 2702
        } else if (entity instanceof TaxonNodeAgentRelation) {

Also available in: Unified diff