Project

General

Profile

« Previous | Next » 

Revision 137d0ad0

Added by Andreas Müller over 3 years ago

ref #9280 adapt TaxEditor to new Term.getLabel()

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/ReferenceCreator.java
36 36
		Reference reference = null;
37 37

  
38 38
		// TODO replace w more generic method when cdmlib matures accordingly
39
		if  (ReferenceType.Article.getMessage().equals(key)) {
39
		if  (ReferenceType.Article.getLabel().equals(key)) {
40 40
			reference = ReferenceFactory.newArticle();
41 41
		}
42
		if  (ReferenceType.Book.getMessage().equals(key)) {
42
		if  (ReferenceType.Book.getLabel().equals(key)) {
43 43
			reference = ReferenceFactory.newBook();
44 44
		}
45
		if  (ReferenceType.BookSection.getMessage().equals(key)) {
45
		if  (ReferenceType.BookSection.getLabel().equals(key)) {
46 46
			reference = ReferenceFactory.newBookSection();
47 47
		}
48
		if  (ReferenceType.CdDvd.getMessage().equals(key)) {
48
		if  (ReferenceType.CdDvd.getLabel().equals(key)) {
49 49
			reference = ReferenceFactory.newCdDvd();
50 50
		}
51
		if  (ReferenceType.Database.getMessage().equals(key)) {
51
		if  (ReferenceType.Database.getLabel().equals(key)) {
52 52
			reference = ReferenceFactory.newDatabase();
53 53
		}
54
		if  (ReferenceType.Generic.getMessage().equals(key)) {
54
		if  (ReferenceType.Generic.getLabel().equals(key)) {
55 55
			reference = ReferenceFactory.newGeneric();
56 56
		}
57
		if  (ReferenceType.InProceedings.getMessage().equals(key)) {
57
		if  (ReferenceType.InProceedings.getLabel().equals(key)) {
58 58
			reference = ReferenceFactory.newInProceedings();
59 59
		}
60
		if  (ReferenceType.Journal.getMessage().equals(key)) {
60
		if  (ReferenceType.Journal.getLabel().equals(key)) {
61 61
			reference = ReferenceFactory.newJournal();
62 62
		}
63
		if  (ReferenceType.Map.getMessage().equals(key)) {
63
		if  (ReferenceType.Map.getLabel().equals(key)) {
64 64
			reference = ReferenceFactory.newMap();
65 65
		}
66
		if  (ReferenceType.Patent.getMessage().equals(key)) {
66
		if  (ReferenceType.Patent.getLabel().equals(key)) {
67 67
			reference = ReferenceFactory.newPatent();
68 68
		}
69
		if  (ReferenceType.PersonalCommunication.getMessage().equals(key)) {
69
		if  (ReferenceType.PersonalCommunication.getLabel().equals(key)) {
70 70
			reference = ReferenceFactory.newPersonalCommunication();
71 71
		}
72
		if  (ReferenceType.PrintSeries.getMessage().equals(key)) {
72
		if  (ReferenceType.PrintSeries.getLabel().equals(key)) {
73 73
			reference = ReferenceFactory.newPrintSeries();
74 74
		}
75
		if  (ReferenceType.Proceedings.getMessage().equals(key)) {
75
		if  (ReferenceType.Proceedings.getLabel().equals(key)) {
76 76
			reference = ReferenceFactory.newProceedings();
77 77
		}
78
		if  (ReferenceType.Report.getMessage().equals(key)) {
78
		if  (ReferenceType.Report.getLabel().equals(key)) {
79 79
			reference = ReferenceFactory.newReport();
80 80
		}
81
		if  (ReferenceType.Thesis.getMessage().equals(key)) {
81
		if  (ReferenceType.Thesis.getLabel().equals(key)) {
82 82
			reference = ReferenceFactory.newThesis();
83 83
		}
84
		if  (ReferenceType.WebPage.getMessage().equals(key)) {
84
		if  (ReferenceType.WebPage.getLabel().equals(key)) {
85 85
			reference = ReferenceFactory.newWebPage();
86 86
		}
87
		if  (ReferenceType.Section.getMessage().equals(key)) {
87
		if  (ReferenceType.Section.getLabel().equals(key)) {
88 88
            reference = ReferenceFactory.newSection();
89 89
        }
90 90
		if (reference == null) {
......
104 104
    public Map<Object, String> getKeyLabelPairs() {
105 105
		Map<Object, String> result = new HashMap<Object, String>();
106 106
		for (ReferenceType type : ReferenceType.values()) {
107
			result.put(type.getMessage(), type.getMessage());
107
			result.put(type.getLabel(), type.getLabel());
108 108
		}
109 109
		return result;
110 110
	}

Also available in: Unified diff