Project

General

Profile

« Previous | Next » 

Revision 1c4f6bb6

Added by Cherian Mathew over 10 years ago

FIME:3.3MC tags for code to be aligned with the 3.3 model changes related to the 'Uses' perspective

View differences:

eu.etaxonomy.taxeditor.application/plugin.xml
31 31
            id="eu.etaxonomy.taxeditor.application.perspective.polytomous"
32 32
            name="Polytomous Key">
33 33
      </perspective>
34
       <perspective
34
      <!-- FIXME:3.3MC -->
35
       <!--perspective
35 36
            class="eu.etaxonomy.taxeditor.perspective.Uses"
36 37
            id="eu.etaxonomy.taxeditor.application.perspective.uses"
37 38
            name="Uses">
38
      </perspective>
39
      </perspective-->
39 40
     
40 41
   </extension>
41 42
   <!--extension
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/UseObjectManager.java
25 25
import eu.etaxonomy.cdm.model.description.FeatureNode;
26 26
import eu.etaxonomy.cdm.model.description.FeatureTree;
27 27
import eu.etaxonomy.cdm.model.description.State;
28
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
28 29
import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;
29 30
import eu.etaxonomy.taxeditor.store.CdmStore;
30 31
import eu.etaxonomy.taxeditor.store.StoreUtil;
......
131 132
			} catch (URISyntaxException e) {
132 133
				e.printStackTrace();
133 134
			}
134
			humanGroupVocabulary = TermVocabulary.NewInstance(UsageTermCollection.humanGroupLabel, UsageTermCollection.humanGroupLabel, null, termSourceUri);
135
			
136
			//FIXME:3.3MC----
137
			//humanGroupVocabulary = TermVocabulary.NewInstance(UsageTermCollection.humanGroupLabel, UsageTermCollection.humanGroupLabel, null, termSourceUri);
138
			humanGroupVocabulary = null;
135 139
			humanGroupVocabulary.setUuid(UsageTermCollection.uuidHumanGroupVocabulary);
136
			DefinedTerm newDummyModifier = DefinedTerm.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);
140
			//FIXME:3.3MC----
141
			
142
			//FIXME:3.3MC----
143
			//DefinedTerm newDummyModifier = DefinedTerm.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);
144
			DefinedTerm newDummyModifier = null;
137 145
			newDummyModifier.setUuid(UsageTermCollection.uuidHumanGroupDummy);
138
			DefinedTerm newSubDummyModifier = DefinedTerm.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);
146
			//FIXME:3.3MC----
147
			
148
			//FIXME:3.3MC----
149
			//DefinedTerm newSubDummyModifier = DefinedTerm.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);
150
			DefinedTerm newSubDummyModifier = null;
139 151
			newSubDummyModifier.setUuid(UsageTermCollection.uuidEthnicGroupDummy);
152
			//FIXME:3.3MC----
153
			
140 154
			newDummyModifier.addIncludes(newSubDummyModifier);
141 155
			humanGroupVocabulary.addTerm(newDummyModifier);
142 156
			CdmStore.getService(IVocabularyService.class).saveOrUpdate(humanGroupVocabulary);
......
155 169
			} catch (URISyntaxException e) {
156 170
				e.printStackTrace();
157 171
			}
158
			plantPartVocabulary = TermVocabulary.NewInstance(UsageTermCollection.plantPartLabel, UsageTermCollection.plantPartLabel, null, termSourceUri);
172
			//FIXME:3.3MC----
173
			//plantPartVocabulary = TermVocabulary.NewInstance(UsageTermCollection.plantPartLabel, UsageTermCollection.plantPartLabel, null, termSourceUri);
174
			plantPartVocabulary = null;
159 175
			plantPartVocabulary.setUuid(UsageTermCollection.uuidPlantPartVocabulary);
160
			DefinedTerm newDummyModifier = DefinedTerm.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);
176
			//FIXME:3.3MC----
177
			
178
			//FIXME:3.3MC----
179
			//DefinedTerm newDummyModifier = DefinedTerm.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);
180
			DefinedTerm newDummyModifier = null;
161 181
			newDummyModifier.setUuid(UsageTermCollection.uuidPlantPartDummy);
162 182
			plantPartVocabulary.addTerm(newDummyModifier);
183
			//FIXME:3.3MC----
184
			
163 185
			CdmStore.getService(IVocabularyService.class).saveOrUpdate(plantPartVocabulary);
