Revision 0fca7e83
Added by Jürgen Koch almost 13 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/MultiPageTaxonEditor.java | ||
---|---|---|
25 | 25 |
|
26 | 26 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
27 | 27 |
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled; |
28 |
import eu.etaxonomy.cdm.api.service.ITaxonService; |
|
28 | 29 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
29 | 30 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase; |
30 | 31 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
... | ... | |
37 | 38 |
import eu.etaxonomy.taxeditor.model.IDirtyMarkableSelectionProvider; |
38 | 39 |
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails; |
39 | 40 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
41 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
|
40 | 42 |
|
41 | 43 |
/** |
42 | 44 |
* |
... | ... | |
126 | 128 |
monitor.worked(1); |
127 | 129 |
} |
128 | 130 |
|
131 |
CdmStore.getService(ITaxonService.class).saveOrUpdate(getTaxon()); |
|
132 |
|
|
129 | 133 |
// commit the conversation and start a new transaction immediately |
130 | 134 |
conversation.commit(true); |
131 | 135 |
monitor.worked(1); |
... | ... | |
232 | 236 |
protected void setPartName() { |
233 | 237 |
|
234 | 238 |
String partName = null; |
235 |
// TaxonNameBase<?, ?> name = getTaxon().getName();
|
|
236 |
// |
|
237 |
// if (name != null) {
|
|
238 |
// partName = name.getTitleCache();
|
|
239 |
// }
|
|
239 |
TaxonNameBase<?, ?> name = getTaxon().getName(); |
|
240 |
|
|
241 |
if (name != null) { |
|
242 |
partName = name.getTitleCache(); |
|
243 |
} |
|
240 | 244 |
|
241 | 245 |
if (partName == null || partName.equals("")) { |
242 | 246 |
partName = ("New taxon"); |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/TaxonEditorInput.java | ||
---|---|---|
321 | 321 |
if(taxon == null){ |
322 | 322 |
List<String> TAXON_INIT_STRATEGY = Arrays.asList(new String []{ |
323 | 323 |
"*", |
324 |
"synonymRelations", |
|
324 |
// synonyms |
|
325 |
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames", |
|
326 |
"synonymRelations.synonym.name.status", |
|
327 |
"synonymRelations.synonym.name.relationsToThisName.fromTaxon.name", |
|
328 |
// synonym name |
|
329 |
"synonymRelations.synonym.name.descriptions.elements", |
|
330 |
"synonymRelations.synonym.name.typeDesignations", |
|
331 |
"synonymRelations.synonym.name.relationsToThisName", |
|
332 |
"synonymRelations.synonym.name.relationsFromThisName", |
|
333 |
"synonymRelations.synonym.name.homotypicalGroup.typifiedNames", |
|
334 |
"synonymRelations.synonym.name.rank.representations", |
|
335 |
"synonymRelations.synonym.name.status.type.representations", |
|
336 |
// snonym name supplemental |
|
337 |
"synonymRelations.synonym.name.annotations.annotationType", |
|
338 |
"synonymRelations.synonym.name.markers", |
|
339 |
"synonymRelations.synonym.name.credits", |
|
340 |
"synonymRelations.synonym.name.extensions", |
|
341 |
"synonymRelations.synonym.name.rights", |
|
342 |
"synonymRelations.synonym.name.sources", |
|
343 |
// |
|
325 | 344 |
"relationsToThisTaxon", |
326 | 345 |
"relationsFromThisTaxon", |
327 | 346 |
// taxon relations |
328 | 347 |
"relationsToThisName.fromTaxon.name", |
329 | 348 |
// the name |
330 |
"name", |
|
331 |
"name.homotypicalGroup", |
|
349 |
"name.descriptions.elements", |
|
350 |
"name.typeDesignations", |
|
351 |
"name.relationsToThisName", |
|
352 |
"name.relationsFromThisName", |
|
332 | 353 |
"name.homotypicalGroup.typifiedNames", |
333 | 354 |
"name.rank.representations", |
334 | 355 |
"name.status.type.representations", |
335 |
|
|
356 |
// name supplemental |
|
357 |
"name.annotations.annotationType", |
|
358 |
"name.markers", |
|
359 |
"name.credits", |
|
360 |
"name.extensions", |
|
361 |
"name.rights", |
|
362 |
"name.sources", |
|
336 | 363 |
// taxon descriptions |
364 |
"descriptions.describedSpecimenOrObservations", |
|
365 |
"descriptions.sources", |
|
366 |
"descriptions.scopes", |
|
367 |
// taxon description supplemental |
|
368 |
"descriptions.annotations.annotationType", |
|
369 |
"descriptions.markers", |
|
370 |
"descriptions.credits", |
|
371 |
"descriptions.extensions", |
|
372 |
"descriptions.rights", |
|
373 |
"descriptions.sources", |
|
374 |
// description elements |
|
375 |
"descriptions.elements.*", |
|
376 |
"descriptions.elements.sources", |
|
337 | 377 |
"descriptions.elements.area.$", |
338 | 378 |
"descriptions.elements.multilanguageText", |
339 | 379 |
"descriptions.elements.media.representations.parts", |
340 | 380 |
"descriptions.elements.media.title", |
341 |
|
|
381 |
// descriptin element supplemental |
|
382 |
"descriptions.elements.annotations.annotationType", |
|
383 |
"descriptions.elements.markers", |
|
384 |
"descriptions.elements.credits", |
|
385 |
"descriptions.elements.extensions", |
|
386 |
"descriptions.elements.rights", |
|
387 |
"descriptions.elements.sources", |
|
388 |
// supplemental |
|
389 |
"annotations.annotationType", |
|
390 |
"markers", |
|
391 |
"credits", |
|
392 |
"extensions", |
|
393 |
"rights", |
|
394 |
"sources" |
|
342 | 395 |
}); |
343 | 396 |
|
344 | 397 |
taxon = (Taxon) CdmStore.getService(ITaxonService.class).load(taxonNode.getTaxon().getUuid(), TAXON_INIT_STRATEGY); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/ConversationHolderMock.java | ||
---|---|---|
100 | 100 |
public TransactionStatus commit(boolean restartTransaction){ |
101 | 101 |
return null; |
102 | 102 |
} |
103 |
// |
|
104 |
// /**
|
|
105 |
// * @return the session associated with this conversation manager
|
|
106 |
// */
|
|
107 |
// private Session getSession() {
|
|
108 |
// return null;
|
|
109 |
// }
|
|
103 |
|
|
104 |
/** |
|
105 |
* @return the session associated with this conversation manager |
|
106 |
*/ |
|
107 |
private Session getSession() { |
|
108 |
return null; |
|
109 |
} |
|
110 | 110 |
// |
111 | 111 |
// /** |
112 | 112 |
// * @return the session factory that is bound to this conversation manager |
... | ... | |
158 | 158 |
// |
159 | 159 |
// } |
160 | 160 |
// |
161 |
// /**
|
|
162 |
// * Free resources bound to this conversationHolder
|
|
163 |
// */
|
|
164 |
// public void close(){
|
|
165 |
// |
|
166 |
// }
|
|
161 |
/** |
|
162 |
* Free resources bound to this conversationHolder |
|
163 |
*/ |
|
164 |
public void close(){ |
|
165 |
|
|
166 |
} |
|
167 | 167 |
// |
168 | 168 |
// public boolean isClosed(){ |
169 | 169 |
// return false; |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/parser/MatchStrategyConfigurator.java | ||
---|---|---|
10 | 10 |
|
11 | 11 |
package eu.etaxonomy.taxeditor.parser; |
12 | 12 |
|
13 |
import java.io.Serializable; |
|
14 |
|
|
13 | 15 |
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase; |
14 | 16 |
import eu.etaxonomy.cdm.model.name.NonViralName; |
15 | 17 |
import eu.etaxonomy.cdm.model.reference.Reference; |
... | ... | |
25 | 27 |
* @created Jan 22, 2010 |
26 | 28 |
* @version 1.0 |
27 | 29 |
*/ |
28 |
public class MatchStrategyConfigurator { |
|
30 |
public class MatchStrategyConfigurator implements Serializable{
|
|
29 | 31 |
|
32 |
/** |
|
33 |
* |
|
34 |
*/ |
|
35 |
private static final long serialVersionUID = 5803683193252347663L; |
|
36 |
|
|
30 | 37 |
/** |
31 | 38 |
* <p>NonViralNameMatchStrategy</p> |
32 | 39 |
* |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/parser/ParseHandler.java | ||
---|---|---|
160 | 160 |
|
161 | 161 |
NonViralName parsedName = parse(unparsedNameString); |
162 | 162 |
|
163 |
MatchMatrix matchMatrix = findMatches(parsedName); |
|
164 |
|
|
165 |
resolveDuplicates(parsedName, matchMatrix); |
|
163 |
// FIXME |
|
164 |
// MatchMatrix matchMatrix = findMatches(parsedName); |
|
165 |
// |
|
166 |
// resolveDuplicates(parsedName, matchMatrix); |
|
166 | 167 |
|
167 | 168 |
return parsedName; |
168 | 169 |
} |
Also available in: Unified diff
First adjustments for the web based taxeditor with the http invoker