164 186
			conversation.commit(true);
165 187
		}
......
176 198
			} catch (URISyntaxException e) {
177 199
				e.printStackTrace();
178 200
			}
179
			countryVocabulary = TermVocabulary.NewInstance(UsageTermCollection.countryLabel, UsageTermCollection.countryLabel, null, termSourceUri);
201
			//FIXME:3.3MC----
202
			//countryVocabulary = TermVocabulary.NewInstance(UsageTermCollection.countryLabel, UsageTermCollection.countryLabel, null, termSourceUri);
203
			countryVocabulary = null;
180 204
			countryVocabulary.setUuid(UsageTermCollection.uuidCountryVocabulary);
181
			DefinedTerm newDummyModifier = DefinedTerm.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);
205
			//FIXME:3.3MC----
206
			
207
			//FIXME:3.3MC----
208
			//DefinedTerm newDummyModifier = DefinedTerm.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);
209
			DefinedTerm newDummyModifier = null;
182 210
			newDummyModifier.setUuid(UsageTermCollection.uuidCountryDummy);
211
			//FIXME:3.3MC----
183 212
			countryVocabulary.addTerm(newDummyModifier);
184 213
			CdmStore.getService(IVocabularyService.class).saveOrUpdate(countryVocabulary);
185 214
			conversation.commit(true);
......
197 226
			} catch (URISyntaxException e) {
198 227
				e.printStackTrace();
199 228
			}
200
			stateVocabulary = TermVocabulary.NewInstance(UsageTermCollection.useCategoryVocabularyLabel, UsageTermCollection.useCategoryVocabularyLabel, null, termSourceUri);
229
			//FIXME:3.3MC----
230
			//stateVocabulary = TermVocabulary.NewInstance(UsageTermCollection.useCategoryVocabularyLabel, UsageTermCollection.useCategoryVocabularyLabel, null, termSourceUri);
231
			stateVocabulary = null;
201 232
			stateVocabulary.setUuid(UsageTermCollection.uuidUseCategoryVocabulary);
233
			//FIXME:3.3MC----
202 234
			State newDummyState = State.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);
203 235
			newDummyState.setUuid(UsageTermCollection.uuidUseCategoryDummy);
204 236
			State newDummySubCat = State.NewInstance(UsageTermCollection.notAvailableLabel, UsageTermCollection.notAvailableLabel, null);
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/internal/TaxeditorEditorPlugin.java
43 43
		EditorStateManager stateManager = new EditorStateManager();
44 44
		CdmStore.getContextManager().addContextListener(stateManager);
45 45
		
46
		UseObjectManager useManager = new UseObjectManager();
47
		CdmStore.getContextManager().addContextListener(useManager);
46
		//FIXME:3.3MC----
47
		//UseObjectManager useManager = new UseObjectManager();
48
		//CdmStore.getContextManager().addContextListener(useManager);
49
		//FIXME:3.3MC----
48 50
		
49 51
		plugin = this;
50 52
		logger.trace("Plugin started: " + this.getBundle().getSymbolicName());
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java
30 30
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
31 31
import eu.etaxonomy.cdm.model.common.ICdmBase;
32 32
import eu.etaxonomy.cdm.model.common.IDefinedTerm;
33
import eu.etaxonomy.cdm.model.common.ISimpleTerm;
33 34
import eu.etaxonomy.cdm.model.common.Language;
34 35
import eu.etaxonomy.cdm.model.common.MarkerType;
35 36
import eu.etaxonomy.cdm.model.common.TermBase;
......
229 230
		}
230 231
		return key;
231 232
	}
233
	
234
	/**
235
	 * Construct a unique key using the CdmBase object's uuid
236
	 * 
237
	 * @param cdmBase
238
	 * @return
239
	 */
240
	public static String getPreferenceKey(ISimpleTerm simpleTerm) {
241
		simpleTerm = (ISimpleTerm) HibernateProxyHelper.deproxy(simpleTerm);
242
		String key = simpleTerm.getClass().getName().concat(".")
243
				.concat(simpleTerm.getUuid().toString());
244
		if (key.contains("javassist")) {
245
			StoreUtil.warn(PreferencesUtil.class,
246
					"Trying to persist a preference based on a proxy class.");
247
		}
248
		return key;
249
	}
250
	
251
	
232 252

  
233 253
	/**
234 254
	 * Construct a unique key using the CdmBase object's uuid

Also available in: Unified diff