.project
+.classpath
integration-test.log
eu.etaxonomy.taxeditor.cdmlib/src/main/resources/etc/jetty/*
.settings
target
.directory
+bin
eu.etaxonomy.taxeditor.cdmlib/cdmlib-*.jar
eu.etaxonomy.taxeditor.cdmlib/cdmlib-*.zip
eu.etaxonomy.taxeditor.cdmlib/dist
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/test/java"/>
Bundle-ManifestVersion: 2
Bundle-Name: Application
Bundle-SymbolicName: eu.etaxonomy.taxeditor.application;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
Bundle-Activator: eu.etaxonomy.taxeditor.TaxonomicEditorPlugin
Bundle-Vendor: EDIT
Bundle-Localization: OSGI-INF/l10n/plugin
</and>
</visibleWhen>
</command>
+ <dynamic
+ class="eu.etaxonomy.taxeditor.admin.UserGroupContributionItem"
+ id="eu.etaxonomy.taxeditor.admin.UserGroupContributionItem">
+ <visibleWhen
+ checkEnabled="true">
+ <and>
+ <reference
+ definitionId="hasROLE_PROJECT_MANAGER">
+ </reference>
+ <reference
+ definitionId="isCdmStoreConnected">
+ </reference>
+ </and>
+ </visibleWhen>
+ </dynamic>
</menuContribution>
<menuContribution
locationURI="menu:org.eclipse.ui.main.menu.help">
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>4.5.1</version>
+ <version>4.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
MessagingUtils.REMOTE_ACCESS_FAILURE_MESSAGE + System.getProperty("line.separator"),
pluginId,
t,
- true,
- false);
+ false,
+ true);
return true;
}
return false;
--- /dev/null
+// $Id$
+/**
+* Copyright (C) 2017 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.admin;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.action.IContributionItem;
+
+import eu.etaxonomy.taxeditor.bulkeditor.command.OpenBulkEditorContributionItem;
+import eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInputType;
+
+/**
+ * @author pplitzner
+ * @date Mar 9, 2017
+ *
+ */
+public class UserGroupContributionItem extends OpenBulkEditorContributionItem {
+
+ /** {@inheritDoc} */
+ @Override
+ protected IContributionItem[] getContributionItems() {
+ List<IContributionItem> contributionItems = new ArrayList<IContributionItem>();
+ contributionItems.add(BulkEditorInputType.USER.createContributionItem());
+ contributionItems.add(BulkEditorInputType.GROUP.createContributionItem());
+ return contributionItems.toArray(new IContributionItem[contributionItems.size()]);
+ }
+}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
<classpathentry including="**/*.java" kind="src" path="src/test/java"/>
Bundle-ManifestVersion: 2
Bundle-Name: Bulkeditor Bundle
Bundle-SymbolicName: eu.etaxonomy.taxeditor.bulkeditor;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
Bundle-Activator: eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin
Bundle-Vendor: EDIT
Export-Package: eu.etaxonomy.taxeditor.annotatedlineeditor,
p2.inf,\\r
OSGI-INF/l10n/bundle.properties,\\r
OSGI-INF/l10n/bundle_de.properties,\\r
- OSGI-INF/l10n/messages.properties,\\r
- OSGI-INF/l10n/messages_de.properties\r
+ src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties,\\r
+ src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties\r
\ No newline at end of file
class="eu.etaxonomy.taxeditor.bulkeditor.handler.defaultHandler.OpenBulkEditorForIdentifiableEntity"
commandId="eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity">
<activeWhen>
- <reference
- definitionId="isBulkEditorSupported">
- </reference>
+ <and>
+ <reference
+ definitionId="isBulkEditorSupported">
+ </reference>
+ <not>
+ <with
+ variable="activePartId">
+ <equals
+ value="bulkeditor.editor">
+ </equals>
+ </with>
+ </not>
+ </and>
</activeWhen>
</handler>
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>4.5.1</version>
+ <version>4.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
import org.eclipse.jface.text.source.Annotation;
import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
-import eu.etaxonomy.cdm.api.service.config.NameDeletionConfigurator;
/**
* An <code>Annotation</code> which spans an entire line and holds an object associated
private boolean markedAsNew;
private T mergeTarget;
private DeleteConfiguratorBase configurator= null;
+ private boolean markAsDelete;
/**
public void setDeleteConfigurator(DeleteConfiguratorBase config) {
this.configurator = config;
-
+
}
}
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
package eu.etaxonomy.taxeditor.annotatedlineeditor.handler;
-import java.net.URI;
-import java.net.URISyntaxException;
-
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
import eu.etaxonomy.taxeditor.annotatedlineeditor.AnnotatedLineEditor;
+import eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator.GroupCreator;
+import eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator.UserCreator;
/**
* <p>NewObjectHandler class.</p>
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
/** {@inheritDoc} */
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
IEditorPart editor = HandlerUtil.getActiveEditor(event);
IEditorInput input = editor.getEditorInput();
-
+
if (editor instanceof AnnotatedLineEditor) {
-
+
Object key = ((Event)event.getTrigger()).data;
if (key != null) {
if(!(key instanceof SpecimenOrObservationType)) {
- String text = ((Event)event.getTrigger()).text;
-
+ String text = ((Event)event.getTrigger()).text;
+
//FIXME : This should probably go into some ValidatorFactory
IInputValidator nonEmptyInputValidator = null;
- //FIXME : This is a workaround to not allow empty strings in the
- // input dialog for User and Group entities.
+ //FIXME : This is a workaround to not allow empty strings in the
+ // input dialog for User and Group entities.
// Normally this should be default
// behaviour, so we need to discuss whether this handler
// should be used to handle the creating new entities of
// type other than User and Group.
// Once #4348 is fixed this check can be removed.
- if(text.equals("User") || text.equals("Group")) {
+ if(text.equals(UserCreator.USER) || text.equals(GroupCreator.GROUP)) {
nonEmptyInputValidator = new IInputValidator() {
- public String isValid(String text) {
+ @Override
+ public String isValid(String text) {
if(text == null || text.isEmpty()) {
return "Input cannot be empty";
}
return null;
- }
+ }
};
}
- InputDialog dialog = new InputDialog(HandlerUtil.getActiveShell(event),
- "Create " + text,
- "Enter new " + text, "",
- nonEmptyInputValidator);
+ InputDialog dialog = new InputDialog(HandlerUtil.getActiveShell(event),
+ String.format("Create %s", text), String.format("Enter new %s", text), "",
+ nonEmptyInputValidator);
- if (dialog.open() != Window.CANCEL) {
- ((AnnotatedLineEditor) editor).createAnnotatedLineNewObject(key, dialog.getValue());
+ if (dialog.open() != Window.CANCEL) {
+ ((AnnotatedLineEditor) editor).createAnnotatedLineNewObject(key, dialog.getValue());
}
} else {
- ((AnnotatedLineEditor) editor).createAnnotatedLineNewObject(key, "Untitled");
+ ((AnnotatedLineEditor) editor).createAnnotatedLineNewObject(key, "Untitled");
}
-
+
} else {
((AnnotatedLineEditor) editor).createAnnotatedLineNewObject();
}
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeNode;
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
import eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInputType;
if(selectedElement!=null){
if(selectedElement instanceof UuidAndTitleCache){
return BulkEditorInputType.getByType(((UuidAndTitleCache) selectedElement).getType())!=null;
+ }
+ else if(selectedElement instanceof TreeNode){
+ System.out.println(BulkEditorInputType.getByType(((TreeNode) selectedElement).getValue().getClass())!=null);
+ return BulkEditorInputType.getByType(((TreeNode) selectedElement).getValue().getClass())!=null;
}
return BulkEditorInputType.getByType(selectedElement.getClass())!=null;
}
package eu.etaxonomy.taxeditor.bulkeditor.command;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.Separator;
-import org.eclipse.swt.SWT;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.CompoundContributionItem;
-import org.eclipse.ui.menus.CommandContributionItem;
-import org.eclipse.ui.menus.CommandContributionItemParameter;
-import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorConstants;
import eu.etaxonomy.taxeditor.bulkeditor.input.BulkEditorInputType;
/**
- * <p>
- * OpenBulkEditorContributionItem class.
- * </p>
*
* @author p.ciardelli
* @created 19.08.2009
*/
public class OpenBulkEditorContributionItem extends CompoundContributionItem {
- /**
- * <p>
- * Constructor for OpenBulkEditorContributionItem.
- * </p>
- */
public OpenBulkEditorContributionItem() {
}
- /**
- * <p>
- * Constructor for OpenBulkEditorContributionItem.
- * </p>
- *
- * @param id
- * a {@link java.lang.String} object.
- */
public OpenBulkEditorContributionItem(String id) {
super(id);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.actions.CompoundContributionItem#getContributionItems()
- */
/** {@inheritDoc} */
@Override
protected IContributionItem[] getContributionItems() {
contributionItems.add(BulkEditorInputType.NAME.createContributionItem());
contributionItems.add(BulkEditorInputType.TAXON.createContributionItem());
contributionItems.add(new Separator(groupName));
- contributionItems.add(BulkEditorInputType.OCCURRENCE.createContributionItem());
- contributionItems.add(new Separator(groupName));
contributionItems.add(BulkEditorInputType.MEDIA.createContributionItem());
contributionItems.add(new Separator(groupName));
- contributionItems.add(BulkEditorInputType.USER.createContributionItem());
- contributionItems.add(BulkEditorInputType.GROUP.createContributionItem());
+ contributionItems.add(BulkEditorInputType.OCCURRENCE.createContributionItem());
return contributionItems.toArray(new IContributionItem[contributionItems.size()]);
}
- /**
- * @param key
- * @param object
- * @return
- */
- private IContributionItem createContributionItem(String label, String inputType) {
- CommandContributionItemParameter parameter = new CommandContributionItemParameter(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), null, IBulkEditorConstants.DYNAMIC_OPEN_MENU_ID, SWT.NONE);
-
- parameter.label = label;
-
- Map<String, String> parameters = new HashMap<String, String>();
- parameters.put(IBulkEditorConstants.INPUT_TYPE_PARAMETER_ID, inputType);
- parameter.parameters = parameters;
-
- return new CommandContributionItem(parameter);
- }
}
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.ui.texteditor.IDocumentProvider;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
import eu.etaxonomy.cdm.api.service.DeleteResult;
import eu.etaxonomy.cdm.api.service.IOccurrenceService;
import eu.etaxonomy.cdm.api.service.IReferenceService;
import eu.etaxonomy.taxeditor.model.DeleteResultMessagingUtils;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator.DeleteConfiguratorDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator.DeleteConfiguratorDialog;
/**
try {
- ICdmApplicationConfiguration controller;
+ ICdmRepository controller;
controller = CdmStore.getCurrentApplicationConfiguration();
if (object instanceof SpecimenOrObservationBase){
IOccurrenceService service = controller.getOccurrenceService();
if (object != null){
config = new NameDeletionConfigurator();
- DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", null, "Do you really want to delete the name?\nThis operation is irreversible!", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
+ DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", null, "Do you really want to delete the name?\nThis operation is irreversible!", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0, true);
int result_dialog= dialog.open();
if (result_dialog != Status.OK){
return null;
Synonym synonym = HibernateProxyHelper.deproxy(object, Synonym.class);
config = new SynonymDeletionConfigurator();
errorMessage = "The synonym ";
- DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", null, "Do you really want to delete the synonym?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
+ DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", null, "Do you really want to delete the synonym?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0, true);
int result_dialog= dialog.open();
if (result_dialog != Status.OK){
return null;
config = new TaxonDeletionConfigurator();
((TaxonDeletionConfigurator) config).setDeleteInAllClassifications(true);
DeleteConfiguratorDialog dialog;
- dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", null, "Do you really want to delete the taxon?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
+ dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", null, "Do you really want to delete the taxon?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0, true);
int result_dialog= dialog.open();
if (result_dialog != Status.OK){
return null;
}
} else if (object instanceof TeamOrPersonBase){
-
+ result = controller.getAgentService().isDeletable(((CdmBase) object).getUuid(), null);
errorMessage = "The team or person ";
} else if (object instanceof Media){
config = new MediaDeletionConfigurator();
Media media = HibernateProxyHelper.deproxy(object, Media.class);
DeleteConfiguratorDialog dialog;
- dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", null, "Do you really want to delete the media?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
+ dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", null, "Do you really want to delete the media?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0, true);
int result_dialog= dialog.open();
if (result_dialog != Status.OK){
return null;
@Override
public TeamOrPersonBase save(TeamOrPersonBase entity) {
return (TeamOrPersonBase) CdmStore.getService(IAgentService.class).merge(entity, true).getMergedEntity();
-
+
}
@Override
public boolean delete(TeamOrPersonBase entity, DeleteConfiguratorBase config)
throws ReferencedObjectUndeletableException {
- return CdmStore.getService(IAgentService.class).delete(entity.getUuid()) != null;
+ if (entity.getUuid() != null){
+ return CdmStore.getService(IAgentService.class).delete(entity.getUuid()) != null;
+ }else{
+ return false;
+ }
}
/* (non-Javadoc)
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorConstants;
+import eu.etaxonomy.taxeditor.l10n.Messages;
public enum BulkEditorInputType {
AGENT(Messages.BulkEditorInputType_0, AgentEditorInput.ID),
*
* @author n.hoffmann
* @created Jun 16, 2010
- * @version 1.0
*/
public class OccurrenceEditorInput extends AbstractBulkEditorInput<SpecimenOrObservationBase> {
return instance;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#listEntities(eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator)
- */
/** {@inheritDoc} */
@Override
protected List<SpecimenOrObservationBase> listEntities(
return CdmStore.getSearchManager().findOccurrences(configurator);
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#loadEntity(java.util.UUID)
- */
/** {@inheritDoc}
@Override
protected SpecimenOrObservationBase loadEntity(UUID entityUuid) {
return CdmStore.getService(IOccurrenceService.class).load(entityUuid, propertyPaths);
}*/
- /* (non-Javadoc)
- * @see org.eclipse.ui.IEditorInput#getName()
- */
/**
* <p>getName</p>
*
return BulkEditorInputType.OCCURRENCE.label;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.IEditorInput#getToolTipText()
- */
/**
* <p>getToolTipText</p>
*
return getName();
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getTypeText(java.lang.Object)
- */
@Override
public String getTypeText(Object entity) {
if(HibernateProxyHelper.isInstanceOf(entity, SpecimenOrObservationBase.class)){
return ID;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#delete(java.lang.Object)
- */
/** {@inheritDoc}
* @throws ReferencedObjectUndeletableException */
@Override
return CdmStore.getService(IOccurrenceService.class).delete(entity) != null;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityPersistenceService#save(java.lang.Object)
- */
/** {@inheritDoc} */
@Override
- public SpecimenOrObservationBase<IIdentifiableEntityCacheStrategy> save(SpecimenOrObservationBase entity) {
+ public SpecimenOrObservationBase<?> save(SpecimenOrObservationBase entity) {
return CdmStore.getService(IOccurrenceService.class).merge(entity, true).getMergedEntity();
}
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#createEntityCreator()
- */
@Override
protected IEntityCreator<SpecimenOrObservationBase> createEntityCreator() {
return new OccurrenceCreator();
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput#getSortProviders()
- */
@Override
public List<IBulkEditorSortProvider<SpecimenOrObservationBase>> getSortProviders() {
List<IBulkEditorSortProvider<SpecimenOrObservationBase>> sortProviders = super.getSortProviders();
return sortProviders;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
- */
@Override
public void merge() {
List<String> propertyPaths = Arrays.asList(new String[]{});
return CdmStore.getService(IOccurrenceService.class).load(entityUuid, propertyPaths);
}
-
}
*
* @author p.ciardelli
* @created 25.06.2009
- * @version 1.0
*/
public class ReferenceEditorInput extends AbstractBulkEditorInput<Reference> {
* @throws ReferencedObjectUndeletableException */
@Override
public boolean delete(Reference entity, DeleteConfiguratorBase config) throws ReferencedObjectUndeletableException {
- return CdmStore.getService(IReferenceService.class).delete(entity.getUuid()) != null;
+ if (entity.getUuid() != null){
+ return CdmStore.getService(IReferenceService.class).delete(entity.getUuid()) != null;
+ }else{
+ return false;
+ }
}
/** {@inheritDoc} */
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
*/
public class GroupCreator implements IEntityCreator<Group> {
- /* (non-Javadoc)
+ public static final String GROUP = "Group";
+
+ /* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.String)
*/
@Override
@Override
public Map<Object, String> getKeyLabelPairs() {
Map<Object, String> result = new HashMap<Object, String>();
- result.put(Group.class, "Group");
+ result.put(Group.class, GROUP);
return result;
}
package eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.springframework.security.access.AccessDeniedException;
import eu.etaxonomy.cdm.api.service.IUserService;
import eu.etaxonomy.cdm.model.common.User;
+import eu.etaxonomy.cdm.persistence.query.MatchMode;
import eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
*/
public class UserCreator implements IEntityCreator<User>{
- /* (non-Javadoc)
+ public static final String USER = "User";
+
+ /* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.String)
*/
@Override
public User createEntity(Object key, String text) {
try{
User user = User.NewInstance(text, text);
- CdmStore.getService(IUserService.class).createUser(user);
- user = CdmStore.getService(IUserService.class).loadWithUpdate(user.getUuid());
- return user;
+ List<User> userList =CdmStore.getService(IUserService.class).listByUsername(user.getUsername(), MatchMode.EXACT, null, 100, 0, null, null);
+ if (userList.isEmpty()){
+ CdmStore.getService(IUserService.class).createUser(user);
+ user = CdmStore.getService(IUserService.class).loadWithUpdate(user.getUuid());
+ return user;
+ } else{
+ MessagingUtils.messageDialog(Messages.USER_CREATOR_user_exists_title, user, Messages.USER_CREATOR_user_exists);
+ return null;
+ }
} catch (AccessDeniedException e){
MessagingUtils.messageDialog("Access denied", getClass(), e.getMessage(), e);
return null;
@Override
public Map<Object, String> getKeyLabelPairs() {
Map<Object, String> result = new HashMap<Object, String>();
- result.put(User.class, "User");
+ result.put(User.class, USER);
return result;
}
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
* @version 1.0
*/
public abstract class AbstractDateComparator<T extends ICdmBase> implements Comparator<T>{
-
- public int compare(T o1, T o2) {
+
+ @Override
+ public int compare(T o1, T o2) {
+ if (o1.equals(o2)){
+ return 0;
+ }
+
return getDate(o1).compareTo(getDate(o2));
};
-
+
protected abstract DateTime getDate(T object);
}
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
public class ReferenceSortProvider extends AbstractSortProvider<Reference> {
/**
- *
+ *
*/
public ReferenceSortProvider() {
comparators.put("Type", new ReferenceTypeComparator());
}
private class ReferenceYearComparator implements Comparator<Reference> {
-
+
/**
* @param o1
* @return
*/
private String getYearString(Reference o) {
- TimePeriod datePublished = o == null ? null : o.getDatePublished();
+ TimePeriod datePublished = o == null ? null : o.getDatePublished();
return datePublished == null? null : datePublished.toString();
}
-
+
/* (non-Javadoc)
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
*/
- public int compare(Reference o1, Reference o2) {
+ @Override
+ public int compare(Reference o1, Reference o2) {
String yearString1 = getYearString(o1);
String yearString2 = getYearString(o2);
if (yearString1 == null) {
}
int returnVal = yearString1.compareToIgnoreCase(yearString2);
if (returnVal == 0) {
- return new TitleCacheComparator<Reference>().compare(o1, o2);
- } else {
- return returnVal;
+ returnVal = new TitleCacheComparator<Reference>().compare(o1, o2);
+
}
- }
+ return returnVal;
+
+ }
}
-
+
private class ReferenceTypeComparator implements Comparator<Reference> {
-
+
/* (non-Javadoc)
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
*/
- public int compare(Reference o1, Reference o2) {
+ @Override
+ public int compare(Reference o1, Reference o2) {
String typeString1 = o1.getClass().toString();
String typeString2 = o2.getClass().toString();
if (typeString1 == null) {
}
int returnVal = typeString1.compareToIgnoreCase(typeString2);
if (returnVal == 0) {
+ //the TitleCacheComparator already fulfills the comparator contract
return new TitleCacheComparator<Reference>().compare(o1, o2);
} else {
return returnVal;
}
- }
+ }
}
-
+
}
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
* @version 1.0
*/
public class TitleCacheComparator<T extends IIdentifiableEntity> implements Comparator<T> {
-
+
private boolean fIgnoreCase;
private String getTitleCache(T o) {
return o == null ? null : o.getTitleCache();
}
-
+
/* (non-Javadoc)
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
*/
/** {@inheritDoc} */
- public int compare(T o1, T o2) {
+ @Override
+ public int compare(T o1, T o2) {
String titleCache1 = getTitleCache(o1);
String titleCache2 = getTitleCache(o2);
if (titleCache1 == null && titleCache2 == null) {
}
if (titleCache2 == null) {
return 1;
- }
- return fIgnoreCase ? titleCache1.compareToIgnoreCase(titleCache2) :
+ }
+ int result = fIgnoreCase ? titleCache1.compareToIgnoreCase(titleCache2) :
titleCache1.compareTo(titleCache2);
+
+ if (result == 0){
+ result = o1.getUuid().compareTo(o2.getUuid());
+ }
+ return result;
}
}
--- /dev/null
+/**
+* Copyright (C) 2017 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.bulkeditor.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author k.luther
+ * @date 10.03.2017
+ *
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "src/main/java/eu.etaxonomy.taxeditor.bulkeditor.l10n.messages"; //$NON-NLS-1$
+ public static String ReferencingObjectsLabelProvider_No_description_available;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
--- /dev/null
+ReferencingObjectsLabelProvider_No_description_available=No description available
--- /dev/null
+ReferencingObjectsLabelProvider_No_description_available=Keine Beschreibung verfügbar
\ No newline at end of file
package eu.etaxonomy.taxeditor.bulkeditor.referencingobjects;
+import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.taxeditor.bulkeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.DescriptionHelper;
/**
}
}else if (columnIndex == 3) {
if(element instanceof CdmBase){
- text = ((CdmBase) element).getId() + "";
+ text = ((CdmBase) element).getId() + ""; //$NON-NLS-1$
}
}
- return text == null ? element.toString() : text;
+ return (StringUtils.isBlank(text)) ? Messages.ReferencingObjectsLabelProvider_No_description_available : text;
}
}
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Table;
import org.eclipse.ui.IWorkbenchPart;
+import org.springframework.remoting.RemoteAccessException;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.service.IAgentService;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.model.DescriptionHelper;
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
import eu.etaxonomy.taxeditor.store.CdmStore;
private String referencedObjectTitleCache;
private ConversationHolder conversation;
private final ICdmEntitySession cdmEntitySession;
+ private UUID actualUuid;
+ List<CdmBase> referencingObjects = null;
+ Set<CdmBase> referencingObjectsSet = null;
+ IProgressMonitor actualMonitor = null;
+ private Job currentJob = null;
public ReferencingObjectsView() {
cdmEntitySession = CdmStore.getCurrentSessionManager().bindNullSession();
}
public void updateReferencingObjects(final UUID entityUUID, final Class objectClass) {
-
- final Display display = Display.getCurrent();
-
- Job job = new Job("Update Referencing Objects") {
+ if (actualUuid == entityUUID){
+ return ;
+ }
+ showEmptyPage();
+ if(actualMonitor!=null && !actualMonitor.isCanceled()){
+// boolean success = false;
+// //wait for cancel to be done
+// while(!success){
+// success = currentJob.cancel();
+// }
+// currentJob = null;
+ while(!actualMonitor.isCanceled()){
+ actualMonitor.setCanceled(true);
+ }
+
+ }
+ currentJob = new Job("Update Referencing Objects " + entityUUID) {
@Override
protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("Calculating referencing objects", 10);
-
- monitor.worked(3);
-
- display.asyncExec(new Runnable() {
-
- @Override
- public void run() {
- if (entityUUID != null){
- ICdmEntitySession previousCdmEntitySession = CdmStore.getCurrentSessionManager().getActiveSession();
- cdmEntitySession.bind();
- List<CdmBase> referencingObjects = getReferencingObjects(entityUUID, objectClass);
- if(previousCdmEntitySession != null) {
- previousCdmEntitySession.bind();
- }
- updateView(referencingObjects);
-
- }
- }
- });
+ monitor.beginTask("Calculating referencing objects", 100);
+ actualUuid = entityUUID;
+
+ monitor.worked(5);
+ referencingObjects = new ArrayList<>();
+ if(monitor.isCanceled()) {
+ actualUuid = null;
+ return Status.CANCEL_STATUS;
+ }
+ if (actualMonitor != null){
+ actualMonitor.setCanceled(true);
+ }
+ actualMonitor = monitor;
+ if (entityUUID != null){
+ ICdmEntitySession previousCdmEntitySession = CdmStore.getCurrentSessionManager().getActiveSession();
+ cdmEntitySession.bind();
+ referencingObjectsSet = getReferencingObjects(entityUUID, objectClass);
+
+ if(monitor.isCanceled()) {
+ actualUuid = null;
+
+ return Status.CANCEL_STATUS;
+ }
+ monitor.worked(30);
+ referencingObjects = sortReferencing();
+ if (referencingObjects == null){
+ if (monitor.isCanceled()){
+ actualUuid = null;
+
+ return Status.CANCEL_STATUS;
+ }
+ }
+
+ if(monitor.isCanceled()) {
+ if(previousCdmEntitySession != null) {
+ previousCdmEntitySession.bind();
+ }
+
+ return Status.CANCEL_STATUS;
+ }
+ monitor.worked(80);
+ updateView();
+
+ if(previousCdmEntitySession != null) {
+ previousCdmEntitySession.bind();
+ }
+ // actualUuid = entityUUID;
+ }
monitor.done();
return Status.OK_STATUS;
+
+
}
};
+ currentJob.setUser(true);
+
+ currentJob.schedule();
+// final IJobChangeListener listener;
+// listener = new JobChangeAdapter() {
+// @Override
+// public void done(IJobChangeEvent event) {
+// System.err.println("Job is done" + entityUUID);
+// //event.getJob().cancel();
+// }
+//
+// };
+// currentJob.addJobChangeListener(listener);
+
+
+
- job.setPriority(Job.DECORATE);
- job.schedule();
}
- private List<CdmBase> getReferencingObjects(UUID entity, Class objectClass) {
+ private Set<CdmBase> getReferencingObjects(UUID entity, Class objectClass) {
CdmBase referencedObject = null;
try {
if (objectClass.getSuperclass().equals(TeamOrPersonBase.class) ){
else if(referencedObject.isInstanceOf(DescriptionElementBase.class)){
referencedObjectTitleCache = DescriptionHelper.getLabel(referencedObject);
}
- else{
+ else if (referencedObject.isInstanceOf(User.class)){
+ referencedObjectTitleCache = ((User)referencedObject).getUsername();
+ }else{
referencedObjectTitleCache = null;
}
setOfReferencingObjects = CdmStore.getCommonService().getReferencingObjects(referencedObject);
+ return setOfReferencingObjects;
}
- if (setOfReferencingObjects != null){
- List<CdmBase> referencingObjects = new ArrayList<CdmBase>(setOfReferencingObjects);
- Collections.sort(referencingObjects, new ReferencingClassComparator());
-
- return referencingObjects;
-
- }
} catch (Exception e) {
- logger.error("Error retrieving referencing objects", e);
- setContentDescription("The referencing objects view could not be loaded completely. Some Problems occured.");
+ logger.debug("Error retrieving referencing objects", e);
+ e.printStackTrace();
+ updateDescription("The referencing objects view could not be loaded completely. Some Problems occured.");
}
return null;
}
+ private List<CdmBase> sortReferencing(){
+
+ if (referencingObjectsSet != null){
+ List<CdmBase> referencingObjects = new ArrayList<CdmBase>(referencingObjectsSet);
+ try{
+ Collections.sort(referencingObjects, new ReferencingClassComparator());
+ }catch (RemoteAccessException e){
+ logger.debug(e.getStackTrace());
+ return null;
+ }
+ return referencingObjects;
+
+ }
+
+ return null;
+ }
- class ReferencingClassComparator implements Comparator<CdmBase> {
+
+ class ReferencingClassComparator implements Comparator<CdmBase> {
@Override
public int compare(CdmBase o1, CdmBase o2) {
String string1 = o1.getClass().getSimpleName();
String string2 = o2.getClass().getSimpleName();
- int classCompare = string1.compareToIgnoreCase(string2);
- if (classCompare == 0) {
+ int result = string1.compareToIgnoreCase(string2);
+ if (result == 0) {
string1 = DescriptionHelper.getObjectDescription(o1);
string2 = DescriptionHelper.getObjectDescription(o2);
- return string1.compareToIgnoreCase(string2);
- } else {
- return classCompare;
+
+ result = string1.compareToIgnoreCase(string2);
+ if (result == 0){
+ return o1.getUuid().compareTo(o2.getUuid());
+ }
}
+ return result;
}
}
- private void updateView(List<CdmBase> referencingObjects) {
- if (viewer != null && !viewer.getControl().isDisposed()){
- try{
- viewer.setInput(referencingObjects);
- if (referencedObjectTitleCache != null){
- setContentDescription("'" + referencedObjectTitleCache + "' is referenced by:");
- } else {
- setContentDescription("");
- }
- showViewer();
- //enable/disable table
- viewer.getControl().setEnabled(referencingObjects!=null);
- }catch(Exception e){
- setContentDescription("The referencing objects view could not be loaded completely. Some Problems occured.");
- }
+ private void updateView() {
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ if (viewer != null && !viewer.getControl().isDisposed()){
+ try{
+ viewer.setInput(referencingObjects);
- }
+ showViewer();
+
+ //enable/disable table
+ viewer.getControl().setEnabled(referencingObjects!=null);
+
+ }catch(Exception e){
+ e.printStackTrace();
+ logger.debug(e.getStackTrace());
+ updateDescription("The referencing objects view could not be loaded completely. Some Problems occured.");
+ }
+
+ }
+ }
+ });
}
+
+ private void updateDescription(final String description){
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ if (referencedObjectTitleCache != null){
+ setContentDescription(description);
+ } else {
+ setContentDescription(description);
+ }
+ }
+
+ });
+ }
+
/** {@inheritDoc} */
@Override
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
if(part == this){
return;
}
+
if(selection instanceof IStructuredSelection){
- referencedObjectTitleCache = null;
- showViewer(part, (IStructuredSelection) selection);
+ //referencedObjectTitleCache = null;
+ showViewer(part, (IStructuredSelection) selection);
}
}
firstElement = ((TreeNode) firstElement).getValue();
}
if(firstElement instanceof CdmBase){
- updateReferencingObjects(((CdmBase) firstElement).getUuid(),firstElement.getClass() );
+ CdmBase referencedCdmObject = (CdmBase) firstElement;
+ if (referencedCdmObject.getUuid() == actualUuid){
+ return;
+ }
+ if (referencedCdmObject != null){
+ if(referencedCdmObject.isInstanceOf(IdentifiableEntity.class)){
+ referencedObjectTitleCache = (HibernateProxyHelper.deproxy(referencedCdmObject, IdentifiableEntity.class)).getTitleCache();
+ }
+ else if(referencedCdmObject.isInstanceOf(DescriptionElementBase.class)){
+ referencedObjectTitleCache = DescriptionHelper.getLabel(referencedCdmObject);
+ }
+ else if (referencedCdmObject.isInstanceOf(User.class)){
+ referencedObjectTitleCache = ((User)referencedCdmObject).getUsername();
+ }else if (referencedCdmObject.isInstanceOf(TaxonNode.class)){
+ referencedObjectTitleCache = "TaxonNode of "+(HibernateProxyHelper.deproxy(referencedCdmObject, TaxonNode.class)).getTaxon().getTitleCache();
+ }
+ }
+ if (referencedObjectTitleCache != null){
+ updateDescription("'" + referencedObjectTitleCache + "' is referenced by:");
+ } else{
+ updateDescription("");
+ }
+
+ updateReferencingObjects(referencedCdmObject.getUuid(),firstElement.getClass() );
+
}
- else{
- updateView(null);
- setContentDescription("");
+ else if (firstElement != null){
+ updateView();
+ updateDescription("");
}
}
-package eu.etaxonomy.taxeditor.bulkeditor.input;\r
-\r
-import org.eclipse.osgi.util.NLS;\r
-\r
-public class Messages extends NLS {\r
- private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$\r
- public static String BulkEditorInputType_0;\r
- public static String BulkEditorInputType_1;\r
- public static String BulkEditorInputType_2;\r
- public static String BulkEditorInputType_3;\r
- public static String BulkEditorInputType_4;\r
- public static String BulkEditorInputType_5;\r
- public static String BulkEditorInputType_6;\r
- public static String BulkEditorInputType_7;\r
- public static String BulkEditorInputType_8;\r
- static {\r
- // initialize resource bundle\r
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);\r
- }\r
-\r
- private Messages() {\r
- }\r
-}\r
+package eu.etaxonomy.taxeditor.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "src/main/java/eu.etaxonomy.taxeditor.l10n.messages"; //$NON-NLS-1$
+ public static String USER_CREATOR_user_exists_title;
+ public static String USER_CREATOR_user_exists;
+ public static String BulkEditorInputType_0;
+ public static String BulkEditorInputType_1;
+ public static String BulkEditorInputType_2;
+ public static String BulkEditorInputType_3;
+ public static String BulkEditorInputType_4;
+ public static String BulkEditorInputType_5;
+ public static String BulkEditorInputType_6;
+ public static String BulkEditorInputType_7;
+ public static String BulkEditorInputType_8;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
-BulkEditorInputType_0=Persons and Teams\r
-BulkEditorInputType_1=References\r
-BulkEditorInputType_2=Names\r
-BulkEditorInputType_3=Name Relationships\r
-BulkEditorInputType_4=Specimen and Observations\r
-BulkEditorInputType_5=Users\r
-BulkEditorInputType_6=Groups\r
-BulkEditorInputType_7=Taxa\r
-BulkEditorInputType_8=Media\r
+BulkEditorInputType_0=Persons and Teams
+BulkEditorInputType_1=References
+BulkEditorInputType_2=Names
+BulkEditorInputType_3=Name Relationships
+BulkEditorInputType_4=Specimen and Observations (bulk)
+BulkEditorInputType_5=Users
+BulkEditorInputType_6=Groups
+BulkEditorInputType_7=Taxa
+BulkEditorInputType_8=Media
+
+USER_CREATOR_user_exists_title=The user already exists
+USER_CREATOR_user_exists=The user already exists in database
\ No newline at end of file
-BulkEditorInputType_0=Personen und Teams \r
-BulkEditorInputType_1=Referenzen\r
-BulkEditorInputType_2=Namen\r
-BulkEditorInputType_3=Namensbeziehungen\r
-BulkEditorInputType_4=Belege und Beobachtungen\r
-BulkEditorInputType_5=Nutzer\r
-BulkEditorInputType_6=Nutzergruppen\r
-BulkEditorInputType_7=Taxa\r
-BulkEditorInputType_8=Medien
\ No newline at end of file
+BulkEditorInputType_0=Personen und Teams
+BulkEditorInputType_1=Referenzen
+BulkEditorInputType_2=Namen
+BulkEditorInputType_3=Namensbeziehungen
+BulkEditorInputType_4=Belege und Beobachtungen (bulk)
+BulkEditorInputType_5=Nutzer
+BulkEditorInputType_6=Nutzergruppen
+BulkEditorInputType_7=Taxa
+BulkEditorInputType_8=Medien
+
+USER_CREATOR_user_exists_title=Der Benutzer existiert bereits
+USER_CREATOR_user_exists=Der Benutzer existiert bereits in der Datenbank.
-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-security-oauth2-2.0.11.RELEASE.jar"/>\r
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>\r
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
- <classpathentry kind="src" path="src/main/java"/>\r
- <classpathentry kind="src" path="src/main/resources"/>\r
- <classpathentry exported="true" kind="lib" path="lib/activation-1.1.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/antlr-2.7.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/aopalliance-1.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/apache-log4j-extras-1.2.17.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/aspectjrt-1.8.8.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/aspectjweaver-1.8.8.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/avro-1.6.3.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/batik-anim-1.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/batik-awt-util-1.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/batik-bridge-1.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/batik-css-1.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/batik-dom-1.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/batik-ext-1.8.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/batik-extension-1.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/batik-gvt-1.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/batik-js-1.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/batik-parser-1.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/batik-script-1.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/batik-svg-dom-1.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/batik-svggen-1.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/batik-transcoder-1.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/batik-util-1.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/batik-xml-1.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/c3p0-0.9.5.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-4.5.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-4.5.1.jar" sourcepath="C:/Users/k.luther/.m2/repository/eu/etaxonomy/cdmlib-ext/4.3.0-SNAPSHOT/cdmlib-ext-4.5.1-sources.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-4.5.1.jar" sourcepath="C:/Users/k.luther/.m2/repository/eu/etaxonomy/cdmlib-io/4.3.0-SNAPSHOT/cdmlib-io-4.5.1-sources.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-4.5.1.jar" sourcepath="C:/Users/k.luther/.m2/repository/eu/etaxonomy/cdmlib-model/4.3.0-SNAPSHOT/cdmlib-model-4.5.1-sources.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-4.5.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-4.5.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-4.5.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-4.5.1.jar" sourcepath="C:/Users/k.luther/.m2/repository/eu/etaxonomy/cdmlib-services/4.3.0-SNAPSHOT/cdmlib-services-4.5.1-sources.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cdmlib-test-4.5.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cglib-3.2.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/cglib-nodep-3.2.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/classmate-1.3.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/codemodel-2.2.11.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.aopalliance-1.0.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.apache.commons.logging-1.1.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.9.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/commons-codec-1.10.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/commons-collections-3.2.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/commons-csv-1.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/commons-dbcp-1.4.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/commons-io-2.4.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/commons-lang-2.6.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/commons-lang3-3.3.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/commons-pool-1.5.4.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/concurrent-1.3.4.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/dbunit-2.4.9.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/doxia-core-1.6.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/doxia-logging-api-1.6.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/doxia-module-apt-1.6.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/doxia-module-xhtml-1.6.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/doxia-sink-api-1.6.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/dozer-5.3.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/dtd-parser-1.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/easymock-2.3.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/easymockclassextension-2.3.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/ehcache-core-2.6.11.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/ezmorph-1.0.6.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/FastInfoset-1.2.13.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/fop-1.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/google-api-translate-java-0.92.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/guava-19.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/h2-1.4.190.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/h2mig_pagestore_addon.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hamcrest-core-1.3.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hibernate-c3p0-5.0.7.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hibernate-cglib-repack-2.1_3.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hibernate-commons-annotations-5.0.1.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hibernate-core-5.0.7.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hibernate-ehcache-5.0.7.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hibernate-entitymanager-5.0.7.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-5.0.7.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hibernate-jpa-2.1-api-1.0.0.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hibernate-search-4.2.0.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hibernate-search-analyzers-4.2.0.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hibernate-search-engine-5.5.2.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hibernate-search-orm-5.5.2.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-5.2.2.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-cdi-5.2.2.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/hsqldb-2.3.3.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/httpclient-4.5.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/httpclient-cache-4.2.6.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/httpcore-4.4.4.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/httpmime-4.5.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/icu4j-2.6.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/istack-commons-runtime-2.21.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/istack-commons-tools-2.21.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/itextpdf-5.5.8.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jackson-annotations-2.6.5.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jackson-core-2.6.5.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jackson-core-asl-1.8.8.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jackson-databind-2.6.5.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jackson-mapper-asl-1.8.8.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jakarta-regexp-1.4.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jandex-2.0.0.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/javassist-3.20.0-GA.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/javax.el-2.2.6.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/javax.el-api-2.2.5.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/javax.servlet-api-3.1.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jaxb-api-2.2.12.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jaxb-core-2.2.11.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jaxb-jxc-2.2.11.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jaxb-runtime-2.2.11.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jaxb-xjc-2.2.11.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jaxb1-impl-2.2-EA.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jaxen-1.1.4.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jaxen-1.1.6.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jboss-logging-3.3.0.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jboss-transaction-api_1.1_spec-1.0.0.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jcl-over-slf4j-1.7.6.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jdbc4-2.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jdom-1.1.3.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jdom2-2.0.6.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jena-arq-2.13.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jena-core-2.13.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jena-iri-1.1.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jena-tdb-1.1.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/joda-time-2.9.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/json-20090211.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/json-lib-2.4-jdk15.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jsonld-java-0.5.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jsr250-api-1.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jta-1.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/jtds-1.3.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/junit-4.12.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/junit-benchmarks-0.7.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/libthrift-0.9.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.17.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/lsid-client-1.1.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/lsid-server-1.1.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/lucene-analyzers-common-5.4.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/lucene-backward-codecs-5.4.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/lucene-core-5.4.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/lucene-facet-5.4.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/lucene-grouping-5.4.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/lucene-highlighter-5.4.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/lucene-join-5.4.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/lucene-memory-5.4.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/lucene-misc-5.4.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/lucene-queries-5.4.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/lucene-queryparser-5.4.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/lucene-sandbox-5.4.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/lucene-suggest-5.4.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/mapstruct-1.0.0.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/mchange-commons-java-0.2.11.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/mysql-connector-java-5.1.38.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/objenesis-1.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/odfdom-0.8.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/odfdom-java-0.8.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/ognl-2.6.9.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/opencsv-2.3.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/org.osgi.core-1.0.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/osgi-3.6.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/paranamer-2.3.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/plexus-classworlds-1.2-alpha-9.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/plexus-component-annotations-1.5.5.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/plexus-container-default-1.0-alpha-30.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/plexus-utils-3.0.15.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/poi-3.13.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-3.13.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-schemas-3.13.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/postgresql-9.4-1206-jdbc4.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/relaxngDatatype-20020414.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/rngom-2.2.11.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/sanselan-0.97-incubator.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/Saxon-HE-9.7.0-2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/servlet-api-2.5.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.7.13.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/slf4j-log4j12-1.7.13.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/slf4j-nop-1.7.13.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/snappy-java-1.0.4.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/solr-analysis-extras-3.6.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/solr-core-3.6.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/solr-solrj-3.6.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-aop-4.2.4.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-aspects-4.2.4.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-beans-4.2.4.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-context-4.2.4.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-context-support-4.2.4.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-core-4.2.4.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-expression-4.2.4.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-jdbc-4.2.4.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-modules-cache-0.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-orm-4.2.4.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-oxm-4.2.4.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-plugin-core-1.2.0.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-plugin-metadata-1.2.0.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-security-config-4.0.3.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-security-core-4.0.3.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-security-web-4.0.3.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-test-4.2.4.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-tx-4.2.4.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-web-4.2.4.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/spring-webmvc-4.2.4.RELEASE.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/springfox-core-2.3.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/springfox-schema-2.3.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/springfox-spi-2.3.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/springfox-spring-web-2.3.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/springfox-swagger-common-2.3.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/springfox-swagger2-2.3.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/standard-1.1.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/stax-1.2.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/stax-api-1.0.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/stax-ex-1.7.7.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/swagger-annotations-1.5.6.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/swagger-models-1.5.5.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/tools.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/txw2-2.2.11.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/unitils-core-3.4.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/unitils-database-3.4.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/unitils-dbmaintainer-3.4.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/unitils-dbunit-3.4.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/unitils-easymock-3.4.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/unitils-inject-3.4.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/unitils-mock-3.4.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/unitils-orm-3.4.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/unitils-spring-3.4.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/usertype.jodatime-2.0.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/usertype.spi-2.0.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/validation-api-1.1.0.Final.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/wsdl4j-1.6.3.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/xalan-2.7.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/xercesImpl-2.11.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/xml-apis-1.0.b2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/xml-apis-ext-1.3.04.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/xml-resolver-1.2.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/xmlbeans-2.6.0.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/xmlgraphics-commons-1.5.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/xmlpull-1.1.3.1.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/xmlunit-1.6.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/xom-1.2.5.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/xpp3_min-1.1.4c.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/xpp3-1.1.4c.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/xsom-20140925.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/xstream-1.4.8.jar"/>\r
- <classpathentry exported="true" kind="lib" path="lib/yjp-controller-api-redist-9.0.8.jar"/>\r
- <classpathentry kind="output" path="target/classes"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry exported="true" kind="lib" path="lib/activation-1.1.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/antlr-2.7.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/aopalliance-1.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/apache-log4j-extras-1.2.17.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/aspectjrt-1.8.8.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/aspectjweaver-1.8.8.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/avro-1.6.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/batik-anim-1.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/batik-awt-util-1.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/batik-bridge-1.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/batik-css-1.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/batik-dom-1.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/batik-ext-1.8.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/batik-extension-1.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/batik-gvt-1.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/batik-js-1.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/batik-parser-1.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/batik-script-1.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/batik-svg-dom-1.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/batik-svggen-1.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/batik-transcoder-1.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/batik-util-1.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/batik-xml-1.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/c3p0-0.9.5.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-commons-4.6.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-ext-4.6.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-io-4.6.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-model-4.6.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-persistence-4.6.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-print-4.6.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-remote-4.6.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-services-4.6.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/cdmlib-test-4.6.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/cglib-3.2.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/cglib-nodep-3.2.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/classmate-1.3.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/codemodel-2.2.11.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.aopalliance-1.0.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/com.springsource.org.apache.commons.logging-1.1.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-beanutils-1.9.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-codec-1.10.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-collections-3.2.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-csv-1.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-dbcp-1.4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-io-2.4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-lang-2.6.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-lang3-3.3.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/commons-pool-1.5.4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/concurrent-1.3.4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/dbunit-2.4.9.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/dom4j-1.6.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/doxia-core-1.6.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/doxia-logging-api-1.6.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/doxia-module-apt-1.6.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/doxia-module-xhtml-1.6.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/doxia-sink-api-1.6.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/dozer-5.3.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/dtd-parser-1.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/easymock-2.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/easymockclassextension-2.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/ehcache-core-2.6.11.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/ezmorph-1.0.6.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/FastInfoset-1.2.13.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/fop-1.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/google-api-translate-java-0.92.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/guava-19.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/h2-1.4.190.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/h2mig_pagestore_addon.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hamcrest-core-1.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate-c3p0-5.0.7.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate-cglib-repack-2.1_3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate-commons-annotations-5.0.1.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate-core-5.0.7.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate-ehcache-5.0.7.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate-entitymanager-5.0.7.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate-envers-5.0.7.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate-jpa-2.1-api-1.0.0.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate-search-4.2.0.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate-search-analyzers-4.2.0.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate-search-engine-5.5.2.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate-search-orm-5.5.2.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-5.2.2.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hibernate-validator-cdi-5.2.2.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/hsqldb-2.3.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/httpclient-4.5.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/httpclient-cache-4.2.6.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/httpcore-4.4.4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/httpmime-4.5.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/icu4j-2.6.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/identificationKeyAPI-1.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/istack-commons-runtime-2.21.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/istack-commons-tools-2.21.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/itextpdf-5.5.8.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jackson-annotations-2.6.5.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jackson-core-2.6.5.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jackson-core-asl-1.8.8.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jackson-databind-2.6.5.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jackson-mapper-asl-1.8.8.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jakarta-regexp-1.4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jandex-2.0.0.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/javassist-3.20.0-GA.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/javax.el-2.2.6.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/javax.el-api-2.2.5.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/javax.servlet-api-3.1.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jaxb-api-2.2.12.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jaxb-core-2.2.11.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jaxb-jxc-2.2.11.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jaxb-runtime-2.2.11.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jaxb-xjc-2.2.11.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jaxb1-impl-2.2-EA.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jaxen-1.1.4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jaxen-1.1.6.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jboss-logging-3.3.0.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jboss-transaction-api_1.1_spec-1.0.0.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jcl-over-slf4j-1.7.6.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jdbc4-2.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jdom-1.1.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jdom2-2.0.6.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jena-arq-2.13.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jena-core-2.13.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jena-iri-1.1.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jena-tdb-1.1.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/joda-time-2.9.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/json-20090211.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/json-lib-2.4-jdk15.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jsonld-java-0.5.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jsr250-api-1.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jta-1.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/jtds-1.3.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/junit-4.12.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/junit-benchmarks-0.7.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/libthrift-0.9.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.17.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/lsid-client-1.1.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/lsid-server-1.1.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/lucene-analyzers-common-5.4.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/lucene-backward-codecs-5.4.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/lucene-core-5.4.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/lucene-facet-5.4.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/lucene-grouping-5.4.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/lucene-highlighter-5.4.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/lucene-join-5.4.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/lucene-memory-5.4.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/lucene-misc-5.4.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/lucene-queries-5.4.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/lucene-queryparser-5.4.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/lucene-sandbox-5.4.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/lucene-suggest-5.4.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/mapstruct-1.0.0.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/mchange-commons-java-0.2.11.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/mysql-connector-java-5.1.38.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/objenesis-1.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/odfdom-0.8.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/odfdom-java-0.8.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/ognl-2.6.9.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/opencsv-2.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/org.osgi.core-1.0.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/osgi-3.6.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/paranamer-2.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/plexus-classworlds-1.2-alpha-9.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/plexus-component-annotations-1.5.5.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/plexus-container-default-1.0-alpha-30.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/plexus-utils-3.0.15.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/poi-3.13.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-3.13.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/poi-ooxml-schemas-3.13.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/postgresql-9.4-1206-jdbc4.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/relaxngDatatype-20020414.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/rngom-2.2.11.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/sanselan-0.97-incubator.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/Saxon-HE-9.7.0-2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/servlet-api-2.5.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.7.13.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/slf4j-log4j12-1.7.13.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/slf4j-nop-1.7.13.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/snappy-java-1.0.4.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/solr-analysis-extras-3.6.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/solr-core-3.6.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/solr-solrj-3.6.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-aop-4.2.4.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-aspects-4.2.4.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-beans-4.2.4.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-context-4.2.4.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-context-support-4.2.4.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-core-4.2.4.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-expression-4.2.4.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-jdbc-4.2.4.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-modules-cache-0.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-orm-4.2.4.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-oxm-4.2.4.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-plugin-core-1.2.0.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-plugin-metadata-1.2.0.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-security-config-4.0.3.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-security-core-4.0.3.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-security-web-4.0.3.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-test-4.2.4.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-tx-4.2.4.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-web-4.2.4.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-webmvc-4.2.4.RELEASE.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/springfox-core-2.3.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/springfox-schema-2.3.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/springfox-spi-2.3.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/springfox-spring-web-2.3.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/springfox-swagger-common-2.3.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/springfox-swagger2-2.3.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/standard-1.1.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/stax-1.2.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/stax-api-1.0.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/stax-ex-1.7.7.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/swagger-annotations-1.5.6.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/swagger-models-1.5.5.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/tools.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/txw2-2.2.11.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/unitils-core-3.4.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/unitils-database-3.4.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/unitils-dbmaintainer-3.4.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/unitils-dbunit-3.4.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/unitils-easymock-3.4.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/unitils-inject-3.4.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/unitils-mock-3.4.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/unitils-orm-3.4.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/unitils-spring-3.4.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/usertype.jodatime-2.0.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/usertype.spi-2.0.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/validation-api-1.1.0.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/wsdl4j-1.6.3.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/xalan-2.7.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/xercesImpl-2.11.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/xml-apis-1.0.b2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/xml-apis-ext-1.3.04.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/xml-resolver-1.2.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/xmlbeans-2.6.0.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/xmlgraphics-commons-1.5.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/xmlpull-1.1.3.1.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/xmlunit-1.6.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/xom-1.2.5.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/xpp3_min-1.1.4c.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/xpp3-1.1.4c.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/xsom-20140925.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/xstream-1.4.8.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/yjp-controller-api-redist-9.0.8.jar"/>
+ <classpathentry exported="true" kind="lib" path="lib/spring-security-oauth2-2.0.11.RELEASE.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Bundle-ManifestVersion: 2
Bundle-Name: CDM Library Dependencies Plugin
Bundle-SymbolicName: eu.etaxonomy.taxeditor.cdmlib;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
Eclipse-BundleShape: dir
Export-Package: com.google.api,
com.google.api.detect,
lib/batik-util-1.7.jar,
lib/batik-xml-1.7.jar,
lib/c3p0-0.9.5.2.jar,
- lib/cdmlib-commons-4.5.1.jar,
- lib/cdmlib-ext-4.5.1.jar,
- lib/cdmlib-io-4.5.1.jar,
- lib/cdmlib-model-4.5.1.jar,
- lib/cdmlib-persistence-4.5.1.jar,
- lib/cdmlib-print-4.5.1.jar,
- lib/cdmlib-remote-4.5.1.jar,
- lib/cdmlib-services-4.5.1.jar,
- lib/cdmlib-test-4.5.1.jar,
+ lib/cdmlib-commons-4.6.0.jar,
+ lib/cdmlib-ext-4.6.0.jar,
+ lib/cdmlib-io-4.6.0.jar,
+ lib/cdmlib-model-4.6.0.jar,
+ lib/cdmlib-persistence-4.6.0.jar,
+ lib/cdmlib-print-4.6.0.jar,
+ lib/cdmlib-remote-4.6.0.jar,
+ lib/cdmlib-services-4.6.0.jar,
+ lib/cdmlib-test-4.6.0.jar,
lib/cglib-3.2.0.jar,
lib/cglib-nodep-3.2.0.jar,
lib/classmate-1.3.1.jar,
lib/batik-util-1.7.jar,\
lib/batik-xml-1.7.jar,\
lib/c3p0-0.9.5.2.jar,\
- lib/cdmlib-commons-4.5.1.jar,\
- lib/cdmlib-ext-4.5.1.jar,\
- lib/cdmlib-io-4.5.1.jar,\
- lib/cdmlib-model-4.5.1.jar,\
- lib/cdmlib-persistence-4.5.1.jar,\
- lib/cdmlib-print-4.5.1.jar,\
- lib/cdmlib-remote-4.5.1.jar,\
- lib/cdmlib-services-4.5.1.jar,\
- lib/cdmlib-test-4.5.1.jar,\
+ lib/cdmlib-commons-4.6.0.jar,\
+ lib/cdmlib-ext-4.6.0.jar,\
+ lib/cdmlib-io-4.6.0.jar,\
+ lib/cdmlib-model-4.6.0.jar,\
+ lib/cdmlib-persistence-4.6.0.jar,\
+ lib/cdmlib-print-4.6.0.jar,\
+ lib/cdmlib-remote-4.6.0.jar,\
+ lib/cdmlib-services-4.6.0.jar,\
+ lib/cdmlib-test-4.6.0.jar,\
lib/cglib-3.2.0.jar,\
lib/cglib-nodep-3.2.0.jar,\
lib/classmate-1.3.1.jar,\
<parent>\r
<groupId>eu.etaxonomy</groupId>\r
<artifactId>taxeditor-parent</artifactId>\r
- <version>4.5.1</version>\r
+ <version>4.6.0</version>\r
</parent>\r
<modelVersion>4.0.0</modelVersion>\r
<artifactId>eu.etaxonomy.taxeditor.cdmlib</artifactId>\r
import eu.etaxonomy.cdm.api.service.IPreferenceService;\r
import eu.etaxonomy.cdm.api.service.IProgressMonitorService;\r
import eu.etaxonomy.cdm.api.service.IReferenceService;\r
+import eu.etaxonomy.cdm.api.service.IRightsService;\r
import eu.etaxonomy.cdm.api.service.IService;\r
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;\r
import eu.etaxonomy.cdm.api.service.ITaxonService;\r
*\r
*/\r
@Component\r
-public class CdmApplicationRemoteConfiguration implements ICdmApplicationConfiguration, ApplicationContextAware {\r
+public class CdmApplicationRemoteConfiguration implements ICdmRepository, ApplicationContextAware {\r
\r
@SuppressWarnings("unused")\r
private static final Logger logger = Logger.getLogger(CdmApplicationRemoteConfiguration.class);\r
return (ITermService) getService(ITermService.class, "/remoting/term.service", new TermServiceRequestExecutor());\r
}\r
\r
+ @Override\r
+ public IRightsService getRightsService(){\r
+ return (IRightsService) getService(IRightsService.class, "/remoting/rights.service", new CdmServiceRequestExecutor());\r
+ }\r
+\r
@Override\r
public ICommonService getCommonService(){\r
return (ICommonService) getService(ICommonService.class, "/remoting/common.service", new CdmServiceRequestExecutor());\r
public IGroupService getGroupService(){\r
return (IGroupService) getService(IGroupService.class, "/remoting/group.service", new CdmServiceRequestExecutor());\r
}\r
- \r
+\r
@Override\r
public IPreferenceService getPreferenceService(){\r
return (IPreferenceService) getService(IPreferenceService.class, "/remoting/preference.service", new CdmServiceRequestExecutor());\r
private static CdmApplicationState cdmApplicationState;
- private ICdmApplicationConfiguration appConfig;
+ private ICdmRepository appConfig;
private ICdmDataChangeService dataChangeService;
return cdmApplicationState;
}
- public void setAppConfig(ICdmApplicationConfiguration appConfig) {
+ public void setAppConfig(ICdmRepository appConfig) {
this.appConfig = appConfig;
if(appConfig instanceof CdmApplicationRemoteController) {
CdmBase.setNewEntityListener(new DefaultNewEntityListener());
}
}
- public ICdmApplicationConfiguration getAppConfig() {
+ public ICdmRepository getAppConfig() {
return appConfig;
}
- public static void setCurrentAppConfig(ICdmApplicationConfiguration appConfig) {
+ public static void setCurrentAppConfig(ICdmRepository appConfig) {
getInstance().setAppConfig(appConfig);
}
- public static ICdmApplicationConfiguration getCurrentAppConfig() {
+ public static ICdmRepository getCurrentAppConfig() {
return getInstance().getAppConfig();
}
/**
- * Generic method that will scan the getters of {@link ICdmApplicationConfiguration} for the given service
+ * Generic method that will scan the getters of {@link ICdmRepository} for the given service
* interface. If a matching getter is found the according service implementation is returned by
* invoking the getter otherwise the method returns <code>null</code>.
*
* @throws CdmApplicationException
*/
public static <T extends IService> T getService(Class<T> serviceClass) throws CdmApplicationException {
- ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+ ICdmRepository configuration = getCurrentAppConfig();
- Method[] methods = ICdmApplicationConfiguration.class.getDeclaredMethods();
+ Method[] methods = ICdmRepository.class.getDeclaredMethods();
T service = null;
* As ICommonService is not extending IService we need a specific request here
*/
public static ICommonService getCommonService() {
- ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+ ICdmRepository configuration = getCurrentAppConfig();
return configuration.getCommonService();
}
public static IIOService getIOService() {
- ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+ ICdmRepository configuration = getCurrentAppConfig();
return ((CdmApplicationRemoteController)configuration).getIOService();
public static ITestService getTestService() {
- ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+ ICdmRepository configuration = getCurrentAppConfig();
return ((CdmApplicationRemoteController)configuration).getTestService();
}
public static ICachedCommonService getCachedCommonService() {
- ICdmApplicationConfiguration configuration = getCurrentAppConfig();
+ ICdmRepository configuration = getCurrentAppConfig();
return ((CdmApplicationRemoteController)configuration).getCachedCommonService();
package eu.etaxonomy.cdm.api.cache;
+import java.io.File;
import java.util.UUID;
-import net.sf.ehcache.config.CacheConfiguration;
-import net.sf.ehcache.config.SizeOfPolicyConfiguration;
-
import org.springframework.stereotype.Component;
import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.config.EhCacheConfiguration;
+import eu.etaxonomy.cdm.common.CdmUtils;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
import eu.etaxonomy.cdm.model.common.TermBase;
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManagerObserver;
+import net.sf.ehcache.config.CacheConfiguration;
+import net.sf.ehcache.config.DiskStoreConfiguration;
+import net.sf.ehcache.config.SizeOfPolicyConfiguration;
/**
* Class which uses CDM services to cache cdm entities
*
* @param <T>
*/
-@Component
-public class CdmServiceCacher extends CdmCacher implements ICdmEntitySessionManagerObserver {
-
+@Component //FIXME This indicates that the CdmServiceCacher is initialized as Spring Component but it seems only to be instantiated directly
+public class CdmServiceCacher extends CdmCacher implements ICdmEntitySessionManagerObserver {
private ICdmEntitySessionManager cdmEntitySessionManager;
@Override
protected void setup() {
+
+ setUpCacheManager();
+
DefinedTermBase.setCacher(this);
CdmTransientEntityCacher.setDefaultCacher(this);
TermServiceRequestExecutor.setDefaultCacher(this);
cacheLoader = new CacheLoader(this);
+
+ }
+
+
+ /**
+ *
+ */
+ private void setUpCacheManager() {
+
+ EhCacheConfiguration cacheConfig = new EhCacheConfiguration();
+
+ DiskStoreConfiguration diskStoreConfiguration = new DiskStoreConfiguration();
+ File ehcacheFolder = CdmUtils.getCdmSubDir("taxeditor-ehcache");
+ // FIXME use subfolder per taxeditor version to allow running multiple installations in parallel
+ // String taxEditorVersion = ..;
+ // File ehcacheFolder = new File(ehcacheFolder, taxEditorVersion);
+ diskStoreConfiguration.setPath(ehcacheFolder.getAbsolutePath());
+
+ cacheConfig.setDiskStoreConfiguration(diskStoreConfiguration);
+ addCacheManager(cacheConfig.cacheManager());
+
}
import org.osgi.framework.Bundle;
+/**
+ * This class serializing and deserializing the CDM model for performance purposes.
+ * To serialize it see the comments on {@link #main(String[])} and on
+ * https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/TaxonomicEditorDevelopersGuide#Model-Change-Actions
+ *
+ * @author c.mathew
+ * @date 2015
+ *
+ */
public class CdmModelCacher {
-
-
public static String HB_CONFIG_FILE_PATH= "/eu/etaxonomy/cdm/mappings/hibernate.cfg.xml";
public static final String CDM_MAP_SER_FILE_PATH = "resources/cdm.map.ser";
FileInputStream fin = new FileInputStream(modelMapFilePath);
ObjectInputStream ois = new ObjectInputStream(fin);
- Map<String, CdmModelFieldPropertyFromClass> modelClassMap = (Map<String, CdmModelFieldPropertyFromClass>) ois.readObject();
+ @SuppressWarnings("unchecked")
+ Map<String, CdmModelFieldPropertyFromClass> modelClassMap = (Map<String, CdmModelFieldPropertyFromClass>) ois.readObject();
ois.close();
return modelClassMap;
}
// To re-create the serialised cdm map run,
// mvn exec:java -Dexec.mainClass="eu.etaxonomy.taxeditor.remoting.cache.CdmModelCacher"
// in the eu.etaxonomy.taxeditor.cdmlib project root dir
+ // See also https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/TaxonomicEditorDevelopersGuide#Model-Change-Actions
+ //Note AM: does not fully work for me, but running the main from the IDE works.
String CDM_MAP_SER_DIR = "resources/";
CdmModelCacher cdmModelCacher = new CdmModelCacher();
/**
* This is a very preliminary class to get the model cache running. Need to better understand how
* the datasource works with hibernate service registry before implementing the correct way.
+
* Or use a running source.
+ *
+ * When changing this class please also adapt https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/TaxonomicEditorDevelopersGuide#Model-Change-Actions
+ *
* @author a.mueller
*
*/
public class CdmModelCacherConnectionProvider extends DatasourceConnectionProviderImpl{
+ private static final long serialVersionUID = 454393966637126346L;
public CdmModelCacherConnectionProvider() {
super();
import java.util.Set;
import java.util.UUID;
-import net.sf.ehcache.Cache;
-import net.sf.ehcache.CacheManager;
-import net.sf.ehcache.Element;
-import net.sf.ehcache.Status;
-import net.sf.ehcache.config.CacheConfiguration;
-import net.sf.ehcache.config.SizeOfPolicyConfiguration;
-import net.sf.ehcache.statistics.LiveCacheStatistics;
-
import org.apache.log4j.Logger;
import eu.etaxonomy.cdm.api.application.CdmApplicationState;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.persistence.dto.MergeResult;
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionManager;
+import net.sf.ehcache.Cache;
+import net.sf.ehcache.CacheManager;
+import net.sf.ehcache.Element;
+import net.sf.ehcache.Status;
+import net.sf.ehcache.config.CacheConfiguration;
+import net.sf.ehcache.config.SizeOfPolicyConfiguration;
+import net.sf.ehcache.statistics.LiveCacheStatistics;
/**
*
RemoteInvocationResult rir = fromCache(currentRemoteInvocation);
if(rir == null) {
- logger.info("Remote invoking : " + currentRemoteInvocation.getMethodName() + "@" + config.getServiceUrl());
- rir = super.doExecuteRequest(config, baos);
+
+ if (!(currentRemoteInvocation.getMethodName() == null) && !(config.getServiceUrl() == null)){
+ // logger.info("Remote invoking : " + currentRemoteInvocation.getMethodName() + "@" + config.getServiceUrl());
+ }
+ rir = super.doExecuteRequest(config, baos);
if(rir.getValue() != null && !rir.hasException()) {
+ if (currentRemoteInvocation == null){
+ logger.debug("return RemoteInvocationResult without caching" );
+ return rir;
+ }
if(cachableMethods.contains(currentRemoteInvocation.getMethodName())) {
rir = new RemoteInvocationResult(cdmEntitySessionManager.load(rir.getValue(), true));
} else if(rir.getValue() instanceof UpdateResult){
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!DOCTYPE hibernate-configuration PUBLIC\r
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"\r
- "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">\r
-\r
-<hibernate-configuration>\r
- <session-factory>\r
-\r
- <property name="connection.release_mode">after_transaction</property>\r
- \r
- <property name="hibernate.implicit_naming_strategy">org.hibernate.boot.model.naming.ImplicitNamingStrategyComponentPathImpl</property>\r
- \r
-\r
- <!-- Connection Pooling -->\r
-<!-- <property name="hibernate.connection.provider_class">org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider</property> -->\r
- <!-- <property name="hibernate.connection.provider_class">org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl</property>\r
- -->\r
- <property name="hibernate.connection.provider_class">eu.etaxonomy.taxeditor.remoting.cache.CdmModelCacherConnectionProvider</property>\r
- \r
- <!--\r
- Configuring the C3P0ConnectionProvider\r
- ========================================\r
- see http://www.mchange.com/projects/c3p0/index.html#hibernate-specific\r
- and also org.springframework.orm.hibernate3.AbstractSessionFactoryBean.setDataSource(DataSource dataSource)\r
-\r
- IMPORTANT:\r
- Because of the constraint (1) the org.hibernate.connection.C3P0ConnectionProvider are not be used\r
- for the Cdm Library because it requires the dataSource bean in some cases.\r
-\r
- (1)\r
- Do NOT specify the dataSource in the sessionFactory for example in the\r
- org.springframework.orm.hibernate3.LocalSessionFactoryBean\r
- !!!==> If *dataSource* is set, this will override corresponding settings in Hibernate properties.!!!\r
- If this is set, the Hibernate settings should not define a connection provider to\r
- avoid meaningless double configuration.\r
- (2)\r
- Hibernate uses the hibernate.c3p0.max_size property to determine if c3p0\r
- is beeing used. Therefore the max_size property MUST be set. - maybe not need in hibernate 3.4 +\r
-\r
- (3) If you are using Hibernate's C3P0ConnectionProvider you must set the following properties\r
- in your hibernate configuration, using hibernate-specific configuration keys.\r
- All other properties must be defined as usual in a c3p0.properties file.\r
- This is confusing, and will hopefully be simplified some time in the future, but for now...\r
- \r
- DOCUMENTATION UPDATE (2015-05-22):\r
- Hibernate's C3P0ConnectionProvider renames 7 c3p0 configuration properties, which, \r
- if set in your hibernate configuration, will override any configuration you may have set \r
- in a c3p0.properties file.\r
- TODO: are points (2) and (3) still valid? I don't think so! (AK)\r
-\r
- hibernate.c3p0.acquire_increment\r
- hibernate.c3p0.idle_test_period\r
- hibernate.c3p0.timeout\r
- hibernate.c3p0.max_size\r
- hibernate.c3p0.max_statements\r
- hibernate.c3p0.min_size\r
- hibernate.c3p0.validate\r
- -->\r
- <mapping package="eu.etaxonomy.cdm.model.common"/>\r
- <!-- Annotation Package -->\r
- <mapping class="eu.etaxonomy.cdm.model.agent.Address"/>\r
- <mapping class="eu.etaxonomy.cdm.model.agent.AgentBase"/>\r
- <mapping class="eu.etaxonomy.cdm.model.agent.Contact"/>\r
- <mapping class="eu.etaxonomy.cdm.model.agent.Institution"/>\r
- <mapping class="eu.etaxonomy.cdm.model.agent.InstitutionalMembership"/>\r
- <mapping class="eu.etaxonomy.cdm.model.agent.Person"/>\r
- <mapping class="eu.etaxonomy.cdm.model.agent.Team"/>\r
- <mapping class="eu.etaxonomy.cdm.model.agent.TeamOrPersonBase"/>\r
- <!-- Common Package -->\r
- <mapping class="eu.etaxonomy.cdm.model.common.Annotation"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.AnnotationType"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.Credit"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.DefinedTerm"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.DefinedTermBase"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.Extension"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.ExtensionType"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.IdentifiableSource"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.Identifier"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.IntextReference"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.Group"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.Language"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.LanguageString"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.LSID"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.LSIDAuthority"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.Marker"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.MarkerType"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.OrderedTerm"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.OrderedTermBase"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.OrderedTermVocabulary"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.OriginalSourceBase"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.RelationshipTermBase"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.Representation"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.TermVocabulary"/>\r
- <mapping class="eu.etaxonomy.cdm.model.common.User"/>\r
- <!-- Description Package -->\r
- <mapping class="eu.etaxonomy.cdm.model.description.CategoricalData"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.CommonTaxonName"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.DescriptionBase"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.DescriptionElementBase"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.DescriptionElementSource"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.Distribution"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.Feature"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.FeatureNode"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.FeatureTree"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.KeyStatement"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.MediaKey"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.IndividualsAssociation"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.MeasurementUnit"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.MultiAccessKey"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.PolytomousKey"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.PolytomousKeyNode"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.QuantitativeData"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.SpecimenDescription"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.State"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.StateData"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.StatisticalMeasure"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.TaxonDescription"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.TaxonInteraction"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.TaxonNameDescription"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.TextData"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.TextFormat"/>\r
- <mapping class="eu.etaxonomy.cdm.model.description.WorkingSet"/>\r
- <!-- Location Package -->\r
- <mapping class="eu.etaxonomy.cdm.model.location.NamedArea"/>\r
- <mapping class="eu.etaxonomy.cdm.model.location.NamedAreaLevel"/>\r
- <mapping class="eu.etaxonomy.cdm.model.location.NamedAreaType"/>\r
- <mapping class="eu.etaxonomy.cdm.model.location.ReferenceSystem"/>\r
- <mapping class="eu.etaxonomy.cdm.model.location.Point"/>\r
- <mapping class="eu.etaxonomy.cdm.model.location.Country"/>\r
- <!-- Media Package -->\r
- <mapping class="eu.etaxonomy.cdm.model.media.AudioFile"/>\r
- <mapping class="eu.etaxonomy.cdm.model.media.ImageFile"/>\r
- <mapping class="eu.etaxonomy.cdm.model.media.Media"/>\r
- <mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentation"/>\r
- <mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentationPart"/>\r
- <mapping class="eu.etaxonomy.cdm.model.media.MovieFile"/>\r
- <mapping class="eu.etaxonomy.cdm.model.media.Rights"/>\r
- <mapping class="eu.etaxonomy.cdm.model.media.RightsType"/>\r
- <!-- Meta Data Package -->\r
- <mapping class="eu.etaxonomy.cdm.model.metadata.CdmMetaData"/>\r
- <mapping class="eu.etaxonomy.cdm.model.metadata.CdmPreference"/>\r
- <!-- Molecular Package -->\r
- <mapping class="eu.etaxonomy.cdm.model.molecular.PhylogeneticTree"/>\r
- <mapping class="eu.etaxonomy.cdm.model.molecular.DnaQuality"/>\r
- <mapping class="eu.etaxonomy.cdm.model.molecular.DnaSample"/>\r
- <mapping class="eu.etaxonomy.cdm.model.molecular.Amplification"/>\r
- <mapping class="eu.etaxonomy.cdm.model.molecular.AmplificationResult"/>\r
- <mapping class="eu.etaxonomy.cdm.model.molecular.Primer"/>\r
- <mapping class="eu.etaxonomy.cdm.model.molecular.Sequence"/>\r
- <mapping class="eu.etaxonomy.cdm.model.molecular.SequenceString"/>\r
- <mapping class="eu.etaxonomy.cdm.model.molecular.SingleRead"/>\r
- <mapping class="eu.etaxonomy.cdm.model.molecular.SingleReadAlignment"/>\r
- <mapping class="eu.etaxonomy.cdm.model.molecular.Cloning"/>\r
- <!-- Name Package -->\r
- <mapping class="eu.etaxonomy.cdm.model.name.BacterialName"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.BotanicalName"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.CultivarPlantName"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.HomotypicalGroup"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.HybridRelationship"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.HybridRelationshipType"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.NameRelationship"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.NameRelationshipType"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.NameTypeDesignation"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalCode"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalStatus"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalStatusType"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.NonViralName"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.Rank"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.TaxonNameBase"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.TypeDesignationBase"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.ViralName"/>\r
- <mapping class="eu.etaxonomy.cdm.model.name.ZoologicalName"/>\r
- <!-- Occurrence Package -->\r
- <mapping class="eu.etaxonomy.cdm.model.occurrence.Collection"/>\r
- <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivationEvent"/>\r
- <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivationEventType"/>\r
- <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivedUnit"/>\r
- <mapping class="eu.etaxonomy.cdm.model.occurrence.MaterialOrMethodEvent"/>\r
- <mapping class="eu.etaxonomy.cdm.model.occurrence.MediaSpecimen"/>\r
- <mapping class="eu.etaxonomy.cdm.model.occurrence.DeterminationEvent"/>\r
- <mapping class="eu.etaxonomy.cdm.model.occurrence.FieldUnit"/>\r
- <mapping class="eu.etaxonomy.cdm.model.occurrence.GatheringEvent"/>\r
- <mapping class="eu.etaxonomy.cdm.model.occurrence.PreservationMethod"/>\r
- <mapping class="eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase"/>\r
- <!-- Reference Package -->\r
- <mapping class="eu.etaxonomy.cdm.model.reference.Reference"/>\r
-\r
- <!-- Taxon Package -->\r
- <mapping class="eu.etaxonomy.cdm.model.taxon.Synonym"/>\r
- <mapping class="eu.etaxonomy.cdm.model.taxon.SynonymType"/>\r
- <mapping class="eu.etaxonomy.cdm.model.taxon.Taxon"/>\r
- <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonBase"/>\r
- <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonNode"/>\r
- <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonNodeAgentRelation"/>\r
- <mapping class="eu.etaxonomy.cdm.model.taxon.Classification"/>\r
- <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonRelationship"/>\r
- <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType"/>\r
- \r
- <!-- Validation Package -->\r
- <mapping class="eu.etaxonomy.cdm.model.validation.EntityValidation"/>\r
- <mapping class="eu.etaxonomy.cdm.model.validation.EntityConstraintViolation"/>\r
- \r
- <!-- View Package -->\r
- <mapping class="eu.etaxonomy.cdm.model.view.AuditEvent"/>\r
- \r
-\r
-\r
- </session-factory>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <property name="connection.release_mode">after_transaction</property>
+
+ <property name="hibernate.implicit_naming_strategy">org.hibernate.boot.model.naming.ImplicitNamingStrategyComponentPathImpl</property>
+ <!-- NOTE: if integrated in spring this is handled there (see persistence.xml) -->
+
+ <!-- Connection Pooling -->
+<!-- <property name="hibernate.connection.provider_class">org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider</property> -->
+<!-- <property name="hibernate.connection.provider_class">org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl</property> -->
+ <property name="hibernate.connection.provider_class">eu.etaxonomy.taxeditor.remoting.cache.CdmModelCacherConnectionProvider</property>
+
+ <!--
+ Configuring the C3P0ConnectionProvider
+ ========================================
+ see http://www.mchange.com/projects/c3p0/index.html#hibernate-specific
+ and also org.springframework.orm.hibernate3.AbstractSessionFactoryBean.setDataSource(DataSource dataSource)
+
+ IMPORTANT:
+ Because of the constraint (1) the org.hibernate.connection.C3P0ConnectionProvider are not be used
+ for the Cdm Library because it requires the dataSource bean in some cases.
+
+ (1)
+ Do NOT specify the dataSource in the sessionFactory for example in the
+ org.springframework.orm.hibernate3.LocalSessionFactoryBean
+ !!!==> If *dataSource* is set, this will override corresponding settings in Hibernate properties.!!!
+ If this is set, the Hibernate settings should not define a connection provider to
+ avoid meaningless double configuration.
+ (2)
+ Hibernate uses the hibernate.c3p0.max_size property to determine if c3p0
+ is beeing used. Therefore the max_size property MUST be set. - maybe not need in hibernate 3.4 +
+
+ (3) If you are using Hibernate's C3P0ConnectionProvider you must set the following properties
+ in your hibernate configuration, using hibernate-specific configuration keys.
+ All other properties must be defined as usual in a c3p0.properties file.
+ This is confusing, and will hopefully be simplified some time in the future, but for now...
+
+ DOCUMENTATION UPDATE (2015-05-22):
+ Hibernate's C3P0ConnectionProvider renames 7 c3p0 configuration properties, which,
+ if set in your hibernate configuration, will override any configuration you may have set
+ in a c3p0.properties file.
+ TODO: are points (2) and (3) still valid? I don't think so! (AK)
+
+ hibernate.c3p0.acquire_increment
+ hibernate.c3p0.idle_test_period
+ hibernate.c3p0.timeout
+ hibernate.c3p0.max_size
+ hibernate.c3p0.max_statements
+ hibernate.c3p0.min_size
+ hibernate.c3p0.validate
+ -->
+ <mapping package="eu.etaxonomy.cdm.model.common"/>
+ <!-- Annotation Package -->
+ <mapping class="eu.etaxonomy.cdm.model.agent.Address"/>
+ <mapping class="eu.etaxonomy.cdm.model.agent.AgentBase"/>
+ <mapping class="eu.etaxonomy.cdm.model.agent.Contact"/>
+ <mapping class="eu.etaxonomy.cdm.model.agent.Institution"/>
+ <mapping class="eu.etaxonomy.cdm.model.agent.InstitutionalMembership"/>
+ <mapping class="eu.etaxonomy.cdm.model.agent.Person"/>
+ <mapping class="eu.etaxonomy.cdm.model.agent.Team"/>
+ <mapping class="eu.etaxonomy.cdm.model.agent.TeamOrPersonBase"/>
+ <!-- Common Package -->
+ <mapping class="eu.etaxonomy.cdm.model.common.Annotation"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.AnnotationType"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.Credit"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.DefinedTerm"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.DefinedTermBase"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.Extension"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.ExtensionType"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.IdentifiableSource"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.Identifier"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.IntextReference"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.Group"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.Language"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.LanguageString"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.LSID"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.LSIDAuthority"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.Marker"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.MarkerType"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.OrderedTerm"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.OrderedTermBase"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.OrderedTermVocabulary"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.OriginalSourceBase"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.RelationshipTermBase"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.Representation"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.TermVocabulary"/>
+ <mapping class="eu.etaxonomy.cdm.model.common.User"/>
+ <!-- Description Package -->
+ <mapping class="eu.etaxonomy.cdm.model.description.CategoricalData"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.CommonTaxonName"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.DescriptionBase"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.DescriptionElementBase"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.DescriptionElementSource"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.Distribution"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.Feature"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.FeatureNode"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.FeatureTree"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.KeyStatement"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.MediaKey"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.IndividualsAssociation"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.MeasurementUnit"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.MultiAccessKey"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.PolytomousKey"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.PolytomousKeyNode"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.QuantitativeData"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.SpecimenDescription"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.State"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.StateData"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.StatisticalMeasure"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.TaxonDescription"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.TaxonInteraction"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.TaxonNameDescription"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.TextData"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.TextFormat"/>
+ <mapping class="eu.etaxonomy.cdm.model.description.WorkingSet"/>
+ <!-- Location Package -->
+ <mapping class="eu.etaxonomy.cdm.model.location.NamedArea"/>
+ <mapping class="eu.etaxonomy.cdm.model.location.NamedAreaLevel"/>
+ <mapping class="eu.etaxonomy.cdm.model.location.NamedAreaType"/>
+ <mapping class="eu.etaxonomy.cdm.model.location.ReferenceSystem"/>
+ <mapping class="eu.etaxonomy.cdm.model.location.Point"/>
+ <mapping class="eu.etaxonomy.cdm.model.location.Country"/>
+ <!-- Media Package -->
+ <mapping class="eu.etaxonomy.cdm.model.media.AudioFile"/>
+ <mapping class="eu.etaxonomy.cdm.model.media.ImageFile"/>
+ <mapping class="eu.etaxonomy.cdm.model.media.Media"/>
+ <mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentation"/>
+ <mapping class="eu.etaxonomy.cdm.model.media.MediaRepresentationPart"/>
+ <mapping class="eu.etaxonomy.cdm.model.media.MovieFile"/>
+ <mapping class="eu.etaxonomy.cdm.model.media.Rights"/>
+ <mapping class="eu.etaxonomy.cdm.model.media.RightsType"/>
+ <!-- Meta Data Package -->
+ <mapping class="eu.etaxonomy.cdm.model.metadata.CdmMetaData"/>
+ <mapping class="eu.etaxonomy.cdm.model.metadata.CdmPreference"/>
+ <!-- Molecular Package -->
+ <mapping class="eu.etaxonomy.cdm.model.molecular.PhylogeneticTree"/>
+ <mapping class="eu.etaxonomy.cdm.model.molecular.DnaQuality"/>
+ <mapping class="eu.etaxonomy.cdm.model.molecular.DnaSample"/>
+ <mapping class="eu.etaxonomy.cdm.model.molecular.Amplification"/>
+ <mapping class="eu.etaxonomy.cdm.model.molecular.AmplificationResult"/>
+ <mapping class="eu.etaxonomy.cdm.model.molecular.Primer"/>
+ <mapping class="eu.etaxonomy.cdm.model.molecular.Sequence"/>
+ <mapping class="eu.etaxonomy.cdm.model.molecular.SequenceString"/>
+ <mapping class="eu.etaxonomy.cdm.model.molecular.SingleRead"/>
+ <mapping class="eu.etaxonomy.cdm.model.molecular.SingleReadAlignment"/>
+ <mapping class="eu.etaxonomy.cdm.model.molecular.Cloning"/>
+ <!-- Name Package -->
+ <mapping class="eu.etaxonomy.cdm.model.name.BacterialName"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.BotanicalName"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.CultivarPlantName"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.HomotypicalGroup"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.HybridRelationship"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.HybridRelationshipType"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.NameRelationship"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.NameRelationshipType"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.NameTypeDesignation"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalCode"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalStatus"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.NomenclaturalStatusType"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.NonViralName"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.Rank"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignationStatus"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.TaxonNameBase"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.TypeDesignationBase"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.ViralName"/>
+ <mapping class="eu.etaxonomy.cdm.model.name.ZoologicalName"/>
+ <!-- Occurrence Package -->
+ <mapping class="eu.etaxonomy.cdm.model.occurrence.Collection"/>
+ <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivationEvent"/>
+ <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivationEventType"/>
+ <mapping class="eu.etaxonomy.cdm.model.occurrence.DerivedUnit"/>
+ <mapping class="eu.etaxonomy.cdm.model.occurrence.MaterialOrMethodEvent"/>
+ <mapping class="eu.etaxonomy.cdm.model.occurrence.MediaSpecimen"/>
+ <mapping class="eu.etaxonomy.cdm.model.occurrence.DeterminationEvent"/>
+ <mapping class="eu.etaxonomy.cdm.model.occurrence.FieldUnit"/>
+ <mapping class="eu.etaxonomy.cdm.model.occurrence.GatheringEvent"/>
+ <mapping class="eu.etaxonomy.cdm.model.occurrence.PreservationMethod"/>
+ <mapping class="eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase"/>
+ <!-- Reference Package -->
+ <mapping class="eu.etaxonomy.cdm.model.reference.Reference"/>
+
+ <!-- Taxon Package -->
+ <mapping class="eu.etaxonomy.cdm.model.taxon.Synonym"/>
+ <mapping class="eu.etaxonomy.cdm.model.taxon.SynonymType"/>
+ <mapping class="eu.etaxonomy.cdm.model.taxon.Taxon"/>
+ <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonBase"/>
+ <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonNode"/>
+ <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonNodeAgentRelation"/>
+ <mapping class="eu.etaxonomy.cdm.model.taxon.Classification"/>
+ <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonRelationship"/>
+ <mapping class="eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType"/>
+
+ <!-- Validation Package -->
+ <mapping class="eu.etaxonomy.cdm.model.validation.EntityValidation"/>
+ <mapping class="eu.etaxonomy.cdm.model.validation.EntityConstraintViolation"/>
+
+ <!-- View Package -->
+ <mapping class="eu.etaxonomy.cdm.model.view.AuditEvent"/>
+
+ <!-- for filling caches -->
+ <!-- since hibernate 4 listeners are not handled via hibernate.cfg.xml anymore -->
+ <!-- http://stackoverflow.com/questions/8616146/eventlisteners-using-hibernate-4-0-with-spring-3-1-0-release
+ https://community.jboss.org/wiki/HibernateCoreMigrationGuide40 -->
+
+ </session-factory>
</hibernate-configuration>
\ No newline at end of file
<bean id="cdmApplicationRemoteConfiguration" \r
class="eu.etaxonomy.cdm.api.application.CdmApplicationRemoteConfiguration" />\r
\r
- \r
<bean id="cdmServiceRequestExecutor" \r
class="eu.etaxonomy.taxeditor.service.CdmServiceRequestExecutor" />\r
\r
<bean id="cachedCommonService" \r
- class="eu.etaxonomy.taxeditor.service.CachedCommonServiceImpl" />\r
- \r
+ class="eu.etaxonomy.taxeditor.service.CachedCommonServiceImpl" /> \r
\r
<bean id="defaultExport"\r
class="eu.etaxonomy.cdm.io.common.CdmApplicationAwareDefaultExport" />\r
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
<classpathentry including="**/*.java" kind="src" path="src/test/java"/>
Bundle-ManifestVersion: 2
Bundle-Name: Editor Bundle
Bundle-SymbolicName: eu.etaxonomy.taxeditor.editor;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
Bundle-Activator: eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: OSGI-INF/l10n/plugin
+++ /dev/null
-CreateDerivateContextMenu_ADD=Add...
-CreateDerivateContextMenu_DNA_SAMPLE=DNA Sample
-CreateDerivateContextMenu_MEDIA=Media...
-CreateDerivateContextMenu_MEDIA_EXISTING=Use existing media item
-CreateDerivateContextMenu_MEDIA_SPECIMEN=Media item
-CreateDerivateContextMenu_NO_CHILD_DERIVATE=No child derivatives
-CreateDerivateContextMenu_SEQUENCE=Consensus Sequence
-CreateDerivateContextMenu_SINGLE_READ=Single Read
-CreateDerivateContextMenu_SPECIMEN=Specimen
-CreateDerivateContextMenu_TISSUE_SAMPLE=Tissue Sample
-
-CreateFieldUnitContextMenu_CREATE_FIELD_UNIT=Create new field unit
-CreateFieldUnitContextMenu_CREATE_FIELD_UNIT_FOR=Create new field unit for %s
-
-SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE=Remove from this Sequence
-SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE=Reuse for other Sequence
-SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE=Reuse SingleRead here
-
-DerivateView_DERIVATIVE_EDITOR=Specimen Editor
-DerivateView_SAVING_HIERARCHY=Saving hierarchy
-DerivateView_UNSAVED_CHANGES=View has unsaved changes
-DerivateView_YOU_NEED_TO_SAVE=You need to save before performing this action
-
-DeleteDerivateOperation_AND_CHILDREN= and its children
-DeleteDerivateOperation_CONFIRM=Confirm Deletion
-DeleteDerivateOperation_DELETE_FAILED=Deletion failed
-DeleteDerivateOperation_REALLY_DELETE=Do you really want to delete the selected element
-
-DerivateDropListener_MOVE_TO=Moving "%s" to "%s"
-
-DerivateViewEditorInput_FAIL_INIT=Failed initializing editor
-DerivateViewEditorInput_NO_ROOT=No root element found\!
-
-MoveDerivateOperation_MOVE_NOT_POSSIBLE=Moving derivatives not possible\!
-MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE=Moving "%s" to "%s" is not possible\!
-
-OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Could not open Specimen Editor
-OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN=Failed to open Editor
-OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED=The derivative hierarchy is corrupted\!
-OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND=No Derivatives found
-
-DeleteTaxonBaseHandler_CONFIRM_DELETION=Confirm Deletion
-DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT=Element has to be Synonym, Misapplication or Concept
-DeleteTaxonBaseHandler_REALLY_DELETE_TAXON=Are you sure you want to delete the selected taxon?
-DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM=Are you sure you want to delete the selected synoym, this is irreversible?
-DeleteTaxonBaseHandler_DELETE_SYNONYM_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS=The Synonym could be deleted, but related object(s) could not be deleted
-DeleteTaxonBaseHandler_DELETE_MISAPPLIEDNAME_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS=The misapplied name could be deleted, but related object(s) could not be deleted
-
-DescriptiveViewPart_COLLAPSE_ALL=Collapse All
-DescriptiveViewPart_EXPAND_ALL=Expand All
-DescriptiveViewPart_FACTUAL_DATA=Factual Data
-DescriptiveViewPart_SHOW_ALL_DATA=Show all factual data
-
-ConceptGraphView_VIEWER_NAME=Concept Graph
-ConceptViewPart_VIEWER_NAME=Concept Relations
-UsesViewPart_VIEWER_NAME=Uses
+++ /dev/null
-CreateDerivateContextMenu_ADD=Hinzufügen...
-CreateDerivateContextMenu_DNA_SAMPLE=DNA Probe
-CreateDerivateContextMenu_MEDIA=Media...
-CreateDerivateContextMenu_MEDIA_EXISTING=Vorhandendes Medienobjekt verwenden
-CreateDerivateContextMenu_MEDIA_SPECIMEN=Medienobjekt
-CreateDerivateContextMenu_NO_CHILD_DERIVATE=Keine Kind-Derivate
-CreateDerivateContextMenu_SEQUENCE=Konsensussequenz
-CreateDerivateContextMenu_SINGLE_READ=Single Read
-CreateDerivateContextMenu_SPECIMEN=Beleg
-CreateDerivateContextMenu_TISSUE_SAMPLE=Gewebeprobe
-
-CreateFieldUnitContextMenu_CREATE_FIELD_UNIT=Erzeuge neue Field Unit
-CreateFieldUnitContextMenu_CREATE_FIELD_UNIT_FOR=Erzeuge neue Field Unit für %s
-
-SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE=Von Sequenz entfernen
-SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE=Für andere Sequenz verwenden
-SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE=SingleRead hier verwenden
-
-DerivateView_DERIVATIVE_EDITOR=Specimen-Editor
-DerivateView_SAVING_HIERARCHY=Speichere Hierarchie
-DerivateView_UNSAVED_CHANGES=Ungepeicherte Änderungen
-DerivateView_YOU_NEED_TO_SAVE=Sie müssen speichern, um diese Aktion auszuführen
-
-DeleteDerivateOperation_CONFIRM=Löschen bestätigen
-DeleteDerivateOperation_DELETE_FAILED=Löschen fehlgeschlagen
-DeleteDerivateOperation_REALLY_DELETE=Wollen Sie wirklich das ausgewählte Element löschen
-DeleteDerivateOperation_AND_CHILDREN= (mit Kind-Elementen)
-
-DerivateDropListener_MOVE_TO=Verschiebe "%s" nach "%s"
-
-DerivateViewEditorInput_FAIL_INIT=Initialisierung des Editor fehlgeschlagen
-DerivateViewEditorInput_NO_ROOT=Kein Root-Element gefunden\!
-
-MoveDerivateOperation_MOVE_NOT_POSSIBLE=Verschieben von Derivaten nicht möglich\!
-MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE=Verschieben von "%s" nach "%s" nicht möglich\!
-
-OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Konnte Specimen-Editor nicht öffnen
-OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN=Öffnen des Editors fehlgeschlagen
-OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED=Die Derivathierarchie ist korrumpiert\!
-OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND=Keine Derivate gefunden
-
-DeleteTaxonBaseHandler_CONFIRM_DELETION=Löschen bestätigen
-DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT=Element muss Synonym, Misapplikation oder Konzept sein
-DeleteTaxonBaseHandler_REALLY_DELETE_TAXON=Wollen Sie wirklich das ausgewählte Taxon löschen?
-DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM=Wollen Sie das ausgewählte Synonym wirklich löschen, dieser Vorgang ist nicht reversibel.
-DeleteTaxonBaseHandler_DELETE_SYNONYM_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS=Das Synonym konnte gelöscht werden, aber es gibt noch verknüpfte Objekte, die nicht gelöscht werden konnten.
-DeleteTaxonBaseHandler_DELETE_MISAPPLIEDNAME_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS=Die Misapplikation konnte gelöscht werden, aber es gibt noch verknüpfte Objekte, die nicht gelöscht werden konnten.
-
-
-DescriptiveViewPart_COLLAPSE_ALL=Alles einklappen
-DescriptiveViewPart_EXPAND_ALL=Alles ausklappen
-DescriptiveViewPart_FACTUAL_DATA=Faktendaten
-DescriptiveViewPart_SHOW_ALL_DATA=Zeige alle Faktendaten
-
-ConceptGraphView_VIEWER_NAME=Konzeptgraph
-ConceptViewPart_VIEWER_NAME=Konzeptrelationen
-UsesViewPart_VIEWER_NAME=Nutzung
command.name.51 = delete
\r
editor.name.DERIVATIVE_EDITOR = Specimen Editor\r
-command.label.DERIVATIVE_EDITOR = Specimen Editor\r
+command.label.DERIVATIVE_EDITOR = Specimen Editor (hierarchy)\r
command.label.LINK_WITH_TAXON_SELECTION = Link with taxon selection\r
command.label.UNLINK_FROM_TAXON_SELECTION = Unlink from taxon selection\r
command.label.REUSE_SINGLE_READ_HERE = Reuse single read here\r
\r
viewCommandMapping.viewerName.NAME_EDITOR = Name Editor\r
viewCommandMapping.viewerName.SPECIMEN_EDITOR = Specimen Editor\r
-viewCommandMapping.viewerName.CHECKLIST_EDITOR = Distribution Editor
\ No newline at end of file
+viewCommandMapping.viewerName.CHECKLIST_EDITOR = Distribution Editor\r
+command.name.OPEN_EDITOR_FOR_TYPE_SPECIMEN = Open specimen editor for type specimen
\ No newline at end of file
command.name.57 = Setze als Basionym der homotypischen Gruppe
editor.name.DERIVATIVE_EDITOR = Specimen-Editor
-command.label.DERIVATIVE_EDITOR = Specimen-Editor
+command.label.DERIVATIVE_EDITOR = Specimen-Editor (Hierarchie)
command.label.LINK_WITH_TAXON_SELECTION = Verknüpfe mit Taxonauswahl
command.label.UNLINK_FROM_TAXON_SELECTION = Verknüpfung mit Taxonauswahl aufheben
command.label.REUSE_SINGLE_READ_HERE = Single-Read hier wiederverwenden
viewCommandMapping.viewerName.NAME_EDITOR = Namenseditor
viewCommandMapping.viewerName.SPECIMEN_EDITOR = Specimen-Editor
-viewCommandMapping.viewerName.CHECKLIST_EDITOR = Verbreitungs-Editor
\ No newline at end of file
+viewCommandMapping.viewerName.CHECKLIST_EDITOR = Verbreitungs-Editor
+command.name.OPEN_EDITOR_FOR_TYPE_SPECIMEN = Öffne Specimen-Editor für Typusbelege
\ No newline at end of file
plugin.xml,\
icons/,\
p2.inf,\
- OSGI-INF/
+ OSGI-INF/,\
+ src/main/java/eu/etaxonomy/taxeditor/editor/l10n/
+bin.excludes = src/main/java/eu/etaxonomy/taxeditor/editor/l10n/Messages.java
</and>
</visibleWhen>
</command>
- <separator
- name="eu.etaxonomy.taxeditor.store.separator_derivative_start"
- visible="true">
- </separator>
- <command
- commandId="eu.etaxonomy.taxeditor.editor.openSpecimenEditorFromMenu"
- label="%command.label.DERIVATIVE_EDITOR"
- style="push">
- <visibleWhen
- checkEnabled="true">
- <reference
- definitionId="isCdmStoreConnected">
- </reference>
- </visibleWhen>
- </command>
- <separator
- name="eu.etaxonomy.taxeditor.editor.separator1"
- visible="true">
- </separator>
</menuContribution>
<menuContribution
locationURI="menu:eu.etaxonomy.taxeditor.menu.showView?before=eu.etaxonomy.taxeditor.store.showViewMenu.internal">
id="eu.etaxonomy.taxeditor.editor.view.concept.menus.new">
</dynamic>
</menu>
- <command
- commandId="eu.etaxonomy.taxeditor.editor.view.concept.command.open"
- label="%command.label.43"
- style="push">
- </command>
+ <dynamic
+ class="eu.etaxonomy.taxeditor.view.CdmViewerContextMenu"
+ id="eu.etaxonomy.taxeditor.view.context.CdmViewerContextMenu">
+ </dynamic>
<separator
name="eu.etaxonomy.taxeditor.editor.view.concept.menu.separator1"
visible="true">
</command>
</toolbar>
</menuContribution>
+ <menuContribution
+ locationURI="menu:bulkeditor.menus.openmenu">
+ <command
+ commandId="eu.etaxonomy.taxeditor.editor.openSpecimenEditorFromMenu"
+ label="%command.label.DERIVATIVE_EDITOR"
+ style="push">
+ <visibleWhen
+ checkEnabled="true">
+ <reference
+ definitionId="isCdmStoreConnected">
+ </reference>
+ </visibleWhen>
+ </command>
+ </menuContribution>
</extension>
<extension
point="org.eclipse.ui.handlers">
</with>
</activeWhen>
</handler>
+ <handler
+ class="eu.etaxonomy.taxeditor.editor.view.derivate.handler.OpenDerivativeEditorForSpecimenOrOBservationBase"
+ commandId="eu.etaxonomy.taxeditor.editor.openSpecimenEditor">
+ <activeWhen>
+ <with
+ variable="activePartId">
+ <equals
+ value="bulkeditor.editor">
+ </equals>
+ </with>
+ </activeWhen>
+ </handler>
<handler
class="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistEditorHandler"
commandId="eu.etaxonomy.taxeditor.editor.handler.OpenChecklistViewHandler">
<command
defaultHandler="eu.etaxonomy.taxeditor.editor.handler.defaultHandler.DefaultOpenSpecimenEditorForTypeSpecimenHandler"
id="eu.etaxonomy.taxeditor.openSpecimenEditorForTypeSpecimen"
- name="Open specimen editor for type specimen">
+ name="%command.name.OPEN_EDITOR_FOR_TYPE_SPECIMEN">
+ </command>
+ <command
+ defaultHandler="eu.etaxonomy.taxeditor.editor.view.concept.handler.OpenRelatedConceptInBulkEditorHandler"
+ id="eu.etaxonomy.taxeditor.editor.openBulkEditorForTaxonRelationship"
+ name="Open bulk editor for taxon relationship">
</command>
</extension>
</propertyTester>
<propertyTester
class="eu.etaxonomy.taxeditor.editor.view.descriptive.handler.DescriptionsMenuPropertyTester"
- id="eu.etaxonomy.taxeditor.descriptions.PropertyTester"
+ id="eu.etaxonomy.taxeditor.descriptions.propertyTester"
namespace="eu.etaxonomy.taxeditor.descriptions.propertyTester"
properties="isMedia,isDescription,isDescriptionElement,isDeletable,isFeatureNodeContainer,isImageGallery,isTaxonEditor,isBulkEditor,isDerivateEditor, isIndividualsAssociation"
type="org.eclipse.jface.viewers.TreeSelection">
<viewCommandMapping
commandId="eu.etaxonomy.taxeditor.openSpecimenEditorForTypeSpecimen"
selection="eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation"
+ viewerName="%viewCommandMapping.viewerName.SPECIMEN_EDITOR">
+ </viewCommandMapping>
+ <viewCommandMapping
+ commandId="eu.etaxonomy.taxeditor.editor.view.concept.command.open"
+ selection="eu.etaxonomy.cdm.model.taxon.TaxonRelationship"
+ viewerName="Name Editor">
+ </viewCommandMapping>
+ <viewCommandMapping
+ commandId="eu.etaxonomy.taxeditor.editor.openBulkEditorForTaxonRelationship"
+ selection="eu.etaxonomy.cdm.model.taxon.TaxonRelationship"
+ viewerName="Bulk Editor">
+ </viewCommandMapping>
+ <viewCommandMapping
+ commandId="eu.etaxonomy.taxeditor.editor.openSpecimenEditor"
+ selection="eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase"
viewerName="Specimen Editor">
</viewCommandMapping>
</extension>
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>4.5.1</version>
+ <version>4.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
private static int SEPARATOR = -10;
private static int EOF = -20;
- private static final String TYPE_NAME = "cdmdata-transfer-format";
+ private static final String TYPE_NAME = "cdmdata-transfer-format"; //$NON-NLS-1$
private static final int TYPE_ID = registerType (TYPE_NAME);
private static final CdmDataTransfer instance = new CdmDataTransfer();
import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
/**
* <p>ChooseClassificationWizard class.</p>
public ChooseFromMultipleTaxonNodesDialog(Shell parent) {
super(parent);
- setTitle("Choose Classification");
- setMessage("The taxon is part of multiple classification. Please choose the one you want to open.");
+ setTitle(Messages.ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION);
+ setMessage(Messages.ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION_MESSAGE);
setContentProvider(new ClassificationContentProvider());
setLabelProvider(new ClassificationLabelProvider());
}
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
import org.eclipse.ui.IPersistable;
import org.eclipse.ui.PartInitException;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.concept.ConceptViewPart;
import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveViewPart;
import eu.etaxonomy.taxeditor.editor.view.media.MediaViewPart;
*/
public class EditorStateManager extends ContextListenerAdapter {
- private static final String EDITORS = "editors";
+ private static final String EDITORS = "editors"; //$NON-NLS-1$
- private static final String EDITOR = "editor";
+ private static final String EDITOR = "editor"; //$NON-NLS-1$
private TaxonEditorInputFactory inputFactory;
-
+
/**
* <p>Constructor for EditorStateManager.</p>
*/
public EditorStateManager() {
inputFactory = new TaxonEditorInputFactory();
}
-
+
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.model.IContextListener#contextAboutToStop(org.eclipse.ui.IMemento, org.eclipse.core.runtime.IProgressMonitor)
*/
EditorUtil.closeAll();
resetConstantViews();
}
-
+
/**
- *
+ *
*/
private void resetConstantViews() {
AbstractCdmEditorViewPart descriptiveView = (AbstractCdmEditorViewPart) EditorUtil.getView(DescriptiveViewPart.ID, false);
AbstractCdmEditorViewPart mediaView = (AbstractCdmEditorViewPart) EditorUtil.getView(MediaViewPart.ID, false);
AbstractCdmEditorViewPart conceptView = (AbstractCdmEditorViewPart) EditorUtil.getView(ConceptViewPart.ID, false);
-
+
if(descriptiveView != null){
descriptiveView.showEmptyPage();
}
public void contextStart(IMemento memento, IProgressMonitor monitor) {
restoreEditors(memento, monitor);
}
-
+
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.model.ContextListenerAdapter#contextRefresh(org.eclipse.core.runtime.IProgressMonitor)
*/
public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
saveEditorState(memento);
}
-
+
/**
- * Reads taxon node UUIDs from the given memento and tries to open an editor
+ * Reads taxon node UUIDs from the given memento and tries to open an editor
* for each of the found UUIDs.
- *
+ *
* @param memento
*/
private void restoreEditors(final IMemento memento, IProgressMonitor monitor){
if(memento == null){
return;
}
-
+
IProgressMonitor subProgressMonitor = EditorUtil.getSubProgressMonitor(monitor, 1);
-
+
IMemento editorMementos = memento.getChild(EDITORS);
IMemento[] editorInputs = editorMementos.getChildren(EDITOR);
-
- subProgressMonitor.beginTask("Restoring Editors", 1 + editorInputs.length * 2);
- subProgressMonitor.subTask("Restoring Editors");
+
+ String taskName = Messages.EditorStateManager_RESTORE_EDITORS;
+ subProgressMonitor.beginTask(taskName, 1 + editorInputs.length * 2);
+ subProgressMonitor.subTask(taskName);
subProgressMonitor.worked(1);
-
+
for(IMemento editorInput : editorInputs){
TaxonEditorInput input = (TaxonEditorInput) inputFactory.createElement(editorInput);
subProgressMonitor.worked(1);
try {
EditorUtil.open(input);
} catch (PartInitException e) {
- MessagingUtils.error(getClass(), "Error opening an editor window", e);
+ MessagingUtils.error(getClass(), Messages.EditorStateManager_ERROR_OPEN_WINDOW, e);
}
}
subProgressMonitor.worked(1);
}
subProgressMonitor.done();
}
-
+
/**
* @param monitor
*/
private void refreshEditors(IProgressMonitor monitor) {
IProgressMonitor subProgressMonitor = EditorUtil.getSubProgressMonitor(monitor, 1);
-
+
Set<IEditorPart> openEditors = EditorUtil.getOpenEditors();
-
-
- subProgressMonitor.beginTask("Refreshing Editors", openEditors.size() * 2);
-
+
+
+ subProgressMonitor.beginTask(Messages.EditorStateManager_REFRESH_EDITOR, openEditors.size() * 2);
+
Set<UUID> uuids = new HashSet<UUID>();
-
+
for(IEditorPart editor : openEditors){
if(editor instanceof MultiPageTaxonEditor){
try {
uuids.add(((TaxonEditorInput) editor.getEditorInput()).getTaxonNode().getUuid());
-
+
// ((MultiPageTaxonEditor) editor).close(false);
EditorUtil.close((MultiPageTaxonEditor)editor);
subProgressMonitor.worked(1);
}
}
}
-
+
for(UUID uuid : uuids){
try {
EditorUtil.openTaxonNode(uuid);
}
subProgressMonitor.worked(1);
}
-
+
subProgressMonitor.done();
}
-
+
/**
- * Saves the UUIDs
- *
+ * Saves the UUIDs
+ *
* @param memento
*/
private void saveEditorState(IMemento memento){
if(memento == null){
return;
}
-
+
Set<IEditorPart> editors = EditorUtil.getOpenEditors();
-
+
IMemento editorMementos = memento.createChild(EDITORS);
-
+
for(IEditorPart editor : editors){
IEditorInput input = editor.getEditorInput();
if(input instanceof IPersistable){
import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
import eu.etaxonomy.taxeditor.editor.key.KeyEditor;
import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyEditorInput;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditor;
import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditorInput;
//import eu.etaxonomy.taxeditor.store.view.dataimport.BioCaseEditorInput;
TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).find(taxonBaseUuid);
if (taxonBase != null && taxonBase.isOrphaned()) {
if(taxonBase.isInstanceOf(Synonym.class)){
- MessagingUtils.warningDialog("Orphaned accepted taxon", TaxonEditorInput.class, "The accepted "
- + "taxon of this synonym is not part of any classification. Editing with the "
- + "name editor is currently not implemented. Try to edit the taxon with the bulk editor.");
+ MessagingUtils.warningDialog(Messages.EditorUtil_ORPHAN_ACCEPTED_TAXON, TaxonEditorInput.class, Messages.EditorUtil_ORPHAN_ACCEPTED_TAXON_MESSAGE);
return;
}
else{
- MessagingUtils.warningDialog("Orphaned Taxon", TaxonEditorInput.class, "This is an orphaned taxon "
- + "i.e. a taxon that is not connected to a classification and not having any taxonomic "
- + "relationships. Editing of orphaned taxa in the name editor is currently not supported. "
- + "Try editing with the bulk editor");
+ MessagingUtils.warningDialog(Messages.EditorUtil_ORPHAN_TAXON, TaxonEditorInput.class, Messages.EditorUtil_ORPHAN_TAXON_MESSAGE);
return;
}
}
if (editor.isDirty()) {
boolean doSave = MessageDialog
- .openConfirm(shell, "Confirm save",
- "Warning - this operation will save the editor. This will also save all other unsaved changes " +
- "in your working editor to the database. Please 'Cancel' if you are not ready to do this.");
+ .openConfirm(shell, Messages.EditorUtil_COMFIRM_SAVE,
+ Messages.EditorUtil_CONFIRM_SAVE_MESSAGE);
if (!doSave) {
return false;
+++ /dev/null
-/**
- * Copyright (C) 2015 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-package eu.etaxonomy.taxeditor.editor;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @author pplitzner
- * @date 09.09.2015
- *
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$
- public static String ConceptGraphView_VIEWER_NAME;
- public static String ConceptViewPart_VIEWER_NAME;
- public static String CreateDerivateContextMenu_ADD;
- public static String CreateDerivateContextMenu_DNA_SAMPLE;
- public static String CreateDerivateContextMenu_MEDIA;
- public static String CreateDerivateContextMenu_MEDIA_EXISTING;
- public static String CreateDerivateContextMenu_MEDIA_SPECIMEN;
- public static String CreateDerivateContextMenu_NO_CHILD_DERIVATE;
- public static String CreateDerivateContextMenu_SEQUENCE;
- public static String CreateDerivateContextMenu_SINGLE_READ;
- public static String CreateDerivateContextMenu_SPECIMEN;
- public static String CreateDerivateContextMenu_TISSUE_SAMPLE;
- public static String CreateFieldUnitContextMenu_CREATE_FIELD_UNIT;
- public static String CreateFieldUnitContextMenu_CREATE_FIELD_UNIT_FOR;
- public static String DeleteDerivateOperation_AND_CHILDREN;
- public static String DeleteDerivateOperation_CONFIRM;
- public static String DeleteDerivateOperation_DELETE_FAILED;
- public static String DeleteDerivateOperation_REALLY_DELETE;
- public static String DeleteTaxonBaseHandler_CONFIRM_DELETION;
- public static String DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT;
- public static String DeleteTaxonBaseHandler_REALLY_DELETE_TAXON;
- public static String DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM;
- public static String DeleteTaxonBaseHandler_DELETE_SYNONYM_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS;
- public static String DeleteTaxonBaseHandler_DELETE_MISAPPLIEDNAME_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS;
-
-
- public static String DerivateDropListener_MOVE_TO;
- public static String DerivateView_DERIVATIVE_EDITOR;
- public static String DerivateView_SAVING_HIERARCHY;
- public static String DerivateView_UNSAVED_CHANGES;
- public static String DerivateView_YOU_NEED_TO_SAVE;
- public static String DerivateViewEditorInput_FAIL_INIT;
- public static String DerivateViewEditorInput_NO_ROOT;
- public static String DescriptiveViewPart_COLLAPSE_ALL;
- public static String DescriptiveViewPart_EXPAND_ALL;
- public static String DescriptiveViewPart_FACTUAL_DATA;
- public static String DescriptiveViewPart_SHOW_ALL_DATA;
- public static String MoveDerivateOperation_MOVE_NOT_POSSIBLE;
- public static String MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE;
- public static String OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR;
- public static String OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN;
- public static String OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED;
- public static String OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND;
- public static String SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE;
- public static String SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE;
- public static String SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE;
- public static String UsesViewPart_VIEWER_NAME;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
import eu.etaxonomy.taxeditor.editor.name.container.AbstractGroupedContainer;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
IDirtyMarkable, IPartContentHasDetails, ISecuredEditor, IPartContentHasMedia {
/** Constant <code>ID="eu.etaxonomy.taxeditor.editor.taxon"{trunked}</code> */
- public static final String ID = "eu.etaxonomy.taxeditor.editor.taxon";
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.taxon"; //$NON-NLS-1$
private boolean dirty;
/** {@inheritDoc} */
@Override
public void doSave(IProgressMonitor monitor) {
- monitor.beginTask("Saving Editor", 4);
+ monitor.beginTask(Messages.MultiPageTaxonEditor_SAVING_EDITOR, 4);
try {
if (!conversation.isBound()) {
conversation.bind();
for (IEditorPart editorPage : getPages()) {
if (editorPage instanceof TaxonNameEditor) {
if (((TaxonNameEditor) editorPage).checkForEmptyNames()) {
- MessageDialog.openWarning(AbstractUtility.getShell(), "No Name Specified",
- "An attempt was made to save a taxon or synonym with "
- + "an empty name. Operation was cancelled.");
+ MessageDialog.openWarning(AbstractUtility.getShell(), Messages.MultiPageTaxonEditor_NO_NAME_SPECIFIED,
+ Messages.MultiPageTaxonEditor_NO_NAME_SPECIFIED_MESSAGE);
return;
}
}
// commit the conversation and start a new transaction immediately
input.merge();
-
+
conversation.commit(true);
CdmApplicationState.getCurrentDataChangeService()
.fireChangeEvent(new CdmChangeEvent(Action.Update, input.getTaxonNode() , MultiPageTaxonEditor.class), true);
monitor.worked(1);
} catch (Exception e) {
setFocus();
- MessagingUtils.operationDialog(this, e, TaxeditorEditorPlugin.PLUGIN_ID,"saving a taxon", " Please close and reopen the taxon again.");
+ MessagingUtils.operationDialog(this, e, TaxeditorEditorPlugin.PLUGIN_ID,Messages.MultiPageTaxonEditor_SAVING_TAXON, Messages.MultiPageTaxonEditor_SAVING_TAXON_MESSAGE);
disableEditor(true);
} finally {
monitor.done();
if (!(input instanceof TaxonEditorInput)) {
throw new PartInitException(
- "Invalid Input: Must be TaxonEditorInput");
+ Messages.MultiPageTaxonEditor_INVALID_INPUT);
}
this.input = (TaxonEditorInput) input;
partName = name.getTitleCache();
}
- if (partName == null || partName.equals("")) {
- partName = ("New taxon");
+ if (partName == null || partName.equals("")) { //$NON-NLS-1$
+ partName = (Messages.MultiPageTaxonEditor_NEW_TAXON);
}
setPartName(partName);
if (editor instanceof IPostOperationEnabled) {
((IPostOperationEnabled) editor).postOperation(objectAffectedByOperation);
} else {
- MessagingUtils.warn(getClass(), "postOperation not enabled for editor " + editor);
+ MessagingUtils.warn(getClass(), Messages.MultiPageTaxonEditor_POST_OP_NOT_ENABLED + editor);
}
}
- MessagingUtils.warn(getClass(), "postOperation called on MultiPageTaxonEditor. Can you make it more specific?");
+ MessagingUtils.warn(getClass(), Messages.MultiPageTaxonEditor_POST_OP_CALLED);
return false;
}
*/
public void reload() {
if (isDirty()) {
- MessagingUtils.warningDialog("Editor has unsaved data", getClass(), "This editor can not be "
- + "refreshed because it contains unsaved data. Refreshing "
- + "this editor would discard the changes. Please save this editor, "
- + "close and reopen it manually in order to get the latest content");
+ MessagingUtils.warningDialog(Messages.MultiPageTaxonEditor_UNSAVED_DATA, getClass(), Messages.MultiPageTaxonEditor_UNSAVED_DATA_MESSAGE);
} else {
TaxonEditorInput input = (TaxonEditorInput) getEditorInput();
editorPart.redraw();
}
} catch (Exception e) {
- MessagingUtils.messageDialog("Error refreshing editor", getClass(), "Could not refresh this editor", e);
+ MessagingUtils.messageDialog(Messages.MultiPageTaxonEditor_REFRESH_ERROR, getClass(), Messages.MultiPageTaxonEditor_REFRESH_ERROR_MESSAGE, e);
}
}
}
@Override
public String toString() {
- return String.format("%s[%s]", this.getClass().getSimpleName(), getEditorInput());
+ return String.format("%s[%s]", this.getClass().getSimpleName(), getEditorInput()); //$NON-NLS-1$
}
@Override
if((event.getEntity() instanceof TaxonNode)
&& input.getTaxonNode().equals(event.getEntity())){
//EditorUtil.close(source);
- logger.debug("Closing open editor for deleted taxon.");
+ logger.debug("Closing open editor for deleted taxon."); //$NON-NLS-1$
}
}
}
if(input.getTaxon().getName().equals(event.getEntity())){
// set the name of the editor window
source.setPartName();
- logger.debug("Updating title of taxons editor.");
+ logger.debug("Updating title of taxons editor."); //$NON-NLS-1$
}
}
// TODO other stuff to happen
* @version 1.0
*/
public enum Page {
- NAME ("Name", TaxonNameEditor.class, 0);
+ NAME ("Name", TaxonNameEditor.class, 0); //$NON-NLS-1$
private String title;
private Class<?> clazz;
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.widgets.Display;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+
/**
* <p>SimpleSelectionProvider class.</p>
*
*/
public class SimpleSelectionProvider implements ISelectionProvider {
- private Set<ISelectionChangedListener> selectionChangedListeners = new HashSet<ISelectionChangedListener>();
+ private static final String SETTING_SELECTION = Messages.SimpleSelectionProvider_SETTING_SELECTION;
+ private Set<ISelectionChangedListener> selectionChangedListeners = new HashSet<ISelectionChangedListener>();
private ISelection selection;
private Job job;
-
+
/*
* (non-Javadoc)
* @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
*/
/** {@inheritDoc} */
- public void addSelectionChangedListener(
+ @Override
+ public void addSelectionChangedListener(
ISelectionChangedListener listener) {
selectionChangedListeners.add(listener);
}
*
* @return a {@link org.eclipse.jface.viewers.ISelection} object.
*/
- public ISelection getSelection() {
+ @Override
+ public ISelection getSelection() {
if (selection != null){
return selection;
}
* @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
*/
/** {@inheritDoc} */
- public void removeSelectionChangedListener(
+ @Override
+ public void removeSelectionChangedListener(
ISelectionChangedListener listener) {
selectionChangedListeners.remove(listener);
}
* @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
*/
/** {@inheritDoc} */
- public void setSelection(ISelection selection) {
+ @Override
+ public void setSelection(ISelection selection) {
this.selection = selection;
-
+
// cancel previous selection setting
if(job != null){
if(job.getState() != Job.NONE){
}
job = null;
}
-
+
if(job == null){
final SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent(this, selection);
final Display display = Display.getCurrent();
- job = new Job("Setting Selection"){
-
+ job = new Job(SETTING_SELECTION){
+
@Override
protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("Setting Selection", 10);
-
+ monitor.beginTask(SETTING_SELECTION, 10);
+
if(!monitor.isCanceled()){
display.asyncExec(new Runnable() {
-
- public void run() {
+
+ @Override
+ public void run() {
SimpleSelectionProvider.this.fireSelectionChanged(selectionChangedEvent);
}
});
}
-
+
return Status.OK_STATUS;
}
-
+
};
-
+
job.setPriority(Job.DECORATE);
job.schedule();
}
-
+
}
private void fireSelectionChanged(final SelectionChangedEvent event) {
-
+
for (final ISelectionChangedListener listener : selectionChangedListeners) {
SafeRunnable.run(new SafeRunnable() {
- public void run() {
+ @Override
+ public void run() {
listener.selectionChanged(event);
}
});
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.DataChangeBridge;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
*/
public class TaxonEditorInput extends CdmEntitySessionInput implements IEditorInput, IConversationEnabled, IPersistableElement {
+ private static final String INCORRECT_STATE = Messages.TaxonEditorInput_INCORRECT_STATE;
+
private final ConversationHolder conversation;
private TaxonNode taxonNode;
TaxonNode taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNodeUuid, getTaxonNodePropertyPaths());
if(taxonNode == null){
- MessagingUtils.warningDialog("Not yet implemented", TaxonEditorInput.class, "Selected element is not type TaxonBase.");
+ MessagingUtils.warningDialog(Messages.TaxonEditorInput_NOT_IMPLEMENTED, TaxonEditorInput.class, Messages.TaxonEditorInput_NOT_IMPLEMENTED_MESSAGE);
}
init(taxonNode);
if (taxon.getTaxonNodes().size() == 0 && taxon.isMisapplication()){
// TODO get accepted taxon
- MessagingUtils.info("trying to open Mispplied Name ");
+ MessagingUtils.info(Messages.TaxonEditorInput_OPEN_MISSAPPLIED_NAME);
Set<Taxon> acceptedTaxa = new HashSet<Taxon>();
Set<TaxonRelationship> relations = taxon.getRelationsFromThisTaxon();
}
} else if (taxonNodes.size() == 0) {
// this is an undesired state
- MessagingUtils.warningDialog("Incorrect state",TaxonEditorInput.class,"The accepted "
- + "taxon is not part of any classification. Editing with the "
- + "name editor is currently not implemented. Try to edit the taxon with the bulk editor.");
+ MessagingUtils.warningDialog(INCORRECT_STATE,TaxonEditorInput.class,Messages.TaxonEditorInput_TAXON_NOT_IN_CLASSIFICATION);
}
}
setInputForMultipleNodes(conversation, taxonNodes);
}else if(taxa.size() == 0){
// this is an undesired state
- MessagingUtils.warningDialog("Incorrect state", TaxonEditorInput.class, "Trying to open accepted taxon for a synonym or misapplication but" +
- " no accepted taxa are present. This should not have happened.");
+ MessagingUtils.warningDialog(INCORRECT_STATE, TaxonEditorInput.class, Messages.TaxonEditorInput_NO_ACCEPTED_TAXON_PRESENT);
}
}
}
TaxonNameBase<?, ?> name = getTaxon().getName();
if (name == null || name.getTitleCache() == null) {
- return "New taxon";
+ return Messages.TaxonEditorInput_NEW_TAXON;
} else {
return name.getTitleCache();
}
private List<String> getTaxonNodePropertyPaths() {
List<String> taxonNodePropertyPaths = new ArrayList<String>();
for(String propertyPath : getTaxonBasePropertyPaths()) {
- taxonNodePropertyPaths.add("taxon." + propertyPath);
+ taxonNodePropertyPaths.add("taxon." + propertyPath); //$NON-NLS-1$
}
return taxonNodePropertyPaths;
}
private List<String> getTaxonBasePropertyPaths() {
List<String> taxonBasePropertyPaths = Arrays.asList(new String[] {
- "sec",
- "createdBy",
- "updatedBy",
- "annotations",
- "markers",
- "credits",
- "extensions",
- "rights",
- "sources",
- "descriptions",
- "relationsToThisTaxon",
- "relationsFromThisTaxon",
- "taxonNodes",
- "descriptions.descriptionElements.feature",
- "descriptions.descriptionElements.area",
- "descriptions.descriptionElements.status",
- "descriptions.markers",
- "name.descriptions",
- "name.typeDesignations",
- "name.status",
- "name.nomenclaturalReference.inReference",
- "name.taxonBases.taxonNodes",
- "name.relationsFromThisName",
- "name.relationsToThisName",
- "name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations.synonym.name.status",
- "name.homotypicalGroup.typifiedNames.relationsToThisName.fromName",
- "synonymRelations.synonym.name.status.type",
- "synonymRelations.synonym.name.relationsToThisName.fromName",
- "synonymRelations.synonym.name.nomenclaturalReference.inReference.authorship",
- "synonymRelations.synonym.name.nomenclaturalReference.authorship",
- "synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations"
+ "sec", //$NON-NLS-1$
+ "createdBy", //$NON-NLS-1$
+ "updatedBy", //$NON-NLS-1$
+ "annotations", //$NON-NLS-1$
+ "markers", //$NON-NLS-1$
+ "credits", //$NON-NLS-1$
+ "extensions", //$NON-NLS-1$
+ "rights", //$NON-NLS-1$
+ "sources", //$NON-NLS-1$
+ "descriptions", //$NON-NLS-1$
+ "relationsToThisTaxon", //$NON-NLS-1$
+ "relationsFromThisTaxon", //$NON-NLS-1$
+ "taxonNodes", //$NON-NLS-1$
+ "descriptions.descriptionElements.feature", //$NON-NLS-1$
+ "descriptions.descriptionElements.area", //$NON-NLS-1$
+ "descriptions.descriptionElements.status", //$NON-NLS-1$
+ "descriptions.markers", //$NON-NLS-1$
+ "name.descriptions", //$NON-NLS-1$
+ "name.typeDesignations", //$NON-NLS-1$
+ "name.status", //$NON-NLS-1$
+ "name.nomenclaturalReference.inReference", //$NON-NLS-1$
+ "name.taxonBases.taxonNodes", //$NON-NLS-1$
+ "name.relationsFromThisName", //$NON-NLS-1$
+ "name.relationsToThisName", //$NON-NLS-1$
+ "name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations.synonym.name.status", //$NON-NLS-1$
+ "name.homotypicalGroup.typifiedNames.relationsToThisName.fromName", //$NON-NLS-1$
+ "synonymRelations.synonym.name.status.type", //$NON-NLS-1$
+ "synonymRelations.synonym.name.relationsToThisName.fromName", //$NON-NLS-1$
+ "synonymRelations.synonym.name.nomenclaturalReference.inReference.authorship", //$NON-NLS-1$
+ "synonymRelations.synonym.name.nomenclaturalReference.authorship", //$NON-NLS-1$
+ "synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations" //$NON-NLS-1$
});
return taxonBasePropertyPaths;
import org.eclipse.ui.IMemento;
import eu.etaxonomy.cdm.api.service.IClassificationService;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
return null;
}
if (taxonNodeUuid == null || CdmStore.getService(IClassificationService.class).getTaxonNodeByUuid(UUID.fromString(taxonNodeUuid)) == null) {
- MessagingUtils.warn(this.getClass(), "Couldn't find taxon node with UUID " + taxonNodeUuid);
+ MessagingUtils.warn(this.getClass(), Messages.TaxonEditorInputFactory_NOT_FOUND_TAXON + taxonNodeUuid);
return null;
}
try {
return TaxonEditorInput.NewInstance(UUID.fromString(taxonNodeUuid));
} catch (Exception e) {
- MessagingUtils.warningDialog("Could not create element", TaxonEditorInputFactory.class, e.getMessage());
+ MessagingUtils.warningDialog(Messages.TaxonEditorInputFactory_COULD_NOT_CREATE, TaxonEditorInputFactory.class, e.getMessage());
}
return null;
}
import org.eclipse.core.runtime.IProgressMonitor;\r
import org.eclipse.ui.IMemento;\r
\r
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;\r
import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;\r
import eu.etaxonomy.taxeditor.model.MessagingUtils;\r
import eu.etaxonomy.taxeditor.store.CdmStore;\r
/**\r
* The context listener will call this class when a new context is started.\r
* It will reset the UseObjectStore to guarantee the static\r
- * content of the store will be refreshed each time we load a new context. \r
+ * content of the store will be refreshed each time we load a new context.\r
* @author a.theys\r
* @author a.mueller\r
* @created mar 13, 2012\r
*/\r
public class UseObjectManager extends ContextListenerAdapter{\r
\r
- public UseObjectManager() {\r
+ private static final String RESET_USAGE_DATA = Messages.UseObjectManager_RESET_DATA;\r
+\r
+\r
+ public UseObjectManager() {\r
CdmStore.getContextManager().addContextListener(this);\r
}\r
\r
\r
@Override\r
public void contextRefresh(IProgressMonitor monitor) {\r
- monitor.subTask("Reset usage data");\r
- MessagingUtils.warn(getClass(), "Reset usage data");\r
+ monitor.subTask(RESET_USAGE_DATA);\r
+ MessagingUtils.warn(getClass(), RESET_USAGE_DATA);\r
UseObjectStore.reset();\r
}\r
\r
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
import eu.etaxonomy.cdm.model.common.Group;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
import eu.etaxonomy.taxeditor.ui.group.grantedauthority.CdmAuthorityCompositeViewer;
@Override
public void doSave(IProgressMonitor monitor) {
try {
- monitor.beginTask("Saving CDM Authority Editor", 1);
+ monitor.beginTask(Messages.CdmAuthorityEditor_SAVING_AUTHORITY_EDITOR, 1);
getConversationHolder().commit(true);
((CdmAuthorityEditorInput) getEditorInput()).merge();
dirty = false;
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.group.authority.CdmAuthorityEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.LineSelection;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
/**
* Handler which opens an instance of the {@link CdmAuthorityEditor} for a particluar group.
- *
+ *
* @author cmathew
* @created Mar 28, 2013
*
public class EditCdmAuthoritiesHandler extends AbstractHandler {
- /* (non-Javadoc)
+ private static final String OPENING_CDM_AUTHORITIES = Messages.EditCdmAuthoritiesHandler_OPEN_AUTHORITIES;
+
+ /* (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
BulkEditor editor = (BulkEditor) EditorUtil.getActiveEditor();
-
- ISelection selection = editor.getSite().getSelectionProvider().getSelection();
+
+ ISelection selection = editor.getSite().getSelectionProvider().getSelection();
if(selection instanceof LineSelection){
-
+
final LineSelection lineSelection = (LineSelection) selection;
-
- Job job = new Job("Opening Cdm Authorities"){
+
+ Job job = new Job(OPENING_CDM_AUTHORITIES){
@Override
protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("Opening Cdm Authorities", lineSelection.size());
-
+ monitor.beginTask(OPENING_CDM_AUTHORITIES, lineSelection.size());
+
for(final Object selectedObject : lineSelection.toArray()){
if(selectedObject instanceof Group){
-
+
Display.getDefault().asyncExec(new Runnable(){
@Override
- public void run() {
+ public void run() {
try {
EditorUtil.openCdmAuthorities(((Group)selectedObject).getUuid());
} catch (Exception e) {
- MessagingUtils.warningDialog("Could not open CDM Authority Editor", EditorUtil.class, e.getMessage());
+ MessagingUtils.warningDialog(Messages.EditCdmAuthoritiesHandler_COULD_NOT_OPEN_AUTHORITIES, EditorUtil.class, e.getMessage());
}
}
-
+
});
monitor.worked(1);
}
monitor.done();
return Status.OK_STATUS;
}
-
+
};
-
+
job.setPriority(Job.SHORT);
- job.schedule();
-
+ job.schedule();
+
}
return null;
}
/** {@inheritDoc} */
public Object execute(ExecutionEvent event) throws ExecutionException {
- logger.debug("Handler called: " + this.getClass().getCanonicalName());
+ logger.debug("Handler called: " + this.getClass().getCanonicalName()); //$NON-NLS-1$
try {
EditorUtil.openEmpty(null);
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditorInput;
import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
public class OpenChecklistEditorHandler extends DefaultOpenHandlerBase<ITaxonTreeNode> {
- @Override
+ private static final String FAILED_TO_OPEN_EDITOR = Messages.OpenChecklistEditorHandler_FAILED_TO_OPEN;
+ private static final String COULD_NOT_OPEN_DISTRIBUTION_EDITOR_THE_HIERARCHY_IS_CORRUPTED = Messages.OpenChecklistEditorHandler_COULD_NOT_OPEN_MESSAGE;
+ private static final String COULD_NOT_OPEN_DISTRIBUTION_EDITOR = Messages.OpenChecklistEditorHandler_COULD_NOT_OPEN_TITLE;
+
+ @Override
protected ITaxonTreeNode getEntity(UUID uuid) {
ITaxonTreeNode taxonTreeNode = CdmStore.getService(ITaxonNodeService.class).load(uuid);
if(taxonTreeNode==null){
protected void open(ExecutionEvent event, ITaxonTreeNode entity) {
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DISTRIBUTION_AREA_PREFRENCES_ACTIVE)) {
if (StringUtils.isBlank(PreferencesUtil.getPreferenceStore().getString(IPreferenceKeys.DISTRIBUTION_AREA_OCCURENCE_STATUS) )){
- MessagingUtils.informationDialog("No Areas to display", "Please choose the areas you want to display. "
- + "For this go to the preferences, choose the Checklist Editor and choose the areas in the Distribution Selection Wizard.");
+ MessagingUtils.informationDialog(Messages.OpenChecklistEditorHandler_NO_AREAS, Messages.OpenChecklistEditorHandler_CHOOSE_AREA
+ + Messages.OpenChecklistEditorHandler_GOTO_PREFERENCES);
this.dispose();
return;
}
try {
EditorUtil.open(input);
} catch (PartInitException e) {
- MessagingUtils.error(OpenChecklistEditorHandler.class, "Could not open Distribution Editor", e);
+ MessagingUtils.error(OpenChecklistEditorHandler.class, COULD_NOT_OPEN_DISTRIBUTION_EDITOR, e);
} catch (NullPointerException npe) {
- MessagingUtils.messageDialog("Failed to open Editor", OpenChecklistEditorHandler.class,
- "Could not open Distribution Editor. The hierarchy is corrupted!", npe);
+ MessagingUtils.messageDialog(FAILED_TO_OPEN_EDITOR, OpenChecklistEditorHandler.class,
+ COULD_NOT_OPEN_DISTRIBUTION_EDITOR_THE_HIERARCHY_IS_CORRUPTED, npe);
}
} else if (entity instanceof TaxonNode) {
ChecklistEditorInput input = new ChecklistEditorInput((TaxonNode) entity);
try {
EditorUtil.open(input);
} catch (PartInitException e) {
- MessagingUtils.error(OpenChecklistEditorHandler.class, "Could not open Distribution Editor", e);
+ MessagingUtils.error(OpenChecklistEditorHandler.class, COULD_NOT_OPEN_DISTRIBUTION_EDITOR, e);
} catch (NullPointerException npe) {
- MessagingUtils.messageDialog("Failed to open Editor", OpenChecklistEditorHandler.class,
- "Could not open Distribution Editor. The hierarchy is corrupted!", npe);
+ MessagingUtils.messageDialog(FAILED_TO_OPEN_EDITOR, OpenChecklistEditorHandler.class,
+ COULD_NOT_OPEN_DISTRIBUTION_EDITOR_THE_HIERARCHY_IS_CORRUPTED, npe);
}
}
- }
+ }
}
}
import org.eclipse.ui.PartInitException;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
try {
EditorUtil.open(new DerivateViewEditorInput());
} catch (PartInitException e) {
- MessagingUtils.error(OpenDerivateViewHandler.class, "Derivative Editor could not be opened", e);
+ MessagingUtils.error(OpenDerivateViewHandler.class, Messages.OpenDerivateViewHandler_COULD_NOT_OPEN, e);
}
return null;
}
/** {@inheritDoc} */
public Object execute(ExecutionEvent event) throws ExecutionException {
- throw new RuntimeException("Open parent not supported anymore");
+ throw new RuntimeException("Open parent not supported anymore"); //$NON-NLS-1$
// Taxon parent = EditorUtil.getActiveMultiPageTaxonEditor().getTaxon().getTaxonomicParent();
//
// if(parent != null){
*/
/** {@inheritDoc} */
public Object execute(ExecutionEvent event) throws ExecutionException {
- logger.debug("Handler called: " + this.getClass().getCanonicalName());
+ logger.debug("Handler called: " + this.getClass().getCanonicalName()); //$NON-NLS-1$
// TODO what is this for?
EditorUtil.setSaving(true);
* @author BenStoever
*/
public class SpecimenPropertyTester extends PropertyTester {
- private static final String SEQUENCE = "isSequence";
- private static final String SINGLE_READ = "isSingleRead";
- private static final String IS_SINGLEREAD_REUSABLE_HERE = "isSingleReadReusableHere";
- private static final String IS_SINGLEREAD_REUSED = "isSingleReadReused";
+ private static final String SEQUENCE = "isSequence"; //$NON-NLS-1$
+ private static final String SINGLE_READ = "isSingleRead"; //$NON-NLS-1$
+ private static final String IS_SINGLEREAD_REUSABLE_HERE = "isSingleReadReusableHere"; //$NON-NLS-1$
+ private static final String IS_SINGLEREAD_REUSED = "isSingleReadReused"; //$NON-NLS-1$
public SpecimenPropertyTester() {}
import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
try {
EditorUtil.open(new DerivateViewEditorInput(entity.getUuid()));
} catch (PartInitException e) {
- MessagingUtils.error(DefaultOpenSpecimenEditorForTypeSpecimenHandler.class, "Derivative Editor could not be opened", e);
+ MessagingUtils.error(DefaultOpenSpecimenEditorForTypeSpecimenHandler.class, Messages.DefaultOpenSpecimenEditorForTypeSpecimenHandler_COULD_NOT_OPEN, e);
}
}
import eu.etaxonomy.cdm.api.service.ITaxonService;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
try {
EditorUtil.openTaxonBase(entity.getUuid());
} catch (PartInitException e) {
- MessagingUtils.error(DefaultOpenTaxonEditorForTaxonBaseHandler.class, "Could not open taxon editor for taxon/synonym "+entity, e);
+ MessagingUtils.error(DefaultOpenTaxonEditorForTaxonBaseHandler.class, Messages.DefaultOpenTaxonEditorForTaxonBaseHandler_COULD_NOT_OPEN+entity, e);
}
}
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
try {
EditorUtil.open(input);
} catch (PartInitException e) {
- MessagingUtils.error(DefaultOpenTaxonEditorForTaxonNodeHandler.class, "Could not open taxon editor for taxon "+input.getTaxon(), e);
+ MessagingUtils.error(DefaultOpenTaxonEditorForTaxonNodeHandler.class, Messages.DefaultOpenTaxonEditorForTaxonNodeHandler_COULD_NOT_OPEN+input.getTaxon(), e);
}
}
// The plug-in ID
/** Constant <code>PLUGIN_ID="eu.etaxonomy.taxeditor.editor"</code> */
- public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.editor";
+ public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.editor"; //$NON-NLS-1$
// The shared instance
private static TaxeditorEditorPlugin plugin;
// CdmStore.getContextManager().addContextListener(vcl);
plugin = this;
- logger.trace("Plugin started: " + this.getBundle().getSymbolicName());
+ logger.trace("Plugin started: " + this.getBundle().getSymbolicName()); //$NON-NLS-1$
}
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
- logger.trace("Plugin stopped");
+ logger.trace("Plugin stopped"); //$NON-NLS-1$
}
/**
import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyEditorInput;
import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyGraphEditor;
import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyListEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.DataChangeBridge;
import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
public class KeyEditor extends FormEditor implements IConversationEnabled,
IDirtyMarkable, IPartContentHasDetails, ICdmChangeListener {
- public static final String ID = "eu.etaxonomy.taxeditor.editor.key";
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.key"; //$NON-NLS-1$
private ConversationHolder conversation;
@Override
public void doSave(IProgressMonitor monitor) {
try {
- monitor.beginTask("Saving Editor", 1);
+ monitor.beginTask(Messages.KeyEditor_SAVING, 1);
getConversationHolder().bind();
getConversationHolder().commit(true);
polytomousKeyEditorInput.merge();
*/
@Override
public void changed(Object element) {
- editorDirtyStateChanged();
+ if (element != null){
+ editorDirtyStateChanged();
+ }
IEditorPart activeEditor = getActiveEditor();
if (activeEditor instanceof IDirtyMarkable) {
((IDirtyMarkable) activeEditor).changed(element);
try {
addPage(0, new PolytomousKeyListEditor(this), polytomousKeyEditorInput);
- setPageText(0, "List");
+ setPageText(0, Messages.KeyEditor_LIST);
addPage(1, new PolytomousKeyGraphEditor(this), polytomousKeyEditorInput);
- setPageText(1, "Graph");
+ setPageText(1, Messages.KeyEditor_GRAPH);
} catch (PartInitException e) {
MessagingUtils.error(getClass(), e);
}
Map<Object,List<String>> propertyPathsMap = new HashMap<Object,List<String>>();
List<String> polytomousKeyNodePropertyPaths = Arrays.asList(new String[] {
- "statement"
+ "statement" //$NON-NLS-1$
});
- propertyPathsMap.put("children", polytomousKeyNodePropertyPaths);
+ propertyPathsMap.put("children", polytomousKeyNodePropertyPaths); //$NON-NLS-1$
return propertyPathsMap;
}
*/
package eu.etaxonomy.taxeditor.editor.key.polytomous;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+
/**
* @author cmathew
* @date 21 Jul 2015
*/
public interface PolytomousKeyEditorLabels {
- public static final String CREATE_CHILD_POLYTOMOUS_KEY_NODE_LABEL = "Create Child Polytomous Key Node";
- public static final String CREATE_SIBLING_POLYTOMOUS_KEY_NODE_LABEL = "Create Sibling Polytomous Key Node";
- public static final String INSERT_NODE_POLYTOMOUS_KEY_NODE_LABEL = "Insert Node Polytomous Key Node";
- public static final String DELETE_NODE_POLYTOMOUS_KEY_NODE_LABEL = "Insert Node Polytomous Key Node";
+ public static final String CREATE_CHILD_POLYTOMOUS_KEY_NODE_LABEL = Messages.PolytomousKeyEditorLabels_CREATE_NODE;
+ public static final String CREATE_SIBLING_POLYTOMOUS_KEY_NODE_LABEL = Messages.PolytomousKeyEditorLabels_CREATE_SIBLING;
+ public static final String INSERT_NODE_POLYTOMOUS_KEY_NODE_LABEL = Messages.PolytomousKeyEditorLabels_INSERT_NODE;
+ public static final String DELETE_NODE_POLYTOMOUS_KEY_NODE_LABEL = Messages.PolytomousKeyEditorLabels_DELETE_NODE;
- public static final String NO_KEY_NODE_FOR_CHILD_SELECTED_MESSAGE = "No Key Node Selected.Please right-click on a specific key node to create a new child key node.";
- public static final String NO_KEY_NODE_FOR_SIBLING_SELECTED_MESSAGE = "No Key Node Selected.Please right-click on a specific key node to create a new sibling key node.";
- public static final String NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE = "No Key Node Selected.Please right-click on a specific key node to create a new key node.";
+ public static final String NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE = Messages.PolytomousKeyEditorLabels_NO_NODE_SELECTED_MESSAGE;
+ public static final String NO_KEY_NODE_SELECTED = Messages.PolytomousKeyEditorLabels_NO_NODE_SELECTED_TITLE;
}
import eu.etaxonomy.cdm.model.description.PolytomousKey;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
/**
children.add(((PolytomousKey) parent).getRoot());
} else {
throw new RuntimeException(
- "Parent element has to be PolytomousKeyNode or PolytomousKey, but was: "
+ Messages.PolytomousKeyGraphContentProvider_WRONG_PARENT
+ parent.getClass());
}
AbstractGraphKeyEditor<PolytomousKey> implements
IPolytomousKeyEditorPage {
- public static final String ID = "eu.etaxonomy.taxeditor.editor.key.polytomous.graph";
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.key.polytomous.graph"; //$NON-NLS-1$
private final KeyEditor editor;
/**
import eu.etaxonomy.cdm.model.description.KeyStatement;
import eu.etaxonomy.cdm.model.description.PolytomousKey;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
import eu.etaxonomy.taxeditor.store.CdmStore;
class PolytomousKeyLabelProvider extends LabelProvider implements
IEntityStyleProvider {
- public static final String LEAF_BUT_NO_TAXON = "leaf but no taxon";
- public static final String NO_NODE_NUMBER = "No node number set";
- public static final String EMPTY = "";
+ public static final String LEAF_BUT_NO_TAXON = Messages.PolytomousKeyLabelProvider_LEAF_BUT_NO_TAXON;
+ public static final String NO_NODE_NUMBER = Messages.PolytomousKeyLabelProvider_NO_NODE_NUMBER_SET;
+ public static final String EMPTY = ""; //$NON-NLS-1$
@Override
public String getText(Object element) {
}
if (keyNode.getNodeNumber() != null) {
- String statementLabel = "";
+ String statementLabel = ""; //$NON-NLS-1$
String nodeNumber = keyNode.getNodeNumber().toString();
KeyStatement question = keyNode.getQuestion();
if (question != null) {
- statementLabel += " "
+ statementLabel += " " //$NON-NLS-1$
+ question.getLabelText(CdmStore
.getDefaultLanguage());
}
- return String.format("%s. %s", nodeNumber, statementLabel);
+ return String.format("%s. %s", nodeNumber, statementLabel); //$NON-NLS-1$
} else {
return NO_NODE_NUMBER;
}
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.key.KeyEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
}
}
- public static final String ID = "eu.etaxonomy.taxeditor.editor.key.polytomous.list";
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.key.polytomous.list"; //$NON-NLS-1$
private TableViewer viewer;
// This will create the columns for the table
private void createColumns(TableViewer viewer) {
Table table = viewer.getTable();
- String[] titles = { "Node", "Question", "Edge", "Statement", "Link", "Taxon" };
+ String[] titles = { Messages.PolytomousKeyListEditor_NODE, Messages.PolytomousKeyListEditor_QUESTION, Messages.PolytomousKeyListEditor_EDGE, Messages.PolytomousKeyListEditor_STATEMENT, Messages.PolytomousKeyListEditor_LINK, Messages.PolytomousKeyListEditor_TAXON };
int[] bounds = { 50, 200, 50, 200, 100, 200 };
for (int i = 0; i < titles.length; i++) {
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
label_statement.setLayoutData(LayoutConstants.FILL_HORIZONTALLY());
Link link = new Link(getLayoutComposite(), SWT.NONE);
- link.setText("<a>" + getItemLink() + "</a>");
+ link.setText("<a>" + getItemLink() + "</a>"); //$NON-NLS-1$ //$NON-NLS-2$
link.setData(getItemLinkData());
link.addSelectionListener(getLinkSelectionListener());
private String getItemNumber() {
if (isParentRoot()) {
- return "root";
+ return "root"; //$NON-NLS-1$
} else {
PolytomousKeyNode parent = getParent();
String itemNumber = parent.getNodeNumber() != null ? parent
- .getNodeNumber().toString() : "NaN";
+ .getNodeNumber().toString() : "NaN"; //$NON-NLS-1$
int index = parent.getChildren().indexOf(entity);
for (int i = 0; i < index; i++) {
- itemNumber += "'";
+ itemNumber += "'"; //$NON-NLS-1$
}
return itemNumber;
private String getItemQuestion() {
if (isParentRoot()) {
- return "";
+ return ""; //$NON-NLS-1$
} else {
KeyStatement question = getParent().getQuestion();
return question != null ? question.getLabelText(CdmStore
- .getDefaultLanguage()) : "";
+ .getDefaultLanguage()) : ""; //$NON-NLS-1$
}
}
private String getItemStatement() {
KeyStatement statement = entity.getStatement();
return statement != null ? CdmUtils.Nz(statement.getLabelText(CdmStore
- .getDefaultLanguage())) : "No statement";
+ .getDefaultLanguage())) : Messages.PolytomousKeyListItem_NO_STATEMENT;
}
private String getItemLink() {
String taxonString = entity.getTaxon() != null ? entity.getTaxon()
- .getName().getTitleCache() : "Taxon empty";
+ .getName().getTitleCache() : Messages.PolytomousKeyListItem_TAXON_EMPTY;
return entity.getChildren().isEmpty() ? taxonString : entity
.getNodeNumber().toString();
SWT.COLOR_BLUE);
private Styler styler;
- private static final String EMPTY = "";
+ private static final String EMPTY = ""; //$NON-NLS-1$
// TODO make this configurable via preferences
- private static final String INCREMENTOR_CHARACTER = "'";
+ private static final String INCREMENTOR_CHARACTER = "'"; //$NON-NLS-1$
/*
* (non-Javadoc)
private String getItemNumber(PolytomousKeyNode node) {
if (isParentRoot(node)) {
- return "root";
+ return "root"; //$NON-NLS-1$
} else {
String itemNumber = (node.getParent().getNodeNumber() != null) ? node.getParent().getNodeNumber().toString() : EMPTY;
private String getItemQuestion(PolytomousKeyNode node) {
if (isParentRoot(node)) {
- return "";
+ return ""; //$NON-NLS-1$
} else {
KeyStatement question = getParent(node).getQuestion();
return question != null ? CdmUtils.Nz(question.getLabelText(CdmStore.getDefaultLanguage())) : EMPTY;
*
*/
public class PolytomousKeyPropertyTester extends PropertyTester {
- private static final String KEYNODE = "isKeyNode";
+ private static final String KEYNODE = "isKeyNode"; //$NON-NLS-1$
/**
* {@inheritDoc}
/**
- *
+ *
*/
package eu.etaxonomy.taxeditor.editor.key.polytomous.handler;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.key.KeyEditor;
import eu.etaxonomy.taxeditor.editor.key.polytomous.IPolytomousKeyEditorPage;
+import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyEditorLabels;
import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyListEditor;
import eu.etaxonomy.taxeditor.editor.key.polytomous.operation.CreateNodeOperation;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
/**
* @author n.hoffmann
- *
+ *
*/
public class CreateChildNodeHandler extends AbstractHandler {
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
* ExecutionEvent)
if (editorPage instanceof PolytomousKeyListEditor) {
PolytomousKeyListEditor klEditor = (PolytomousKeyListEditor) editorPage;
if(klEditor.getTableItemCount() == 0) {
- PolytomousKey pk = (PolytomousKey)klEditor.getViewerInputKey();
+ PolytomousKey pk = klEditor.getViewerInputKey();
try {
String label = event.getCommand().getName();
IUndoContext undoContext = EditorUtil.getUndoContext();
AbstractPostOperation operation = new CreateNodeOperation(
label, undoContext, pk.getRoot(), editorPage);
- EditorUtil.executeOperation(operation);
+ AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
} else {
AbstractPostOperation operation = new CreateNodeOperation(
label, undoContext, keyNode, editorPage);
- EditorUtil.executeOperation(operation);
+ AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
} else {
MessageDialog.openInformation(
- EditorUtil.getShell(),
- "No Key Node Selected",
- "Please right-click on a specific key node to create a new child key node.");
+ AbstractUtility.getShell(),
+ PolytomousKeyEditorLabels.NO_KEY_NODE_SELECTED,
+ PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE
+ );
}
}
}
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.handlers.HandlerUtil;
-import eu.etaxonomy.cdm.model.description.PolytomousKey;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.key.KeyEditor;
import eu.etaxonomy.taxeditor.editor.key.polytomous.IPolytomousKeyEditorPage;
+import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyEditorLabels;
import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyListEditor;
import eu.etaxonomy.taxeditor.editor.key.polytomous.operation.CreateNodeOperation;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
/**
* Handler responsible for creating sibling nodes of Polytomous Key Nodes
- * @author c.mathew
- *
+ * @author c.mathew
+ *
*/
public class CreateSiblingNodeHandler extends AbstractHandler {
- /*
+ /*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
* ExecutionEvent)
IPolytomousKeyEditorPage editorPage = (IPolytomousKeyEditorPage) ((KeyEditor) editor)
.getActiveEditor();
- if (editorPage instanceof PolytomousKeyListEditor) {
+ if (editorPage instanceof PolytomousKeyListEditor) {
IStructuredSelection selection = (IStructuredSelection) HandlerUtil
.getCurrentSelection(event);
AbstractPostOperation operation = new CreateNodeOperation(
label, undoContext, keyNode.getParent(), editorPage);
- EditorUtil.executeOperation(operation);
+ AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
} else {
MessageDialog.openInformation(
- EditorUtil.getShell(),
- "No Key Node Selected",
- "Please right-click on a specific key node to create a new sibling key node.");
+ AbstractUtility.getShell(),
+ PolytomousKeyEditorLabels.NO_KEY_NODE_SELECTED,
+ PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE
+ );
}
}
- }
+ }
return null;
}
package eu.etaxonomy.taxeditor.editor.key.polytomous.handler;
import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.common.NotDefinedException;
import org.eclipse.core.commands.operations.AbstractOperation;
import org.eclipse.core.commands.operations.IUndoContext;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.handlers.HandlerUtil;
-import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.key.KeyEditor;
import eu.etaxonomy.taxeditor.editor.key.polytomous.IPolytomousKeyEditorPage;
import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyEditorLabels;
-import eu.etaxonomy.taxeditor.editor.key.polytomous.PolytomousKeyListEditor;
import eu.etaxonomy.taxeditor.editor.key.polytomous.operation.DeleteNodeOperation;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
public class DeleteNodeHandler extends AbstractPolytomousKeyNodeHandler {
+ private static final String DO_YOU_REALLY_WANT_TO_DELETE_THE_NODE_THIS_OPERATION_IS_NOT_REVERSABLE = Messages.DeleteNodeHandler_REALLY_DELETE;
+ private static final String CONFIRM_DELETION_OF_CHILDREN = Messages.DeleteNodeHandler_CONFIRM_DELETE;
+ private static final String NO = Messages.DeleteNodeHandler_NO;
+ private static final String CANCEL = Messages.DeleteNodeHandler_CANCEL;
+ private static final String YES = Messages.DeleteNodeHandler_YES;
PolytomousKeyNode nodeToBeDeleted;
+ boolean deleteChildren;
/**
* @param label
*/
super(PolytomousKeyEditorLabels.DELETE_NODE_POLYTOMOUS_KEY_NODE_LABEL);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
- * ExecutionEvent)
- */
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- IEditorPart editor = HandlerUtil.getActiveEditor(event);
-
- if (editor.isDirty()){
- boolean proceed = MessageDialog.openQuestion(null,
- "Save changes", "You have made changes that must be saved before you can delete the node. Would you like to proceed?");
- if (!proceed) {
- return null;
- }else{
- editor.doSave(EditorUtil.getMonitor());
- }
- }
- if (editor instanceof KeyEditor) {
- IPolytomousKeyEditorPage editorPage = (IPolytomousKeyEditorPage) ((KeyEditor) editor)
- .getActiveEditor();
-
- IStructuredSelection selection = (IStructuredSelection) HandlerUtil
- .getCurrentSelection(event);
-
- if (selection.getFirstElement() instanceof PolytomousKeyNode) {
- try {
- String label = event.getCommand().getName();
- IUndoContext undoContext = EditorUtil.getUndoContext();
-
- for (Object element : selection.toArray()) {
- PolytomousKeyNode keyNode = HibernateProxyHelper.deproxy(element, PolytomousKeyNode.class);
-
- AbstractPostOperation operation = new DeleteNodeOperation(
- label, undoContext, keyNode, editorPage);
- EditorUtil.executeOperation(operation);
- }
-
- } catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
- }
- } else {
- MessageDialog.openInformation(
- EditorUtil.getShell(),
- "No Key Node Selected",
- "Please right-click on a specific key node to delete a key node.");
- }
- }
-
- return null;
- }
-
/**
* {@inheritDoc}
*/
@Override
public IStatus allowOperations(ExecutionEvent event) {
IEditorPart editor = HandlerUtil.getActiveEditor(event);
-
+ IStructuredSelection selection = (IStructuredSelection) HandlerUtil
+ .getCurrentSelection(event);
+ AbstractPostOperation operation;
if (editor instanceof KeyEditor) {
editorPage = (IPolytomousKeyEditorPage) ((KeyEditor) editor)
.getActiveEditor();
+ }
- if (editorPage instanceof PolytomousKeyListEditor) {
- PolytomousKeyListEditor klEditor = (PolytomousKeyListEditor) editorPage;
- IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
- if (selection.getFirstElement() instanceof PolytomousKeyNode) {
- nodeToBeDeleted = (PolytomousKeyNode) selection.getFirstElement();
- } else {
- return new Status(IStatus.ERROR,
- "unknown",
- PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_CHILD_SELECTED_MESSAGE);
+
+ if (selection.getFirstElement() instanceof PolytomousKeyNode) {
+ try {
+ String label = event.getCommand().getName();
+ IUndoContext undoContext = EditorUtil.getUndoContext();
+ PolytomousKeyNode node = (PolytomousKeyNode)selection.getFirstElement();
+ nodeToBeDeleted = node;
+ MessageDialog dialog;
+ if (node.getChildren().size()>0){
+ String[] buttonLables = {YES, NO,CANCEL};
+ dialog = new MessageDialog(null, CONFIRM_DELETION_OF_CHILDREN, null, DO_YOU_REALLY_WANT_TO_DELETE_THE_NODE_THIS_OPERATION_IS_NOT_REVERSABLE+Messages.DeleteNodeHandler_NODE_HAS_CHILDREN, MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
+ int returnCode = dialog.open();
+
+ if (returnCode == 0){
+ deleteChildren = false;
+ } else if (returnCode == 1){
+ deleteChildren = true;
+ } else{
+ return new Status(IStatus.CANCEL, "unknown", //$NON-NLS-1$
+ null);
+ }
+
+
+ }else{
+ String[] buttonLables = {YES, CANCEL};
+ dialog = new MessageDialog(null, CONFIRM_DELETION_OF_CHILDREN, null, DO_YOU_REALLY_WANT_TO_DELETE_THE_NODE_THIS_OPERATION_IS_NOT_REVERSABLE, MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 1);
+ int returnCode = dialog.open();
+
+ if (returnCode == 0){
+ deleteChildren = false;
+ } else if (returnCode == 1){
+ return new Status(IStatus.CANCEL, "unknown", //$NON-NLS-1$
+ null);
}
}
+
+
+
+ } catch (NotDefinedException e) {
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
+ }
+ } else {
+ MessageDialog.openInformation(
+ AbstractUtility.getShell(),
+ PolytomousKeyEditorLabels.NO_KEY_NODE_SELECTED,
+ PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE
+ );
}
+
return Status.OK_STATUS;
}
@Override
public AbstractOperation prepareOperation(ExecutionEvent event) {
IUndoContext undoContext = EditorUtil.getUndoContext();
- String label = "";
+ String label = ""; //$NON-NLS-1$
+ IEditorPart editor = HandlerUtil.getActiveEditor(event);
+ if (editor.isDirty()){
+ boolean proceed = MessageDialog.openQuestion(null,
+ Messages.DeleteNodeHandler_SAVE_CHANGES_TITLE, Messages.DeleteNodeHandler_SAVE_CHANGES_MESSAGE);
+ if (!proceed) {
+ return null;
+ }else{
+ editor.doSave(EditorUtil.getMonitor());
+ }
+ }
+
try {
label = event.getCommand().getName();
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
- return new DeleteNodeOperation(label, undoContext, nodeToBeDeleted, editorPage);
+ DeleteNodeOperation operation ;
+ if (deleteChildren){
+ operation = new DeleteNodeOperation(label, undoContext, nodeToBeDeleted, editorPage, true);
+ }else{
+ operation = new DeleteNodeOperation(label, undoContext, nodeToBeDeleted, editorPage, false);
+ }
+
+ return operation;
}
/**
parentNode = ((PolytomousKeyNode) selection.getFirstElement()).getParent();
} else {
return new Status(IStatus.ERROR,
- "unknown",
- PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_CHILD_SELECTED_MESSAGE);
+ "unknown", //$NON-NLS-1$
+ PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE);
}
}
}
label, undoContext, keyNode, editorPage);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
}
}
parentNode = (PolytomousKeyNode) selection.getFirstElement();
} else {
return new Status(IStatus.ERROR,
- "unknown",
- PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_CHILD_SELECTED_MESSAGE);
+ "unknown", //$NON-NLS-1$
+ PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE);
}
}
}
parentNode = (PolytomousKeyNode) selection.getFirstElement();
} else {
return new Status(IStatus.ERROR,
- "unknown",
- PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_SIBLING_SELECTED_MESSAGE);
+ "unknown", //$NON-NLS-1$
+ PolytomousKeyEditorLabels.NO_KEY_NODE_FOR_INSERT_NODE_SELECTED_MESSAGE);
}
return Status.OK_STATUS;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.MessageDialog;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
import eu.etaxonomy.cdm.api.service.DeleteResult;
import eu.etaxonomy.cdm.api.service.IPolytomousKeyNodeService;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
import eu.etaxonomy.taxeditor.bulkeditor.internal.TaxeditorBulkeditorPlugin;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
private final PolytomousKeyNode parent;
private final PolytomousKeyNode node;
-
+ private final boolean deleteChildren;
public DeleteNodeOperation(String label, IUndoContext undoContext,
- PolytomousKeyNode node, IPostOperationEnabled postOperationEnabled) {
+ PolytomousKeyNode node, IPostOperationEnabled postOperationEnabled, boolean deleteChildren) {
super(label, undoContext, node, postOperationEnabled);
HibernateProxyHelper.deproxy(node, PolytomousKeyNode.class);
this.node = node;
this.parent = node.getParent();
+ this.deleteChildren = deleteChildren;
}
/*
throws ExecutionException {
//parent.removeChild(node);
- ICdmApplicationConfiguration controller;
+ ICdmRepository controller;
controller = CdmStore.getCurrentApplicationConfiguration();
DeleteResult result;
if (node.getChildren().size()>0){
- if(! MessageDialog.openQuestion(null, "Confirm deletion of children", "The selected node has children, do you want to delete them, too?")) {
+ if(deleteChildren) {
result = service.delete(node.getUuid(), false);
} else{
result = service.delete(node.getUuid(), true);
}else {
t = result.getExceptions().iterator().next();
}
- MessagingUtils.errorDialog("Exception occured. Delete not possible", getClass(),null, TaxeditorBulkeditorPlugin.PLUGIN_ID, t, true);
+ MessagingUtils.errorDialog(Messages.DeleteNodeOperation_DELETE_FAILED, getClass(),null, TaxeditorBulkeditorPlugin.PLUGIN_ID, t, true);
}
return postExecute(null);
}
import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.operation.RemotingCdmDefaultOperation;
private final PolytomousKeyNode parentNode;
- private final static String LABEL = "Insert new polytomous key node";
+ private final static String LABEL = Messages.InsertPolytomousKeyNodeOperation_INSERT_KEY;
/**
*
import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.operation.RemotingCdmDefaultOperation;
return childNode;
}
- private final static String LABEL = "Create new polytomous key node";
+ private final static String LABEL = Messages.RemotingCreatePolytomousKeyNodeOperation_CREATE_KEY;
public RemotingCreatePolytomousKeyNodeOperation(Object source,
boolean async,
--- /dev/null
+/**
+ * Copyright (C) 2015 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+package eu.etaxonomy.taxeditor.editor.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author pplitzner
+ * @date 09.09.2015
+ *
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "src/main/java/eu.etaxonomy.taxeditor.editor.l10n.messages"; //$NON-NLS-1$
+ public static String AbstractGroupedContainer_EDIT_IN_DETAILS_VIEW;
+ public static String AbstractGroupedContainer_MULTIPLE_USE;
+ public static String AbstractGroupedContainer_NEW_HETERO_SYNONYM;
+ public static String AddDerivedUnitFacadeMediaOperation_CREATE_FAILED;
+ public static String AddDerivedUnitFacadeMediaOperation_CREATE_FAILED_MESSAGE;
+ public static String CdmAuthorityEditor_SAVING_AUTHORITY_EDITOR;
+ public static String ChangeConceptRelationshipTypeOperation_NOT_IMPLEMENTED;
+ public static String ChangeConceptToSynonymOperation_MULTI_REPS;
+ public static String ChangeConceptToSynonymOperation_MULTI_REPS_MESSAGE;
+ public static String ChangeSynonymToAcceptedTaxonHandler_CHANGE_SYN_TO_ACC_TAXON;
+ public static String ChangeSynonymToAcceptedTaxonHandler_CREATE_FAILURE;
+ public static String ChangeSynonymToAcceptedTaxonHandler_SELECT_PARENT;
+ public static String ChangeSynonymToAcceptedTaxonOperation_INCONSISTENT_DATA;
+ public static String ChangeSynonymToAcceptedTaxonOperation_NOT_IMPLEMENTED;
+ public static String ChecklistDropdownSelectionListener_ADD_DISTRIBUTION;
+ public static String ChecklistEditor_DIST_STATUS;
+ public static String ChecklistEditor_DIST_STATUS_TOOLTIP;
+ public static String ChecklistEditor_ELEMENT_COUNT;
+ public static String ChecklistEditor_LOAD_CNT_TAXA;
+ public static String ChecklistEditor_LOAD_TAXA;
+ public static String ChecklistEditor_NO_AREAS;
+ public static String ChecklistEditor_NO_AREAS_MESSAGE;
+ public static String ChecklistEditor_RANK;
+ public static String ChecklistEditor_RETRIEVE_NODES;
+ public static String ChecklistEditor_SAVE_EDITOR;
+ public static String ChecklistEditor_SEARCH;
+ public static String ChecklistEditor_TAXON;
+ public static String ChecklistEditor_UNKNOWN;
+ public static String ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION;
+ public static String ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION_MESSAGE;
+ public static String ConceptContainer_SEC_REQUIRED;
+ public static String ConceptGraphView_VIEWER_NAME;
+ public static String ConceptViewPart_VIEWER_NAME;
+ public static String CreateDerivateContextMenu_ADD;
+ public static String CreateDerivateContextMenu_DNA_SAMPLE;
+ public static String CreateDerivateContextMenu_MEDIA;
+ public static String CreateDerivateContextMenu_MEDIA_EXISTING;
+ public static String CreateDerivateContextMenu_MEDIA_SPECIMEN;
+ public static String CreateDerivateContextMenu_NO_CHILD_DERIVATE;
+ public static String CreateDerivateContextMenu_SEQUENCE;
+ public static String CreateDerivateContextMenu_SINGLE_READ;
+ public static String CreateDerivateContextMenu_SPECIMEN;
+ public static String CreateDerivateContextMenu_TISSUE_SAMPLE;
+ public static String CreateFieldUnitContextMenu_CREATE_FIELD_UNIT;
+ public static String CreateFieldUnitContextMenu_CREATE_FIELD_UNIT_FOR;
+ public static String DefaultOpenSpecimenEditorForTypeSpecimenHandler_COULD_NOT_OPEN;
+ public static String DefaultOpenTaxonEditorForTaxonBaseHandler_COULD_NOT_OPEN;
+ public static String DefaultOpenTaxonEditorForTaxonNodeHandler_COULD_NOT_OPEN;
+ public static String DeleteDerivateHandler_INVALID_SELECTION;
+ public static String DeleteDerivateOperation_AND_CHILDREN;
+ public static String DeleteDerivateOperation_CONFIRM;
+ public static String DeleteDerivateOperation_DELETE_FAILED;
+ public static String DeleteDerivateOperation_REALLY_DELETE;
+ public static String DeleteDescriptionElementOperation_DESC_NOT_FOUND;
+ public static String DeleteHandler_CONFIRM_DELETION;
+ public static String DeleteHandler_CONFIRM_DELETION_MESSAGE;
+ public static String DeleteHandler_DELETE;
+ public static String DeleteHandler_INVALID_SELECTION;
+ public static String DeleteHandler_SKIP;
+ public static String DeleteMediaHandler_CONFIRM;
+ public static String DeleteMediaHandler_CONFIRM_MESSAGE;
+ public static String DeleteMediaHandler_DELETE;
+ public static String DeleteMediaHandler_SKIP;
+ public static String DeleteNodeHandler_CANCEL;
+ public static String DeleteNodeHandler_CONFIRM_DELETE;
+ public static String DeleteNodeHandler_NO;
+ public static String DeleteNodeHandler_NODE_HAS_CHILDREN;
+ public static String DeleteNodeHandler_REALLY_DELETE;
+ public static String DeleteNodeHandler_SAVE_CHANGES_MESSAGE;
+ public static String DeleteNodeHandler_SAVE_CHANGES_TITLE;
+ public static String DeleteNodeHandler_YES;
+ public static String DeleteNodeOperation_DELETE_FAILED;
+ public static String DeleteTaxonBaseHandler_CONFIRM_DELETION;
+ public static String DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT;
+ public static String DeleteTaxonBaseHandler_REALLY_DELETE_TAXON;
+ public static String DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM;
+ public static String DeleteTaxonBaseHandler_REALLY_DELETE_MISAPPLICATION;
+ public static String DeleteTaxonBaseHandler_DELETE_SYNONYM_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS;
+ public static String DeleteTaxonBaseHandler_DELETE_MISAPPLIEDNAME_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS;
+
+
+ public static String DerivateDropListener_MOVE_TO;
+ public static String DerivateSearchComposite_ALL;
+ public static String DerivateSearchComposite_DERIVATE_TYPE;
+ public static String DerivateSearchComposite_NEW_TEXT;
+ public static String DerivateSearchComposite_NO;
+ public static String DerivateSearchComposite_SEARCH;
+ public static String DerivateSearchComposite_TAXON;
+ public static String DerivateSearchComposite_TAXON_ASSIGNMENT;
+ public static String DerivateSearchComposite_TITLE_CACHE;
+ public static String DerivateSearchComposite_YES;
+ public static String DerivateView_CNT_DERIVATIVES_FOUND;
+ public static String DerivateView_DERIVATIVE_EDITOR;
+ public static String DerivateView_NO_TAXON_SELECTED;
+ public static String DerivateView_PERF_WARNING;
+ public static String DerivateView_PERF_WARNING_MESSAGE;
+ public static String DerivateView_SAVING_HIERARCHY;
+ public static String DerivateView_SPECIMEN_EDITOR;
+ public static String DerivateView_UNSAVED_CHANGES;
+ public static String DerivateView_YOU_NEED_TO_SAVE;
+ public static String DerivateViewEditorInput_FAIL_INIT;
+ public static String DerivateViewEditorInput_NO_ROOT;
+ public static String DerivateViewEditorInput_SPECIMEN_EDITOR;
+ public static String DescriptionElementDropAdapter_MOVE_DESC;
+ public static String DescriptionElementDropAdapter_NOT_SUPPORTED;
+ public static String DescriptionElementDropAdapter_NOT_SUPPORTED_EMPTY_ELEMENT;
+ public static String DescriptionElementDropAdapter_NOT_SUPPORTED_NEW_ELEMENT;
+ public static String DescriptiveViewPart_COLLAPSE_ALL;
+ public static String DescriptiveViewPart_EXPAND_ALL;
+ public static String DescriptiveViewPart_FACTUAL_DATA;
+ public static String DescriptiveViewPart_SHOW_ALL_DATA;
+ public static String EditCdmAuthoritiesHandler_COULD_NOT_OPEN_AUTHORITIES;
+ public static String EditCdmAuthoritiesHandler_OPEN_AUTHORITIES;
+ public static String EditorAnnotation_ERROR;
+ public static String EditorAnnotation_WARNING;
+ public static String EditorStateManager_ERROR_OPEN_WINDOW;
+ public static String EditorStateManager_REFRESH_EDITOR;
+ public static String EditorStateManager_RESTORE_EDITORS;
+ public static String EditorUtil_COMFIRM_SAVE;
+ public static String EditorUtil_CONFIRM_SAVE_MESSAGE;
+ public static String EditorUtil_ORPHAN_ACCEPTED_TAXON;
+ public static String EditorUtil_ORPHAN_ACCEPTED_TAXON_MESSAGE;
+ public static String EditorUtil_ORPHAN_TAXON;
+ public static String EditorUtil_ORPHAN_TAXON_MESSAGE;
+ public static String IContainerConstants_CLICK_ADD_NAME;
+ public static String InsertPolytomousKeyNodeOperation_INSERT_KEY;
+ public static String KeyEditor_GRAPH;
+ public static String KeyEditor_LIST;
+ public static String KeyEditor_SAVING;
+ public static String ListenToSelectionChangeContextMenu_LINK;
+ public static String ListenToSelectionChangeContextMenu_UNLINK;
+ public static String MediaViewPart_MEDIA;
+ public static String MisapplicationContainer_SEC_REF_REQUIRED;
+ public static String MoveDerivateOperation_MOVE_NOT_POSSIBLE;
+ public static String MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE;
+ public static String MoveDescriptionElementsHandler_CHOOSE_ACC_TAXON;
+ public static String MoveDescriptionElementsHandler_CREATE_FAILURE;
+ public static String MoveDescriptionElementsHandler_ELEMENTS_MOVED;
+ public static String MoveDescriptionToOtherTaxonHandler_CHOOSE_ACC_TAXON;
+ public static String MoveDescriptionToOtherTaxonHandler_CREATE_FAILED;
+ public static String MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES;
+ public static String MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES_MESSAGE;
+ public static String MoveDescriptionToOtherTaxonOperation_MOVED_FROM;
+ public static String MoveMediaInListOperation_MORE_DESC;
+ public static String MoveSynonymToAnotherAcceptedTaxonHandler_CHANGE_ACC_TAXON;
+ public static String MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION;
+ public static String MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION_MESSAGE;
+ public static String MoveSynonymToAnotherAcceptedTaxonHandler_SELECT_ACC_TAXON;
+ public static String MultiPageTaxonEditor_INVALID_INPUT;
+ public static String MultiPageTaxonEditor_NEW_TAXON;
+ public static String MultiPageTaxonEditor_NO_NAME_SPECIFIED;
+ public static String MultiPageTaxonEditor_NO_NAME_SPECIFIED_MESSAGE;
+ public static String MultiPageTaxonEditor_POST_OP_CALLED;
+ public static String MultiPageTaxonEditor_POST_OP_NOT_ENABLED;
+ public static String MultiPageTaxonEditor_REFRESH_ERROR;
+ public static String MultiPageTaxonEditor_REFRESH_ERROR_MESSAGE;
+ public static String MultiPageTaxonEditor_SAVING_EDITOR;
+ public static String MultiPageTaxonEditor_SAVING_TAXON;
+ public static String MultiPageTaxonEditor_SAVING_TAXON_MESSAGE;
+ public static String MultiPageTaxonEditor_UNSAVED_DATA;
+ public static String MultiPageTaxonEditor_UNSAVED_DATA_MESSAGE;
+ public static String NameEditorDropTargetListener_CHANGE_ACC_TAXON;
+ public static String NameEditorDropTargetListener_CHANGE_HOMOTYPICAL_GROUP;
+ public static String NameEditorDropTargetListener_CHANGE;
+ public static String NameEditorDropTargetListener_CHANGE_SYNONYM;
+ public static String NameEditorDropTargetListener_CHANGE_SYNONYM_TO_MISAPP;
+ public static String NameEditorDropTargetListener_UNSUCCESSFULL_DROP;
+ public static String OpenChecklistEditorHandler_CHOOSE_AREA;
+ public static String OpenChecklistEditorHandler_COULD_NOT_OPEN_MESSAGE;
+ public static String OpenChecklistEditorHandler_COULD_NOT_OPEN_TITLE;
+ public static String OpenChecklistEditorHandler_FAILED_TO_OPEN;
+ public static String OpenChecklistEditorHandler_GOTO_PREFERENCES;
+ public static String OpenChecklistEditorHandler_NO_AREAS;
+ public static String OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR;
+ public static String OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN;
+ public static String OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED;
+ public static String OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND;
+ public static String OpenDerivateViewHandler_COULD_NOT_OPEN;
+ public static String OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS;
+ public static String OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS_MESSAGE;
+ public static String OpenDerivativeEditorForTaxonNode_COULD_NOT_OPEN;
+ public static String OpenRelatedConceptHandler_COULD_NOT_OPEN;
+ public static String OpenRelatedConceptHandler_COULD_NOT_OPEN_MESSAGE;
+ public static String PolytomousKeyEditorLabels_CREATE_NODE;
+ public static String PolytomousKeyEditorLabels_CREATE_SIBLING;
+ public static String PolytomousKeyEditorLabels_DELETE_NODE;
+ public static String PolytomousKeyEditorLabels_INSERT_NODE;
+ public static String PolytomousKeyEditorLabels_NO_NODE_SELECTED_MESSAGE;
+ public static String PolytomousKeyEditorLabels_NO_NODE_SELECTED_TITLE;
+ public static String PolytomousKeyGraphContentProvider_WRONG_PARENT;
+ public static String PolytomousKeyLabelProvider_LEAF_BUT_NO_TAXON;
+ public static String PolytomousKeyLabelProvider_NO_NODE_NUMBER_SET;
+ public static String PolytomousKeyListEditor_EDGE;
+ public static String PolytomousKeyListEditor_LINK;
+ public static String PolytomousKeyListEditor_NODE;
+ public static String PolytomousKeyListEditor_QUESTION;
+ public static String PolytomousKeyListEditor_STATEMENT;
+ public static String PolytomousKeyListEditor_TAXON;
+ public static String PolytomousKeyListItem_NO_STATEMENT;
+ public static String PolytomousKeyListItem_TAXON_EMPTY;
+ public static String RemotingCreatePolytomousKeyNodeOperation_CREATE_KEY;
+ public static String SimpleSelectionProvider_SETTING_SELECTION;
+ public static String SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE;
+ public static String SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE;
+ public static String SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE;
+ public static String UseObjectManager_RESET_DATA;
+ public static String UsesLabelProvider_NO_DATA;
+ public static String UsesLabelProvider_NO_LABEL;
+ public static String UsesLabelProvider_USE;
+ public static String UsesViewPart_VIEWER_NAME;
+ public static String SetSecundumHandler_configureSettings;
+ public static String SetSecundumHandler_confirm;
+ public static String SwapSynonymAndAcceptedHandler_COULD_NOT_OPEN;
+ public static String SwapSynonymAndAcceptedOperation_NOT_IMPLEMENTED;
+ public static String SwapSynonymAndAcceptedOperation_SWAP_SYN_ACC_TAXON;
+ public static String SynonymContainer_SYNONYM_NULL_NAME;
+ public static String TaxonEditorInput_INCORRECT_STATE;
+ public static String TaxonEditorInput_NEW_TAXON;
+ public static String TaxonEditorInput_NO_ACCEPTED_TAXON_PRESENT;
+ public static String TaxonEditorInput_NOT_IMPLEMENTED;
+ public static String TaxonEditorInput_NOT_IMPLEMENTED_MESSAGE;
+ public static String TaxonEditorInput_OPEN_MISSAPPLIED_NAME;
+ public static String TaxonEditorInput_TAXON_NOT_IN_CLASSIFICATION;
+ public static String TaxonEditorInputFactory_COULD_NOT_CREATE;
+ public static String TaxonEditorInputFactory_NOT_FOUND_TAXON;
+ public static String TaxonNameEditor_INVALID_INPUT;
+ public static String TaxonNameEditor_INVALID_INPUT_TAXON_NULL;
+ public static String TaxonNameEditor_SAVING_COMPOSITES;
+ public static String TaxonNameEditor_SAVING_NAMES;
+ public static String TaxonNameEditor_THERE_SHOULD_ALWAYS_BE;
+ public static String ValidationDaemon_RUNNING_DAEMON;
+ public static String ValidationDaemon_VALIDATION_EXCEPTION;
+ public static String ValidationDaemon_VALIDATION_STOPPED;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
--- /dev/null
+CreateDerivateContextMenu_ADD=Add...
+CreateDerivateContextMenu_DNA_SAMPLE=DNA Sample
+CreateDerivateContextMenu_MEDIA=Media...
+CreateDerivateContextMenu_MEDIA_EXISTING=Use existing media item
+CreateDerivateContextMenu_MEDIA_SPECIMEN=Media item
+CreateDerivateContextMenu_NO_CHILD_DERIVATE=No child derivatives
+CreateDerivateContextMenu_SEQUENCE=Consensus Sequence
+CreateDerivateContextMenu_SINGLE_READ=Single Read
+CreateDerivateContextMenu_SPECIMEN=Specimen
+CreateDerivateContextMenu_TISSUE_SAMPLE=Tissue Sample
+CreateFieldUnitContextMenu_CREATE_FIELD_UNIT=Create new field unit
+CreateFieldUnitContextMenu_CREATE_FIELD_UNIT_FOR=Create new field unit for %s
+SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE=Remove from this Sequence
+SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE=Reuse for other Sequence
+SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE=Reuse SingleRead here
+DerivateView_CNT_DERIVATIVES_FOUND=%d derivative hierarchies found
+DerivateView_DERIVATIVE_EDITOR=Specimen Editor
+DerivateView_NO_TAXON_SELECTED=\ [no taxon selected]
+DerivateView_PERF_WARNING=Performance warning
+DerivateView_PERF_WARNING_MESSAGE=Specimens will not be loaded\!\n There are %d specimens associated with the current selection. If you really want to show all of them in the specimen editor please use the taxon filter in the search bar.
+DerivateView_SAVING_HIERARCHY=Saving hierarchy
+DerivateView_SPECIMEN_EDITOR=Specimen Editor
+DerivateView_UNSAVED_CHANGES=View has unsaved changes
+DerivateView_YOU_NEED_TO_SAVE=You need to save before performing this action
+DeleteDerivateOperation_AND_CHILDREN= and its children
+DeleteDerivateOperation_CONFIRM=Confirm Deletion
+DeleteDerivateOperation_DELETE_FAILED=Deletion failed
+DeleteDerivateOperation_REALLY_DELETE=Do you really want to delete the selected element
+DerivateDropListener_MOVE_TO=Moving "%s" to "%s"
+DerivateViewEditorInput_FAIL_INIT=Failed initializing editor
+DerivateViewEditorInput_NO_ROOT=No root element found\!
+MediaViewPart_MEDIA=Media
+MoveDerivateOperation_MOVE_NOT_POSSIBLE=Moving derivatives not possible\!
+MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE=Moving "%s" to "%s" is not possible\!
+MoveDescriptionElementsHandler_CHOOSE_ACC_TAXON=Choose the accepted taxon
+MoveDescriptionElementsHandler_CREATE_FAILURE=Could not create taxon
+MoveDescriptionElementsHandler_ELEMENTS_MOVED=Elements moved from %s
+MoveDescriptionToOtherTaxonHandler_CHOOSE_ACC_TAXON=Choose the accepted taxon
+MoveDescriptionToOtherTaxonHandler_CREATE_FAILED=Could not create Taxon
+MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES=Save changes
+MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES_MESSAGE=You have made changes that must be saved before this query can be executed. Would you like to proceed?
+MoveDescriptionToOtherTaxonOperation_MOVED_FROM=Description moved from %s
+MoveMediaInListOperation_MORE_DESC=More than one description element in this image gallery
+OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Could not open Specimen Editor
+OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN=Failed to open Editor
+OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED=The derivative hierarchy is corrupted\!
+OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND=No Derivatives found
+DeleteTaxonBaseHandler_CONFIRM_DELETION=Confirm Deletion
+DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT=Element has to be Synonym, Misapplication or Concept
+DeleteTaxonBaseHandler_REALLY_DELETE_TAXON=Are you sure you want to delete the selected taxon?
+DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM=Are you sure you want to delete the selected synoym, this is irreversible?
+DeleteTaxonBaseHandler_DELETE_SYNONYM_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS=The Synonym could be deleted, but related object(s) could not be deleted
+DeleteTaxonBaseHandler_DELETE_MISAPPLIEDNAME_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS=The misapplied name could be deleted, but related object(s) could not be deleted
+DeleteTaxonBaseHandler_REALLY_DELETE_MISAPPLICATION=Are you sure you want to delete the selected misapplication, this is irreversible?
+DescriptionElementDropAdapter_MOVE_DESC=Move Descriptions
+DescriptionElementDropAdapter_NOT_SUPPORTED=Operation not supported yet
+DescriptionElementDropAdapter_NOT_SUPPORTED_EMPTY_ELEMENT=We are unable to drag and drop empty descriptions
+DescriptionElementDropAdapter_NOT_SUPPORTED_NEW_ELEMENT=We are currently unable to drag and drop a newly created element. Please save the editor to make this work.
+DescriptiveViewPart_COLLAPSE_ALL=Collapse All
+DescriptiveViewPart_EXPAND_ALL=Expand All
+DescriptiveViewPart_FACTUAL_DATA=Factual Data
+DescriptiveViewPart_SHOW_ALL_DATA=Show all factual data
+ConceptGraphView_VIEWER_NAME=Concept Graph
+ConceptViewPart_VIEWER_NAME=Concept Relations
+UsesLabelProvider_NO_DATA=No data provided
+UsesLabelProvider_NO_LABEL=No label provided
+UsesLabelProvider_USE=Use:
+UsesViewPart_VIEWER_NAME=Uses
+SetSecundumHandler_configureSettings=Configure the settings for secundum reference exchange of the subtree
+SetSecundumHandler_confirm=Confirm the exchange of secundum reference
+DefaultOpenSpecimenEditorForTypeSpecimenHandler_COULD_NOT_OPEN=Specimen editor could not be opened
+DefaultOpenTaxonEditorForTaxonBaseHandler_COULD_NOT_OPEN=Could not open taxon editor for taxon/synonym
+DefaultOpenTaxonEditorForTaxonNodeHandler_COULD_NOT_OPEN=Could not open taxon editor for taxon node
+OpenChecklistEditorHandler_CHOOSE_AREA=Please choose the areas you want to display.
+OpenChecklistEditorHandler_COULD_NOT_OPEN_MESSAGE=Could not open Distribution Editor.
+OpenChecklistEditorHandler_COULD_NOT_OPEN_TITLE=Could not open Distribution Editor
+OpenChecklistEditorHandler_FAILED_TO_OPEN=Failed to open Editor
+OpenChecklistEditorHandler_GOTO_PREFERENCES=For this go to the preferences, choose the Checklist Editor and choose the areas in the Distribution Selection Wizard.
+OpenChecklistEditorHandler_NO_AREAS=No Areas to display
+OpenDerivateViewHandler_COULD_NOT_OPEN=Specimen editor could not be opened
+DeleteNodeHandler_CANCEL=Cancel
+DeleteNodeHandler_CONFIRM_DELETE=Confirm deletion of children
+DeleteNodeHandler_NO=No
+DeleteNodeHandler_NODE_HAS_CHILDREN=The selected node has children, do you want to delete them, too?
+DeleteNodeHandler_REALLY_DELETE=Do you really want to delete the node. This operation is not reversable.
+DeleteNodeHandler_SAVE_CHANGES_MESSAGE=You have made changes that must be saved before you can delete the node. Would you like to proceed?
+DeleteNodeHandler_SAVE_CHANGES_TITLE=Save changes
+DeleteNodeHandler_YES=Yes
+DeleteNodeOperation_DELETE_FAILED=Exception occured. Delete not possible
+InsertPolytomousKeyNodeOperation_INSERT_KEY=Insert new polytomous key node
+RemotingCreatePolytomousKeyNodeOperation_CREATE_KEY=Create new polytomous key node
+PolytomousKeyEditorLabels_CREATE_NODE=Create Child Polytomous Key Node
+PolytomousKeyEditorLabels_CREATE_SIBLING=Create Sibling Polytomous Key Node
+PolytomousKeyEditorLabels_DELETE_NODE=Delete Polytomous Key Node
+PolytomousKeyEditorLabels_INSERT_NODE=Insert Polytomous Key Node
+PolytomousKeyEditorLabels_NO_NODE_SELECTED_MESSAGE=No Key Node Selected.Please right-click on a specific key node to create a new key node.
+PolytomousKeyEditorLabels_NO_NODE_SELECTED_TITLE=No Key Node Selected.
+PolytomousKeyGraphContentProvider_WRONG_PARENT=Parent element has to be PolytomousKeyNode or PolytomousKey, but was:
+PolytomousKeyLabelProvider_LEAF_BUT_NO_TAXON=leaf but no taxon
+PolytomousKeyLabelProvider_NO_NODE_NUMBER_SET=No node number set
+PolytomousKeyListEditor_EDGE=Edge
+PolytomousKeyListEditor_LINK=Link
+PolytomousKeyListEditor_NODE=Node
+PolytomousKeyListEditor_QUESTION=Question
+PolytomousKeyListEditor_STATEMENT=Statement
+PolytomousKeyListEditor_TAXON=Taxon
+PolytomousKeyListItem_NO_STATEMENT=No statement
+PolytomousKeyListItem_TAXON_EMPTY=Taxon empty
+TaxonNameEditor_INVALID_INPUT=Invalid Input: Must be IEditorInput
+TaxonNameEditor_INVALID_INPUT_TAXON_NULL=Invalid Input: Taxon cannot be null
+TaxonNameEditor_SAVING_COMPOSITES=Saving composite:
+TaxonNameEditor_SAVING_NAMES=Saving names
+TaxonNameEditor_THERE_SHOULD_ALWAYS_BE=There should always be a selected object.
+ValidationDaemon_RUNNING_DAEMON=Running validation daemon
+ValidationDaemon_VALIDATION_EXCEPTION=Validation module terminated unexpectedly:
+ValidationDaemon_VALIDATION_STOPPED=Validation module stopped
+ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION=Choose Classification
+ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION_MESSAGE=The taxon is part of multiple classification. Please choose the one you want to open.
+EditorStateManager_ERROR_OPEN_WINDOW=Error opening an editor window
+EditorStateManager_REFRESH_EDITOR=Refreshing Editors
+EditorStateManager_RESTORE_EDITORS=Restoring Editors
+EditorUtil_COMFIRM_SAVE=Confirm save
+EditorUtil_CONFIRM_SAVE_MESSAGE=Warning - this operation will save the editor. This will also save all other unsaved changes in your working editor to the database. Please 'Cancel' if you are not ready to do this.
+EditorUtil_ORPHAN_ACCEPTED_TAXON=Orphaned accepted taxon
+EditorUtil_ORPHAN_ACCEPTED_TAXON_MESSAGE=The accepted taxon of this synonym is not part of any classification. Editing with the name editor is currently not implemented. Try to edit the taxon with the bulk editor.
+EditorUtil_ORPHAN_TAXON=Orphaned Taxon
+EditorUtil_ORPHAN_TAXON_MESSAGE=This is an orphaned taxon i.e. a taxon that is not connected to a classification and not having any taxonomic relationships. Editing of orphaned taxa in the name editor is currently not supported. Try editing with the bulk editor
+MultiPageTaxonEditor_INVALID_INPUT=Invalid Input: Must be TaxonEditorInput
+MultiPageTaxonEditor_NEW_TAXON=New taxon
+MultiPageTaxonEditor_NO_NAME_SPECIFIED=No Name Specified
+MultiPageTaxonEditor_NO_NAME_SPECIFIED_MESSAGE=An attempt was made to save a taxon or synonym with an empty name. Operation was cancelled.
+MultiPageTaxonEditor_POST_OP_CALLED=postOperation called on MultiPageTaxonEditor. Can you make it more specific?
+MultiPageTaxonEditor_POST_OP_NOT_ENABLED=postOperation not enabled for editor
+MultiPageTaxonEditor_REFRESH_ERROR=Error refreshing editor
+MultiPageTaxonEditor_REFRESH_ERROR_MESSAGE=Could not refresh this editor
+MultiPageTaxonEditor_SAVING_EDITOR=Saving Editor
+MultiPageTaxonEditor_SAVING_TAXON=saving a taxon
+MultiPageTaxonEditor_SAVING_TAXON_MESSAGE=Please close and reopen the taxon again.
+MultiPageTaxonEditor_UNSAVED_DATA=Editor has unsaved data
+MultiPageTaxonEditor_UNSAVED_DATA_MESSAGE=This editor can not be refreshed because it contains unsaved data. Refreshing this editor would discard the changes. Please save this editor, close and reopen it manually in order to get the latest content
+SimpleSelectionProvider_SETTING_SELECTION=Setting Selection
+TaxonEditorInput_INCORRECT_STATE=Incorrect state
+TaxonEditorInput_NEW_TAXON=New taxon
+TaxonEditorInput_NO_ACCEPTED_TAXON_PRESENT=Trying to open accepted taxon for a synonym or misapplication but no accepted taxa are present. This should not have happened.
+TaxonEditorInput_NOT_IMPLEMENTED=Not yet implemented
+TaxonEditorInput_NOT_IMPLEMENTED_MESSAGE=Selected element is not type TaxonBase.
+TaxonEditorInput_OPEN_MISSAPPLIED_NAME=trying to open Mispplied Name
+TaxonEditorInput_TAXON_NOT_IN_CLASSIFICATION=The accepted taxon is not part of any classification. Editing with the name editor is currently not implemented. Try to edit the taxon with the bulk editor.
+TaxonEditorInputFactory_COULD_NOT_CREATE=Could not create element
+TaxonEditorInputFactory_NOT_FOUND_TAXON=Couldn't find taxon node with UUID
+UseObjectManager_RESET_DATA=Reset usage data
+CdmAuthorityEditor_SAVING_AUTHORITY_EDITOR=Saving CDM Authority Editor
+EditCdmAuthoritiesHandler_COULD_NOT_OPEN_AUTHORITIES=Could not open CDM Authority Editor
+EditCdmAuthoritiesHandler_OPEN_AUTHORITIES=Opening Cdm Authorities
+KeyEditor_GRAPH=Graph
+KeyEditor_LIST=List
+KeyEditor_SAVING=Saving Editor
+AbstractGroupedContainer_EDIT_IN_DETAILS_VIEW=This name may only be edited in the details view.
+AbstractGroupedContainer_MULTIPLE_USE=The name of this taxons is used multiple times.
+AbstractGroupedContainer_NEW_HETERO_SYNONYM=New Heterotypic Synonym
+AddDerivedUnitFacadeMediaOperation_CREATE_FAILED=Image gallery creation failed
+AddDerivedUnitFacadeMediaOperation_CREATE_FAILED_MESSAGE=Only one image gallery is possible.
+ConceptContainer_SEC_REQUIRED=This taxon requires a sec. reference.
+EditorAnnotation_ERROR=Error:
+EditorAnnotation_WARNING=Warning:
+IContainerConstants_CLICK_ADD_NAME=Click to add name
+MisapplicationContainer_SEC_REF_REQUIRED=This misapplication requires a sec. reference.
+SynonymContainer_SYNONYM_NULL_NAME=Synonym with a null name detected. This should never happen.
+NameEditorDropTargetListener_CHANGE=Change
+NameEditorDropTargetListener_CHANGE_ACC_TAXON=Change accepted Taxon
+NameEditorDropTargetListener_CHANGE_HOMOTYPICAL_GROUP=Change Homotypical Group
+NameEditorDropTargetListener_CHANGE_SYNONYM=Change to Synonym
+NameEditorDropTargetListener_CHANGE_SYNONYM_TO_MISAPP=Change Synonym to Misapplication
+NameEditorDropTargetListener_UNSUCCESSFULL_DROP=User unsuccessfully tried to drop: %s. Target: %s
+ChangeSynonymToAcceptedTaxonHandler_CHANGE_SYN_TO_ACC_TAXON=Change synonym to accepted taxon
+ChangeSynonymToAcceptedTaxonHandler_CREATE_FAILURE=Could not create Taxon
+ChangeSynonymToAcceptedTaxonHandler_SELECT_PARENT=Select parent
+MoveSynonymToAnotherAcceptedTaxonHandler_CHANGE_ACC_TAXON=Change accepted Taxon of Synonym
+MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION=No selection
+MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION_MESSAGE=No synonym selected
+MoveSynonymToAnotherAcceptedTaxonHandler_SELECT_ACC_TAXON=Select new accepted taxon
+SwapSynonymAndAcceptedHandler_COULD_NOT_OPEN=Could not open editor for taxon
+ChangeConceptRelationshipTypeOperation_NOT_IMPLEMENTED=Not implemented yet. See developer documentation for details
+ChangeConceptToSynonymOperation_MULTI_REPS=Multiple relations between taxa
+ChangeConceptToSynonymOperation_MULTI_REPS_MESSAGE=There are multiple relations between the accepted and the related taxon. This case is not handled by the software yet.
+ChangeSynonymToAcceptedTaxonOperation_INCONSISTENT_DATA=Operation may lead to inconsistent data
+ChangeSynonymToAcceptedTaxonOperation_NOT_IMPLEMENTED=Not yet implemented
+SwapSynonymAndAcceptedOperation_NOT_IMPLEMENTED=Not yet implemented
+SwapSynonymAndAcceptedOperation_SWAP_SYN_ACC_TAXON=Swap Synonym And Accepted Taxon Operation
+ChecklistDropdownSelectionListener_ADD_DISTRIBUTION=Add Distribution
+ChecklistEditor_DIST_STATUS=Distribution Status
+ChecklistEditor_DIST_STATUS_TOOLTIP=Show Distribution Status for selected Areas
+ChecklistEditor_ELEMENT_COUNT=Element count:
+ChecklistEditor_LOAD_CNT_TAXA=Loading %d Taxa...
+ChecklistEditor_LOAD_TAXA=loading Taxa
+ChecklistEditor_NO_AREAS=No Areas to display
+ChecklistEditor_NO_AREAS_MESSAGE=Please choose the areas you want to display. Go to the preferences, choose the Checklist Editor and choose the areas in the Distribution Selection Wizard.
+ChecklistEditor_RANK=Rank
+ChecklistEditor_RETRIEVE_NODES=Retrieving TaxonNodes
+ChecklistEditor_SAVE_EDITOR=Saving Editor
+ChecklistEditor_SEARCH=Search:
+ChecklistEditor_TAXON=Taxon
+ChecklistEditor_UNKNOWN=unknown
+OpenRelatedConceptHandler_COULD_NOT_OPEN=Could not open taxon
+OpenRelatedConceptHandler_COULD_NOT_OPEN_MESSAGE=Could not open the taxon: %s
+ListenToSelectionChangeContextMenu_LINK=Link with taxon selection
+ListenToSelectionChangeContextMenu_UNLINK=Unlink from taxon selection
+DeleteDerivateHandler_INVALID_SELECTION=Selection is not valid for this delete handler
+DeleteDescriptionElementOperation_DESC_NOT_FOUND=Couldn't find element's description!
+DeleteHandler_CONFIRM_DELETION=Confirm Deletion
+DeleteHandler_CONFIRM_DELETION_MESSAGE=Do you really want to delete the media?
+DeleteHandler_DELETE=Delete
+DeleteHandler_INVALID_SELECTION=Selection is not valid for this delete handler
+DeleteHandler_SKIP=Skip
+DeleteMediaHandler_CONFIRM=Confirm Deletion
+DeleteMediaHandler_CONFIRM_MESSAGE=Do you really want to delete the media?
+DeleteMediaHandler_DELETE=Delete
+DeleteMediaHandler_SKIP=Skip
+OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS=No specimens found
+OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS_MESSAGE=No specimens found for the selected object. (Maybe there are unsaved changes)
+OpenDerivativeEditorForTaxonNode_COULD_NOT_OPEN=Specimen editor could not be opened
+DerivateSearchComposite_ALL=All
+DerivateSearchComposite_DERIVATE_TYPE=Derivative Type
+DerivateSearchComposite_NEW_TEXT=New Text
+DerivateSearchComposite_NO=No
+DerivateSearchComposite_SEARCH=Search
+DerivateSearchComposite_TAXON=Taxon
+DerivateSearchComposite_TAXON_ASSIGNMENT=Taxon assignment
+DerivateSearchComposite_TITLE_CACHE=Title Cache
+DerivateSearchComposite_YES=Yes
+DerivateViewEditorInput_SPECIMEN_EDITOR=Specimen Editor
--- /dev/null
+CreateDerivateContextMenu_ADD=Hinzufügen...
+CreateDerivateContextMenu_DNA_SAMPLE=DNA Probe
+CreateDerivateContextMenu_MEDIA=Media...
+CreateDerivateContextMenu_MEDIA_EXISTING=Vorhandendes Medienobjekt verwenden
+CreateDerivateContextMenu_MEDIA_SPECIMEN=Medienobjekt
+CreateDerivateContextMenu_NO_CHILD_DERIVATE=Keine Kind-Derivate
+CreateDerivateContextMenu_SEQUENCE=Konsensussequenz
+CreateDerivateContextMenu_SINGLE_READ=Single Read
+CreateDerivateContextMenu_SPECIMEN=Beleg
+CreateDerivateContextMenu_TISSUE_SAMPLE=Gewebeprobe
+CreateFieldUnitContextMenu_CREATE_FIELD_UNIT=Erzeuge neue Field Unit
+CreateFieldUnitContextMenu_CREATE_FIELD_UNIT_FOR=Erzeuge neue Field Unit für %s
+SingleReadSequenceContextMenu_REMOVE_FROM_SEQUENCE=Von Sequenz entfernen
+SingleReadSequenceContextMenu_REUSE_FOR_SEQUENCE=Für andere Sequenz verwenden
+SingleReadSequenceContextMenu_REUSE_SINGLE_READ_HERE=SingleRead hier verwenden
+DerivateView_CNT_DERIVATIVES_FOUND=%d Derivat-Hierarchien gefunden
+DerivateView_DERIVATIVE_EDITOR=Specimen-Editor
+DerivateView_NO_TAXON_SELECTED=\ [kein Taxon ausgewählt]
+DerivateView_PERF_WARNING=Performance-Warnung
+DerivateView_PERF_WARNING_MESSAGE=Specimens werden nicht geladen\!\n Es gibt %d Specimens für die aktuelle Auswahl. Wenn wirklich alle Specimens im Specimen-Editor angezeigt werden sollen, dann nutzen Sie bitte den Taxon-Filter in der Suchleiste.
+DerivateView_SAVING_HIERARCHY=Speichere Hierarchie
+DerivateView_SPECIMEN_EDITOR=Specimen-Editor
+DerivateView_UNSAVED_CHANGES=Ungepeicherte Änderungen
+DerivateView_YOU_NEED_TO_SAVE=Sie müssen speichern, um diese Aktion auszuführen
+DeleteDerivateOperation_AND_CHILDREN= (mit Kind-Elementen)
+DeleteDerivateOperation_CONFIRM=Löschen bestätigen
+DeleteDerivateOperation_DELETE_FAILED=Löschen fehlgeschlagen
+DeleteDerivateOperation_REALLY_DELETE=Wollen Sie wirklich das ausgewählte Element löschen
+DerivateDropListener_MOVE_TO=Verschiebe "%s" nach "%s"
+DerivateViewEditorInput_FAIL_INIT=Initialisierung des Editor fehlgeschlagen
+DerivateViewEditorInput_NO_ROOT=Kein Root-Element gefunden\!
+MediaViewPart_MEDIA=Media
+MoveDerivateOperation_MOVE_NOT_POSSIBLE=Verschieben von Derivaten nicht möglich\!
+MoveDerivateOperation_MOVE_TO_NOT_POSSIBLE=Verschieben von "%s" nach "%s" nicht möglich\!
+MoveDescriptionElementsHandler_CHOOSE_ACC_TAXON=Wähle akzeptiertes Taxon
+MoveDescriptionElementsHandler_CREATE_FAILURE=Konnte Taxon nicht erstellen
+MoveDescriptionElementsHandler_ELEMENTS_MOVED=Elemente verschoben von %s
+MoveDescriptionToOtherTaxonHandler_CHOOSE_ACC_TAXON=Wähle akzeptiertes Taxon
+MoveDescriptionToOtherTaxonHandler_CREATE_FAILED=Konnte Taxon nicht erstellen
+MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES=Änderungen speichern
+MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES_MESSAGE=Änderungen müssen gespeichert werden, bevor die Anfrage ausgeführt werden kann. Fortfahren?
+MoveDescriptionToOtherTaxonOperation_MOVED_FROM=Beschreibung verschoben von %s
+MoveMediaInListOperation_MORE_DESC=Mehr als eine Beschreibung in dieser Bildergalerie
+OpenDerivateEditorForTaxonHandler_COULD_NOT_OPEN_EDITOR=Konnte Specimen-Editor nicht öffnen
+OpenDerivateEditorForTaxonHandler_FAILED_TO_OPEN=Öffnen des Editors fehlgeschlagen
+OpenDerivateEditorForTaxonHandler_HIERARCHY_CORRUPTED=Die Derivathierarchie ist korrumpiert\!
+OpenDerivateEditorForTaxonHandler_NO_DERIVATIVES_FOUND=Keine Derivate gefunden
+DeleteTaxonBaseHandler_CONFIRM_DELETION=Löschen bestätigen
+DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT=Element muss Synonym, Misapplikation oder Konzept sein
+DeleteTaxonBaseHandler_REALLY_DELETE_TAXON=Wollen Sie wirklich das ausgewählte Taxon löschen?
+DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM=Wollen Sie das ausgewählte Synonym wirklich löschen, dieser Vorgang ist nicht reversibel.
+DeleteTaxonBaseHandler_DELETE_SYNONYM_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS=Das Synonym konnte gelöscht werden, aber es gibt noch verknüpfte Objekte, die nicht gelöscht werden konnten.
+DeleteTaxonBaseHandler_DELETE_MISAPPLIEDNAME_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS=Die Misapplikation konnte gelöscht werden, aber es gibt noch verknüpfte Objekte, die nicht gelöscht werden konnten.
+DeleteTaxonBaseHandler_REALLY_DELETE_MISAPPLICATION=Wollen Sie die ausgewählte Misapplikation wirklich löschen, dieser Vorgang ist nicht reversibel.
+DescriptionElementDropAdapter_MOVE_DESC=Verschiebe Beschreibungen
+DescriptionElementDropAdapter_NOT_SUPPORTED=Vorgang noch nicht unterstützt
+DescriptionElementDropAdapter_NOT_SUPPORTED_EMPTY_ELEMENT=Drag and Drop für leeren Beschreibungen noch nicht unterstützt
+DescriptionElementDropAdapter_NOT_SUPPORTED_NEW_ELEMENT=Drag and Drop für neu erstellte Elemente noch nicht unterstützt. Bitte Editor speichern, um den Vorgang auszuführen.
+DescriptiveViewPart_COLLAPSE_ALL=Alles einklappen
+DescriptiveViewPart_EXPAND_ALL=Alles ausklappen
+DescriptiveViewPart_FACTUAL_DATA=Faktendaten
+DescriptiveViewPart_SHOW_ALL_DATA=Zeige alle Faktendaten
+ConceptGraphView_VIEWER_NAME=Konzeptgraph
+ConceptViewPart_VIEWER_NAME=Konzeptrelationen
+UsesLabelProvider_NO_DATA=Keine Daten verfügbar
+UsesLabelProvider_NO_LABEL=Kein Label verfügbar
+UsesLabelProvider_USE=Nutzung:
+UsesViewPart_VIEWER_NAME=Nutzung
+SetSecundumHandler_configureSettings=Konfigurieren Sie das Ersetzen der Secundum Referenz für den ausgewählten Teilbaum.
+SetSecundumHandler_confirm=Ersetzen der Secundum Referenz bestätigen
+DefaultOpenSpecimenEditorForTypeSpecimenHandler_COULD_NOT_OPEN=Specimen-Editor konnte nicht geöffnet werden
+DefaultOpenTaxonEditorForTaxonBaseHandler_COULD_NOT_OPEN=Taxon-Editor für Taxon/Synonym konnte nicht geöffnet werden
+DefaultOpenTaxonEditorForTaxonNodeHandler_COULD_NOT_OPEN=Taxon-Editor für Taxonknoten konnte nicht geöffnet werden
+OpenChecklistEditorHandler_CHOOSE_AREA=Bitte wählen Sie das Gebiet aus, das dargestellt werden soll
+OpenChecklistEditorHandler_COULD_NOT_OPEN_MESSAGE=Der Verbreitungs-Editor konnte nicht geöffnet werden
+OpenChecklistEditorHandler_COULD_NOT_OPEN_TITLE=Der Verbreitungs-Editor konnte nicht geöffnet werden
+OpenChecklistEditorHandler_FAILED_TO_OPEN=Der Editor konnte nicht geöffnet werden
+OpenChecklistEditorHandler_GOTO_PREFERENCES=Hierfür gehen Sie zu den Preferences, wählen Sie Checklist Editor und dann die Gebiete in dem Verbreitungs-Wizard.
+OpenChecklistEditorHandler_NO_AREAS=Keine Gebiete, die angezeigt werden können
+OpenDerivateViewHandler_COULD_NOT_OPEN=Specimen-Editor konnte nicht geöffnet werden.
+DeleteNodeHandler_CANCEL=Abbrechen
+DeleteNodeHandler_CONFIRM_DELETE=Löschen der Kindknoten bestätigen
+DeleteNodeHandler_NO=Nein
+DeleteNodeHandler_NODE_HAS_CHILDREN=Der ausgewählte Knoten hat Kindknoten. Sollen diese auch gelöscht werden?
+DeleteNodeHandler_REALLY_DELETE=Wollen Sie wirklich den Knoten löschen? Diese Operation ist nicht rückgängig zu machen.
+DeleteNodeHandler_SAVE_CHANGES_MESSAGE=Sie haben ungespeicherte Änderungen, die vor dem Löschen des Knotens gespeichert werden müssen. Wollen Sie fortfahren?
+DeleteNodeHandler_SAVE_CHANGES_TITLE=Änderungen speichern
+DeleteNodeHandler_YES=Ja
+DeleteNodeOperation_DELETE_FAILED=Ein Fehler ist aufgetreten. Löschen nicht möglich
+InsertPolytomousKeyNodeOperation_INSERT_KEY=Neuen polytomen Bestimmungsschlüssel einfügen
+RemotingCreatePolytomousKeyNodeOperation_CREATE_KEY=Neuen polytomen Bestimmungsschlüssel anlegen
+PolytomousKeyEditorLabels_CREATE_NODE=Neuen polytomen Bestimmungsschlüssel anlegen
+PolytomousKeyEditorLabels_CREATE_SIBLING=Neuen polytomen Bestimmungsschlüssel anlegen
+PolytomousKeyEditorLabels_DELETE_NODE=Polytomen Bestimmungsschlüssel löschen
+PolytomousKeyEditorLabels_INSERT_NODE=Polytomen Bestimmungsschlüssel einfügen
+PolytomousKeyEditorLabels_NO_NODE_SELECTED_MESSAGE=Kein Schlüssel ausgewählt. Um einen Schlüssel anzulegen, bitte auf einen ausgewählten Schlüssel einen Rechts-Klick ausführen.
+PolytomousKeyEditorLabels_NO_NODE_SELECTED_TITLE=Kein Schlüssel ausgewählt.
+PolytomousKeyGraphContentProvider_WRONG_PARENT=Der Elternknoten muss ein PolytomousKeyNode oder PolytomousKey sein, war aber:
+PolytomousKeyLabelProvider_LEAF_BUT_NO_TAXON=leaf but no taxon
+PolytomousKeyLabelProvider_NO_NODE_NUMBER_SET=Keine Knotennummer angegeben
+PolytomousKeyListEditor_EDGE=Edge
+PolytomousKeyListEditor_LINK=Link
+PolytomousKeyListEditor_NODE=Node
+PolytomousKeyListEditor_QUESTION=Question
+PolytomousKeyListEditor_STATEMENT=Statement
+PolytomousKeyListEditor_TAXON=Taxon
+PolytomousKeyListItem_NO_STATEMENT=No statement
+PolytomousKeyListItem_TAXON_EMPTY=Taxon leer
+TaxonNameEditor_INVALID_INPUT=Ungültige Eingabe: Muss IEditorInput sein
+TaxonNameEditor_INVALID_INPUT_TAXON_NULL=Ungültige Eingabe: Taxon darf nicht null sein
+TaxonNameEditor_SAVING_COMPOSITES=Speichere Composites:
+TaxonNameEditor_SAVING_NAMES=Speichere Namen
+TaxonNameEditor_THERE_SHOULD_ALWAYS_BE=Es muss immer ein Objekt ausgewählt sein.
+ValidationDaemon_RUNNING_DAEMON=Validation daemon läuft
+ValidationDaemon_VALIDATION_EXCEPTION=Validation-Modul wurde unerwartet beendet:
+ValidationDaemon_VALIDATION_STOPPED=Validation-Modul angehalten
+ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION=Klassifiaktion wählen
+ChooseFromMultipleTaxonNodesDialog_CHOOSE_CLASSIFICATION_MESSAGE=Das Taxon ist in mehreren Klassifikationen vorhanden. Bitte wählen sie, welche sie öffnen möchten.
+EditorStateManager_ERROR_OPEN_WINDOW=Fehler beim Öffnen des Editors
+EditorStateManager_REFRESH_EDITOR=Aktualisiere Editor
+EditorStateManager_RESTORE_EDITORS=Editor wird wiederhergestellt
+EditorUtil_COMFIRM_SAVE=Speichern bestätigen
+EditorUtil_CONFIRM_SAVE_MESSAGE=Warnung - Diese Operation wird den Editor speichern. Ebenso werden alle weiteren ungespeicherten Änderungen gespeichert. Um das zu verhindern, drücken Sie 'Abbrechen'.
+EditorUtil_ORPHAN_ACCEPTED_TAXON=Verwaistes akzeptiertes Taxon
+EditorUtil_ORPHAN_ACCEPTED_TAXON_MESSAGE=Das akzeptierte Taxon dieses Synonyms ist in keiner Klassifikation vorhanden. Editieren mit dem Namens-Editor ist noch nicht implementiert. Benutzen Sie den Bulk-Editor.
+EditorUtil_ORPHAN_TAXON=Verwaistes Taxon
+EditorUtil_ORPHAN_TAXON_MESSAGE=Dies ist ein verwaistes Taxon d.h. ein Taxon, welches in keiner Klassifikation vorhanden ist und keine Taxonverknüpfungen hat. Editieren von verwaisten Taxa im Namens-Editor ist noch nicht implementiert. Benutzen Sie den Bulk-Editor.
+MultiPageTaxonEditor_INVALID_INPUT=Ungültiger Input: Muss TaxonEditorInput sein
+MultiPageTaxonEditor_NEW_TAXON=Neues Taxon
+MultiPageTaxonEditor_NO_NAME_SPECIFIED=Kein Name angegeben
+MultiPageTaxonEditor_NO_NAME_SPECIFIED_MESSAGE=Es wurde versucht ein Taxon oder Synonym mit einem leeren Namen zu speichern. Vorgang abgebrochen.
+MultiPageTaxonEditor_POST_OP_CALLED=postOperation called on MultiPageTaxonEditor. Can you make it more specific?
+MultiPageTaxonEditor_POST_OP_NOT_ENABLED=postOperation not enabled for editor
+MultiPageTaxonEditor_REFRESH_ERROR=Fehler beim Aktualisieren des Editors
+MultiPageTaxonEditor_REFRESH_ERROR_MESSAGE=Konnte Editor nicht aktualisieren
+MultiPageTaxonEditor_SAVING_EDITOR=Speichere Editor
+MultiPageTaxonEditor_SAVING_TAXON=Speichere Taxon
+MultiPageTaxonEditor_SAVING_TAXON_MESSAGE=Bitte Taxon schließen und erneut öffnen.
+MultiPageTaxonEditor_UNSAVED_DATA=Editor hat ungespeicherte Änderungen
+MultiPageTaxonEditor_UNSAVED_DATA_MESSAGE=Der Editor kann nicht aktualisiert werden, weil es ungespeicherte Änderungen gibt. Aktualisieren würde diese Änderungen verwerfen. Bitte den Editor speichern, schließen und wieder öffnen, um den Inhalt zu aktualisieren.
+SimpleSelectionProvider_SETTING_SELECTION=Auswahl setzen
+TaxonEditorInput_INCORRECT_STATE=Ungültiger Zustand
+TaxonEditorInput_NEW_TAXON=Neues Taxon
+TaxonEditorInput_NO_ACCEPTED_TAXON_PRESENT=Öffnen eins akzeptierten Taxons für ein Synonym oder eine Misapplikation, aber kein akzeptiertes Taxon gefunden. Das sollte nicht passieren.
+TaxonEditorInput_NOT_IMPLEMENTED=Noch nicht implementiert
+TaxonEditorInput_NOT_IMPLEMENTED_MESSAGE=Ausgewähltes Element ist nicht vom Typ TaxonBase.
+TaxonEditorInput_OPEN_MISSAPPLIED_NAME=Öffnen einer Misapplikation
+TaxonEditorInput_TAXON_NOT_IN_CLASSIFICATION=Das akzeptierte Taxon ist in keiner Klassifikation vorhanden. Editieren mit dem Namens-Editor ist noch nicht implementier. Benutzen Sie den Bulk-Editor.
+TaxonEditorInputFactory_COULD_NOT_CREATE=Element konnte nicht erstellt werden
+TaxonEditorInputFactory_NOT_FOUND_TAXON=Konnte Taxonknoten nicht finden. UUID
+UseObjectManager_RESET_DATA=Wiederherstellen der Nutzugsdaten
+CdmAuthorityEditor_SAVING_AUTHORITY_EDITOR=Speichere CDM Authority Editor
+EditCdmAuthoritiesHandler_COULD_NOT_OPEN_AUTHORITIES=Konnte CDM-Authority-Editor nicht öffnen
+EditCdmAuthoritiesHandler_OPEN_AUTHORITIES=Öffne Cdm-Authorities
+KeyEditor_GRAPH=Graph
+KeyEditor_LIST=Liste
+KeyEditor_SAVING=Speichere Editor
+AbstractGroupedContainer_EDIT_IN_DETAILS_VIEW=Diser Name kann nur im Details-View bearbeitet werden.
+AbstractGroupedContainer_MULTIPLE_USE=Dieser Taxonname wird mehrfach verwendet.
+AbstractGroupedContainer_NEW_HETERO_SYNONYM=Neues heterotypisches Synonym
+ConceptContainer_SEC_REQUIRED=Dieses Taxon benötigt eine sec. Referenz.
+EditorAnnotation_ERROR=Error:
+EditorAnnotation_WARNING=Warunung:
+AddDerivedUnitFacadeMediaOperation_CREATE_FAILED=Erstellen der Bildergallerie fehlgeschlagen
+AddDerivedUnitFacadeMediaOperation_CREATE_FAILED_MESSAGE=Nur eine Bildergalerie möglich.
+IContainerConstants_CLICK_ADD_NAME=Klicken, um Namen hinzuzufügen
+MisapplicationContainer_SEC_REF_REQUIRED=Diese Misapplikation benötigt eine sec. Referenz.
+SynonymContainer_SYNONYM_NULL_NAME=Synonym mit einem null-Namen entdeckt. Das sollte nicht passieren.
+NameEditorDropTargetListener_CHANGE=Ändern
+NameEditorDropTargetListener_CHANGE_ACC_TAXON=Ändere akzeptiertes Taxon
+NameEditorDropTargetListener_CHANGE_HOMOTYPICAL_GROUP=Ändere homotypische Gruppe
+NameEditorDropTargetListener_CHANGE_SYNONYM=Ändere in Synonym
+NameEditorDropTargetListener_CHANGE_SYNONYM_TO_MISAPP=Ändere Synonym in Misapplikation
+NameEditorDropTargetListener_UNSUCCESSFULL_DROP=Das Ziehen von %s auf %s war nicht erfolgreich.
+ChangeSynonymToAcceptedTaxonHandler_CHANGE_SYN_TO_ACC_TAXON=Ändere Synonym in akzeptiertes Taxon
+ChangeSynonymToAcceptedTaxonHandler_CREATE_FAILURE=Konnte Taxon nicht erstellen
+ChangeSynonymToAcceptedTaxonHandler_SELECT_PARENT=Wähle Elternelement
+MoveSynonymToAnotherAcceptedTaxonHandler_CHANGE_ACC_TAXON=Ändere akzeptiertes Taxon des Synonyms
+MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION=Keine Auswahl
+MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION_MESSAGE=Kein Synonym ausgewählt
+MoveSynonymToAnotherAcceptedTaxonHandler_SELECT_ACC_TAXON=Wähle neues akzeptiertes Taxon
+SwapSynonymAndAcceptedHandler_COULD_NOT_OPEN=Konnte Editor für Taxon nicht öffnen
+ChangeConceptRelationshipTypeOperation_NOT_IMPLEMENTED=Noch nicht implementiert. Für Details bitte in die Entwickler-Dokumentation schauen
+ChangeConceptToSynonymOperation_MULTI_REPS=Mehrere Verknüpfungen zwischen Taxa
+ChangeConceptToSynonymOperation_MULTI_REPS_MESSAGE=Es gibt mehrere Verknüpfungen zwischen dem akzeptierten und dem verknüpften Taxon. Dieser Fall wird noch nicht von der Software unterstützt.
+ChangeSynonymToAcceptedTaxonOperation_INCONSISTENT_DATA=Vorgang kann zu inkonsistenten Daten führen
+ChangeSynonymToAcceptedTaxonOperation_NOT_IMPLEMENTED=Noch nicht implementiert
+SwapSynonymAndAcceptedOperation_NOT_IMPLEMENTED=Noch nicht implementiert
+SwapSynonymAndAcceptedOperation_SWAP_SYN_ACC_TAXON=Tausche Synonym und akzeptiertes Taxon
+ChecklistDropdownSelectionListener_ADD_DISTRIBUTION=Verbreitung hinzufügen
+ChecklistEditor_DIST_STATUS=Verbreitungsstatus
+ChecklistEditor_DIST_STATUS_TOOLTIP=Zeige den Verbreitungsstatus für die ausgewählten Gebiete
+ChecklistEditor_ELEMENT_COUNT=Anzahl der Elemente:
+ChecklistEditor_LOAD_CNT_TAXA=Lade %d Taxa...
+ChecklistEditor_LOAD_TAXA=Lade Taxa
+ChecklistEditor_NO_AREAS=Keine Gebiete zum Anzeigen
+ChecklistEditor_NO_AREAS_MESSAGE=Bitte wählen Sie die Gebiete, die sie anzeigen möchten. Unter Einstellungen->Checklist-Editor lassen sich die Gebiete mit dem Verbreitungs-Wizard auswählen.
+ChecklistEditor_RANK=Rang
+ChecklistEditor_RETRIEVE_NODES=Lade Taxonknoten
+ChecklistEditor_SAVE_EDITOR=Speichere Editor
+ChecklistEditor_SEARCH=Suche:
+ChecklistEditor_TAXON=Taxon
+ChecklistEditor_UNKNOWN=unbekannt
+OpenRelatedConceptHandler_COULD_NOT_OPEN=Konnte Taxon nicht öffnen
+OpenRelatedConceptHandler_COULD_NOT_OPEN_MESSAGE=Konnte Taxon nicht öffnen: %s
+ListenToSelectionChangeContextMenu_LINK=Verknüpfe mit Taxonauswahl
+ListenToSelectionChangeContextMenu_UNLINK=Verknüpfung mit Taxonauswahl aufheben
+DeleteDerivateHandler_INVALID_SELECTION=Auswahl ungültig
+OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS=Keine Specimens gefunden
+OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS_MESSAGE=Keine Specimens für die Auswahl. (Gibt es vielleicht noch ungespeicherte Änderungen?)
+OpenDerivativeEditorForTaxonNode_COULD_NOT_OPEN=Specimen-Editor konnte nicht geöffnet werden
+DeleteDescriptionElementOperation_DESC_NOT_FOUND=Beschreibung konnte nicht gefunden werden!
+DeleteHandler_CONFIRM_DELETION=Löschen bestätigen
+DeleteHandler_CONFIRM_DELETION_MESSAGE=Wollen sie wirklich das Medienobjektlöschen?
+DeleteHandler_DELETE=Löschen
+DeleteHandler_INVALID_SELECTION=Auswahl ungültig für den DeleteHandler
+DeleteHandler_SKIP=Ãœberspringen
+DeleteMediaHandler_CONFIRM=Löschen bestätigen
+DeleteMediaHandler_CONFIRM_MESSAGE=Wollen sie wirklich das Medienobjektlöschen?
+DeleteMediaHandler_DELETE=Löschen
+DeleteMediaHandler_SKIP=Ãœberspringen
+DerivateSearchComposite_ALL=Alle
+DerivateSearchComposite_DERIVATE_TYPE=Derivat-Typ
+DerivateSearchComposite_NEW_TEXT=Neuer Text
+DerivateSearchComposite_NO=Nein
+DerivateSearchComposite_SEARCH=Suche
+DerivateSearchComposite_TAXON=Taxon
+DerivateSearchComposite_TAXON_ASSIGNMENT=Taxonbestimmung
+DerivateSearchComposite_TITLE_CACHE=Titlecache
+DerivateSearchComposite_YES=Ja
+DerivateViewEditorInput_SPECIMEN_EDITOR=Specimen-Editor
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
import eu.etaxonomy.taxeditor.editor.SimpleSelectionProvider;
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.name.container.AbstractGroup;
import eu.etaxonomy.taxeditor.editor.name.container.AbstractGroupedContainer;
import eu.etaxonomy.taxeditor.editor.name.container.AcceptedGroup;
ISelectionListener, IDropTargetable, ISecuredEditor {
/** Constant <code>ID="eu.etaxonomy.taxeditor.editor.taxon.name"</code> */
- public static final String ID = "eu.etaxonomy.taxeditor.editor.taxon.name";
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.taxon.name"; //$NON-NLS-1$
private Taxon taxon;
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().setFocus();
if (getSelectedContainer() == null) {
throw new IllegalStateException(
- "There should always be a selected object.");
+ Messages.TaxonNameEditor_THERE_SHOULD_ALWAYS_BE);
}
getSelectedContainer().setSelected();
@Override
public void doSave(IProgressMonitor monitor) {
- monitor.beginTask("Saving names", getGroupedContainers().size());
+ monitor.beginTask(Messages.TaxonNameEditor_SAVING_NAMES, getGroupedContainers().size());
try {
// check for empty names
for (AbstractGroupedContainer container : getGroupedContainers()) {
- monitor.subTask("Saving composite: "
+ monitor.subTask(Messages.TaxonNameEditor_SAVING_COMPOSITES
+ container.getTaxonBase().getTitleCache());
container.persistName();
throws PartInitException {
if (!(input != null)) {
- throw new PartInitException("Invalid Input: Must be IEditorInput");
+ throw new PartInitException(Messages.TaxonNameEditor_INVALID_INPUT);
}
if (input.getAdapter(Taxon.class) != null) {
taxon = CdmBase.deproxy(input.getAdapter(Taxon.class), Taxon.class);
} else {
- throw new PartInitException("Invalid Input: Taxon cannot be null");
+ throw new PartInitException(Messages.TaxonNameEditor_INVALID_INPUT_TAXON_NULL);
}
setSite(site);
/**
* Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
+ * European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
- *
+ *
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.MouseAdapter;
import eu.etaxonomy.cdm.common.CdmUtils;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.name.INonViralName;
import eu.etaxonomy.cdm.model.name.NameRelationship;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
import eu.etaxonomy.taxeditor.editor.CdmDataTransfer;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
import eu.etaxonomy.taxeditor.editor.name.container.EditorAnnotation.EditorAnnotationType;
import eu.etaxonomy.taxeditor.editor.name.dnd.NameEditorDragListener;
* The <code>IManagedForm</code> can also used for drawing borders by calling
* the method <code>createBorderSupport()</code>.
* </p>
- *
+ *
* @author p.ciardelli
* @author n.hoffmann
* @created 02.06.2008
* <p>
* Constructor for AbstractGroupedContainer.
* </p>
- *
+ *
* @param editor
* a {@link eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor}
* object.
protected void createListener() {
nameCompositeModifyListener = new ModifyListener() {
- public void modifyText(ModifyEvent e) {
+ @Override
+ public void modifyText(ModifyEvent e) {
// mark the composite dirty
setDirty(true);
// parse the text
String text = nameViewer.getTextWidget().getText();
- NonViralName name = parseHandler.parse(text);
+ TaxonNameBase<?,?> name = (TaxonNameBase<?,?>)parseHandler.parse(text);
getTaxonBase().setName(name);
getTaxonBase().setTitleCache((getTaxonBase().generateTitle()));
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt
* .events.FocusEvent)
* <p>
* getEmptyTextPrompt
* </p>
- *
+ *
* @return a {@link java.lang.String} object.
*/
protected String getEmptyTextPrompt() {
}
/**
- *
+ *
*/
private void showNameRelations() {
TaxonNameBase<?, ?> name = getName();
}
/**
- *
+ *
*/
public void showAnnotations() {
.addAnnotation(
new EditorAnnotation(EditorAnnotationType.WARNING,
0,
- "This name may only be edited in the details view."));
+ Messages.AbstractGroupedContainer_EDIT_IN_DETAILS_VIEW));
}
if (isNameUsedMultipleTimes()) {
getNameViewer().addAnnotation(
new EditorAnnotation(EditorAnnotationType.WARNING, 0,
- "This taxons name is used multiple times."));
+ Messages.AbstractGroupedContainer_MULTIPLE_USE));
}
}
/**
- *
+ *
*/
private void showParsingProblems() {
String text = getNameViewer().getTextWidget().getText();
* <p>
* handleSplitText
* </p>
- *
+ *
* @param text
* a {@link java.lang.String} object.
*/
.parseReferencedName(text, null);
EditorUtil.executeOperation(new CreateSynonymInNewGroupOperation(
- "New Heterotypic Synonym", getEditor().getUndoContext(),
+ Messages.AbstractGroupedContainer_NEW_HETERO_SYNONYM, getEditor().getUndoContext(),
getEditor().getTaxon(), synonymName, getEditor()));
}
/**
* Refreshes the display with latest data from the model.
- *
+ *
* Note: Will not parse the text and not calculate errors!
*/
- public void refresh() {
+ @Override
+ public void refresh() {
// showNameRelations();
String text = NameHelper.getDisplayNameWithRef(getTaxonBase());
}
/**
- *
+ *
*/
protected abstract void updateIcon();
protected abstract void updateNonEditableInfo();
/**
- *
+ *
*/
private void enableFreeText() {
setEnabled(isFreetextEditingAllowed());
/**
* Checks whether the freetext should be editable based on specific empty
* fields.
- *
+ *
* @return
*/
private boolean isFreetextEditingAllowed() {
}
/**
- * Checks whether there are more than one, non-orphaned taxon bases
+ * Checks whether there are more than one, non-orphaned taxon bases
* attached to the taxon name
- *
+ *
* @return
*/
private boolean isNameUsedMultipleTimes() {
-
+
Set<TaxonBase> taxonBases = getName().getTaxonBases();
Iterator<TaxonBase> tbItr = taxonBases.iterator();
int nonOrphanedTaxonBaseCount = taxonBases.size();
-
+
while(tbItr.hasNext()) {
- TaxonBase tb = tbItr.next();
+ TaxonBase tb = tbItr.next();
if(tb.isOrphaned()) {
nonOrphanedTaxonBaseCount--;
}
* <p>
* getTaxonBase
* </p>
- *
+ *
* @return the taxonBase
*/
public T getTaxonBase() {
* <p>
* getName
* </p>
- *
+ *
* @return a {@link eu.etaxonomy.cdm.model.name.TaxonNameBase} object.
*/
public TaxonNameBase getName() {
- return (TaxonNameBase) HibernateProxyHelper.deproxy(getTaxonBase()
+ return HibernateProxyHelper.deproxy(getTaxonBase()
.getName());
}
// @Override
// protected IStatus run(IProgressMonitor monitor) {
//
- final NonViralName name = parseHandler
+ final TaxonNameBase<?,?> name = (TaxonNameBase<?,?>)parseHandler
.parseAndResolveDuplicates(unparsedNameString);
//
// Display.getDefault().asyncExec(new Runnable(){
* <p>
* Getter for the field <code>group</code>.
* </p>
- *
+ *
* @return a
* {@link eu.etaxonomy.taxeditor.editor.name.container.AbstractGroup}
* object.
*/
public AbstractGroup getGroup() {
if (group == null) {
- throw new IllegalStateException("Group shall not be null.");
+ throw new IllegalStateException("Group shall not be null."); //$NON-NLS-1$
}
return group;
}
* <p>
* Getter for the field <code>control</code>.
* </p>
- *
+ *
* @return a {@link org.eclipse.swt.widgets.Composite} object.
*/
public Composite getControl() {
* <p>
* setIcon
* </p>
- *
+ *
* @param icon
* a {@link org.eclipse.swt.graphics.Image} object.
*/
* <p>
* setIndent
* </p>
- *
+ *
* @param indent
* a int.
*/
control.layout();
} else {
new RuntimeException(
- "Couldn't indent - composite's layout must be TableWrapLayout.");
+ "Couldn't indent - composite's layout must be TableWrapLayout."); //$NON-NLS-1$
}
}
* <p>
* isSelected
* </p>
- *
+ *
* @return a boolean.
*/
public boolean isSelected() {
* <p>
* colorSelected
* </p>
- *
+ *
* @param mode
* a int.
*/
Display display = Display.getCurrent();
Runnable runnable = new Runnable() {
- public void run() {
+ @Override
+ public void run() {
getEditor().getManagedForm().setInput(selection);
}
};
* <p>
* setBackground
* </p>
- *
+ *
* @param color
* a {@link org.eclipse.swt.graphics.Color} object.
*/
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.swt.widgets.Control#setFont(org.eclipse.swt.graphics.Font)
*/
* <p>
* setFont
* </p>
- *
+ *
* @param font
* a {@link org.eclipse.swt.graphics.Font} object.
*/
* <p>
* Getter for the field <code>nameViewer</code>.
* </p>
- *
+ *
* @return a {@link eu.etaxonomy.taxeditor.editor.name.container.NameViewer}
* object.
*/
public NameViewer getNameViewer() {
if (nameViewer == null) {
throw new RuntimeException(
- "The Name Viewer is corrupt for Name Container: "
+ "The Name Viewer is corrupt for Name Container: " //$NON-NLS-1$
+ getTaxonBase().getName().getTitleCache());
}
return nameViewer;
* If <code>textViewer</code> has already been set, it will show a
* <code>prompt</code> along the lines of
* "Click here to start entering data" when empty.
- *
+ *
* @param prompt
* a {@link java.lang.String} object.
*/
setFocusListener(new FocusListener() {
- public void focusGained(FocusEvent e) {
+ @Override
+ public void focusGained(FocusEvent e) {
if (document.get().equals(prompt)) {
textControl.setFont(getViewerFont());
- document.set("");
+ document.set(""); //$NON-NLS-1$
}
}
- public void focusLost(FocusEvent e) {
+ @Override
+ public void focusLost(FocusEvent e) {
if (document.getLength() == 0) {
initEmptyText();
}
* <p>
* getViewerFont
* </p>
- *
+ *
* @return a {@link org.eclipse.swt.graphics.Font} object.
*/
abstract protected Font getViewerFont();
* <p>
* Setter for the field <code>focusListener</code>.
* </p>
- *
+ *
* @param focusListener
* a {@link org.eclipse.swt.events.FocusListener} object.
*/
* <p>
* setDirty
* </p>
- *
+ *
* @param isDirty
* a boolean.
*/
* <p>
* isDirty
* </p>
- *
+ *
* @return a boolean.
*/
- public boolean isDirty() {
+ @Override
+ public boolean isDirty() {
return isDirty;
}
* <p>
* setMenu
* </p>
- *
+ *
* @param menu
* a {@link org.eclipse.swt.widgets.Menu} object.
*/
* <p>
* setDraggableControl
* </p>
- *
+ *
* @param controls
* an array of {@link org.eclipse.swt.widgets.Control} objects.
*/
* <p>
* setIsDraggable
* </p>
- *
+ *
* @param draggable
* a boolean.
*/
if (draggableControls == null) {
throw new NullPointerException(
- "Draggable controls must be set to add draggability");
+ "Draggable controls must be set to add draggability"); //$NON-NLS-1$
}
Transfer[] types = new Transfer[] { CdmDataTransfer.getInstance() };
* nonEditableInfo is a label displayed underneath a GroupedComposite's
* input field. For instance, NameComposites display things like name
* relations, sec. references, etc. here.
- *
+ *
* @param info
* the text to display in the label
* @param append
info = info.toUpperCase();
if (append) {
- nonEditableText += ", " + info;
- nonEditableHoverText += "\n" + info;
+ nonEditableText += ", " + info; //$NON-NLS-1$
+ nonEditableHoverText += "\n" + info; //$NON-NLS-1$
} else {
nonEditableText = info;
nonEditableHoverText = info;
if (nonEditableInfoLabel == null) {
nonEditableInfoLabel = getEditor().getToolkit().createLabel(
- control, "");
+ control, ""); //$NON-NLS-1$
TableWrapData layoutData = new TableWrapData(
TableWrapData.FILL_GRAB, TableWrapData.TOP);
// Set indent to viewer ruler's width
* <p>
* Getter for the field <code>data</code>.
* </p>
- *
+ *
* @return a T object.
*/
- public T getData() {
+ @Override
+ public T getData() {
return data;
}
* <p>
* Setter for the field <code>data</code>.
* </p>
- *
+ *
* @param data
* a T object.
*/
public void setData(T data) {
- this.data = (T) HibernateProxyHelper.deproxy(data);
+ this.data = HibernateProxyHelper.deproxy(data);
}
/**
};
getNameViewer().getTextWidget().addVerifyListener(lineBreakListener);
-
+
}
abstract class LabelEllipsisListener extends ControlAdapter {
* <p>
* Setter for the field <code>group</code>.
* </p>
- *
+ *
* @param group
* a
* {@link eu.etaxonomy.taxeditor.editor.name.container.AbstractGroup}
/*
* (non-Javadoc)
- *
+ *
* @see
* org.eclipse.ui.forms.IFormPart#initialize(org.eclipse.ui.forms.IManagedForm
* )
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.forms.IFormPart#dispose()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.forms.IFormPart#commit(boolean)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.forms.IFormPart#setFormInput(java.lang.Object)
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.forms.IFormPart#setFocus()
*/
@Override
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.forms.IFormPart#isStale()
*/
@Override
public boolean isStale() {
return false;
}
-
+
public void setDisabled(boolean disabled) {
this.enabled = !disabled;
setEnabled(enabled);
}
-
+
public void setEnabled(boolean enabled) {
this.enabled = enabled;
Color color = enabled ? control.getForeground() : EditorUtil.getColor(Resources.COLOR_DISABLED_EDITOR);
-
+
getNameViewer().getTextWidget().setEditable(enabled);
getNameViewer().getTextWidget().setEnabled(enabled);
getNameViewer().getTextWidget().setForeground(color);
}
-
+
public boolean isEnabled(){
return enabled;
}
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
import eu.etaxonomy.taxeditor.preference.Resources;
}
if (getTaxonBase().getSec() == null) {
- setNonEditableInfo("sec. ???", false);
+ setNonEditableInfo("sec. ???", false); //$NON-NLS-1$
} else {
- setNonEditableInfo("sec. " + getTaxonBase().getSec().getTitleCache(), false);
+ setNonEditableInfo("sec. " + getTaxonBase().getSec().getTitleCache(), false); //$NON-NLS-1$
}
}
public void showAnnotations() {
if(getData().getSec() == null){
getNameViewer().addAnnotation(
- new EditorAnnotation(0, "This taxon requires a sec. reference."));
+ new EditorAnnotation(0, Messages.ConceptContainer_SEC_REQUIRED));
}
super.showAnnotations();
}
import org.eclipse.swt.widgets.Canvas;
import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.ImageResources;
/**
@Override
public String getText() {
if (EditorAnnotationType.ERROR.name().equals(getType())) {
- return "Error: " + text;
+ return Messages.EditorAnnotation_ERROR + text;
}
if (EditorAnnotationType.WARNING.name().equals(getType())) {
- return "Warning: " + text;
+ return Messages.EditorAnnotation_WARNING + text;
}
return super.getText();
}
import org.eclipse.swt.graphics.Image;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.ImageResources;
/**
* ************ COMPOSITE TYPES ************
*/
/** Constant <code>ACCEPTED_TAXON="accepted_name_composite"</code> */
- public static final String ACCEPTED_TAXON = "accepted_name_composite";
+ public static final String ACCEPTED_TAXON = "accepted_name_composite"; //$NON-NLS-1$
/** Constant <code>HOMOTYPIC_SYNONYM="homotypic_name_composite"</code> */
- public static final String HOMOTYPIC_SYNONYM = "homotypic_name_composite";
+ public static final String HOMOTYPIC_SYNONYM = "homotypic_name_composite"; //$NON-NLS-1$
/** Constant <code>HETEROTYPIC_SYNONYM="heterotypic_name_composite"</code> */
- public static final String HETEROTYPIC_SYNONYM = "heterotypic_name_composite";
+ public static final String HETEROTYPIC_SYNONYM = "heterotypic_name_composite"; //$NON-NLS-1$
/** Constant <code>MISAPPLIED_NAME="misappliedname_name_composite"</code> */
- public static final String MISAPPLIED_NAME = "misappliedname_name_composite";
+ public static final String MISAPPLIED_NAME = "misappliedname_name_composite"; //$NON-NLS-1$
/** Constant <code>CONCEPTRELATION="concept_name_composite"</code> */
- public static final String CONCEPTRELATION = "concept_name_composite";
+ public static final String CONCEPTRELATION = "concept_name_composite"; //$NON-NLS-1$
/**
* ************ INDENTATIONS ************
/**
* ************ TRANSFORMATIONS ************
*/
- public static final String ADD_GROUP_BASIONYM = "add_group_basionym";
+ public static final String ADD_GROUP_BASIONYM = "add_group_basionym"; //$NON-NLS-1$
/** Constant <code>REMOVE_GROUP_BASIONYM="remove_group_basionym"</code> */
- public static final String REMOVE_GROUP_BASIONYM = "remove_group_basionym";
+ public static final String REMOVE_GROUP_BASIONYM = "remove_group_basionym"; //$NON-NLS-1$
- public static final String EMPTY_NAME_PROMPT = "Click to add name";
+ public static final String EMPTY_NAME_PROMPT = Messages.IContainerConstants_CLICK_ADD_NAME;
}
public abstract class LineBreakListener implements VerifyListener{
- private static String LINE_BREAK = System.getProperty("line.separator");
+ private static String LINE_BREAK = System.getProperty("line.separator"); //$NON-NLS-1$
/**
// make a new, empty synonym
if (widgetText.length() == cursorPosition &&
verifyText.equals(LINE_BREAK)) {
- handleSplitText("");
+ handleSplitText(""); //$NON-NLS-1$
return;
}
public class LineWrapSquigglesStrategy extends SquigglesStrategy {
/** Constant <code>ID="linewrap_squigglesstrategy"</code> */
- public static final String ID = "linewrap_squigglesstrategy";
+ public static final String ID = "linewrap_squigglesstrategy"; //$NON-NLS-1$
private GC gc;
if (viewer == null) {
throw new IllegalArgumentException(
- "The provided TextViewer object is null.");
+ "The provided TextViewer object is null."); //$NON-NLS-1$
}
// this.viewer = viewer;
this.lineCount = textWidget.getLinePixel(textWidget.getLineCount());
this.scrolledForm = form.getForm();
- logger.trace(this.getClass().getSimpleName() + " created");
+ logger.trace(this.getClass().getSimpleName() + " created"); //$NON-NLS-1$
}
/**
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.preference.Resources;
/**
if (getMisappliedName().getAppendedPhrase() != null ){
setNonEditableInfo(getMisappliedName().getAppendedPhrase(), false);
}else{
- setNonEditableInfo("sec. ???", false);
+ setNonEditableInfo("sec. ???", false); //$NON-NLS-1$
}
} else {
String title = getMisappliedName().getSec().getTitleCache();
- title = title.replace("&", "&&");
- String sec = "sec. ";
+ title = title.replace("&", "&&"); //$NON-NLS-1$ //$NON-NLS-2$
+ String sec = "sec. "; //$NON-NLS-1$
if (getMisappliedName().getAppendedPhrase() != null ){
- sec = getMisappliedName().getAppendedPhrase() + " "+sec;
+ sec = getMisappliedName().getAppendedPhrase() + " "+sec; //$NON-NLS-1$
}
setNonEditableInfo(sec + title, false);
}
public void showAnnotations() {
if(getData().getSec() == null){
getNameViewer().addAnnotation(
- new EditorAnnotation(0, "This misapplication requires a sec. reference."));
+ new EditorAnnotation(0, Messages.MisapplicationContainer_SEC_REF_REQUIRED));
}
super.showAnnotations();
}
ruler.getControl().moveAbove(getTextWidget());
annotationModel = new AnnotationModel();
- this.setDocument(new Document(""), annotationModel);
+ this.setDocument(new Document(""), annotationModel); //$NON-NLS-1$
createAnnotationPainter();
if (ruler instanceof RulerWithIcon) {
((RulerWithIcon) ruler).setIcon(icon);
} else {
- throw new IllegalStateException("Viewer's IVerticalRuler is not an instance of RulerWithIcon.");
+ throw new IllegalStateException("Viewer's IVerticalRuler is not an instance of RulerWithIcon."); //$NON-NLS-1$
}
}
*/
public void setText(String text) {
if (text == null) {
- text = "";
+ text = ""; //$NON-NLS-1$
}
try {
Assert.isNotNull(text);
Rectangle r = icon.getBounds();
if (r.width > size.x || r.height > size.y) {
- logger.warn(r.width + "x" + r.height + " icon too big for " + size.x + "x" + size.y + " Canvas.");
+ logger.warn(r.width + "x" + r.height + " icon too big for " + size.x + "x" + size.y + " Canvas."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
} else {
// Set destination coordinates to center icon
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.preference.Resources;
setFont(getViewerFont());
if(getName() == null){
- MessagingUtils.warn(getClass(), "Synonym with a null name detected. This should never happen.");
+ MessagingUtils.warn(getClass(), Messages.SynonymContainer_SYNONYM_NULL_NAME);
}
initTextViewer();
/**
- *
+ *
*/
package eu.etaxonomy.taxeditor.editor.name.dnd;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.IDropTargetable;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
import eu.etaxonomy.taxeditor.editor.name.container.AbstractHomotypicalGroupContainer;
import eu.etaxonomy.taxeditor.editor.name.container.MisappliedGroup;
* @version $Id: $
*/
public class NameEditorDropTargetListener extends DropTargetAdapter {
-
+
private IDropTargetable target;
-
+
/**
* <p>Constructor for NameEditorDropTargetListener.</p>
public NameEditorDropTargetListener(IDropTargetable target){
this.target = target;
}
-
+
/** {@inheritDoc} */
- public void dragEnter(DropTargetEvent dropTargetEvent) {
+ @Override
+ public void dragEnter(DropTargetEvent dropTargetEvent) {
target.dragEntered();
-
+
// if(! EditorUtil.getActiveMultiPageTaxonEditor().equals(editor.getMultiPageTaxonEditor())){
// editor.getMultiPageTaxonEditor().setFocus();
// }
}
-
+
/** {@inheritDoc} */
- public void dragLeave(DropTargetEvent dropTargetEvent) {
+ @Override
+ public void dragLeave(DropTargetEvent dropTargetEvent) {
target.dragLeft();
}
-
+
/** {@inheritDoc} */
- public void drop(DropTargetEvent dropTargetEvent) {
-
+ @Override
+ public void drop(DropTargetEvent dropTargetEvent) {
+
TaxonBase taxonBase = getDroppedTaxonBase(dropTargetEvent);
-
+
Assert.isNotNull(taxonBase);
-
+
if(taxonBase.getHomotypicGroup().equals(getHomotypicalGroup())){
// do nothing when dragged to the same group
dropTargetEvent.detail = DND.DROP_NONE;
return;
}
-
+
// Execute operations at end of drag event
AbstractPostOperation operation = createOperation(taxonBase);
-
+
// Execute operation if it has been initiated
if (operation == null) {
- MessagingUtils.warn(getClass(), "User unsuccessfully tried to drop: " + taxonBase.getClass() +
- ". Target: " + target);
+ MessagingUtils.warn(getClass(), String.format(Messages.NameEditorDropTargetListener_UNSUCCESSFULL_DROP, taxonBase.getClass(), target));
dropTargetEvent.detail = DND.DROP_NONE;
} else {
EditorUtil.executeOperation(operation);
if (!target.equals(EditorUtil.getActiveMultiPageTaxonEditor().getActiveEditor())){
((TaxonNameEditor)EditorUtil.getActiveMultiPageTaxonEditor().getActiveEditor()).redraw();
((TaxonNameEditor)EditorUtil.getActiveMultiPageTaxonEditor().getActiveEditor()).getConversationHolder().commit();
-
+
}
target.getEditor().redraw();
-
+
}
-
+
private AbstractPostOperation createOperation(TaxonBase taxonBase) {
-
+
if(taxonBase instanceof Synonym){
Synonym synonym = (Synonym) taxonBase;
-
+
if(target instanceof AbstractHomotypicalGroupContainer){
HomotypicalGroup homotypicalGroup = ((AbstractHomotypicalGroupContainer) target).getGroup();
-
- return new ChangeHomotypicGroupOperation("Change Homotypical Group", getEditor().getUndoContext(),
+
+ return new ChangeHomotypicGroupOperation(Messages.NameEditorDropTargetListener_CHANGE_HOMOTYPICAL_GROUP, getEditor().getUndoContext(),
getEditor().getTaxon(), synonym, homotypicalGroup, target);
}
else if(target instanceof MisappliedGroup){
- return new ChangeSynonymToMisapplicationOperation("Change Synonym to Misapplication", getEditor().getUndoContext(),
+ return new ChangeSynonymToMisapplicationOperation(Messages.NameEditorDropTargetListener_CHANGE_SYNONYM_TO_MISAPP, getEditor().getUndoContext(),
getEditor().getTaxon(), synonym, target);
}
else if(target instanceof TaxonNameEditor){
if (target.equals(getEditor())){
- return new ChangeHomotypicGroupOperation("Change Homotypical Group", getEditor().getUndoContext(),
+ return new ChangeHomotypicGroupOperation(Messages.NameEditorDropTargetListener_CHANGE_HOMOTYPICAL_GROUP, getEditor().getUndoContext(),
getEditor().getTaxon(), synonym, null, target);
} else{
getEditor().getConversationHolder().commit();
((TaxonNameEditor) target).getConversationHolder().commit();
-
- return new MoveSynonymToAnotherAcceptedTaxonOperation("Change accepted Taxon", getEditor().getUndoContext(), getEditor().getTaxon().getUuid(), synonym.getUuid(), ((TaxonNameEditor) target).getTaxon(), null );
-
+
+ return new MoveSynonymToAnotherAcceptedTaxonOperation(Messages.NameEditorDropTargetListener_CHANGE_ACC_TAXON, getEditor().getUndoContext(), getEditor().getTaxon().getUuid(), synonym.getUuid(), ((TaxonNameEditor) target).getTaxon(), null );
+
}
}
-
+
}else if(taxonBase instanceof Taxon){
Taxon concept = (Taxon) taxonBase;
-
+
if(target instanceof AbstractHomotypicalGroupContainer){
HomotypicalGroup homotypicalGroup = ((AbstractHomotypicalGroupContainer) target).getGroup();
-
- return new ChangeConceptToSynonymOperation("Change to Synonym", getEditor().getUndoContext(),
+
+ return new ChangeConceptToSynonymOperation(Messages.NameEditorDropTargetListener_CHANGE_SYNONYM, getEditor().getUndoContext(),
getEditor().getTaxon(), concept, homotypicalGroup, target);
}
else if(target instanceof MisappliedGroup ){
- return new ChangeConceptRelationshipTypeOperation("Change", getEditor().getUndoContext(),
+ return new ChangeConceptRelationshipTypeOperation(Messages.NameEditorDropTargetListener_CHANGE, getEditor().getUndoContext(),
getEditor().getTaxon(), concept, TaxonRelationshipType.MISAPPLIED_NAME_FOR(), target);
}
}
-
+
return null;
}
// pass
}
-
+
private HomotypicalGroup getHomotypicalGroup() {
if(target instanceof AbstractHomotypicalGroupContainer){
return ((AbstractHomotypicalGroupContainer) target).getGroup();
}
return null;
- }
-
+ }
+
private TaxonBase getDroppedTaxonBase(DropTargetEvent dropTargetEvent){
if(dropTargetEvent.data instanceof ICdmBase[]){
-
+
ICdmBase[] cdmBaseObjects = (ICdmBase[]) dropTargetEvent.data;
-
+
if(cdmBaseObjects[0] instanceof TaxonBase){
return (TaxonBase) cdmBaseObjects[0];
}
}
return null;
}
-
+
/**
- * @return
- *
+ * @return
+ *
*/
private TaxonNameEditor getEditor() {
return (TaxonNameEditor) EditorUtil.getActiveMultiPageTaxonEditor().getActiveEditor();
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.name.operation.ChangeSynonymToAcceptedTaxonOperation;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
IEditorInput input = editor.getEditorInput();
if (!(input instanceof TaxonEditorInput)) {
- logger.error("Editor input is not TaxonEditorInput");
+ logger.error("Editor input is not TaxonEditorInput"); //$NON-NLS-1$
return null;
}
// Get synonym from selection
StructuredSelection selection = (StructuredSelection) HandlerUtil.getCurrentSelection(event);
if (!(selection.getFirstElement() instanceof Synonym)) {
- logger.error("Selection does not contain a Synonym");
+ logger.error("Selection does not contain a Synonym"); //$NON-NLS-1$
return null;
}
List<UUID> excludeTaxa = new ArrayList<UUID>();
//excludeTaxa.add(taxon.getUuid());//there are some cases where the accepted taxon should be the parent of the new created accepted taxon
- TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), "Select parent", null, null, ((TaxonEditorInput) input).getTaxonNode().getClassification());
+ TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), Messages.ChangeSynonymToAcceptedTaxonHandler_SELECT_PARENT, null, null, ((TaxonEditorInput) input).getTaxonNode().getClassification());
if(newParentNode != null){
HomotypicalGroup group = synonym.getHomotypicGroup();
Set<TaxonNameBase> namesInGroup = group.getTypifiedNames();
// FIXME with this implementation we can not create a taxonNode that is a direct child of the classification node
- AbstractPostOperation operation = new ChangeSynonymToAcceptedTaxonOperation("Change synonym to accepted taxon", EditorUtil.getUndoContext(),
+ AbstractPostOperation operation = new ChangeSynonymToAcceptedTaxonOperation(Messages.ChangeSynonymToAcceptedTaxonHandler_CHANGE_SYN_TO_ACC_TAXON, EditorUtil.getUndoContext(),
taxon, newParentNode, synonym, namesInGroup, this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput()); //$NON-NLS-1$
EditorUtil.executeOperation(operation);
// TODO Auto-generated catch block
e.printStackTrace();
} catch (Exception e) {
- MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
+ MessagingUtils.warningDialog(Messages.ChangeSynonymToAcceptedTaxonHandler_CREATE_FAILURE, this, e.getMessage());
}
}
return true;
EditorUtil.executeOperation(operation);
}
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
editor.getUndoContext(), editor.getTaxon(), newSynonymName, editor);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
import org.eclipse.core.commands.common.NotDefinedException;
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
+import eu.etaxonomy.cdm.model.name.INonViralName;
import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.Page;
Page.NAME);
Taxon taxon = editor.getTaxon();
HomotypicalGroup group = taxon.getHomotypicGroup();
- NonViralName newSynonymName = ParseHandler.createEmptyName();
+ TaxonNameBase<?,?> newSynonymName = ParseHandler.createEmptyName();
AbstractPostOperation operation;
try {
editor.getUndoContext(), editor.getTaxon(), concept, type, editor);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
import org.eclipse.ui.handlers.HandlerUtil;
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
+import eu.etaxonomy.cdm.model.name.INonViralName;
import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.Page;
HomotypicalGroup group = synonym.getHomotypicGroup();
- NonViralName newSynonymName = ParseHandler.createEmptyName();
+ TaxonNameBase<?,?> newSynonymName = ParseHandler.createEmptyName();
AbstractPostOperation operation;
editor.getTaxon(), group, newSynonymName, editor);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
TaxonNameEditor editor = (TaxonNameEditor) EditorUtil.getActiveEditorPage(Page.NAME);
for(AbstractGroupedContainer<TaxonBase> containerWithEmptyName : editor.getEmptyContainers()){
+ editor.removeGroup(containerWithEmptyName.getGroup());
doExecute(event, editor, containerWithEmptyName.getData());
}
-
+
return null;
}
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.commands.common.NotDefinedException;
-import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.handlers.HandlerUtil;
import eu.etaxonomy.cdm.api.service.DeleteResult;
import eu.etaxonomy.cdm.api.service.config.SynonymDeletionConfigurator;
+import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
-import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.Page;
import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
import eu.etaxonomy.taxeditor.editor.name.operation.DeleteMisapplicationOperation;
import eu.etaxonomy.taxeditor.editor.name.operation.DeleteSynonymOperation;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator.DeleteConfiguratorDialog;
/**
* @author n.hoffmann
MessagingUtils.error(getClass(), e);
}
IWorkbenchPage activePage = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();
+ if (selectedElement instanceof TaxonBase){
+ if (((TaxonBase)selectedElement).getId() == 0){
+ if (selectedElement instanceof Taxon && ((Taxon) selectedElement).isMisapplication()) {
+ editor.getTaxon().removeTaxon((Taxon)selectedElement, TaxonRelationshipType.MISAPPLIED_NAME_FOR());
+
+ } else if (selectedElement instanceof Synonym){
+ editor.getTaxon().removeSynonym((Synonym)selectedElement);
+ }
+ editor.redraw();
+ return;
+
+ }
+
+ }
+
// synonym
if(selectedElement instanceof Synonym){
- if(! MessageDialog.openConfirm(HandlerUtil.getActiveShell(event), Messages.DeleteTaxonBaseHandler_CONFIRM_DELETION, Messages.DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM)){
- return ;
+ SynonymDeletionConfigurator deleteConfig = new SynonymDeletionConfigurator();
+ if(! DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfig, HandlerUtil.getActiveShell(event), Messages.DeleteTaxonBaseHandler_CONFIRM_DELETION, Messages.DeleteTaxonBaseHandler_REALLY_DELETE_SYNONYM)){
+ return ;
}
- operation = new DeleteSynonymOperation(commandName, editor.getUndoContext(), new SynonymDeletionConfigurator(), activePage, editor.getTaxon(), (Synonym) selectedElement,this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput());
+ operation = new DeleteSynonymOperation(commandName, editor.getUndoContext(), deleteConfig, activePage, editor.getTaxon(), (Synonym) selectedElement,this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput());
}
// misapplication
else if(selectedElement instanceof Taxon && ((Taxon) selectedElement).isMisapplication()){
- operation = new DeleteMisapplicationOperation(commandName, editor.getUndoContext(), editor
- .getTaxon(), (Taxon) selectedElement, editor);
- }
- else {
+ TaxonDeletionConfigurator deleteConfig = new TaxonDeletionConfigurator();
+ if(! DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfig, HandlerUtil.getActiveShell(event), Messages.DeleteTaxonBaseHandler_CONFIRM_DELETION, Messages.DeleteTaxonBaseHandler_REALLY_DELETE_MISAPPLICATION)){
+ return ;
+ }
+ operation = new DeleteMisapplicationOperation(commandName, editor.getUndoContext(), deleteConfig, activePage, editor.getTaxon(), (Taxon) selectedElement,this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput());
+ } else {
throw new IllegalArgumentException(Messages.DeleteTaxonBaseHandler_ELEMENT_MUST_BE_SYNONYM_MISAPP_CONCEPT);
}
DeleteResult result = ((DeleteTaxonBaseOperation)operation).getResult();
if (result.isError()){
DeleteResultMessagingUtils.messageDialogWithDetails(result, Messages.DeleteDerivateOperation_DELETE_FAILED, TaxeditorEditorPlugin.PLUGIN_ID);
- } else if (selectedElement instanceof Synonym){
+ } else {
this.editor.redraw();
if (!result.getUpdatedObjects().isEmpty()){
DeleteResultMessagingUtils.messageDialogWithDetails(result, Messages.DeleteTaxonBaseHandler_DELETE_SYNONYM_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS, TaxeditorEditorPlugin.PLUGIN_ID);
}
- }else {
+ }
if (!result.getUpdatedObjects().isEmpty()){
DeleteResultMessagingUtils.messageDialogWithDetails(result, Messages.DeleteTaxonBaseHandler_DELETE_MISAPPLIEDNAME_SUCCESSFULL_BUT_REMAINING_RELATED_OBJECTS, TaxeditorEditorPlugin.PLUGIN_ID);
}
- }
+
}
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.name.operation.MoveSynonymToAnotherAcceptedTaxonOperation;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
}
if (!(input instanceof TaxonEditorInput)) {
- logger.error("Editor input is not TaxonEditorInput");
+ logger.error("Editor input is not TaxonEditorInput"); //$NON-NLS-1$
return null;
}
if (selection==null || !(selection.getFirstElement() instanceof Synonym)) {
- MessagingUtils.warningDialog("No selection", this, "No synonym selected");
- logger.error("Selection does not contain a Synonym");
+ MessagingUtils.warningDialog(Messages.MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION, this, Messages.MoveSynonymToAnotherAcceptedTaxonHandler_NO_SELECTION_MESSAGE);
+ logger.error("Selection does not contain a Synonym"); //$NON-NLS-1$
return null;
}
excludeTaxa.add(oldParent.getUuid());
- TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), "Select new accepted taxon", excludeTaxa, null, ((TaxonEditorInput)input).getTaxonNode().getClassification());
+ TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), Messages.MoveSynonymToAnotherAcceptedTaxonHandler_SELECT_ACC_TAXON, excludeTaxa, null, ((TaxonEditorInput)input).getTaxonNode().getClassification());
if(newParentNode!=null){
- MoveSynonymToAnotherAcceptedTaxonOperation operation = new MoveSynonymToAnotherAcceptedTaxonOperation("Change accepted Taxon of Synonym", EditorUtil.getUndoContext(),
+ MoveSynonymToAnotherAcceptedTaxonOperation operation = new MoveSynonymToAnotherAcceptedTaxonOperation(Messages.MoveSynonymToAnotherAcceptedTaxonHandler_CHANGE_ACC_TAXON, EditorUtil.getUndoContext(),
oldParent.getUuid(), synonym.getUuid(), newParentNode.getTaxon(), editor);
AbstractUtility.executeOperation(operation);
*/
public class NameEditorMenuPropertyTester extends PropertyTester {
- private static final String ACCEPTED = "isAcceptedTaxon";
- private static final String SYNONYM = "isSynonym";
- private static final String MISAPPLICATION = "isMisapplication";
- private static final String TAXONBASE = "isTaxonBase";
- private static final String CONCEPT = "isConceptRelation";
- private static final String EMPTY_NAMES = "hasEmptyNames";
- private static final String ACCEPTED_AND_NO_HOMOTYPIC_SYNONYMS = "isAcceptedAndHasNoHomotypicSynonyms";
- private static final String NOT_HOMOTYPIC_SYNONYM_OF_ACCEPTED = "isNotHomotypicSynonymOfAcceptedTaxon";
- private static final String SYNONYM_WITH_HOMOTYPIC_SYNONYMS = "isSynonymInHomotypicalGroupWithMoreSynonyms";
- private static final String IS_ORPHANED = "isOrphaned";
+ private static final String ACCEPTED = "isAcceptedTaxon"; //$NON-NLS-1$
+ private static final String SYNONYM = "isSynonym"; //$NON-NLS-1$
+ private static final String MISAPPLICATION = "isMisapplication"; //$NON-NLS-1$
+ private static final String TAXONBASE = "isTaxonBase"; //$NON-NLS-1$
+ private static final String CONCEPT = "isConceptRelation"; //$NON-NLS-1$
+ private static final String EMPTY_NAMES = "hasEmptyNames"; //$NON-NLS-1$
+ private static final String ACCEPTED_AND_NO_HOMOTYPIC_SYNONYMS = "isAcceptedAndHasNoHomotypicSynonyms"; //$NON-NLS-1$
+ private static final String NOT_HOMOTYPIC_SYNONYM_OF_ACCEPTED = "isNotHomotypicSynonymOfAcceptedTaxon"; //$NON-NLS-1$
+ private static final String SYNONYM_WITH_HOMOTYPIC_SYNONYMS = "isSynonymInHomotypicalGroupWithMoreSynonyms"; //$NON-NLS-1$
+ private static final String IS_ORPHANED = "isOrphaned"; //$NON-NLS-1$
/**
* <p>Constructor for NameEditorMenuPropertyTester.</p>
editor.getTaxon(), selectedTaxonBase, editor);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
editor.getTaxon(), selectedTaxonBase, editor);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.name.operation.SwapSynonymAndAcceptedOperation;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
EditorUtil.openTaxonBase(taxon.getUuid());
} catch (Exception e) {
- MessagingUtils.warningDialog("Could not open editor for taxon", this, e.getMessage());
+ MessagingUtils.warningDialog(Messages.SwapSynonymAndAcceptedHandler_COULD_NOT_OPEN, this, e.getMessage());
}
}
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
Set<TaxonRelationship> taxonRelationships = taxon.getTaxonRelations(relatedTaxon);
if(taxonRelationships.size() > 1){
- MessagingUtils.warningDialog("Multiple relations between taxa", this, "There are multiple relations between the " +
- "accepted and the related taxon. This case is not handled by the software yet");
+ MessagingUtils.warningDialog(ChangeConceptToSynonymOperation.CHANGE_CONCEPT_TO_SYNONYM_OPERATION_MULTI_REPS, this, ChangeConceptToSynonymOperation.CHANGE_CONCEPT_TO_SYNONYM_OPERATION_MULTI_REPS_MESSAGE);
return;
}
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
// see FIXME in execute()
- MessagingUtils.warn(this.getClass(), "Not implemented yet. See developer documentation for details");
+ MessagingUtils.warn(this.getClass(), Messages.ChangeConceptRelationshipTypeOperation_NOT_IMPLEMENTED);
return null;
}
}
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
public class ChangeConceptToSynonymOperation extends
AbstractPostTaxonOperation {
- private Taxon concept;
+ protected static final String CHANGE_CONCEPT_TO_SYNONYM_OPERATION_MULTI_REPS_MESSAGE = Messages.ChangeConceptToSynonymOperation_MULTI_REPS_MESSAGE;
+ protected static final String CHANGE_CONCEPT_TO_SYNONYM_OPERATION_MULTI_REPS = Messages.ChangeConceptToSynonymOperation_MULTI_REPS;
+
+ private Taxon concept;
private HomotypicalGroup homotypicalGroup;
Set<TaxonRelationship> taxonRelationships = taxon.getTaxonRelations(concept);
if(taxonRelationships.size() > 1){
- MessagingUtils.warningDialog("Multiple relations between taxa", this, "There are multiple relations between the " +
- "accepted and the related taxon. This case is not handled by the software yet");
+ MessagingUtils.warningDialog(CHANGE_CONCEPT_TO_SYNONYM_OPERATION_MULTI_REPS, this, CHANGE_CONCEPT_TO_SYNONYM_OPERATION_MULTI_REPS_MESSAGE);
return;
}
this.synonym = synonym;
if(synonym == null){
throw new IllegalArgumentException(
- "A null synonym was provided.");
+ "A null synonym was provided."); //$NON-NLS-1$
}
this.oldHomotypicalGroup = synonym.getHomotypicGroup();
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
parentNode.getUuid(),
true).getCdmEntity();
} catch (HomotypicalGroupChangeException e) {
- MessagingUtils.warningDialog("Operation may lead to inconsistent data", getClass(), e.getMessage());
+ MessagingUtils.warningDialog(Messages.ChangeSynonymToAcceptedTaxonOperation_INCONSISTENT_DATA, getClass(), e.getMessage());
return postExecute(null);
}
monitor.worked(20);
throws ExecutionException {
// TODO implement - biggest problem is that any window open for new taxon must be closed first
- MessagingUtils.warn(this.getClass(), "Not yet implemented");
+ MessagingUtils.warn(this.getClass(), Messages.ChangeSynonymToAcceptedTaxonOperation_NOT_IMPLEMENTED);
return postExecute(element);
}
import org.eclipse.core.runtime.IStatus;
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
+import eu.etaxonomy.cdm.model.name.INonViralName;
import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
AbstractPostTaxonOperation {
private final HomotypicalGroup group;
- private final NonViralName newSynonymName;
+ private final TaxonNameBase<?,?> newSynonymName;
private Synonym synonym;
* @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
*/
public CreateSynonymInExistingHomotypicalGroupOperation(String label,
- IUndoContext undoContext, Taxon taxon, HomotypicalGroup group, NonViralName newSynonymName, IPostOperationEnabled postOperationEnabled) {
+ IUndoContext undoContext, Taxon taxon, HomotypicalGroup group,
+ TaxonNameBase<?,?> newSynonymName, IPostOperationEnabled postOperationEnabled) {
super(label, undoContext, taxon, postOperationEnabled);
this.group = group;
this.newSynonymName = newSynonymName;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.ui.IWorkbenchPage;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
+import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
import eu.etaxonomy.cdm.api.service.ITaxonService;
import eu.etaxonomy.cdm.api.service.config.NameDeletionConfigurator;
+import eu.etaxonomy.cdm.api.service.config.TaxonBaseDeletionConfigurator;
import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
-import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
+import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
import eu.etaxonomy.taxeditor.store.CdmStore;
/**
* @author p.ciardelli
* @created 16.01.2009
*/
-public class DeleteMisapplicationOperation extends AbstractPostTaxonOperation {
+public class DeleteMisapplicationOperation extends DeleteTaxonBaseOperation {
private final Taxon misapplication;
* @param misapplication a {@link eu.etaxonomy.cdm.model.taxon.Taxon} object.
* @param postOperationEnabled a {@link eu.etaxonomy.taxeditor.operation.IPostOperationEnabled} object.
*/
- public DeleteMisapplicationOperation(String label, IUndoContext undoContext,
- Taxon taxon, Taxon misapplication, IPostOperationEnabled postOperationEnabled) {
- super(label, undoContext, taxon, postOperationEnabled);
-
+ public DeleteMisapplicationOperation(String label, IUndoContext undoContext, TaxonBaseDeletionConfigurator configurator,IWorkbenchPage activePage,
+ Taxon taxon, Taxon misapplication, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled,ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
+ //super(label, undoContext, taxon, postOperationEnabled);
+ super(label, undoContext, configurator, activePage, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
this.misapplication = misapplication;
+ this.element = taxon;
}
/* (non-Javadoc)
// Remove misapplied name relation from taxon
element.removeTaxon(misapplication, TaxonRelationshipType.MISAPPLIED_NAME_FOR());
- ICdmApplicationConfiguration controller;
+ ICdmRepository controller;
controller = CdmStore.getCurrentApplicationConfiguration();
NameDeletionConfigurator nameConfig = new NameDeletionConfigurator();
nameConfig.setRemoveAllNameRelationships(true);
config.setNameDeletionConfig(nameConfig);
- service.deleteTaxon(misapplication.getUuid(), config, null);
+ result = service.deleteTaxon(misapplication.getUuid(), config, null);
monitor.worked(40);
return postExecute(null);
element.addMisappliedName(misapplication, citation, microcitation);
+
return postExecute(misapplication);
}
}
import org.eclipse.core.runtime.IStatus;
import org.eclipse.ui.IWorkbenchPage;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
import eu.etaxonomy.cdm.api.service.DeleteResult;
import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.api.service.config.SynonymDeletionConfigurator;
import eu.etaxonomy.cdm.api.service.config.TaxonBaseDeletionConfigurator;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.SynonymType;
Taxon taxon, Synonym synonym, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled,ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
super(label, undoContext, configurator, activePage, postOperationEnabled, conversationEnabled, cdmEntitySessionEnabled);
this.synonym = synonym;
+ this.element = taxon;
}
/** {@inheritDoc} */
monitor.worked(20);
// Remove synonym from taxon
- ICdmApplicationConfiguration controller;
+ ICdmRepository controller;
controller = CdmStore.getCurrentApplicationConfiguration();
ITaxonService service = controller.getTaxonService();
- if (synonym.getId() == 0){
- element.removeSynonym(synonym);
- } else {
- //TODO: this should be moved to the handler, the operations should not contain ui code
- setResult(service.deleteSynonym(synonym.getUuid(), null));
- }
- // taxon.removeSynonym(synonym);
-// CdmStore.getTaxonService().deleteSynonymRelationships(synonym);
-// CdmStore.getTaxonService().delete(synonym);
+ result = service.deleteSynonym(synonym.getUuid(), (SynonymDeletionConfigurator)configurator);
+
+
monitor.worked(40);
import org.eclipse.core.runtime.IStatus;\r
import org.eclipse.ui.IWorkbenchPage;\r
\r
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;\r
+import eu.etaxonomy.cdm.api.application.ICdmRepository;\r
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;\r
import eu.etaxonomy.cdm.api.service.ITaxonService;\r
import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;\r
bind();\r
\r
\r
- ICdmApplicationConfiguration controller;\r
+ ICdmRepository controller;\r
\r
controller = CdmStore.getCurrentApplicationConfiguration();\r
\r
\r
super(label, undoContext, taxon, postOperationEnabled);\r
List<String> propertyPaths = new ArrayList<String>();\r
- propertyPaths.add("synonymRelations");\r
+ propertyPaths.add("synonymRelations"); //$NON-NLS-1$\r
this.element = (Taxon) CdmStore.getService(ITaxonService.class).load(taxon.getUuid(),propertyPaths);\r
this.oldTaxon = (Taxon) CdmStore.getService(ITaxonService.class).load(oldTaxonUUID);\r
this.synonym = (Synonym) CdmStore.getService(ITaxonService.class).load(synonymUUID);\r
if(synonym == null){\r
throw new IllegalArgumentException(\r
- "A null synonym was provided.");\r
+ "A null synonym was provided."); //$NON-NLS-1$\r
}\r
}\r
\r
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.SynonymType;
import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
public SwapSynonymAndAcceptedOperation(String label, IUndoContext undoContext,
Taxon taxon, Synonym synonym, IPostOperationEnabled postOperationEnabled,
ICdmEntitySessionEnabled cdmEntitySessionEnabled) {
- super("Swap Synonym And Accepted Taxon Operation", undoContext, taxon, postOperationEnabled, cdmEntitySessionEnabled);
+ super(Messages.SwapSynonymAndAcceptedOperation_SWAP_SYN_ACC_TAXON, undoContext, taxon, postOperationEnabled, cdmEntitySessionEnabled);
this.synonym = synonym;
}
@Override
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- MessagingUtils.error(this.getClass(), "Not yet implemented", null);
+ MessagingUtils.error(this.getClass(), Messages.SwapSynonymAndAcceptedOperation_NOT_IMPLEMENTED, null);
return null;
}
}
*/\r
public class MarkerManager {\r
\r
- public static final String MARKER_TYPE_ID = "eu.etaxonomy.taxeditor.markers.validationerror";\r
+ public static final String MARKER_TYPE_ID = "eu.etaxonomy.taxeditor.markers.validationerror"; //$NON-NLS-1$\r
\r
/**\r
* The primary key (id) of the EntityConstraintViolation record\r
*/\r
- public static final String ATTRIB_DATABASE_ID = "databaseId";\r
+ public static final String ATTRIB_DATABASE_ID = "databaseId"; //$NON-NLS-1$\r
\r
// The values of the following constants must correspond to the attributes\r
// defined for the org.eclipse.core.resources.markers extension point in\r
/**\r
* A user-friendly description of the type of the entity\r
*/\r
- public static final String ATTRIB_USER_FRIENDLY_TYPE_NAME = "userFriendlyTypeName";\r
+ public static final String ATTRIB_USER_FRIENDLY_TYPE_NAME = "userFriendlyTypeName"; //$NON-NLS-1$\r
/**\r
* A user-friendly description of the entity\r
*/\r
- public static final String ATTRIB_USER_FRIENDLY_DESCRIPTION = "userFriendlyDescription";\r
+ public static final String ATTRIB_USER_FRIENDLY_DESCRIPTION = "userFriendlyDescription"; //$NON-NLS-1$\r
/**\r
* The field whose value violated a constraint\r
*/\r
- public static final String ATTRIB_USER_FRIENDLY_FIELD_NAME = "userFriendlyFieldName";\r
+ public static final String ATTRIB_USER_FRIENDLY_FIELD_NAME = "userFriendlyFieldName"; //$NON-NLS-1$\r
/**\r
* The value violating a constraint\r
*/\r
- public static final String ATTRIB_INVALID_VALUE = "invalidValue";\r
+ public static final String ATTRIB_INVALID_VALUE = "invalidValue"; //$NON-NLS-1$\r
/**\r
* The message from the {@link Validator} about what was wrong.\r
*/\r
- public static final String ATTRIB_VALIDATOR_MESSAGE = "validatorMessage";\r
+ public static final String ATTRIB_VALIDATOR_MESSAGE = "validatorMessage"; //$NON-NLS-1$\r
/**\r
* The class of the {@link Validator} coding for the constraint\r
*/\r
- public static final String ATTRIB_VALIDATOR_CLASS = "validatorClass";\r
+ public static final String ATTRIB_VALIDATOR_CLASS = "validatorClass"; //$NON-NLS-1$\r
/**\r
* The class of the validated entity\r
*/\r
- public static final String ATTRIB_ENTITY_CLASS = "entityClass";\r
+ public static final String ATTRIB_ENTITY_CLASS = "entityClass"; //$NON-NLS-1$\r
/**\r
* The id of the validated entity\r
*/\r
- public static final String ATTRIB_ENTITY_ID = "entityId";\r
+ public static final String ATTRIB_ENTITY_ID = "entityId"; //$NON-NLS-1$\r
\r
private final List<EntityConstraintViolation> problems;\r
\r
\r
import eu.etaxonomy.cdm.api.service.IEntityValidationService;\r
import eu.etaxonomy.cdm.model.validation.EntityValidation;\r
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;\r
import eu.etaxonomy.taxeditor.model.MessagingUtils;\r
import eu.etaxonomy.taxeditor.store.CdmStore;\r
\r
\r
\r
public ValidationDaemon(){\r
- super("Running validation daemon");\r
+ super(Messages.ValidationDaemon_RUNNING_DAEMON);\r
entityValidationService = CdmStore.getService(IEntityValidationService.class);\r
}\r
\r
markerManager.createMarkers();\r
Thread.sleep(SLEEP_TIME);\r
}\r
- MessagingUtils.info("Validation module stopped");\r
+ MessagingUtils.info(Messages.ValidationDaemon_VALIDATION_STOPPED);\r
return Status.OK_STATUS;\r
}\r
catch (Throwable t) {\r
- MessagingUtils.info("Validation module terminated unexpectedly: " + t.getMessage());\r
+ MessagingUtils.info(Messages.ValidationDaemon_VALIDATION_EXCEPTION + t.getMessage());\r
return Status.CANCEL_STATUS;\r
}\r
}\r
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.SimpleSelectionProvider;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.checklist.edit.DistributionEditingSupport;
import eu.etaxonomy.taxeditor.editor.view.checklist.filter.ChecklistEditorFilter;
import eu.etaxonomy.taxeditor.editor.view.checklist.listener.ChecklistDropdownSelectionListener;
* @version 1.0
*/
public class ChecklistEditor extends EditorPart implements ISelectionListener, IPartContentHasFactualData, IConversationEnabled,
- IContextListener, IPartContentHasDetails, IDirtyMarkable{//, ICdmEntitySessionEnabled {
-
- private static final Logger logger = Logger.getLogger(ChecklistEditor.class);
- /**
- * Key used for storing Checklist Editor View
- */
- private static final String CHECKLIST_EDITOR_MEMENTO_KEY = "checklistEditor";
+ IContextListener, IPartContentHasDetails, IDirtyMarkable{
+ private static final String LOADING_TAXA = Messages.ChecklistEditor_LOAD_TAXA;
+ private static final String UNKNOWN = Messages.ChecklistEditor_UNKNOWN;
+ private static final String ELEMENT_COUNT = Messages.ChecklistEditor_ELEMENT_COUNT;
+ public static final String TYPE_FILTER_TEXT = "type filter text"; //$NON-NLS-1$
+ private static final Logger logger = Logger.getLogger(ChecklistEditor.class);
private class ChecklistJob extends Job {
@Override
public IStatus run(final IProgressMonitor monitor) {
try {
- logger.debug("Begin of eclipse core runtime Job to Retrieve datasources");
- monitor.beginTask("Retrieving TaxonNodes", taxonNodes.size() + 1);
+ logger.debug("Begin of eclipse core runtime Job to Retrieve datasources"); //$NON-NLS-1$
+ monitor.beginTask(Messages.ChecklistEditor_RETRIEVE_NODES, taxonNodes.size() + 1);
final List<Taxon> taxonList = new ArrayList<Taxon>();
* Constant
* <code>ID="eu.etaxonomy.taxeditor.store.datasource"{trunked}</code>
*/
- public static String ID = "eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditor";
+ public static String ID = "eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditor"; //$NON-NLS-1$
private TableViewer viewer;
selectionService.addSelectionListener(this);
viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
labelProvider = new ChecklistLabelProvider(this.viewer);
-
+
terms = labelProvider.getNamedAreas();
if (terms == null){
- MessagingUtils.informationDialog("No Areas to display", "Please choose the areas you want to display. "
- + "Therefore go to the preferences, choose the Checklist Editor and choose the areas in the Distribution Selection Wizard.");
+ MessagingUtils.informationDialog(Messages.ChecklistEditor_NO_AREAS, Messages.ChecklistEditor_NO_AREAS_MESSAGE);
this.dispose();
return;
}
*/
private Text createSearchBar(Composite parent) {
Label searchLabel = new Label(parent, SWT.NONE);
- searchLabel.setText("Search: ");
+ searchLabel.setText(Messages.ChecklistEditor_SEARCH);
final Text searchText = new Text(parent, SWT.BORDER | SWT.SEARCH | SWT.ICON_SEARCH | SWT.CANCEL);
searchText.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL));
searchText.setForeground(EditorUtil.getColor(Resources.SEARCH_VIEW_FOREGROUND));
- searchText.setText("type filter text");
+ searchText.setText(TYPE_FILTER_TEXT);
return searchText;
}
private void createToolbar(Composite parent) {
ToolBar toolBar = new ToolBar(parent, SWT.NONE);
toolItem = new ToolItem(toolBar, SWT.DROP_DOWN | SWT.BORDER);
- toolItem.setText("Distribution Status");
- toolItem.setToolTipText("Show Distribution Status for selected Areas");
+ toolItem.setText(Messages.ChecklistEditor_DIST_STATUS);
+ toolItem.setToolTipText(Messages.ChecklistEditor_DIST_STATUS_TOOLTIP);
createToolbarItems();
toolItem.addSelectionListener(dropListener);
toolBar.pack();
private void createToolbarItems() {
dropListener = new ChecklistDropdownSelectionListener(toolItem, this, terms);
-
+
for (DefinedTermBase<DefinedTermBase> term : terms) {
if(term!=null){
dropListener.add(term);
gridData.horizontalAlignment = GridData.FILL;
statusLabel = new Label(composite, SWT.LEFT);
- statusLabel.setText("Anzahl der Elemente: " + (countNodes != null ? countNodes : "uknown"));
+ statusLabel.setText(ELEMENT_COUNT + (countNodes != null ? countNodes : UNKNOWN));
statusLabel.setLayoutData(gridData);
}
List<String> titles = new ArrayList<String>();
List<Integer> bounds = new ArrayList<Integer>();
if (PreferencesUtil.isShowRankInChecklistEditor()){
- Collections.addAll(titles, "Taxon", "Rank");
+ Collections.addAll(titles, Messages.ChecklistEditor_TAXON, Messages.ChecklistEditor_RANK);
Collections.addAll(bounds, 300, 200);
} else{
- Collections.addAll(titles, "Taxon");
+ Collections.addAll(titles, Messages.ChecklistEditor_TAXON);
Collections.addAll(bounds, 300);
}
TaxonNode taxonNode = checklistEditorInput.getTaxonNode();
if (classification != null && taxonNode == null) {
countNodes = taxonNodeService.countAllNodesForClassification(classification);
- statusLabel.setText("Anzahl der Elemente: " + (countNodes != null ? countNodes : "unknown"));
+ statusLabel.setText(ELEMENT_COUNT + (countNodes != null ? countNodes : UNKNOWN));
// This should not kill the view nor the editor if something goes
// wrong
// TODO: don't load the whole taxonNode Object but rather a small
// FIXME: May be don't open classification which are greater than
// 3000 Taxa
selectedTaxonNodes = taxonNodeService.listAllNodesForClassification(classification, 0, countNodes);
- getService().schedule(new ChecklistJob("loading Taxa", selectedTaxonNodes), Job.LONG);
+ getService().schedule(new ChecklistJob(LOADING_TAXA, selectedTaxonNodes), Job.LONG);
}
if (taxonNode != null) {
selectedTaxonNodes = taxonNodeService.loadChildNodesOfTaxonNode(taxonNode, NODE_INIT_STRATEGY, true, null);
- getService().schedule(new ChecklistJob("loading Taxa", selectedTaxonNodes), Job.LONG);
+ getService().schedule(new ChecklistJob(LOADING_TAXA, selectedTaxonNodes), Job.LONG);
}
}
public void dispose() {
this.checklistEditorInput.dispose();
super.dispose();
-
+
conversation.unregisterForDataStoreChanges(this);
conversation.unbind();
-
+
//conversation.close();
conversation = null;
}
// viewer.getTable().setEnabled(!busy);
if (busy) {
partNameCache = getPartName();
- setPartName("Loading " + countNodes + " Taxa...");
+ setPartName(String.format(Messages.ChecklistEditor_LOAD_CNT_TAXA, countNodes));
} else {
if (partNameCache != null) {
setPartName(partNameCache);
acitivateNewColumnInDropDownMenu(term);
}
viewer.setLabelProvider(labelProvider);
- getService().schedule(new ChecklistJob("loading Taxa", selectedTaxonNodes), Job.LONG);
+ getService().schedule(new ChecklistJob(LOADING_TAXA, selectedTaxonNodes), Job.LONG);
table.setRedraw(true);
viewer.refresh();
}
@Override
public void doSave(IProgressMonitor monitor) {
try {
- monitor.beginTask("Saving Editor", 1);
+ monitor.beginTask(Messages.ChecklistEditor_SAVE_EDITOR, 1);
if (!conversation.isBound()) {
conversation.bind();
}
setInput(input);
if (input instanceof ChecklistEditorInput) {
checklistEditorInput = (ChecklistEditorInput) input;
- setPartName(getPartName() + ": " + checklistEditorInput.getName());
+ setPartName(getPartName() + ": " + checklistEditorInput.getName()); //$NON-NLS-1$
conversation = checklistEditorInput.getConversation();
conversation.registerForDataStoreChanges(this);
}
conversation = null;
}
- private static final List<String> NODE_INIT_STRATEGY = Arrays.asList(new String[] { "descriptions",
- "descriptions.*", "description.state", "feature", "feature.*", "childNodes", "childNodes.taxon",
- "childNodes.taxon.name", "taxonNodes", "taxonNodes.*", "taxonNodes.taxon.*", "taxon.*",
- "taxon.descriptions", "taxon.sec", "taxon.name.*", "terms", "name.*",
- "name.rank.representations", "name.status.type.representations", "stateData.$" });
+ private static final List<String> NODE_INIT_STRATEGY = Arrays.asList(new String[] { "descriptions", //$NON-NLS-1$
+ "descriptions.*", "description.state", "feature", "feature.*", "childNodes", "childNodes.taxon", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ "childNodes.taxon.name", "taxonNodes", "taxonNodes.*", "taxonNodes.taxon.*", "taxon.*", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ "taxon.descriptions", "taxon.sec", "taxon.name.*", "terms", "name.*", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ "name.rank.representations", "name.status.type.representations", "stateData.$" }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
/*
* (non-Javadoc)
return conversation;
}
-
-
+
+
}
private List<String> getTaxonNodePropertyPaths() {
List<String> taxonNodePropertyPaths = new ArrayList<String>();
for(String propertyPath : getTaxonBasePropertyPaths()) {
- taxonNodePropertyPaths.add("taxon." + propertyPath);
+ taxonNodePropertyPaths.add("taxon." + propertyPath); //$NON-NLS-1$
}
return taxonNodePropertyPaths;
}
private List<String> getTaxonBasePropertyPaths() {
List<String> taxonBasePropertyPaths = Arrays.asList(new String[] {
- "sec",
- "createdBy",
- "updatedBy",
- "annotations",
- "markers",
- "credits",
- "extensions",
- "rights",
- "sources",
- "descriptions",
- "relationsToThisTaxon",
- "relationsFromThisTaxon",
- "taxonNodes",
- "descriptions.descriptionElements.feature",
- "descriptions.descriptionElements.area",
- "descriptions.descriptionElements.status",
- "descriptions.markers",
- "name.descriptions",
- "name.typeDesignations",
- "name.status",
- "name.nomenclaturalReference.inReference",
- "name.taxonBases.taxonNodes",
- "name.relationsFromThisName",
- "name.relationsToThisName",
- "name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations.synonym.name.status",
- "name.homotypicalGroup.typifiedNames.relationsToThisName.fromName",
- "synonymRelations.synonym.name.status.type",
- "synonymRelations.synonym.name.relationsToThisName.fromName",
- "synonymRelations.synonym.name.nomenclaturalReference.inReference.authorship",
- "synonymRelations.synonym.name.nomenclaturalReference.authorship",
- "synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations"
+ "sec", //$NON-NLS-1$
+ "createdBy", //$NON-NLS-1$
+ "updatedBy", //$NON-NLS-1$
+ "annotations", //$NON-NLS-1$
+ "markers", //$NON-NLS-1$
+ "credits", //$NON-NLS-1$
+ "extensions", //$NON-NLS-1$
+ "rights", //$NON-NLS-1$
+ "sources", //$NON-NLS-1$
+ "descriptions", //$NON-NLS-1$
+ "relationsToThisTaxon", //$NON-NLS-1$
+ "relationsFromThisTaxon", //$NON-NLS-1$
+ "taxonNodes", //$NON-NLS-1$
+ "descriptions.descriptionElements.feature", //$NON-NLS-1$
+ "descriptions.descriptionElements.area", //$NON-NLS-1$
+ "descriptions.descriptionElements.status", //$NON-NLS-1$
+ "descriptions.markers", //$NON-NLS-1$
+ "name.descriptions", //$NON-NLS-1$
+ "name.typeDesignations", //$NON-NLS-1$
+ "name.status", //$NON-NLS-1$
+ "name.nomenclaturalReference.inReference", //$NON-NLS-1$
+ "name.taxonBases.taxonNodes", //$NON-NLS-1$
+ "name.relationsFromThisName", //$NON-NLS-1$
+ "name.relationsToThisName", //$NON-NLS-1$
+ "name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations.synonym.name.status", //$NON-NLS-1$
+ "name.homotypicalGroup.typifiedNames.relationsToThisName.fromName", //$NON-NLS-1$
+ "synonymRelations.synonym.name.status.type", //$NON-NLS-1$
+ "synonymRelations.synonym.name.relationsToThisName.fromName", //$NON-NLS-1$
+ "synonymRelations.synonym.name.nomenclaturalReference.inReference.authorship", //$NON-NLS-1$
+ "synonymRelations.synonym.name.nomenclaturalReference.authorship", //$NON-NLS-1$
+ "synonymRelations.synonym.name.homotypicalGroup.typifiedNames.taxonBases.synonymRelations" //$NON-NLS-1$
});
return taxonBasePropertyPaths;
*/
public class ChecklistLabelProvider extends LabelProvider implements ITableLabelProvider {
- public static final String DEFAULT_ENTRY = "";
+ public static final String DEFAULT_ENTRY = ""; //$NON-NLS-1$
private IDescriptionService descriptionService;
private final SortedSet<DefinedTermBase> namedAreas;
TableViewer viewer = null;
}
- private static final List<String> DESC_INIT_STRATEGY = Arrays.asList(new String[] { "descriptions",
- "descriptions.*", "description.state" });
+ private static final List<String> DESC_INIT_STRATEGY = Arrays.asList(new String[] { "descriptions", //$NON-NLS-1$
+ "descriptions.*", "description.state" }); //$NON-NLS-1$ //$NON-NLS-2$
private SortedSet<DefinedTermBase> loadNamedAreas() {
IPreferenceStore preferenceStore = PreferencesUtil.getPreferenceStore();
String values = preferenceStore.getString(PreferencesUtil.DISTRIBUTION_AREA_OCCURENCE_STATUS);
- if (values != null && values != "") {
- String[] split = values.split(",");
+ if (values != null && values != "") { //$NON-NLS-1$
+ String[] split = values.split(","); //$NON-NLS-1$
List<String> listValue = Arrays.asList(split);
List<DefinedTermBase> termlist = new ArrayList<DefinedTermBase>();
Set<UUID> uuidList = new HashSet<UUID>();
}
}
- private static final List<String> DESC_INIT_STRATEGY = Arrays.asList(new String[] { "descriptions",
- "descriptions.*", "description.state" });
+ private static final List<String> DESC_INIT_STRATEGY = Arrays.asList(new String[] { "descriptions", //$NON-NLS-1$
+ "descriptions.*", "description.state" }); //$NON-NLS-1$ //$NON-NLS-2$
/**
*
public void setSearchText(String s) {
// Search must be a substring of the existing value
- if(s.contains("*")){
- s=s.replace("*", ".*");
+ if(s.contains("*")){ //$NON-NLS-1$
+ s=s.replace("*", ".*"); //$NON-NLS-1$ //$NON-NLS-2$
}
- this.searchString = ".*" + s + ".*";
+ this.searchString = ".*" + s + ".*"; //$NON-NLS-1$ //$NON-NLS-2$
}
@Override
operation = operationCreationInstance(event.getCommand().getName(), event, description, postOperationEnabled);
AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set");
+ MessagingUtils.warn(getClass(), "Command name not set"); //$NON-NLS-1$
}
} else {
- MessagingUtils.error(getClass(), new IllegalArgumentException("Could not determine the taxon description"));
+ MessagingUtils.error(getClass(), new IllegalArgumentException("Could not determine the taxon description")); //$NON-NLS-1$
return null;
}
return null;
operation = createTaxonOperation(event.getCommand().getName(), taxon, postOperationEnabled);
AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
}
// specimen description
operation = new CreateSpecimenDescriptionOperation(event.getCommand().getName(), EditorUtil.getUndoContext(), (SpecimenOrObservationBase<?>) viewerInput, postOperationEnabled);
AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
}
}
return null;
}
private static final List<String> DESC_INIT_STRATEGY = Arrays.asList(new String[]{
- "descriptions",
- "descriptions.*",
- "description.state"
+ "descriptions", //$NON-NLS-1$
+ "descriptions.*", //$NON-NLS-1$
+ "description.state" //$NON-NLS-1$
});
import org.eclipse.swt.widgets.ToolItem;
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditor;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.preference.wizard.AvailableDistributionWizard;
for(int i=0; i<columns.length; i++){
if(selected.getText().equalsIgnoreCase(columns[i].getText())){
column = columns[i];
- logger.info("Column no " +i +" Column Header "+ column.getText() );
+ logger.info("Column no " +i +" Column Header "+ column.getText() ); //$NON-NLS-1$ //$NON-NLS-2$
for (DefinedTermBase<DefinedTermBase> term : termSet) {
if(column.getText().equalsIgnoreCase(term.getTitleCache())){
selectedTerm = term;
private void initialMenuItem(){
MenuItem menuItem = new MenuItem(menu, SWT.PUSH);
- menuItem.setText("Add Distribution");
+ menuItem.setText(Messages.ChecklistDropdownSelectionListener_ADD_DISTRIBUTION);
menuItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
import org.eclipse.swt.widgets.Text;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditor;
import eu.etaxonomy.taxeditor.preference.Resources;
public class ChecklistFocusListener implements FocusListener{
- private final Text searchText;
- private final ModifyListener modifyListener;
+ private final Text searchText;
+ private final ModifyListener modifyListener;
- /**
- *
- */
public ChecklistFocusListener(Text searchText, ModifyListener modifyListener) {
this.searchText = searchText;
this.modifyListener = modifyListener;
@Override
public void focusGained(FocusEvent e) {
- if ("type filter text".equals(searchText.getText())) {
+ if (ChecklistEditor.TYPE_FILTER_TEXT.equals(searchText.getText())) {
searchText.setForeground(EditorUtil.getColor(Resources.SEARCH_VIEW_FOCUS));
- searchText.setText("");
+ searchText.setText(""); //$NON-NLS-1$
}
}
@Override
public void focusLost(FocusEvent e) {
- if ("".equals(searchText.getText())) {
+ if ("".equals(searchText.getText())) { //$NON-NLS-1$
//TODO: set demo string
searchText.removeModifyListener(modifyListener);
searchText.setForeground(EditorUtil.getColor(Resources.SEARCH_VIEW_FOREGROUND));
- searchText.setText("type filter text");
+ searchText.setText(ChecklistEditor.TYPE_FILTER_TEXT);
searchText.addModifyListener(modifyListener);
}
return formatRelationship((Entry<TaxonRelationship, Taxon>) element);
}
- return "";
+ return ""; //$NON-NLS-1$
}
/**
Taxon sourceTaxon = entry.getValue();
TaxonRelationshipTypeInverseContainer container = TaxonRelationshipTypeInverseContainer.CreateFromSource(sourceTaxon, entry.getKey());
Taxon relatedTaxon = TaxonRelationshipTypeInverseContainer.RelatedTaxon(sourceTaxon, entry.getKey());
- String string = String.format("%s %s", container.getAbbreviatedLabel(), relatedTaxon);
+ String string = String.format("%s %s", container.getAbbreviatedLabel(), relatedTaxon); //$NON-NLS-1$
return string;
}
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
-import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
import eu.etaxonomy.taxeditor.editor.key.AbstractGraphKeyEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
} else if( element instanceof TaxonRelationship) {
return ((TaxonRelationship)element).getType().getRepresentation(Language.getLanguageFromUuid(Language.uuidEnglish)).getAbbreviatedLabel();
}
- return "TODO";
+ return "TODO"; //$NON-NLS-1$
}
@Override
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
-import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
/**
try {
handlerService.executeCommand(getCommandName(), event);
} catch (Exception e) {
- MessagingUtils.error(getClass(), "Error executing command", e);
+ MessagingUtils.error(getClass(), "Error executing command", e); //$NON-NLS-1$
}
}
});
editor.getUndoContext(), editor.getTaxon(), selectedElement, type, editor);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
return null;
public class ChangeConceptRelationshipTypeMenu extends
AbstractDynamicConceptRelationMenu {
- public String commandName = "eu.etaxonomy.taxeditor.editor.name.changeConceptRelationshipType";
+ public String commandName = "eu.etaxonomy.taxeditor.editor.name.changeConceptRelationshipType"; //$NON-NLS-1$
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.editor.handler.AbstractDynamicConceptRelationMenu#getCommandName()
public class ChangeToConceptRelationMenu extends
AbstractDynamicConceptRelationMenu {
- public String commandName = "eu.etaxonomy.taxeditor.editor.name.changeToConceptRelation";
+ public String commandName = "eu.etaxonomy.taxeditor.editor.name.changeToConceptRelation"; //$NON-NLS-1$
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.editor.handler.AbstractDynamicConceptRelationMenu#getCommandName()
undoContext, taxon, relatedConcept, typeInverseContainer, postOperationEnabled);
AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set");
+ MessagingUtils.warn(getClass(), "Command name not set"); //$NON-NLS-1$
}
return null;
public class CreateConceptRelationMenu extends
AbstractDynamicConceptRelationMenu {
- public String commandName = "eu.etaxonomy.taxeditor.editor.name.createConceptRelation";
+ public String commandName = "eu.etaxonomy.taxeditor.editor.name.createConceptRelation"; //$NON-NLS-1$
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.editor.handler.AbstractDynamicConceptRelationMenu#getCommandName()
editor.getUndoContext(), editor.getTaxon(), relations, postOperationEnabled);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set");
+ MessagingUtils.warn(getClass(), "Command name not set"); //$NON-NLS-1$
}
return null;
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
package eu.etaxonomy.taxeditor.editor.view.concept.handler;
-import java.util.Iterator;
-
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.handlers.HandlerUtil;
import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
+import eu.etaxonomy.taxeditor.model.LineSelection;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
/**
*/
public class OpenRelatedConceptHandler extends AbstractHandler {
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
- MultiPageTaxonEditor editor = EditorUtil.getActiveMultiPageTaxonEditor();
-
ISelection selection = HandlerUtil.getCurrentSelection(event);
-
- if(selection instanceof IStructuredSelection){
- IStructuredSelection structuredSelection = (IStructuredSelection) selection;
- Iterator iterator = structuredSelection.iterator();
-
- while (iterator.hasNext()){
- Object element = iterator.next();
- if(element instanceof TaxonRelationship){
- Taxon relatedTaxon = getRelatedTaxon((TaxonRelationship) element, editor.getTaxon());
-
- try {
- EditorUtil.openTaxonBase(relatedTaxon.getUuid());
- } catch (PartInitException e) {
- MessagingUtils.messageDialog("Could not open taxon", getClass(),
- String.format("Could not open the taxon: %s" ,relatedTaxon), e);
- }
- }
- }
+ TaxonBase<?> relatedTaxon = null;
+
+ if(selection instanceof IStructuredSelection){
+ IStructuredSelection structuredSelection = (IStructuredSelection) selection;
+ Object selectedElement = structuredSelection.getFirstElement();
+
+ if(selectedElement instanceof TaxonRelationship){
+ IEditorPart activeEditor = AbstractUtility.getActiveEditor();
+ if(activeEditor instanceof MultiPageTaxonEditor){
+ relatedTaxon = getRelatedTaxon((TaxonRelationship) selectedElement, ((MultiPageTaxonEditor) activeEditor).getTaxon());
+ }
+ else if(activeEditor instanceof BulkEditor){
+ ISelection bulkSelection = ((BulkEditor)activeEditor).getSelectionProvider().getSelection();
+ if(bulkSelection instanceof LineSelection){
+ Object firstElement = ((LineSelection)bulkSelection).getFirstElement();
+ if(firstElement instanceof Taxon){
+ relatedTaxon = getRelatedTaxon((TaxonRelationship) selectedElement, (Taxon) firstElement);
+ }
+ }
+ }
+ }
+ }
+
+ if(relatedTaxon==null){
+ MessagingUtils.messageDialog(Messages.OpenRelatedConceptHandler_COULD_NOT_OPEN, getClass(),
+ String.format(Messages.OpenRelatedConceptHandler_COULD_NOT_OPEN_MESSAGE ,relatedTaxon), null);
}
-
+ else{
+ openConcept(relatedTaxon);
+ }
+
return null;
}
-
+ /**
+ * @param relatedTaxon
+ */
+ protected void openConcept(TaxonBase<?> relatedTaxon) {
+ try {
+ EditorUtil.openTaxonBase(relatedTaxon.getUuid());
+ } catch (PartInitException e) {
+ MessagingUtils.messageDialog(Messages.OpenRelatedConceptHandler_COULD_NOT_OPEN, getClass(),
+ String.format(Messages.OpenRelatedConceptHandler_COULD_NOT_OPEN_MESSAGE ,relatedTaxon), e);
+ }
+ }
+
private Taxon getRelatedTaxon(TaxonRelationship relationship, Taxon taxon){
if (relationship.getFromTaxon().equals(taxon)){
return relationship.getToTaxon();
--- /dev/null
+package eu.etaxonomy.taxeditor.editor.view.concept.handler;
+
+import org.eclipse.ui.PartInitException;
+
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.taxeditor.bulkeditor.BulkEditorUtil;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+
+public class OpenRelatedConceptInBulkEditorHandler extends OpenRelatedConceptHandler{
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void openConcept(TaxonBase<?> relatedTaxon) {
+ try {
+ BulkEditorUtil.openEditor(relatedTaxon);
+ } catch (PartInitException e) {
+ MessagingUtils.error(this.getClass(), "Bulk Editor could not be opened for "+relatedTaxon, e);
+ }
+ }
+}
import org.eclipse.swt.dnd.TransferData;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
-import eu.etaxonomy.taxeditor.editor.Messages;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.operation.MoveDerivateOperation;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
-import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.searchFilter.DerivateSearchCompositeController;
import eu.etaxonomy.taxeditor.model.IContextListener;
import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
public class DerivateView extends EditorPart implements IPartContentHasFactualData, IConversationEnabled,
ICdmEntitySessionEnabled, IDirtyMarkable, IPostOperationEnabled, IPartContentHasDetails, IPartContentHasSupplementalData, IPartContentHasMedia,
IContextListener, ISelectionListener {
+ private static final String SPECIMEN_EDITOR = Messages.DerivateView_SPECIMEN_EDITOR;
+
public static final String ID = "eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView"; //$NON-NLS-1$
public static final String YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION = Messages.DerivateView_YOU_NEED_TO_SAVE;
public static final String VIEW_HAS_UNSAVED_CHANGES = Messages.DerivateView_UNSAVED_CHANGES;
private static final List<String> SPECIMEN_INIT_STRATEGY = Arrays.asList(new String[] {
- "descriptions",
- "annotations",
- "markers",
- "credits",
- "extensions",
- "rights",
- "sources",
- "derivationEvents.derivatives.annotations",
- "derivationEvents.derivatives.markers",
- "derivationEvents.derivatives.credits",
- "derivationEvents.derivatives.extensions",
- "derivationEvents.derivatives.rights",
- "derivationEvents.derivatives.sources"
+ "descriptions", //$NON-NLS-1$
+ "annotations", //$NON-NLS-1$
+ "markers", //$NON-NLS-1$
+ "credits", //$NON-NLS-1$
+ "extensions", //$NON-NLS-1$
+ "rights", //$NON-NLS-1$
+ "sources", //$NON-NLS-1$
+ "derivationEvents.derivatives.annotations", //$NON-NLS-1$
+ "derivationEvents.derivatives.markers", //$NON-NLS-1$
+ "derivationEvents.derivatives.credits", //$NON-NLS-1$
+ "derivationEvents.derivatives.extensions", //$NON-NLS-1$
+ "derivationEvents.derivatives.rights", //$NON-NLS-1$
+ "derivationEvents.derivatives.sources" //$NON-NLS-1$
});
private static final int WARN_THRESHOLD = 200;
//set taxon filter
derivateSearchCompositeController.setTaxonFilter(((DerivateViewEditorInput) getEditorInput()).getTaxonUuid());
//reset status bar
- getEditorSite().getActionBars().getStatusLineManager().setMessage("");
+ getEditorSite().getActionBars().getStatusLineManager().setMessage(""); //$NON-NLS-1$
//add drag'n'drop support
Transfer[] transfers = new Transfer[] {LocalSelectionTransfer.getTransfer(),};
labelProvider.updateLabelCache(rootElements);
viewer.setInput(rootElements);
- getEditorSite().getActionBars().getStatusLineManager().setMessage(rootElements.size() +" derivative hierarchies found");
+ getEditorSite().getActionBars().getStatusLineManager().setMessage(String.format(Messages.DerivateView_CNT_DERIVATIVES_FOUND, rootElements.size()));
//set selection to derivatives if the filter criteria
//taxon assignment or derivative type are set
conversation.commit(true);
CdmStore.getService(IOccurrenceService.class).merge(new ArrayList<SpecimenOrObservationBase>(rootElements), true);
-
+
monitor.worked(1);
this.setDirty(false);
@Override
public Map<Object, List<String>> getPropertyPathsMap() {
List<String> specimenPropertyPaths = Arrays.asList(new String[] {
- "descriptions",
- "derivationEvents.derivates",
- "annotations",
- "markers",
- "credits",
- "extensions",
- "rights",
- "sources"
+ "descriptions", //$NON-NLS-1$
+ "derivationEvents.derivates", //$NON-NLS-1$
+ "annotations", //$NON-NLS-1$
+ "markers", //$NON-NLS-1$
+ "credits", //$NON-NLS-1$
+ "extensions", //$NON-NLS-1$
+ "rights", //$NON-NLS-1$
+ "sources" //$NON-NLS-1$
});
Map<Object, List<String>> specimenPropertyPathMap =
new HashMap<Object, List<String>>();
}
checkWarnThreshold(uuids);
updateRootEntities(uuids);
- setPartName("Derivative Editor: " + selectedTaxon.getName());
+ setPartName(SPECIMEN_EDITOR+": " + selectedTaxon.getName()); //$NON-NLS-1$
}
}
}
private void checkWarnThreshold(Collection<UUID> uuids) {
if(uuids!=null && uuids.size()>WARN_THRESHOLD){
- MessagingUtils.warningDialog("Performance warning", this.getClass(), String.format("Specimens will not be loaded!\n"
- + "There are %d specimens associated with the current "
- + "selection. If you really want to show all of them in the specimen editor please "
- + "use the taxon filter in the search bar.", uuids.size()));
+ MessagingUtils.warningDialog(Messages.DerivateView_PERF_WARNING, this.getClass(), String.format(Messages.DerivateView_PERF_WARNING_MESSAGE, uuids.size()));
uuids.clear();
}
}
derivateSearchCompositeController.setEnabled(!listenToSelectionChange);
if(!listenToSelectionChange){
selectedTaxon = null;
- setPartName("Derivative Editor");
+ setPartName(SPECIMEN_EDITOR);
}
else if(selectedTaxon==null){
- setPartName("Derivative Editor [no taxon selected]");
+ setPartName(SPECIMEN_EDITOR+Messages.DerivateView_NO_TAXON_SELECTED);
}
}
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+
/**
* Editor input for the {@link DerivateView}
*
}
private String getEditorName() {
- return "Derivative Editor";
+ return Messages.DerivateViewEditorInput_SPECIMEN_EDITOR;
}
}
@Override
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
DerivateView derivateView = (DerivateView)receiver;
- if(property.equals("isLinkedWithTaxonSelection")){
+ if(property.equals("isLinkedWithTaxonSelection")){ //$NON-NLS-1$
return derivateView.isListenToSelectionChange();
}
return false;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
-import eu.etaxonomy.taxeditor.editor.Messages;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.cdm.model.description.TaxonDescription;
import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.editor.Messages;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.CompoundContributionItem;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
import eu.etaxonomy.taxeditor.model.ImageResources;
final DerivateView derivateView = (DerivateView) activePart;
MenuItem item = new MenuItem(menu, SWT.NONE);
if(derivateView.isListenToSelectionChange()){
- item.setText("Unlink from taxon selection");
+ item.setText(Messages.ListenToSelectionChangeContextMenu_UNLINK);
}
else{
- item.setText("Link with taxon selection");
+ item.setText(Messages.ListenToSelectionChangeContextMenu_LINK);
}
item.setImage(ImageResources.getImage(ImageResources.SYNCED));
item.addSelectionListener(new SelectionAdapterExtension(derivateView));
import eu.etaxonomy.cdm.model.molecular.SingleRead;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.operation.DeleteDerivateOperation;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
}
}
else{
- MessagingUtils.error(getClass(), "Selection is not valid for this delete handler", null);
+ MessagingUtils.error(getClass(), Messages.DeleteDerivateHandler_INVALID_SELECTION, null);
}
}
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set");
+ MessagingUtils.warn(getClass(), "Command name not set"); //$NON-NLS-1$
}
return null;
}
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.handler.OpenDerivateViewHandler;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
@Override
protected void open(ExecutionEvent event, IndividualsAssociation entity) {
if(entity==null || entity.getAssociatedSpecimenOrObservation()==null){
- MessagingUtils.messageDialog("No specimens found", this, "No specimens found for the selected object. (Maybe there are unsaved changes)");
+ MessagingUtils.messageDialog(Messages.OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS, this, Messages.OpenDerivativeEditorForDescriptionElement_NO_SPECIMENS_MESSAGE);
return;
}
SpecimenOrObservationBase associatedSpecimenOrObservation = entity.getAssociatedSpecimenOrObservation();
try {
EditorUtil.open(new DerivateViewEditorInput(Collections.singletonList(specimenUuid)));
} catch (PartInitException e) {
- MessagingUtils.error(OpenDerivateViewHandler.class, "Derivative Editor could not be opened", e);
+ MessagingUtils.error(OpenDerivateViewHandler.class, OpenDerivativeEditorForTaxonNode.OPEN_DERIVATIVE_EDITOR_FOR_TAXON_NODE_COULD_NOT_OPEN, e);
}
}
--- /dev/null
+package eu.etaxonomy.taxeditor.editor.view.derivate.handler;
+
+import java.util.UUID;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.ui.PartInitException;
+
+import eu.etaxonomy.cdm.api.service.IOccurrenceService;
+import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
+import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.handler.OpenDerivateViewHandler;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
+import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+public class OpenDerivativeEditorForSpecimenOrOBservationBase extends DefaultOpenHandlerBase<SpecimenOrObservationBase<?>>{
+
+ protected static final String OPEN_DERIVATIVE_EDITOR_FOR_TAXON_NODE_COULD_NOT_OPEN = Messages.OpenDerivativeEditorForTaxonNode_COULD_NOT_OPEN;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected SpecimenOrObservationBase<?> getEntity(UUID uuid) {
+ return CdmStore.getService(IOccurrenceService.class).load(uuid);
+ }
+
+ @Override
+ protected void open(ExecutionEvent event, SpecimenOrObservationBase<?> entity) {
+ try {
+ EditorUtil.open(new DerivateViewEditorInput(entity.getUuid()));
+ } catch (PartInitException e) {
+ MessagingUtils.error(OpenDerivateViewHandler.class, OPEN_DERIVATIVE_EDITOR_FOR_TAXON_NODE_COULD_NOT_OPEN, e);
+ }
+
+ }
+
+
+
+}
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.handler.OpenDerivateViewHandler;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateViewEditorInput;
import eu.etaxonomy.taxeditor.handler.defaultHandler.DefaultOpenHandlerBase;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
public class OpenDerivativeEditorForTaxonNode extends DefaultOpenHandlerBase<TaxonNode> {
+ protected static final String OPEN_DERIVATIVE_EDITOR_FOR_TAXON_NODE_COULD_NOT_OPEN = Messages.OpenDerivativeEditorForTaxonNode_COULD_NOT_OPEN;
+
@Override
protected TaxonNode getEntity(UUID uuid) {
return CdmStore.getService(ITaxonNodeService.class).load(uuid);
try {
EditorUtil.open(new DerivateViewEditorInput(specimenUuids, taxonUuid));
} catch (PartInitException e) {
- MessagingUtils.error(OpenDerivateViewHandler.class, "Derivative Editor could not be opened", e);
+ MessagingUtils.error(OpenDerivateViewHandler.class, OPEN_DERIVATIVE_EDITOR_FOR_TAXON_NODE_COULD_NOT_OPEN, e);
}
}
TreeNode selectedTreeNode = EditorUtil.getTreeNodeOfSelection(selection);
if(activeEditor instanceof DerivateView) {
DerivateView derivateView = (DerivateView)activeEditor;
- if(event.getCommand().getId().equals("eu.etaxonomy.taxeditor.editor.derivative.copySingleReadToClipBoard")){
+ if(event.getCommand().getId().equals("eu.etaxonomy.taxeditor.editor.derivative.copySingleReadToClipBoard")){ //$NON-NLS-1$
LocalSelectionTransfer.getTransfer().setSelection(selection);
}
- else if(event.getCommand().getId().equals("eu.etaxonomy.taxeditor.editor.derivative.reuseSingleRead")){
+ else if(event.getCommand().getId().equals("eu.etaxonomy.taxeditor.editor.derivative.reuseSingleRead")){ //$NON-NLS-1$
if(activeEditor.isDirty()){
MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
return null;
}
}
}
- else if(event.getCommand().getId().equals("eu.etaxonomy.taxeditor.editor.derivative.removeSingleReadFromSequence")){
+ else if(event.getCommand().getId().equals("eu.etaxonomy.taxeditor.editor.derivative.removeSingleReadFromSequence")){ //$NON-NLS-1$
if(activeEditor.isDirty()){
MessagingUtils.warningDialog(DerivateView.VIEW_HAS_UNSAVED_CHANGES, this, DerivateView.YOU_NEED_TO_SAVE_BEFORE_PERFORMING_THIS_ACTION);
return null;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.molecular.Sequence;
import eu.etaxonomy.cdm.model.molecular.SingleRead;
-import eu.etaxonomy.taxeditor.editor.Messages;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator.DeleteConfiguratorDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator.DeleteConfiguratorDialog;
/**
*
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
-import eu.etaxonomy.taxeditor.editor.Messages;
import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.wb.swt.ResourceManager;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+
/**
* The widgets of the {@link DerivateSearchView}<br>
*
setLayout(new GridLayout(7, false));
lblTaxon = new Label(this, SWT.NONE);
- lblTaxon.setText("Taxon");
+ lblTaxon.setText(Messages.DerivateSearchComposite_TAXON);
- textTaxonName = formToolkit.createText(this, "New Text", SWT.BORDER);
+ textTaxonName = formToolkit.createText(this, Messages.DerivateSearchComposite_NEW_TEXT, SWT.BORDER);
textTaxonName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
textTaxonName.setEnabled(false);
- textTaxonName.setText("");
+ textTaxonName.setText(""); //$NON-NLS-1$
- btnBrowseTaxa = formToolkit.createButton(this, "", SWT.NONE);
+ btnBrowseTaxa = formToolkit.createButton(this, "", SWT.NONE); //$NON-NLS-1$
btnBrowseTaxa.setAlignment(SWT.RIGHT);
- btnBrowseTaxa.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/prj_obj.gif"));
+ btnBrowseTaxa.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/prj_obj.gif")); //$NON-NLS-1$ //$NON-NLS-2$
- btnClearTaxon = formToolkit.createButton(this, "", SWT.NONE);
+ btnClearTaxon = formToolkit.createButton(this, "", SWT.NONE); //$NON-NLS-1$
btnClearTaxon.setAlignment(SWT.RIGHT);
btnClearTaxon.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));
- btnClearTaxon.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/trash.gif"));
+ btnClearTaxon.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/trash.gif")); //$NON-NLS-1$ //$NON-NLS-2$
lbltaxonAssignment = new Label(this, SWT.NONE);
lbltaxonAssignment.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- lbltaxonAssignment.setText("Taxon assignment");
+ lbltaxonAssignment.setText(Messages.DerivateSearchComposite_TAXON_ASSIGNMENT);
comboTaxonAssignment = new Combo(this, SWT.NONE);
- comboTaxonAssignment.setItems(new String[] { "All", "Yes", "No" });
+ comboTaxonAssignment.setItems(new String[] { Messages.DerivateSearchComposite_ALL, Messages.DerivateSearchComposite_YES, Messages.DerivateSearchComposite_NO });
comboTaxonAssignment.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
formToolkit.adapt(comboTaxonAssignment);
formToolkit.paintBordersFor(comboTaxonAssignment);
lblTitleCache = new Label(this, SWT.NONE);
lblTitleCache.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- lblTitleCache.setText("Title Cache");
+ lblTitleCache.setText(Messages.DerivateSearchComposite_TITLE_CACHE);
- searchField = formToolkit.createText(this, "New Text", SWT.BORDER);
+ searchField = formToolkit.createText(this, "New Text", SWT.BORDER); //$NON-NLS-1$
searchField.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 3, 1));
- searchField.setText("");
+ searchField.setText(""); //$NON-NLS-1$
lblDerivateType = new Label(this, SWT.NULL);
lblDerivateType.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
- lblDerivateType.setText("Derivative Type");
+ lblDerivateType.setText(Messages.DerivateSearchComposite_DERIVATE_TYPE);
comboDerivateType = new Combo(this, SWT.READ_ONLY);
comboDerivateType.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
buttonSearch = new Button(this, SWT.NONE);
formToolkit.adapt(buttonSearch, true, true);
- buttonSearch.setText("Search");
+ buttonSearch.setText(Messages.DerivateSearchComposite_SEARCH);
}
}
else if(eventSource==derivateSearchComposite.getBtnClearTaxon()){
selectedTaxon = null;
- derivateSearchComposite.getTextTaxonName().setText("");
+ derivateSearchComposite.getTextTaxonName().setText(""); //$NON-NLS-1$
derivateSearchComposite.getComboTaxonAssignment().select(DerivateSearchComposite.ALL_SPECIMENS);
derivateSearchComposite.getComboTaxonAssignment().setEnabled(true);
derivateSearchComposite.getLbltaxonAssignment().setEnabled(true);
*/
public void reset(){
if(!derivateSearchComposite.isDisposed()){
- derivateSearchComposite.getSearchField().setText("");
+ derivateSearchComposite.getSearchField().setText(""); //$NON-NLS-1$
derivateSearchComposite.getComboDerivateType().deselectAll();
comboSpecimenTypeController.setSelection(SpecimenOrObservationType.Unknown);
}
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
import eu.etaxonomy.cdm.model.description.TaxonDescription;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.MoveDescriptionElementsOperation;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
*/
public class DescriptionElementDropAdapter extends ViewerDropAdapter {
- /**
+ private static final String OPERATION_NOT_SUPPORTED_YET = Messages.DescriptionElementDropAdapter_NOT_SUPPORTED;
+
+ /**
* @param viewer
*/
public DescriptionElementDropAdapter(Viewer viewer) {
if (droppedElements != null){
for (Object droppedElement : droppedElements) {
if (droppedElement == null){
- MessagingUtils.warningDialog("Operation not supported yet", this, "We are currently unable to drag and drop a newly created element. Please save the editor to make this work.");
+ MessagingUtils.warningDialog(OPERATION_NOT_SUPPORTED_YET, this, Messages.DescriptionElementDropAdapter_NOT_SUPPORTED_NEW_ELEMENT);
return false;
}
if(! (droppedElement instanceof DescriptionElementBase)){
}
}
- AbstractPostOperation operation = new MoveDescriptionElementsOperation("Move Descriptions", EditorUtil.getUndoContext(), target, descriptionElements, isCopy, null);
+ AbstractPostOperation operation = new MoveDescriptionElementsOperation(Messages.DescriptionElementDropAdapter_MOVE_DESC, EditorUtil.getUndoContext(), target, descriptionElements, isCopy, null);
EditorUtil.executeOperation(operation);
return true;
}
- MessagingUtils.warningDialog("Operation not supported yet", this, "We are unable to drag and drop empty descriptions");
+ MessagingUtils.warningDialog(OPERATION_NOT_SUPPORTED_YET, this, Messages.DescriptionElementDropAdapter_NOT_SUPPORTED_EMPTY_ELEMENT);
return false;
public class DescriptionElementTransfer extends CdmObjectTransfer<DescriptionElementBase> {
private static DescriptionElementTransfer instance = new DescriptionElementTransfer();
- private static final String TYPE_NAME = "descriptionElement-transfer-format";
+ private static final String TYPE_NAME = "descriptionElement-transfer-format"; //$NON-NLS-1$
private static final int TYPEID = registerType(TYPE_NAME);
public static synchronized DescriptionElementTransfer getInstance(){
import eu.etaxonomy.cdm.model.common.Marker;
import eu.etaxonomy.cdm.model.description.DescriptionBase;
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
-import eu.etaxonomy.cdm.model.description.Feature;
import eu.etaxonomy.cdm.model.description.FeatureTree;
import eu.etaxonomy.cdm.model.description.IDescribable;
import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainerTree;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.store.TermStore;
import eu.etaxonomy.taxeditor.store.UsageTermCollection;
/**
@Override
public int compare(IndividualsAssociation o1, IndividualsAssociation o2) {
- if(o1==null || o1.getAssociatedSpecimenOrObservation()==null){
- return -1;
+ if(o1==null){
+ if(o2==null){
+ return 0;
+ }
+ else{
+ return -1;
+ }
}
- if(o2==null || o2.getAssociatedSpecimenOrObservation()==null){
+ else if(o2==null){
return 1;
}
- return o1.getAssociatedSpecimenOrObservation().compareTo(o2.getAssociatedSpecimenOrObservation());
+
+ if(o1.getAssociatedSpecimenOrObservation()==null){
+ if(o2.getAssociatedSpecimenOrObservation()==null){
+ return 0;
+ }
+ else{
+ return -1;
+ }
+ }
+ else if(o2.getAssociatedSpecimenOrObservation()==null){
+ return 1;
+ }
+
+ String titleCache1 = o1.getAssociatedSpecimenOrObservation().getTitleCache();
+ String titleCache2 = o2.getAssociatedSpecimenOrObservation().getTitleCache();
+
+ if(titleCache1==null){
+ if(titleCache2==null){
+ return 0;
+ }
+ else{
+ return -1;
+ }
+ }
+ if(titleCache2==null){
+ return 1;
+ }
+
+ return titleCache1.compareTo(titleCache2);
}
});
if(showOnlyIndividualAssociations){
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
-import eu.etaxonomy.taxeditor.editor.Messages;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.checklist.ChecklistEditor;
import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
import eu.etaxonomy.taxeditor.editor.view.media.MediaViewPart;
operation = operationCreationInstance(event.getCommand().getName(), event, description, postOperationEnabled);
AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set");
+ MessagingUtils.warn(getClass(), "Command name not set"); //$NON-NLS-1$
}
} else {
- MessagingUtils.error(getClass(), new IllegalArgumentException("Could not determine the taxon description"));
+ MessagingUtils.error(getClass(), new IllegalArgumentException("Could not determine the taxon description")); //$NON-NLS-1$
return null;
}
return null;
operation = createTaxonOperation(event.getCommand().getName(), taxon, postOperationEnabled);
AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
}
// specimen description
operation = new CreateSpecimenDescriptionOperation(event.getCommand().getName(), EditorUtil.getUndoContext(), (SpecimenOrObservationBase<?>) viewerInput, postOperationEnabled);
AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
}
if(viewerInput instanceof TaxonBase){
operation = createTaxonOperation(event.getCommand().getName(), (Taxon) viewerInput, postOperationEnabled);
AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
}
import eu.etaxonomy.cdm.model.description.TaxonDescription;
import eu.etaxonomy.cdm.model.media.Media;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.DeleteDescriptionElementOperation;
import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.DeleteSpecimenDescriptionOperation;
import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.DeleteTaxonDescriptionOperation;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
-import eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator.DeleteConfiguratorDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator.DeleteConfiguratorDialog;
/**
* <p>DeleteDescriptionHandler class.</p>
MediaDeletionConfigurator config = new MediaDeletionConfigurator();
DeleteConfiguratorDialog dialog;
- dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", null, "Do you really want to delete the media?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
+ dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), Messages.DeleteHandler_CONFIRM_DELETION, null, Messages.DeleteHandler_CONFIRM_DELETION_MESSAGE, MessageDialog.WARNING, new String[] { Messages.DeleteHandler_DELETE, Messages.DeleteHandler_SKIP }, 0);
int result_dialog= dialog.open();
if (result_dialog != Status.OK){
return null;
}
else{
- MessagingUtils.error(getClass(), "Selection is not valid for this delete handler", null);
+ MessagingUtils.error(getClass(), Messages.DeleteHandler_INVALID_SELECTION, null);
}
}
}
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
*/
public class DescriptionsMenuPropertyTester extends PropertyTester {
- private static final String MEDIA = "isMedia";
- private static final String FEATURE_NODE_CONTAINER = "isFeatureNodeContainer";
- private static final String DESCRIPTION = "isDescription";
- private static final String INDIVIDUALS_ASSOCIATION = "isIndividualsAssociation";
- private static final String DESCRIPTION_ELEMENT = "isDescriptionElement";
- private static final String DELETABLE = "isDeletable";
- private static final String IMAGE_GALLERY = "isImageGallery";
- private static final String TAXON_EDITOR = "isTaxonEditor";
- private static final String BULK_EDITOR = "isBulkEditor";
- private static final String DERIVATE_EDITOR = "isDerivateEditor";
+ private static final String MEDIA = "isMedia"; //$NON-NLS-1$
+ private static final String FEATURE_NODE_CONTAINER = "isFeatureNodeContainer"; //$NON-NLS-1$
+ private static final String DESCRIPTION = "isDescription"; //$NON-NLS-1$
+ private static final String INDIVIDUALS_ASSOCIATION = "isIndividualsAssociation"; //$NON-NLS-1$
+ private static final String DESCRIPTION_ELEMENT = "isDescriptionElement"; //$NON-NLS-1$
+ private static final String DELETABLE = "isDeletable"; //$NON-NLS-1$
+ private static final String IMAGE_GALLERY = "isImageGallery"; //$NON-NLS-1$
+ private static final String TAXON_EDITOR = "isTaxonEditor"; //$NON-NLS-1$
+ private static final String BULK_EDITOR = "isBulkEditor"; //$NON-NLS-1$
+ private static final String DERIVATE_EDITOR = "isDerivateEditor"; //$NON-NLS-1$
/* (non-Javadoc)
* @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Object)
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
import eu.etaxonomy.taxeditor.editor.Page;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.MoveDescriptionElementsOperation;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
}
TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
editor.getConversationHolder(),
- "Choose the accepted taxon",
+ Messages.MoveDescriptionElementsHandler_CHOOSE_ACC_TAXON,
excludeTaxa,
null, classification
);
}
newAcceptedTaxonNodeUuid = newAcceptedTaxonNode.getUuid();
- String moveMessage = String.format("Elements moved from %s", EditorUtil.getActiveMultiPageTaxonEditor().getTaxon());
+ String moveMessage = String.format(Messages.MoveDescriptionElementsHandler_ELEMENTS_MOVED, EditorUtil.getActiveMultiPageTaxonEditor().getTaxon());
try {
AbstractPostOperation operation = new MoveDescriptionElementsOperation(
MessagingUtils.error(this.getClass(), e);
throw new RuntimeException(e);
} catch (Exception e) {
- MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
+ MessagingUtils.warningDialog(Messages.MoveDescriptionElementsHandler_CREATE_FAILURE, this, e.getMessage());
}
}
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor;
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.descriptive.operation.MoveDescriptionToOtherTaxonOperation;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
editor = EditorUtil.getActiveMultiPageTaxonEditor();
if (this.editor.isDirty()){
boolean proceed = MessageDialog.openQuestion(null,
- "Save changes", "You have made changes that must be saved before this query can be executed. Would you like to proceed?");
+ Messages.MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES, Messages.MoveDescriptionToOtherTaxonHandler_SAVE_CHANGES_MESSAGE);
if (proceed) {
editor.doSave(EditorUtil.getMonitor());
} else {
}
TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
editor.getConversationHolder(),
- "Choose the accepted taxon",
+ Messages.MoveDescriptionToOtherTaxonHandler_CHOOSE_ACC_TAXON,
excludeTaxa,
node,
classification);
}
} catch (NotDefinedException e) {
- logger.warn("Command name not set");
+ logger.warn("Command name not set"); //$NON-NLS-1$
}
}
MessagingUtils.error(this.getClass(), e);
throw new RuntimeException(e);
} catch (Exception e) {
- MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
+ MessagingUtils.warningDialog(Messages.MoveDescriptionToOtherTaxonHandler_CREATE_FAILED, this, e.getMessage());
}
}
import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
*/
public class AddDerivedUnitFacadeMediaOperation extends AbstractPostTaxonOperation {
- private final SpecimenOrObservationBase<?> specimen;
+ private static final String ONLY_ONE_IMAGE_GALLERY_IS_POSSIBLE = Messages.AddDerivedUnitFacadeMediaOperation_CREATE_FAILED_MESSAGE;
+ private static final String IMAGE_GALLERY_CREATION_FAILED = Messages.AddDerivedUnitFacadeMediaOperation_CREATE_FAILED;
+ private final SpecimenOrObservationBase<?> specimen;
/**
* @param label
if(specimen instanceof FieldUnit){
facade = DerivedUnitFacade.NewInstance(SpecimenOrObservationType.FieldUnit, (FieldUnit) specimen);
if(facade.hasFieldObjectImageGallery()){
- MessagingUtils.informationDialog("Image gallery creation failed", "Only one image gallery is possible.");
+ MessagingUtils.informationDialog(IMAGE_GALLERY_CREATION_FAILED, ONLY_ONE_IMAGE_GALLERY_IS_POSSIBLE);
return Status.CANCEL_STATUS;
}
else{
else if(specimen instanceof DerivedUnit){
facade = DerivedUnitFacade.NewInstance((DerivedUnit)specimen);
if(facade.hasDerivedUnitImageGallery()){
- MessagingUtils.informationDialog("Image gallery creation failed", "Only one image gallery is possible.");
+ MessagingUtils.informationDialog(IMAGE_GALLERY_CREATION_FAILED, ONLY_ONE_IMAGE_GALLERY_IS_POSSIBLE);
return Status.CANCEL_STATUS;
}
else{
public class CreateDescriptionElementOperation extends AbstractPostTaxonOperation {
/** Constant <code>ID="eu.etaxonomy.taxeditor.editor.descripti"{trunked}</code> */
- public static final String ID = "eu.etaxonomy.taxeditor.editor.view.descriptive.command.createDescriptionElement";
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.view.descriptive.command.createDescriptionElement"; //$NON-NLS-1$
private final DescriptionBase<?> description;
private final Feature feature;
monitor.worked(20);
if (element == null) {
if (feature.isSupportsCommonTaxonName()) {
- element = CommonTaxonName.NewInstance("", null);
+ element = CommonTaxonName.NewInstance("", null); //$NON-NLS-1$
}
else if (feature.isSupportsDistribution()) {
element = Distribution.NewInstance();
* @date 04.12.2013
*
*/
-public class CreateSpecimenDescriptionOperation extends AbstractDescriptionPostOperation<SpecimenOrObservationBase<?>, DescriptionBase> {
+public class CreateSpecimenDescriptionOperation extends AbstractDescriptionPostOperation<SpecimenOrObservationBase, DescriptionBase> {
/**
* @param label
import eu.etaxonomy.cdm.model.description.DescriptionBase;
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
// Remove element from description
if (description == null) {
- MessagingUtils.error(this.getClass(), "Couldn't find element's description!", null);
+ MessagingUtils.error(this.getClass(), Messages.DeleteDescriptionElementOperation_DESC_NOT_FOUND, null);
} else {
description.removeElement(element);
}
*/\r
@Override\r
public Object execute(ExecutionEvent event) throws ExecutionException {\r
- MessagingUtils.warningDialog("Operation not supported yet", getClass(), "This operation is not supported yet.");\r
+ MessagingUtils.warningDialog("Operation not supported yet", getClass(), "This operation is not supported yet."); //$NON-NLS-1$ //$NON-NLS-2$\r
return null;\r
}\r
\r
import eu.etaxonomy.cdm.model.description.TaxonDescription;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
monitor.worked(20);
bind();
- String moveMessage = String.format("Description moved from %s", EditorUtil.getActiveMultiPageTaxonEditor().getTaxon());
+ String moveMessage = String.format(Messages.MoveDescriptionToOtherTaxonOperation_MOVED_FROM, EditorUtil.getActiveMultiPageTaxonEditor().getTaxon());
if(description.isProtectedTitleCache()){
- String separator = "";
+ String separator = ""; //$NON-NLS-1$
if(!StringUtils.isBlank(description.getTitleCache())){
- separator = " - ";
+ separator = " - "; //$NON-NLS-1$
}
description.setTitleCache(description.getTitleCache() + separator + moveMessage, true);
}
}
if(taxon == null){
- MessagingUtils.error(getClass(), "Taxon is null", null);
+ MessagingUtils.error(getClass(), "Taxon is null", null); //$NON-NLS-1$
return NO_CHILDREN;
}
HashSet<DescriptionBase> imageGalleries = new HashSet<DescriptionBase>();
}
} catch (DerivedUnitFacadeNotSupportedException e) {
- MessagingUtils.error(this.getClass(), "DerivedUnitFacadeNotSupportedException when trying to instantiate DerivedUnitFacade", e);
+ MessagingUtils.error(this.getClass(), "DerivedUnitFacadeNotSupportedException when trying to instantiate DerivedUnitFacade", e); //$NON-NLS-1$
}
}
else if (parentElement instanceof FieldUnit){
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
private List<Media> getImages(DescriptionBase description){
- Assert.isTrue(description.isImageGallery(), "Description should have the imageGallery flag set.");
+ Assert.isTrue(description.isImageGallery(), "Description should have the imageGallery flag set."); //$NON-NLS-1$
Set<DescriptionElementBase> elements = description.getElements();
if (elements != null) {
// by definition, image galleries have only one description element
if(elements.size() > 1){
- MessagingUtils.error(this.getClass(), "There should be one and only one description element to hold the images. Found: " + elements.size() + " InDescription ID: " + description.getUuid(), null);
+ MessagingUtils.error(this.getClass(), "There should be one and only one description element to hold the images. Found: " + elements.size() + " InDescription ID: " + description.getUuid(), null); //$NON-NLS-1$ //$NON-NLS-2$
}
if (!elements.isEmpty()){
DescriptionElementBase element = elements.iterator().next();
import eu.etaxonomy.cdm.model.description.IDescribable;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
import eu.etaxonomy.taxeditor.bulkeditor.BulkEditor;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptiveViewPart;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
*/
public class MediaViewPart extends AbstractCdmEditorViewPart implements IPartContentHasDetails, IPartContentHasSupplementalData {
- public static final String ID = "eu.etaxonomy.taxeditor.editor.view.media";
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.view.media"; //$NON-NLS-1$
private TreeViewer viewer;
@Override
protected String getViewName() {
- return "Media";
+ return Messages.MediaViewPart_MEDIA;
}
}
AbstractUtility.executeOperation(operation);
}
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
}
}
}
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
}
return null;
EditorUtil.getUndoContext(), description, postOperationEnabled);
AbstractUtility.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
}
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
-import eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator.DeleteConfiguratorDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator.DeleteConfiguratorDialog;
/**
* <p>DeleteMediaHandler class.</p>
MediaDeletionConfigurator config = new MediaDeletionConfigurator();
DeleteConfiguratorDialog dialog;
- dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", null, "Do you really want to delete the media?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
+ dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), Messages.DeleteMediaHandler_CONFIRM, null, Messages.DeleteMediaHandler_CONFIRM_MESSAGE, MessageDialog.WARNING, new String[] { Messages.DeleteMediaHandler_DELETE, Messages.DeleteMediaHandler_SKIP }, 0);
int result_dialog= dialog.open();
if (result_dialog != Status.OK){
return null;
EditorUtil.getUndoContext(), taxon, description, media, MoveMediaInListOperation.DOWN, postOperationEnabled);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
}
}
EditorUtil.getUndoContext(), taxon, element, media, MoveMediaInListOperation.UP, postOperationEnabled);
EditorUtil.executeOperation(operation);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set.");
+ MessagingUtils.warn(getClass(), "Command name not set."); //$NON-NLS-1$
}
}
}
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
import eu.etaxonomy.cdm.model.media.Media;
import eu.etaxonomy.cdm.model.taxon.Taxon;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
Set<DescriptionElementBase> elements = description.getElements();
if(elements.size() != 1){
- MessagingUtils.error(this.getClass(), "More than one description element in this image gallery", null);
+ MessagingUtils.error(this.getClass(), Messages.MoveMediaInListOperation_MORE_DESC, null);
}
DescriptionElementBase element = elements.iterator().next();
/**\r
* Copyright (C) 2011 EDIT\r
-* European Distributed Institute of Taxonomy \r
+* European Distributed Institute of Taxonomy\r
* http://www.e-taxonomy.eu\r
-* \r
+*\r
* The contents of this file are subject to the Mozilla Public License Version 1.1\r
* See LICENSE.TXT at the top of this package for the full license terms.\r
*/\r
import eu.etaxonomy.cdm.model.description.DescriptionBase;\r
import eu.etaxonomy.cdm.model.description.StateData;\r
import eu.etaxonomy.cdm.model.description.TextData;\r
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;\r
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;\r
import eu.etaxonomy.taxeditor.store.CdmStore;\r
import eu.etaxonomy.taxeditor.store.UsageTermCollection;\r
\r
/**\r
* UsesLabelProvider Class\r
- * @author a.theys \r
+ * @author a.theys\r
* @created mar 13, 2012\r
* @version 1.0\r
*/\r
public class UsesLabelProvider extends ColumnLabelProvider implements\r
IStyledLabelProvider {\r
- \r
- /** {@inheritDoc} */\r
- public String getText(Object element) {\r
- String text = "";\r
+\r
+ private static final String USE = Messages.UsesLabelProvider_USE;\r
+ private static final String NO_DATA_PROVIDED = Messages.UsesLabelProvider_NO_DATA;\r
+ private static final String SEMICOLON = ";"; //$NON-NLS-1$\r
+\r
+ /** {@inheritDoc} */\r
+ @Override\r
+ public String getText(Object element) {\r
+ String text = ""; //$NON-NLS-1$\r
\r
if (element instanceof DescriptionBase) {\r
text = ((DescriptionBase) element).getTitleCache();\r
if (text == null || text.length() == 0) {\r
- text = "Use: No label provided";\r
+ text = USE+Messages.UsesLabelProvider_NO_LABEL;\r
}\r
else {\r
- text = "Use: " + text;\r
+ text = USE + text;\r
}\r
}\r
else if (element instanceof CategoricalData) {\r
boolean isUseCategoryAbsent = true;\r
for (StateData statedata : ((CategoricalData) element).getStateData()) {\r
if(statedata.getState() != null && statedata.getModifyingText().get(CdmStore.getDefaultLanguage()) !=null && statedata.getModifyingText().get(CdmStore.getDefaultLanguage()).getText().equals(UsageTermCollection.useCategoryVocabularyLabel)) {\r
- text = text + statedata.getState().getTitleCache() + ";";\r
+ text = text + statedata.getState().getTitleCache() + SEMICOLON;\r
isUseCategoryAbsent = false;\r
}\r
}\r
if(isUseCategoryAbsent) {\r
- text = text + UsageTermCollection.notAvailableLabel + ";";\r
+ text = text + UsageTermCollection.notAvailableLabel + SEMICOLON;\r
}\r
- \r
+\r
boolean isUseSubCategoryAbsent = true;\r
for (StateData statedata : ((CategoricalData) element).getStateData()) {\r
if(statedata.getState() != null && statedata.getModifyingText().get(CdmStore.getDefaultLanguage()) !=null && statedata.getModifyingText().get(CdmStore.getDefaultLanguage()).getText().equals(UsageTermCollection.useSubCategoryVocabularyLabel)) {\r
- text = text + statedata.getState().getTitleCache() + ";";\r
+ text = text + statedata.getState().getTitleCache() + SEMICOLON;\r
isUseSubCategoryAbsent = false;\r
}\r
}\r
if(isUseSubCategoryAbsent) {\r
- text = text + UsageTermCollection.notAvailableLabel + ";";\r
+ text = text + UsageTermCollection.notAvailableLabel + SEMICOLON;\r
}\r
}\r
else {\r
- text = text + UsageTermCollection.notAvailableLabel + ";" + UsageTermCollection.notAvailableLabel + ";";\r
+ text = text + UsageTermCollection.notAvailableLabel + SEMICOLON + UsageTermCollection.notAvailableLabel + SEMICOLON;\r
}\r
if (!((CategoricalData) element).getModifiers().isEmpty()) {\r
for (DefinedTerm modifier: ((CategoricalData) element).getModifiers()){\r
modifier.getPartOf();\r
modifier.getVocabulary();\r
}\r
- \r
+\r
boolean isPlantPartAbsent = true;\r
for (DefinedTerm modifier: ((CategoricalData) element).getModifiers()){\r
if(GetVocabularyType(modifier, UsageTermCollection.plantPartLabel)) {\r
- text = text + modifier.getTitleCache()+ ";";\r
+ text = text + modifier.getTitleCache()+ SEMICOLON;\r
isPlantPartAbsent = false;\r
}\r
- \r
+\r
}\r
if (isPlantPartAbsent) {\r
- text = text + UsageTermCollection.notAvailableLabel + ";";\r
+ text = text + UsageTermCollection.notAvailableLabel + SEMICOLON;\r
}\r
- \r
+\r
boolean isHumanGroupAbsent = true;\r
for (DefinedTerm modifier: ((CategoricalData) element).getModifiers()){\r
if(GetVocabularyType(modifier, UsageTermCollection.humanGroupLabel)) {\r
- text = text + modifier.getTitleCache()+ ";";\r
+ text = text + modifier.getTitleCache()+ SEMICOLON;\r
isHumanGroupAbsent = false;\r
}\r
}\r
if (isHumanGroupAbsent) {\r
- text = text + UsageTermCollection.notAvailableLabel + ";";\r
+ text = text + UsageTermCollection.notAvailableLabel + SEMICOLON;\r
}\r
- \r
+\r
boolean isEthnicGroupAbsent = true;\r
for (DefinedTerm modifier: ((CategoricalData) element).getModifiers()){\r
if(GetVocabularyType(modifier, UsageTermCollection.ethnicGroupLabel)) {\r
- text = text + modifier.getTitleCache()+ ";";\r
+ text = text + modifier.getTitleCache()+ SEMICOLON;\r
isEthnicGroupAbsent = false;\r
}\r
}\r
if (isEthnicGroupAbsent) {\r
- text = text + UsageTermCollection.notAvailableLabel + ";";\r
+ text = text + UsageTermCollection.notAvailableLabel + SEMICOLON;\r
}\r
- \r
+\r
boolean isCountryAbsent = true;\r
for (DefinedTerm modifier: ((CategoricalData) element).getModifiers()){\r
if(GetVocabularyType(modifier, UsageTermCollection.countryLabel)) {\r
- text = text + modifier.getTitleCache()+ ";";\r
+ text = text + modifier.getTitleCache()+ SEMICOLON;\r
isCountryAbsent = false;\r
}\r
}\r
if (isCountryAbsent) {\r
- text = text + UsageTermCollection.notAvailableLabel + ";";\r
+ text = text + UsageTermCollection.notAvailableLabel + SEMICOLON;\r
}\r
}\r
else {\r
- text = text + UsageTermCollection.notAvailableLabel + ";" + UsageTermCollection.notAvailableLabel + ";" + UsageTermCollection.notAvailableLabel + ";" + UsageTermCollection.notAvailableLabel + ";";\r
+ text = text + UsageTermCollection.notAvailableLabel + SEMICOLON + UsageTermCollection.notAvailableLabel + SEMICOLON + UsageTermCollection.notAvailableLabel + SEMICOLON + UsageTermCollection.notAvailableLabel + SEMICOLON;\r
}\r
- \r
+\r
if (text == null || text.length() == 0) {\r
- text = "No data provided";\r
+ text = NO_DATA_PROVIDED;\r
}\r
else {\r
- String[] textElements = text.split(";");\r
- String dataportalString = textElements[0] + ";" + textElements[1] + ";" + textElements[5] + ";" + textElements[2] + ";" + textElements[3] + ";" + textElements[4] + ";" ; \r
- \r
+ String[] textElements = text.split(SEMICOLON);\r
+ String dataportalString = textElements[0] + SEMICOLON + textElements[1] + SEMICOLON + textElements[5] + SEMICOLON + textElements[2] + SEMICOLON + textElements[3] + SEMICOLON + textElements[4] + SEMICOLON ;\r
+\r
((CategoricalData)element).putModifyingText(CdmStore.getDefaultLanguage(), dataportalString);\r
}\r
return text;\r
}\r
- \r
+\r
else if (element instanceof TextData) {\r
List<Language> languages = Arrays.asList(new Language[]{CdmStore.getDefaultLanguage()});\r
LanguageString languageString = ((TextData) element).getPreferredLanguageString(languages);\r
text = languageString != null ? languageString.getText() : null;\r
if (text == null || text.length() == 0) {\r
- text = "No data provided";\r
+ text = NO_DATA_PROVIDED;\r
}\r
}\r
- \r
+\r
else if (element instanceof FeatureNodeContainer){\r
text = ((FeatureNodeContainer)element).getFeature().getTitleCache();\r
}\r
return text;\r
}\r
\r
- /** Function dertmining which vocabulary is the term part of \r
- * \r
+ /** Function dertmining which vocabulary is the term part of\r
+ *\r
* @param term\r
* @param vocabularyExpected\r
* @return\r
}\r
return false;\r
}\r
- \r
+\r
/** {@inheritDoc} */\r
@Override\r
public StyledString getStyledText(Object element) {\r
return new StyledString(this.getText(element),\r
StyledString.QUALIFIER_STYLER);\r
}\r
- \r
- \r
+\r
+\r
\r
}\r
import org.eclipse.swt.widgets.Tree;
import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.taxeditor.editor.Messages;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementDragListener;
import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementDropAdapter;
import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementTransfer;
* CreateTaxonUseOperation Class\r
* @author a.theys\r
* @created mar 13, 2012\r
- * @version 1.0\r
*/\r
public class CreateTaxonUseOperation extends CreateTaxonDescriptionOperation {\r
private TaxonDescription description;\r
public class CreateUseRecordOperation extends AbstractPostOperation {
/** Constant <code>ID="eu.etaxonomy.taxeditor.editor.view.use."{trunked}</code> */
- public static final String ID = "eu.etaxonomy.taxeditor.editor.use.createUseRecord";
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.use.createUseRecord"; //$NON-NLS-1$
private final DescriptionBase<?> description;
private final Feature feature;
private DescriptionElementBase element;
*/\r
public class CreateUseSummaryOperation extends AbstractPostOperation {\r
\r
- public static final String ID = "eu.etaxonomy.taxeditor.editor.use.createUseRecord";\r
+ public static final String ID = "eu.etaxonomy.taxeditor.editor.use.createUseRecord"; //$NON-NLS-1$\r
\r
private final DescriptionBase<?> description;\r
private final Feature feature;\r
{\r
try {\r
Object value = item.getMarker().getAttribute(MarkerManager.ATTRIB_ENTITY_CLASS);\r
- return value == null ? "" : value.toString();\r
+ return value == null ? "" : value.toString(); //$NON-NLS-1$\r
}\r
catch (CoreException e) {\r
- throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_ENTITY_CLASS);\r
+ throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_ENTITY_CLASS); //$NON-NLS-1$\r
}\r
}\r
}\r
{\r
try {\r
Object value = item.getMarker().getAttribute(MarkerManager.ATTRIB_ENTITY_ID);\r
- return value == null ? "" : value.toString();\r
+ return value == null ? "" : value.toString(); //$NON-NLS-1$\r
}\r
catch (CoreException e) {\r
- throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_ENTITY_ID);\r
+ throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_ENTITY_ID); //$NON-NLS-1$\r
}\r
}\r
}\r
{\r
try {\r
Object value = item.getMarker().getAttribute(MarkerManager.ATTRIB_INVALID_VALUE);\r
- return value == null ? "" : value.toString();\r
+ return value == null ? "" : value.toString(); //$NON-NLS-1$\r
}\r
catch (CoreException e) {\r
- throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_INVALID_VALUE);\r
+ throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_INVALID_VALUE); //$NON-NLS-1$\r
}\r
}\r
}\r
{\r
try {\r
Object value = item.getMarker().getAttribute(MarkerManager.ATTRIB_USER_FRIENDLY_DESCRIPTION);\r
- return value == null ? "" : value.toString();\r
+ return value == null ? "" : value.toString(); //$NON-NLS-1$\r
}\r
catch (CoreException e) {\r
- throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_USER_FRIENDLY_DESCRIPTION);\r
+ throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_USER_FRIENDLY_DESCRIPTION); //$NON-NLS-1$\r
}\r
}\r
\r
{\r
try {\r
Object value = item.getMarker().getAttribute(MarkerManager.ATTRIB_USER_FRIENDLY_FIELD_NAME);\r
- return value == null ? "" : value.toString();\r
+ return value == null ? "" : value.toString(); //$NON-NLS-1$\r
}\r
catch (CoreException e) {\r
- throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_USER_FRIENDLY_FIELD_NAME);\r
+ throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_USER_FRIENDLY_FIELD_NAME); //$NON-NLS-1$\r
}\r
}\r
}\r
{\r
try {\r
Object value = item.getMarker().getAttribute(MarkerManager.ATTRIB_USER_FRIENDLY_TYPE_NAME);\r
- return value == null ? "" : value.toString();\r
+ return value == null ? "" : value.toString(); //$NON-NLS-1$\r
}\r
catch (CoreException e) {\r
- throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_USER_FRIENDLY_TYPE_NAME);\r
+ throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_USER_FRIENDLY_TYPE_NAME); //$NON-NLS-1$\r
}\r
}\r
}\r
\r
public ValidationProblemsView()\r
{\r
- super("eu.etaxonomy.taxeditor.editor.validation.ValidationProblemsMarkerGenerator");\r
+ super("eu.etaxonomy.taxeditor.editor.validation.ValidationProblemsMarkerGenerator"); //$NON-NLS-1$\r
}\r
\r
\r
{\r
try {\r
Object value = item.getMarker().getAttribute(MarkerManager.ATTRIB_VALIDATOR_CLASS);\r
- return value == null ? "" : value.toString();\r
+ return value == null ? "" : value.toString(); //$NON-NLS-1$\r
}\r
catch (CoreException e) {\r
- throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_VALIDATOR_CLASS);\r
+ throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_VALIDATOR_CLASS); //$NON-NLS-1$\r
}\r
}\r
\r
{\r
try {\r
Object value = item.getMarker().getAttribute(MarkerManager.ATTRIB_VALIDATOR_MESSAGE);\r
- return value == null ? "" : value.toString();\r
+ return value == null ? "" : value.toString(); //$NON-NLS-1$\r
}\r
catch (CoreException e) {\r
- throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_VALIDATOR_MESSAGE);\r
+ throw new RuntimeException("Error while retrieving value for " + MarkerManager.ATTRIB_VALIDATOR_MESSAGE); //$NON-NLS-1$\r
}\r
}\r
\r
import eu.etaxonomy.cdm.model.common.ICdmBase;
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
@BeforeClass
public static void setUpBeforeClass() throws Exception {
taxon = Taxon.NewInstance(null, null);
- concept = Taxon.NewInstance(NonViralName.NewInstance(null), null);
+ concept = Taxon.NewInstance(TaxonNameFactory.NewNonViralInstance(null), null);
homotypicalGroup = HomotypicalGroup.NewInstance();
concept.addTaxonRelation(taxon, TaxonRelationshipType.MISAPPLIED_NAME_FOR(), null, null);
import eu.etaxonomy.cdm.model.common.ICdmBase;
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.editor.name.operation.ChangeHomotypicGroupOperation;
public static void setUpBeforeClass() throws Exception {
taxon = Taxon.NewInstance(null, null);
- synonym = Synonym.NewInstance(NonViralName.NewInstance(null), null);
+ synonym = Synonym.NewInstance(TaxonNameFactory.NewNonViralInstance(null), null);
oldHomotypicalGroup = HomotypicalGroup.NewInstance();
oldHomotypicalGroup.addTypifiedName(synonym.getName());
import eu.etaxonomy.cdm.model.common.ICdmBase;
import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.SynonymType;
import eu.etaxonomy.cdm.model.taxon.Taxon;
public static void setUpBeforeClass() throws Exception {
taxon = Taxon.NewInstance(null, null);
- synonym = Synonym.NewInstance(NonViralName.NewInstance(null), null);
+ synonym = Synonym.NewInstance(TaxonNameFactory.NewNonViralInstance(null), null);
taxonRelationshipType = TaxonRelationshipType.CONTRADICTION();
taxon.addSynonym(synonym, SynonymType.SYNONYM_OF());
import eu.etaxonomy.cdm.model.common.ICdmBase;
import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.SynonymType;
import eu.etaxonomy.cdm.model.taxon.Taxon;
@BeforeClass
public static void setUpBeforeClass() throws Exception {
taxon = Taxon.NewInstance(null, null);
- synonym = Synonym.NewInstance(NonViralName.NewInstance(null), null);
+ synonym = Synonym.NewInstance(TaxonNameFactory.NewNonViralInstance(null), null);
synonymType = SynonymType.SYNONYM_OF();
taxon.addSynonym(synonym, synonymType);
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
import eu.etaxonomy.cdm.model.taxon.SynonymType;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBase;
@Before
public void setUp() throws Exception {
- taxonName = NonViralName.NewInstance(null);
+ taxonName = TaxonNameFactory.NewNonViralInstance(null);
taxon = Taxon.NewInstance(taxonName, null);
homotypicalGroup = HomotypicalGroup.NewInstance();
- newSynonymName = NonViralName.NewInstance(null);
+ newSynonymName = TaxonNameFactory.NewNonViralInstance(null);
operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
undoContext, taxon, homotypicalGroup, newSynonymName, postOperation);
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.editor.name.operation.CreateSynonymInNewGroupOperation;
import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBase;
public static void setUpBeforeClass() throws Exception {
taxon = Taxon.NewInstance(null, null);
- newSynonymName = NonViralName.NewInstance(null);
+ newSynonymName = TaxonNameFactory.NewNonViralInstance(null);
operation = new CreateSynonymInNewGroupOperation("Create Synonyma In New Group", undoContext, taxon, newSynonymName, postOperation);
}
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
import eu.etaxonomy.cdm.model.common.ICdmBase;
import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.taxeditor.editor.name.operation.DeleteMisapplicationOperation;
import eu.etaxonomy.taxeditor.store.operations.AbstractTaxeditorOperationTestBase;
/**
private static Taxon taxon;
private static Taxon misapplication;
-
+
/**
* @throws java.lang.Exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception {
-
+
taxon = Taxon.NewInstance(null, null);
misapplication = Taxon.NewInstance(null, null);
-
+
taxon.addMisappliedName(misapplication, null, null);
-
- operation = new DeleteMisapplicationOperation("", undoContext, taxon, misapplication, postOperation);
+
+ operation = new DeleteMisapplicationOperation("", undoContext, null, null, taxon, misapplication, postOperation, null, null);
+
}
/**
* Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.DeleteMisapplicationOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
+ * @throws ExecutionException
*/
@Test
public void testExecuteIProgressMonitorIAdaptable() throws ExecutionException {
operation.execute(monitor, info);
-
+
Assert.assertTrue(taxon.getMisappliedNames().size() == 0);
}
/**
* Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.DeleteMisapplicationOperation#undo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
+ * @throws ExecutionException
*/
@Test
public void testUndoIProgressMonitorIAdaptable() throws ExecutionException {
operation.undo(monitor, info);
-
+
Assert.assertEquals(misapplication, taxon.getMisappliedNames().toArray(new Taxon[0])[0]);
}
/**
* Test method for {@link eu.etaxonomy.taxeditor.editor.name.operation.DeleteMisapplicationOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)}.
- * @throws ExecutionException
+ * @throws ExecutionException
*/
@Test
public void testRedoIProgressMonitorIAdaptable() throws ExecutionException {
operation.redo(monitor, info);
-
+
Assert.assertTrue(taxon.getMisappliedNames().size() == 0);
}
import eu.etaxonomy.cdm.model.description.TaxonDescription;
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.SynonymType;
import eu.etaxonomy.cdm.model.taxon.Taxon;
(new DefaultTermInitializer()).initialize();
// Create the original accepted taxon
- oldTaxonName = NonViralName.NewInstance(null);
+ oldTaxonName = TaxonNameFactory.NewNonViralInstance(null);
taxon = Taxon.NewInstance(oldTaxonName, null);
// // Create its parent taxon
-// parentTaxon = Taxon.NewInstance(NonViralName.NewInstance(null), null);
+// parentTaxon = Taxon.NewInstance(TaxonNameBase.NewNonViralInstance(null), null);
// parentTaxon.addTaxonomicChild(taxon, null, null);
//
// // Give it a child taxon
-// childTaxon = Taxon.NewInstance(NonViralName.NewInstance(null), null);
+// childTaxon = Taxon.NewInstance(TaxonNameBase.NewNonViralInstance(null), null);
// childTaxon.setTaxonomicParent(taxon, null, null);
// Create a homotypic synonym for the accepted taxon
- taxon.addHomotypicSynonymName(NonViralName.NewInstance(null));
-// homotypicSynonym = Synonym.NewInstance(NonViralName.NewInstance(null), null);
+ taxon.addHomotypicSynonymName(TaxonNameFactory.NewNonViralInstance(null));
+// homotypicSynonym = Synonym.NewInstance(TaxonNameBase.NewNonViralInstance(null), null);
// HomotypicalGroup acceptedHomotypicalGroup = HomotypicalGroup.NewInstance();
// acceptedHomotypicalGroup.addTypifiedName(oldTaxon.getName());
// acceptedHomotypicalGroup.addTypifiedName(homotypicSynonym.getName());
// Create a heterotypic synonym that will be used to create the new accepted taxon
- oldSynonymName = NonViralName.NewInstance(null);
+ oldSynonymName = TaxonNameFactory.NewNonViralInstance(null);
oldHeterotypicSynonym = Synonym.NewInstance(oldSynonymName, null);
// oldTaxon.addS .addHeterotypicSynonym(oldHeterotypicSynonym, null, null);
heteroypicalGroup = HomotypicalGroup.NewInstance();
taxon.addSynonym(oldHeterotypicSynonym, SynonymType.HETEROTYPIC_SYNONYM_OF());
// Create a misapplication
- misapplication = Taxon.NewInstance(NonViralName.NewInstance(null), null);
+ misapplication = Taxon.NewInstance(TaxonNameFactory.NewNonViralInstance(null), null);
taxon.addMisappliedName(misapplication, null, null);
// Create a concept relation
- concept = Taxon.NewInstance(NonViralName.NewInstance(null), null);
+ concept = Taxon.NewInstance(TaxonNameFactory.NewNonViralInstance(null), null);
conceptRelationshipType = TaxonRelationshipType.CONGRUENT_TO();
concept.addTaxonRelation(taxon, conceptRelationshipType, null, null);
<feature
id="eu.etaxonomy.taxeditor.feature.jre.linux64"
label="Taxonomic Editor JRE Linux64"
- version="4.5.1"
+ version="4.6.0"
provider-name="EDIT"
plugin="eu.etaxonomy.taxeditor.application"
os="linux"
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>4.5.1</version>
+ <version>4.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>eu.etaxonomy.taxeditor.feature.jre.linux64</artifactId>
<feature
id="eu.etaxonomy.taxeditor.feature.platform"
label="Taxeditor Dependencies"
- version="4.5.1"
+ version="4.6.0"
os="linux,macosx,win32"
ws="cocoa,gtk,win32"
arch="x86,x86_64">
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.apache.commons.httpclient"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="com.ibm.icu"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.sat4j.pb"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.apache.lucene"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.apache.lucene.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.sat4j.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.apache.lucene.analysis"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>4.5.1</version>
+ <version>4.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>eu.etaxonomy.taxeditor.feature.platform</artifactId>
<feature
id="eu.etaxonomy.taxeditor.feature"
label="Taxonomic Editor"
- version="4.5.1"
+ version="4.6.0"
provider-name="EDIT"
plugin="eu.etaxonomy.taxeditor.application"
os="linux,macosx,win32"
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>4.5.1</version>
+ <version>4.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>eu.etaxonomy.taxeditor.feature</artifactId>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="target"/>
Bundle-ManifestVersion: 2
Bundle-Name: Help
Bundle-SymbolicName: eu.etaxonomy.taxeditor.help; singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
Bundle-Activator: eu.etaxonomy.taxeditor.help.Activator
Bundle-Vendor: EDIT
Require-Bundle: org.eclipse.ui,
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>4.5.1</version>
+ <version>4.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry exported="true" kind="lib" path="lib/owlapi-xmlutils-4.1.4.jar"/>
<classpathentry exported="true" kind="lib" path="lib/commons-collections4-4.1.jar"/>
Bundle-ManifestVersion: 2
Bundle-Name: eu.etaxonomy.taxeditor.molecular.lib
Bundle-SymbolicName: eu.etaxonomy.taxeditor.molecular.lib;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
Bundle-ClassPath: .,
lib/owlapi-xmlutils-4.1.4.jar,
lib/commons-collections4-4.1.jar,
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>4.5.1</version>
+ <version>4.6.0</version>
</parent>
<build>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/test/java"/>
Bundle-ManifestVersion: 2
Bundle-Name: Molecular Bundle
Bundle-SymbolicName: eu.etaxonomy.taxeditor.molecular;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
Bundle-Activator: eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
+++ /dev/null
-exportSequenceToFileHandlerIOErrorMessage=An error occurred when trying to export a consensus sequence alignment to the file "%s".
-exportSequenceToFileHandlerIOErrorTitle=I/O error
-exportSequenceToFileHandlerOverwriteTitle=Overwrite file
-exportSequenceToFileHandlerOverwriteText=The file \"%s\" already exists.\n\nDo you want to overwrite it?
-wizardExportAlignmentAppendExtensionButton=Append default extension
-wizardExportAlignmentBrowseButton=Browse...
-wizardExportAlignmentDataLabel=Select the data to export:
-wizardExportAlignmentDescription=Define the output file and format.
-wizardExportAlignmentDestinationLabel=Select the export destination:
-wizardExportAlignmentErrorMissingFileName=The file name must not be empty.
-wizardExportAlignmentErrorMissingSeqLabel=The consensus sequence label must not be empty.
-wizardExportAlignmentErrorNothingToExport=Either single reads or the consensus sequence have to be selected for export.
-wizardExportAlignmentExportConsensusSeqLabel=Export consensus sequence
-wizardExportAlignmentExportFormatLabel=Select the export format:
-wizardExportAlignmentExportSingleReads=Export single reads
-wizardExportAlignmentFileDialogTitle=Export to
-wizardExportAlignmentFileLabel=Alignment file:
-wizardExportAlignmentTitle=Sequence export
-wizardExportAlignmentWarningFileNameStartsDot=File starting with '.' are not supported on all operating systems.
-wizardExportAlignmentwarningMissingExtension=The file name does have a valid extension for the selected format.
-wizardExportAlignmentWarningFileExists=The file already exists and will be overwritten.
-wizardExportAlignmentOptionsDescription=Specify additional export parameters.
-wizardExportAlignmentOptionsTitle=Export options
-wizardExportAlignmentExportedSeqHeading=Specify the sequences to be exported:
-wizardExportAlignmentAdditionalOptionsHeading=Specify additional export options:
-wizardExportAlignmentElongateSeqHeading=Elongate sequences to have equal length with:
-wizardExportAlignmentElongateSeqMissingData=Missing data ('?')"
-wizardExportAlignmentElongateSeqGap=Gap ('-')
+++ /dev/null
-exportSequenceToFileHandlerIOErrorMessage=Beim Schreiben der Datei "%s" ist ein Fehler aufgetreten.
-exportSequenceToFileHandlerIOErrorTitle=E/A Fehler
-exportSequenceToFileHandlerOverwriteTitle=Datei überschreiben
-exportSequenceToFileHandlerOverwriteText=Die Datei \"%s\" existiert bereits.\n\nSoll sie überschrieben werden?
-wizardExportAlignmentAppendExtensionButton=Standarddateiendung anhängen
-wizardExportAlignmentBrowseButton=Durchsuchen...
-wizardExportAlignmentDataLabel=Zu exportierende Daten:
-wizardExportAlignmentDescription=Wählen Sie den Zielort und das Zielformat aus!
-wizardExportAlignmentDestinationLabel=Zieldatei:
-wizardExportAlignmentErrorMissingFileName=Der Dateiname darf nicht leer sein.
-wizardExportAlignmentErrorMissingSeqLabel=Der Name der Konsensussequenz darf nicht leer sein.
-wizardExportAlignmentErrorNothingToExport=Es müssen entweder die einzelnen Reads oder die Konsensussequenz zum Export ausgewählt werden.
-wizardExportAlignmentExportConsensusSeqLabel=Konsensussequenz exportieren
-wizardExportAlignmentExportFormatLabel=Zielformat:
-wizardExportAlignmentExportSingleReads=Einzelne Reads exportieren
-wizardExportAlignmentFileDialogTitle=Exportieren nach
-wizardExportAlignmentFileLabel=Alignment Datei:
-wizardExportAlignmentTitle=Sequenzexport
-wizardExportAlignmentWarningFileNameStartsDot=Dateinamen, die mit einem '.' beginnen, werden nicht auf allen Betriebssystemen unterstützt.
-wizardExportAlignmentwarningMissingExtension=Der momentane Dateiname hat keine zum aktuellen Format passende Endung.
-wizardExportAlignmentWarningFileExists=The existiert bereits und würde überschrieben.
-wizardExportAlignmentOptionsDescription=Geben Sie weitere Exportparameter an!
-wizardExportAlignmentOptionsTitle=Exportoptionen
-wizardExportAlignmentExportedSeqHeading=Zu exportierende Sequenzen:
-wizardExportAlignmentAdditionalOptionsHeading=Erweiterte Exportoptionen:
-wizardExportAlignmentElongateSeqHeading=Sequenzen auf einheitliche Länge bringen mit:
-wizardExportAlignmentElongateSeqMissingData=Fehlende Daten ('?')"
-wizardExportAlignmentElongateSeqGap=Lücke ('-')
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>4.5.1</version>
+ <version>4.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
+++ /dev/null
-/**
- * Copyright (C) 2016 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-package eu.etaxonomy.taxeditor.molecular;
-
-
-import org.eclipse.osgi.util.NLS;
-
-
-
-/**
- * Provides messages and texts for classes of the molecular plugin.
- *
- * @author Ben Stöver
- * @date 17.11.2016
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$
-
-
- public static String exportSequenceToFileHandlerIOErrorMessage;
- public static String exportSequenceToFileHandlerIOErrorTitle;
- public static String exportSequenceToFileHandlerOverwriteTitle;
- public static String exportSequenceToFileHandlerOverwriteText;
-
- public static String wizardExportAlignmentAppendExtensionButton;
- public static String wizardExportAlignmentBrowseButton;
- public static String wizardExportAlignmentDataLabel;
- public static String wizardExportAlignmentDescription;
- public static String wizardExportAlignmentDestinationLabel;
- public static String wizardExportAlignmentErrorMissingFileName;
- public static String wizardExportAlignmentErrorMissingSeqLabel;
- public static String wizardExportAlignmentErrorNothingToExport;
- public static String wizardExportAlignmentExportConsensusSeqLabel;
- public static String wizardExportAlignmentExportFormatLabel;
- public static String wizardExportAlignmentExportSingleReads;
- public static String wizardExportAlignmentFileDialogTitle;
- public static String wizardExportAlignmentFileLabel;
- public static String wizardExportAlignmentOptionsDescription;
- public static String wizardExportAlignmentOptionsTitle;
- public static String wizardExportAlignmentTitle;
- public static String wizardExportAlignmentWarningFileNameStartsDot;
- public static String wizardExportAlignmentwarningMissingExtension;
- public static String wizardExportAlignmentWarningFileExists;
- public static String wizardExportAlignmentExportedSeqHeading;
- public static String wizardExportAlignmentAdditionalOptionsHeading;
- public static String wizardExportAlignmentElongateSeqHeading;
- public static String wizardExportAlignmentElongateSeqMissingData;
- public static String wizardExportAlignmentElongateSeqGap;
-
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {}
-}
package eu.etaxonomy.taxeditor.molecular.editor;
-import info.bioinfweb.commons.swt.SWTUtils;
-import info.bioinfweb.libralign.alignmentarea.AlignmentArea;
-import info.bioinfweb.libralign.alignmentarea.selection.SelectionModel;
-import info.bioinfweb.libralign.alignmentarea.tokenpainter.NucleotideTokenPainter;
-import info.bioinfweb.libralign.dataarea.implementations.ConsensusSequenceArea;
-import info.bioinfweb.libralign.dataarea.implementations.pherogram.PherogramArea;
-import info.bioinfweb.libralign.dataarea.implementations.sequenceindex.SequenceIndexArea;
-import info.bioinfweb.libralign.editsettings.EditSettingsChangeEvent;
-import info.bioinfweb.libralign.editsettings.EditSettingsListener;
-import info.bioinfweb.libralign.model.AlignmentModel;
-import info.bioinfweb.libralign.model.AlignmentModelChangeListener;
-import info.bioinfweb.libralign.model.adapters.StringAdapter;
-import info.bioinfweb.libralign.model.events.SequenceChangeEvent;
-import info.bioinfweb.libralign.model.events.SequenceRenamedEvent;
-import info.bioinfweb.libralign.model.events.TokenChangeEvent;
-import info.bioinfweb.libralign.model.implementations.PackedAlignmentModel;
-import info.bioinfweb.libralign.model.tokenset.CharacterTokenSet;
-import info.bioinfweb.libralign.model.tokenset.TokenSet;
-import info.bioinfweb.libralign.model.utils.AlignmentModelUtils;
-import info.bioinfweb.libralign.multiplealignments.AlignmentAreaList;
-import info.bioinfweb.libralign.multiplealignments.MultipleAlignmentsContainer;
-import info.bioinfweb.libralign.pherogram.model.PherogramAreaModel;
-import info.bioinfweb.libralign.pherogram.model.ShiftChange;
-import info.bioinfweb.libralign.pherogram.provider.BioJavaPherogramProvider;
-import info.bioinfweb.libralign.pherogram.provider.PherogramProvider;
-import info.bioinfweb.libralign.pherogram.provider.ReverseComplementPherogramProvider;
-import info.bioinfweb.tic.SWTComponentFactory;
-
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
import eu.etaxonomy.taxeditor.molecular.handler.ToggleInsertOverwriteHandler;
import eu.etaxonomy.taxeditor.molecular.handler.ToggleLeftRightInsertionHandler;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.view.derivateSearch.DerivateLabelProvider;
+import info.bioinfweb.commons.swt.SWTUtils;
+import info.bioinfweb.libralign.alignmentarea.AlignmentArea;
+import info.bioinfweb.libralign.alignmentarea.selection.SelectionModel;
+import info.bioinfweb.libralign.alignmentarea.tokenpainter.NucleotideTokenPainter;
+import info.bioinfweb.libralign.dataarea.implementations.ConsensusSequenceArea;
+import info.bioinfweb.libralign.dataarea.implementations.pherogram.PherogramArea;
+import info.bioinfweb.libralign.dataarea.implementations.sequenceindex.SequenceIndexArea;
+import info.bioinfweb.libralign.editsettings.EditSettingsChangeEvent;
+import info.bioinfweb.libralign.editsettings.EditSettingsListener;
+import info.bioinfweb.libralign.model.AlignmentModel;
+import info.bioinfweb.libralign.model.AlignmentModelChangeListener;
+import info.bioinfweb.libralign.model.adapters.StringAdapter;
+import info.bioinfweb.libralign.model.events.SequenceChangeEvent;
+import info.bioinfweb.libralign.model.events.SequenceRenamedEvent;
+import info.bioinfweb.libralign.model.events.TokenChangeEvent;
+import info.bioinfweb.libralign.model.implementations.PackedAlignmentModel;
+import info.bioinfweb.libralign.model.tokenset.CharacterTokenSet;
+import info.bioinfweb.libralign.model.tokenset.TokenSet;
+import info.bioinfweb.libralign.model.utils.AlignmentModelUtils;
+import info.bioinfweb.libralign.multiplealignments.AlignmentAreaList;
+import info.bioinfweb.libralign.multiplealignments.MultipleAlignmentsContainer;
+import info.bioinfweb.libralign.pherogram.model.PherogramAreaModel;
+import info.bioinfweb.libralign.pherogram.model.ShiftChange;
+import info.bioinfweb.libralign.pherogram.provider.BioJavaPherogramProvider;
+import info.bioinfweb.libralign.pherogram.provider.PherogramProvider;
+import info.bioinfweb.libralign.pherogram.provider.ReverseComplementPherogramProvider;
+import info.bioinfweb.tic.SWTComponentFactory;
* @date 04.08.2014
*/
public class AlignmentEditor extends EditorPart {
- public static final String ID = "eu.etaxonomy.taxeditor.molecular.AlignmentEditor";
+ public static final String ID = "eu.etaxonomy.taxeditor.molecular.AlignmentEditor"; //$NON-NLS-1$
public static final int READS_AREA_INDEX = 1;
public static final int EDITABLE_CONSENSUS_AREA_INDEX = READS_AREA_INDEX + 1;
public static final int CONSENSUS_HINT_AREA_INDEX = EDITABLE_CONSENSUS_AREA_INDEX + 1;
public static final int PHEROGRAM_AREA_INDEX = 0;
public static final int CONSENSUS_DATA_AREA_INDEX = 0;
- public static final String DEFAULT_READ_NAME_PREFIX = "Read ";
- public static final String CONSENSUS_NAME = "Consensus";
+ public static final String DEFAULT_READ_NAME_PREFIX = "Read "; //$NON-NLS-1$
+ public static final String CONSENSUS_NAME = "Consensus"; //$NON-NLS-1$
private final ConversationHolder conversationHolder;
private void createTestContents() {
// Just for testing:
try {
- addRead(new File("D:/Users/BenStoever/ownCloud/Dokumente/Projekte/EDITor/Quelltexte/LibrAlign branch/Repository/eu.etaxonomy.taxeditor.editor/src/main/resources/AlignmentTestData/JR430_JR-P01.ab1").toURI(), false);
+ addRead(new File("D:/Users/BenStoever/ownCloud/Dokumente/Projekte/EDITor/Quelltexte/LibrAlign branch/Repository/eu.etaxonomy.taxeditor.editor/src/main/resources/AlignmentTestData/JR430_JR-P01.ab1").toURI(), false); //$NON-NLS-1$
//addRead(new File("D:/Users/BenStoever/ownCloud/Dokumente/Projekte/EDITor/Quelltexte/LibrAlign branch/Repository/eu.etaxonomy.taxeditor.editor/src/main/resources/AlignmentTestData/JR444_JR-P05.ab1").toURI(), false);
- addRead(new File("D:/Users/BenStoever/ownCloud/Dokumente/Projekte/EDITor/Quelltexte/LibrAlign branch/Repository/eu.etaxonomy.taxeditor.editor/src/main/resources/AlignmentTestData/Test_qualityScore.scf").toURI(), false);
+ addRead(new File("D:/Users/BenStoever/ownCloud/Dokumente/Projekte/EDITor/Quelltexte/LibrAlign branch/Repository/eu.etaxonomy.taxeditor.editor/src/main/resources/AlignmentTestData/Test_qualityScore.scf").toURI(), false); //$NON-NLS-1$
// Add test consensus sequence:
AlignmentModel consensusModel = getEditableConsensusArea().getAlignmentModel();
String id = consensusModel.addSequence(CONSENSUS_NAME);
Collection<Object> tokens = new ArrayList<Object>(); // First save tokens in a collection to avoid GUI updated for each token.
- tokens.add(consensusModel.getTokenSet().tokenByRepresentation("A"));
- tokens.add(consensusModel.getTokenSet().tokenByRepresentation("C"));
- tokens.add(consensusModel.getTokenSet().tokenByRepresentation("G"));
- tokens.add(consensusModel.getTokenSet().tokenByRepresentation("T"));
+ tokens.add(consensusModel.getTokenSet().tokenByRepresentation("A")); //$NON-NLS-1$
+ tokens.add(consensusModel.getTokenSet().tokenByRepresentation("C")); //$NON-NLS-1$
+ tokens.add(consensusModel.getTokenSet().tokenByRepresentation("G")); //$NON-NLS-1$
+ tokens.add(consensusModel.getTokenSet().tokenByRepresentation("T")); //$NON-NLS-1$
consensusModel.insertTokensAt(id, 0, tokens);
}
catch (Exception e) {
cdmMap.put(id, singleReadAlignment);
}
catch (Exception e) { // Usually due to an error while trying to read the pherogram (e.g. due to an unsupported format or an invalid URI).
- MessagingUtils.errorDialog("Error", null, "A single read was skipped because of the following error:\n\n" +
+ MessagingUtils.errorDialog(Messages.AlignmentEditor_ERROR_SINGLE_READ, null, Messages.AlignmentEditor_ERROR_SINGLE_READ_MESSAGE +
e.getLocalizedMessage(), TaxeditorMolecularPlugin.PLUGIN_ID, e, false);
}
}
}
}
else {
- throw new IllegalArgumentException("The editor input must have the type " +
- AlignmentEditorInput.class.getCanonicalName()); //TODO What should be done here?
+ throw new IllegalArgumentException(String.format(Messages.AlignmentEditor_MUST_HAVE_TYPE,
+ AlignmentEditorInput.class.getCanonicalName())); //TODO What should be done here?
}
}
private void updateStatusBar() {
IActionBars bars = getEditorSite().getActionBars();
- bars.getStatusLineManager().setMessage("Edit mode: " +
- (getReadsArea().getEditSettings().isInsert() ? "Insert" : "Overwrite") + " " +
- "Insertion in pherogram: " +
- (getReadsArea().getEditSettings().isInsertLeftInDataArea() ? "Left" : "Right")); //TODO multi language
+ bars.getStatusLineManager().setMessage(
+ Messages.AlignmentEditor_EDIT_MODE + (getReadsArea().getEditSettings().isInsert() ? Messages.AlignmentEditor_INSERT : Messages.AlignmentEditor_OVERWRITE) + " " + //$NON-NLS-1$
+ Messages.AlignmentEditor_INSERTION_PHEROGRAM +
+ (getReadsArea().getEditSettings().isInsertLeftInDataArea() ? Messages.AlignmentEditor_LEFT : Messages.AlignmentEditor_RIGHT)); //TODO multi language
}
@Override
public void doSave(IProgressMonitor monitor) {
if (getEditorInput() instanceof AlignmentEditorInput) {
- String taskName = "Saving alignment"; //TODO multi language
+ String taskName = Messages.AlignmentEditor_SAVING_ALIGNMENT; //TODO multi language
monitor.beginTask(taskName, 3);
//re-loading sequence to avoid session conflicts
String id = iterator.next();
SingleReadAlignment singleRead = cdmMap.get(id);
if (singleRead == null) {
- throw new InternalError("Creating new reads from AlignmentEditor not implemented."); //TODO multi language
+ throw new InternalError(Messages.AlignmentEditor_NEW_READ_FAILURE); //TODO multi language
//TODO Create new read object. => Shall it be allowed to add reads in the alignment editor which are not represented in the CDM tree before the alignment editor is saved?
//singleRead = SingleReadAlignment.NewInstance(consensusSequence, singleRead, shifts, editedSequence);
}
private String cutPherogram(boolean left) {
SelectionModel selection = getReadsArea().getSelection();
if (selection.getCursorHeight() != 1) {
- return "Cutting pherograms is only possible if exactly one row is selected."; //TODO multi language
+ return Messages.AlignmentEditor_CUTTING_FAILURE; //TODO multi language
}
else {
PherogramArea pherogramArea =
getPherogramArea(getReadsArea().getSequenceOrder().idByIndex(selection.getCursorRow()));
if (pherogramArea == null) {
- return "There is no pherogram attached to the current sequence."; //TODO multi language
+ return Messages.AlignmentEditor_NO_ATTACHED_PHEROGRAM; //TODO multi language
}
else {
if (left) {
return null;
}
else {
- return "The left end of the selection lies outside the pherogram attached to this sequence."; //TODO multi language
+ return Messages.AlignmentEditor_LEFT_END_OUTSIDE; //TODO multi language
}
}
else {
return null;
}
else {
- return "The right end of the selection lies outside the pherogram attached to this sequence."; //TODO multi language
+ return Messages.AlignmentEditor_RIGHT_END_OUTSIDE; //TODO multi language
}
}
}
import eu.etaxonomy.cdm.api.service.molecular.ISequenceService;
import eu.etaxonomy.cdm.model.molecular.Sequence;
import eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
import eu.etaxonomy.taxeditor.store.CdmStore;
* @date 04.08.2014
*/
public class AlignmentEditorInput extends CdmEntitySessionInput implements IEditorInput {
- private static final String name = "AlignmentEditor";
+ private static final String name = Messages.AlignmentEditorInput_EDITOR_NAME;
private final UUID sequenceNodeUuid;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
import eu.etaxonomy.taxeditor.molecular.handler.ShowPherogramHandler;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
ShowPherogramHandler.showPherogram(area.getModel());
}
catch (PartInitException e) {
- MessagingUtils.errorDialog("Unable to create pherogram view", null, e.getLocalizedMessage(),
+ MessagingUtils.errorDialog(Messages.PherogramMouseListener_UNABLE_TO_CREATE_VIEW, null, e.getLocalizedMessage(),
TaxeditorMolecularPlugin.PLUGIN_ID, e, false); //TODO set pluginID
}
return true;
* @date Nov 20, 2014
*/
public class PherogramViewPart extends ViewPart {
- public static final String ID = "eu.etaxonomy.taxeditor.molecular.PherogramView";
+ public static final String ID = "eu.etaxonomy.taxeditor.molecular.PherogramView"; //$NON-NLS-1$
private PherogramView pherogramView = null;
package eu.etaxonomy.taxeditor.molecular.handler;\r
\r
\r
-import info.bioinfweb.libralign.alignmentarea.AlignmentArea;\r
-import info.bioinfweb.libralign.alignmentarea.order.SequenceOrder;\r
-import info.bioinfweb.libralign.alignmentarea.selection.SelectionModel;\r
-import info.bioinfweb.libralign.model.AlignmentModel;\r
-import info.bioinfweb.libralign.model.utils.AlignmentModelUtils;\r
-\r
import java.util.ArrayList;\r
import java.util.List;\r
import java.util.Map;\r
import org.eclipse.ui.menus.UIElement;\r
\r
import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;\r
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;\r
+import info.bioinfweb.libralign.alignmentarea.AlignmentArea;\r
+import info.bioinfweb.libralign.alignmentarea.order.SequenceOrder;\r
+import info.bioinfweb.libralign.alignmentarea.selection.SelectionModel;\r
+import info.bioinfweb.libralign.model.AlignmentModel;\r
+import info.bioinfweb.libralign.model.utils.AlignmentModelUtils;\r
\r
\r
\r
while (scanner.hasNext()) {\r
lines.add(scanner.nextLine());\r
}\r
- if (lines.get(lines.size() - 1).equals("")) {\r
+ if (lines.get(lines.size() - 1).equals("")) { //$NON-NLS-1$\r
lines.remove(lines.size() - 1);\r
}\r
}\r
}\r
else {\r
MessageDialog dialog = new MessageDialog(HandlerUtil.getActiveWorkbenchWindow(event).getShell(), //TODO Can the window be null?\r
- "Pasting multiple lines", null,\r
- "The text to be pasted contains mutlitple lines (" + lines.size() +\r
- ") although the current cursor height is one. What do you want to do?",\r
+ Messages.AlignmentEditorPasteHandler_PASTING_LINES, null,\r
+ String.format(Messages.AlignmentEditorPasteHandler_PASTING_LINES_QUESTION, lines.size()),\r
MessageDialog.QUESTION,\r
- new String[]{"Ingnore line breaks and paste as one sequence",\r
- "Only paste the first line from the clipboard", "Cancel"},\r
+ new String[]{Messages.AlignmentEditorPasteHandler_PASTING_LINES_IGNORE,\r
+ Messages.AlignmentEditorPasteHandler_PASTING_LINES_FIRST_LINE, Messages.AlignmentEditorPasteHandler_CANCEL},\r
0);\r
//TODO Does the dialog have to be disposed in some way?\r
\r
}\r
else {\r
MessageDialog.openError(HandlerUtil.getActiveWorkbenchWindow(event).getShell(), //TODO Can the window be null?\r
- "Unable to paste multiple lines",\r
- "The current cursor height (" + selection.getCursorHeight() +\r
- ") does not match the number of lines to be pasted (" + lines.size() + ")." +\r
- System.getProperty("line.separator") + System.getProperty("line.separator") +\r
- "You can either change the cursor height accordingly or set the cursor height to one "\r
- + "allowing you to paste all lines from the clipboad into one sequence.");\r
+ Messages.AlignmentEditorPasteHandler_PASTE_FAILURE,\r
+ String.format(Messages.AlignmentEditorPasteHandler_PASTE_FAILURE_MESSAGE, selection.getCursorHeight(), lines.size(), System.getProperty("line.separator"))); //$NON-NLS-1$\r
}\r
}\r
}\r
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
public void doExecute(ExecutionEvent event, AlignmentEditor editor) throws ExecutionException {
String errorMessage = editor.cutPherogramLeft();
if (errorMessage != null) {
- MessagingUtils.errorDialog("Unable to cut base call sequence", this, errorMessage, TaxeditorMolecularPlugin.PLUGIN_ID, null, false);
+ MessagingUtils.errorDialog(Messages.CutPherogramLeftHandler_CUT_FAILURE, this, errorMessage, TaxeditorMolecularPlugin.PLUGIN_ID, null, false);
}
}
}
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
public void doExecute(ExecutionEvent event, AlignmentEditor editor) throws ExecutionException {
String errorMessage = editor.cutPherogramRight();
if (errorMessage != null) {
- MessagingUtils.errorDialog("Unable to cut base call sequence", this, errorMessage, TaxeditorMolecularPlugin.PLUGIN_ID, null, false);
+ MessagingUtils.errorDialog(Messages.CutPherogramRightHandler_CUT_FAILURE, this, errorMessage, TaxeditorMolecularPlugin.PLUGIN_ID, null, false);
}
}
}
import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditorInput;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
.getActiveWorkbenchWindow().getActivePage().openEditor(input, AlignmentEditor.ID);
}
catch (PartInitException e) {
- logger.error("Could not open AlignmentEditor", e);
+ logger.error(Messages.EditSequenceHandler_COULD_NOT_OPEN, e);
}
}
return null;
import eu.etaxonomy.cdm.model.molecular.Sequence;\r
import eu.etaxonomy.taxeditor.editor.EditorUtil;\r
import eu.etaxonomy.taxeditor.model.MessagingUtils;\r
-import eu.etaxonomy.taxeditor.molecular.Messages;\r
import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;\r
import eu.etaxonomy.taxeditor.molecular.io.CDMPherogramAlignmentObjectTranslator;\r
import eu.etaxonomy.taxeditor.molecular.io.CDMSequenceMatrixAdapter;\r
import eu.etaxonomy.taxeditor.molecular.io.SingleReadAlignmentRDFXMLConstants;\r
import eu.etaxonomy.taxeditor.molecular.io.wizard.ExportSingleReadAlignmentWizard;\r
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;\r
import eu.etaxonomy.taxeditor.util.ApplicationUtil;\r
\r
\r
ReadWriteParameterMap parameters = new ReadWriteParameterMap();\r
parameters.put(ReadWriteParameterNames.KEY_APPLICATION_NAME, ApplicationUtil.getTitle());\r
//parameters.put(ReadWriteParameterNames.KEY_APPLICATION_VERSION, ApplicationUtil.getVersion()); // Setting the version unnecessary, since its already contained in the title.\r
- parameters.put(ReadWriteParameterNames.KEY_APPLICATION_URL, "http://cybertaxonomy.eu/taxeditor/"); //TODO Specify URL obtained from a central class?\r
+ parameters.put(ReadWriteParameterNames.KEY_APPLICATION_URL, "http://cybertaxonomy.eu/taxeditor/"); //TODO Specify URL obtained from a central class? //$NON-NLS-1$\r
parameters.put(ReadWriteParameterNames.KEY_SEQUENCE_EXTENSION_TOKEN, wizard.getModel().getElongationToken());\r
\r
// Create and register object translator for writing pherogram alignment shifts:\r
import org.eclipse.jface.resource.ImageDescriptor;
import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
public class HandlerTools { //TODO Move this class or method somewhere else?
public static ImageDescriptor createImageDescriptor(String iconName) {
URL url = FileLocator.find(TaxeditorMolecularPlugin.getDefault().getBundle(),
- new Path("icons/" + iconName), null);
+ new Path("icons/" + iconName), null); //$NON-NLS-1$
if (url != null) {
return ImageDescriptor.createFromURL(url);
}
else {
- throw new InternalError("Icon \"" + iconName + "\" could not be loaded."); //TODO Throw other type of exception?
+ throw new InternalError(String.format(Messages.HandlerTools_COULD_NOT_LOAD_ICON, iconName)); //TODO Throw other type of exception?
}
}
}
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
AlignmentEditor alignmentEditor = (AlignmentEditor)activeEditor;
FileDialog fileDialog = new FileDialog(alignmentEditor.getSite().getShell());
- fileDialog.setText("Import pherogram into contig alignment");
- fileDialog.setFilterNames(new String[]{"All supported formats", "AB1 pherogram files", "SCF pherogram files", "All files"});
- fileDialog.setFilterExtensions(new String[]{"*.ab1;*.scf", "*.ab1", "*.scf", "*.*"});
+ fileDialog.setText(Messages.LoadPherogramHandler_IMPORT_PHEROGRAM);
+ fileDialog.setFilterNames(new String[]{Messages.LoadPherogramHandler_ALL_FORMATS, Messages.LoadPherogramHandler_AB1, Messages.LoadPherogramHandler_SCF, Messages.LoadPherogramHandler_ALL});
+ fileDialog.setFilterExtensions(new String[]{"*.ab1;*.scf", "*.ab1", "*.scf", "*.*"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
String path = fileDialog.open();
if (path != null) {
alignmentEditor.addRead(new File(path).toURI(), false);
}
catch (UnsupportedChromatogramFormatException e) {
- MessagingUtils.errorDialog("Unsupported format", this, "The format of the pherogram file \"" + path +
- "\" is not supported. (Only AB1 and SCF are supported.)", TaxeditorMolecularPlugin.PLUGIN_ID, e, false); //TODO set pluginID
+ MessagingUtils.errorDialog(Messages.LoadPherogramHandler_UNSUPPORTED_FORMAT, this,
+ String.format(Messages.LoadPherogramHandler_UNSUPPORTED_FORMAT_MESSAGE, path), TaxeditorMolecularPlugin.PLUGIN_ID, e, false); //TODO set pluginID
}
catch (IOException e) {
- MessagingUtils.errorDialog("Unsupported format", this,
- "An IO error occurred while trying to read the file \"" + path + "\".",
+ MessagingUtils.errorDialog(Messages.LoadPherogramHandler_UNSUPPORTED_FORMAT_FILE, this,
+ Messages.LoadPherogramHandler_UNSUPPORTED_FORMAT_FILE_MESSAGE + path,
TaxeditorMolecularPlugin.PLUGIN_ID, e, false); //TODO set pluginID
}
}
import eu.etaxonomy.taxeditor.molecular.TaxeditorMolecularPlugin;
import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
import eu.etaxonomy.taxeditor.molecular.editor.PherogramViewPart;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
}
if (uri == null) {
- MessagingUtils.messageDialog("No pherogram available", this,
- "The selected read does not have an associated pherogram.");
+ MessagingUtils.messageDialog(Messages.ShowPherogramHandler_NO_PHEROGRAM, this,
+ Messages.ShowPherogramHandler_NO_PHEROGRAM_MESSAGE);
}
else {
showPherogram(new PherogramComponentModel(AlignmentEditor.readPherogram(uri)));
}
}
catch (Exception e) {
- MessagingUtils.errorDialog("Error", null, e.getLocalizedMessage(), TaxeditorMolecularPlugin.PLUGIN_ID,
+ MessagingUtils.errorDialog(Messages.ShowPherogramHandler_ERROR, null, e.getLocalizedMessage(), TaxeditorMolecularPlugin.PLUGIN_ID,
e, false);
}
}
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
*/
public class ToggleInsertOverwriteHandler extends AbstractAlignmentEditorHandler implements IElementUpdater {
public static final String COMMAND_ID =
- "eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleInsertOverwrite";
+ "eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleInsertOverwrite"; //$NON-NLS-1$
- private final ImageDescriptor INSERT_DESCRIPTOR = HandlerTools.createImageDescriptor("insert-16x16.png");
- private final ImageDescriptor OVERWRITE_DESCRIPTOR = HandlerTools.createImageDescriptor("overwrite-16x16.png");
+ private final ImageDescriptor INSERT_DESCRIPTOR = HandlerTools.createImageDescriptor("insert-16x16.png"); //$NON-NLS-1$
+ private final ImageDescriptor OVERWRITE_DESCRIPTOR = HandlerTools.createImageDescriptor("overwrite-16x16.png"); //$NON-NLS-1$
@Override
if (activeEditor instanceof AlignmentEditor) {
if (((AlignmentEditor)activeEditor).isInsertMode()) {
element.setIcon(INSERT_DESCRIPTOR);
- element.setText("INS");
- element.setTooltip("Click to switch to overwrite mode");
+ element.setText("INS"); //$NON-NLS-1$
+ element.setTooltip(Messages.ToggleInsertOverwriteHandler_SWITCH_OVERWRITE);
}
else {
element.setIcon(OVERWRITE_DESCRIPTOR);
- element.setText("OVR");
- element.setTooltip("Click to switch to insertion mode");
+ element.setText("OVR"); //$NON-NLS-1$
+ element.setTooltip(Messages.ToggleInsertOverwriteHandler_SWITCH_INSERTION);
}
((ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class)).refreshElements(
ToggleLeftRightInsertionHandler.COMMAND_ID, null);
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
* @date 04.12.2014
*/
public class ToggleLeftRightInsertionHandler extends AbstractAlignmentEditorHandler implements IElementUpdater {
- public static final String COMMAND_ID = "eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleLeftRightInsertion";
+ public static final String COMMAND_ID = "eu.etaxonomy.taxeditor.molecular.AlignmentEditor.toggleLeftRightInsertion"; //$NON-NLS-1$
private final ImageDescriptor INSERT_LEFT_DESCRIPTOR =
- HandlerTools.createImageDescriptor("pherogram-insert-left-16x16.png");
+ HandlerTools.createImageDescriptor("pherogram-insert-left-16x16.png"); //$NON-NLS-1$
private final ImageDescriptor INSERT_RIGHT_DESCRIPTOR =
- HandlerTools.createImageDescriptor("pherogram-insert-right-16x16.png");
+ HandlerTools.createImageDescriptor("pherogram-insert-right-16x16.png"); //$NON-NLS-1$
private final ImageDescriptor INSERT_LEFT_DISABLED_DESCRIPTOR =
- HandlerTools.createImageDescriptor("pherogram-insert-left-disabled-16x16.png");
+ HandlerTools.createImageDescriptor("pherogram-insert-left-disabled-16x16.png"); //$NON-NLS-1$
private final ImageDescriptor INSERT_RIGHT_DISABLED_DESCRIPTOR =
- HandlerTools.createImageDescriptor("pherogram-insert-right-disabled-16x16.png");
+ HandlerTools.createImageDescriptor("pherogram-insert-right-disabled-16x16.png"); //$NON-NLS-1$
@Override
if (((AlignmentEditor)activeEditor).isInsertLeftInPherogram()) {
element.setIcon(INSERT_LEFT_DESCRIPTOR);
element.setDisabledIcon(INSERT_LEFT_DISABLED_DESCRIPTOR);
- element.setText("Left");
- element.setTooltip("Switch to insert pherogram distorsions right of future edits.");
+ element.setText(Messages.ToggleLeftRightInsertionHandler_LEFT);
+ element.setTooltip(Messages.ToggleLeftRightInsertionHandler_SWITCH_RIGHT);
}
else {
element.setIcon(INSERT_RIGHT_DESCRIPTOR);
element.setDisabledIcon(INSERT_RIGHT_DISABLED_DESCRIPTOR);
- element.setText("Right");
- element.setTooltip("Switch to insert pherogram distorsions left of future edits.");
+ element.setText(Messages.ToggleLeftRightInsertionHandler_RIGHT);
+ element.setTooltip(Messages.ToggleLeftRightInsertionHandler_SWITCH_LEFT);
}
}
}
import javax.xml.stream.XMLStreamWriter;
import eu.etaxonomy.cdm.model.molecular.SingleReadAlignment;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
throws IOException, XMLStreamException, InvalidObjectSourceDataException {
// TODO implement
- throw new InternalError("Not implemented.");
+ throw new InternalError(Messages.CDMPherogramAlignmentObjectTranslator_NOT_IMPLEMENTED);
}
package eu.etaxonomy.taxeditor.molecular.io;\r
\r
\r
+import java.io.IOException;\r
+import java.net.URI;\r
+import java.util.ArrayList;\r
+import java.util.Collections;\r
+import java.util.Iterator;\r
+import java.util.List;\r
+\r
+import javax.xml.namespace.QName;\r
+\r
+import eu.etaxonomy.cdm.model.molecular.Sequence;\r
+import eu.etaxonomy.cdm.model.molecular.SingleReadAlignment;\r
+import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;\r
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;\r
import info.bioinfweb.commons.bio.CharacterStateSetType;\r
import info.bioinfweb.commons.io.W3CXSConstants;\r
import info.bioinfweb.commons.text.StringUtils;\r
import info.bioinfweb.jphyloio.events.type.EventContentType;\r
import info.bioinfweb.jphyloio.utils.JPhyloIOWritingUtils;\r
\r
-import java.io.IOException;\r
-import java.net.URI;\r
-import java.util.ArrayList;\r
-import java.util.Collections;\r
-import java.util.Iterator;\r
-import java.util.List;\r
-\r
-import javax.xml.namespace.QName;\r
-\r
-import eu.etaxonomy.cdm.model.molecular.Sequence;\r
-import eu.etaxonomy.cdm.model.molecular.SingleReadAlignment;\r
-import eu.etaxonomy.taxeditor.molecular.editor.AlignmentEditor;\r
-\r
\r
\r
/**\r
* @date 29.04.2016\r
*/\r
public class CDMSequenceMatrixAdapter extends NoCharDefsNoSetsMatrixDataAdapter implements ReadWriteConstants, SingleReadAlignmentRDFXMLConstants {\r
- public static final String MATRIX_ID = DEFAULT_MATRIX_ID_PREFIX + "ContigAlignment";\r
- public static final String SINGLE_READ_SEQUENCE_ID_PREFIX = DEFAULT_SEQUENCE_ID_PREFIX + "SingleRead";\r
- public static final String CONSENSUS_SEQUENCE_ID= DEFAULT_SEQUENCE_ID_PREFIX + "Consensus";\r
+\r
+ private static final String NO_SEQUENCE_WITH_THE_ID_D_COULD_BE_FOUND = Messages.CDMSequenceMatrixAdapter_NO_SEQUENCE_FOUND;\r
+ public static final String MATRIX_ID = DEFAULT_MATRIX_ID_PREFIX + "ContigAlignment"; //$NON-NLS-1$\r
+ public static final String SINGLE_READ_SEQUENCE_ID_PREFIX = DEFAULT_SEQUENCE_ID_PREFIX + "SingleRead"; //$NON-NLS-1$\r
+ public static final String CONSENSUS_SEQUENCE_ID= DEFAULT_SEQUENCE_ID_PREFIX + "Consensus"; //$NON-NLS-1$\r
\r
\r
private Sequence sequence;\r
public CDMSequenceMatrixAdapter(Sequence sequence, String consensusSequenceLabel, boolean exportConsensus, boolean exportSingleReads) {\r
super();\r
if (!exportConsensus && !exportSingleReads) {\r
- throw new IllegalArgumentException("Either exportConsensus or exportSingleReads must be true. "\r
- + "Otherwise no sequences would be contained in this matrix.");\r
+ throw new IllegalArgumentException(Messages.CDMSequenceMatrixAdapter_EITHER_MUST_BE_TRUE);\r
}\r
else {\r
this.sequence = sequence;\r
\r
@Override\r
public LinkedLabeledIDEvent getStartEvent(ReadWriteParameterMap parameters) {\r
- return new LinkedLabeledIDEvent(EventContentType.ALIGNMENT, MATRIX_ID, "Contig alignment", null);\r
+ return new LinkedLabeledIDEvent(EventContentType.ALIGNMENT, MATRIX_ID, "Contig alignment", null); //$NON-NLS-1$\r
//TODO Use label according to derivate and markers.\r
}\r
\r
return getCDMSequence().getSequenceString().length();\r
}\r
else {\r
- throw new IllegalArgumentException("No sequence with the ID \"" + sequenceID + "\" could be found.");\r
+ throw new IllegalArgumentException(String.format(NO_SEQUENCE_WITH_THE_ID_D_COULD_BE_FOUND, sequenceID));\r
}\r
}\r
\r
public LinkedLabeledIDEvent getSequenceStartEvent(ReadWriteParameterMap parameters, String sequenceID) {\r
int singleReadIndex = extractSingleReadIndexFromID(sequenceID);\r
if (singleReadIndex >= 0) {\r
- return new LinkedLabeledIDEvent(EventContentType.SEQUENCE, sequenceID, "Single read " + singleReadIndex, null);\r
+ return new LinkedLabeledIDEvent(EventContentType.SEQUENCE, sequenceID, "Single read " + singleReadIndex, null); //$NON-NLS-1$\r
//TODO Use name displayed in derivate hierarchy or specified name as label instead?\r
}\r
else if (exportConsensus && CONSENSUS_SEQUENCE_ID.equals(sequenceID)) {\r
return new LinkedLabeledIDEvent(EventContentType.SEQUENCE, sequenceID, consensusSequenceLabel, null);\r
}\r
else {\r
- throw new IllegalArgumentException("No sequence with the ID \"" + sequenceID + "\" could be found.");\r
+ throw new IllegalArgumentException(String.format(NO_SEQUENCE_WITH_THE_ID_D_COULD_BE_FOUND, sequenceID));\r
}\r
}\r
\r
\r
\r
private String createMetadataID(String sequenceID, QName predicate) {\r
- return sequenceID + "META" + predicate.getLocalPart();\r
+ return sequenceID + "META" + predicate.getLocalPart(); //$NON-NLS-1$\r
}\r
\r
\r
writeStringPart(receiver, getCDMSequence().getSequenceString(), startColumn, endColumn);\r
}\r
else {\r
- throw new IllegalArgumentException("No sequence with the ID \"" + sequenceID + "\" could be found.");\r
+ throw new IllegalArgumentException(String.format(NO_SEQUENCE_WITH_THE_ID_D_COULD_BE_FOUND, sequenceID));\r
}\r
}\r
\r
import java.util.Iterator;\r
import java.util.NoSuchElementException;\r
\r
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;\r
+\r
\r
\r
/**\r
return CDMSequenceMatrixAdapter.CONSENSUS_SEQUENCE_ID;\r
}\r
else {\r
- throw new NoSuchElementException("There are no more sequence IDs availble from this iterator.");\r
+ throw new NoSuchElementException(Messages.SequenceIDIterator_NO_MORE_SEQUENCES);\r
}\r
}\r
\r
\r
@Override\r
public void remove() {\r
- throw new UnsupportedOperationException("This iterator does not support removing elements.");\r
+ throw new UnsupportedOperationException(Messages.SequenceIDIterator_REMOVE_NOT_SUPPORTED);\r
}\r
}\r
* @date 27.10.2016
*/
public interface SingleReadAlignmentRDFXMLConstants {
- public static final String NAMESPACE_URI_PREFIX = "http://bioinfweb.info/xmlns/PhyDE/ReadAlignment/"; //TODO Possibly change this namespace, when according decision is made.
- public static final String PREDICATE_NAMESPACE_URI = NAMESPACE_URI_PREFIX + "Predicates/";
- public static final String PREDICATE_NAMESPACE_PREFIX = "ra";
- public static final String DATA_TYPE_NAMESPACE_URI = NAMESPACE_URI_PREFIX + "DataTypes/";
- public static final String DATA_TYPE_NAMESPACE_PREFIX = "radt";
- public static final String PHEROGRAM_ALIGNMENT_NAMESPACE_URI = NAMESPACE_URI_PREFIX + "PherogramAlignment/";
- public static final String PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX = "pha";
-
- public static final QName PREDICATE_IS_SINGLE_READ = new QName(PREDICATE_NAMESPACE_URI, "isSingleRead", PREDICATE_NAMESPACE_PREFIX);
- public static final QName PREDICATE_IS_CONSENSUS_SEQUENCE = new QName(PREDICATE_NAMESPACE_URI, "isConsensus", PREDICATE_NAMESPACE_PREFIX);
- public static final QName PREDICATE_IS_REVERSE_COMPLEMENTED = new QName(PREDICATE_NAMESPACE_URI, "isRCed", PREDICATE_NAMESPACE_PREFIX);
- public static final QName PREDICATE_HAS_PHEROGRAM = new QName(PREDICATE_NAMESPACE_URI, "hasPherogram", PREDICATE_NAMESPACE_PREFIX);
- public static final QName PREDICATE_HAS_PHEROGRAM_ALIGNMENT = new QName(PREDICATE_NAMESPACE_URI, "hasPherogramAlignment", PREDICATE_NAMESPACE_PREFIX);
- public static final QName PREDICATE_HAS_LEFT_CUT_POSITION = new QName(PREDICATE_NAMESPACE_URI, "hasLeftCutPosition", PREDICATE_NAMESPACE_PREFIX);
- public static final QName PREDICATE_HAS_RIGHT_CUT_POSITION = new QName(PREDICATE_NAMESPACE_URI, "hasRightCutPosition", PREDICATE_NAMESPACE_PREFIX);
-
- public static final QName DATA_TYPE_PHERORAGM_ALIGNMENT = new QName(DATA_TYPE_NAMESPACE_URI, "pherogramAlignment", DATA_TYPE_NAMESPACE_PREFIX);
-
- public static final QName TAG_SHIFTS = new QName(PHEROGRAM_ALIGNMENT_NAMESPACE_URI, "shifts", PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX);
- public static final QName TAG_SHIFT = new QName(PHEROGRAM_ALIGNMENT_NAMESPACE_URI, "shift", PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX);
- public static final QName ATTR_POSITION = new QName(PHEROGRAM_ALIGNMENT_NAMESPACE_URI, "pos", PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX);
- public static final QName ATTR_SHIFT = new QName(PHEROGRAM_ALIGNMENT_NAMESPACE_URI, "shift", PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX);
+ public static final String NAMESPACE_URI_PREFIX = "http://bioinfweb.info/xmlns/PhyDE/ReadAlignment/"; //TODO Possibly change this namespace, when according decision is made. //$NON-NLS-1$
+ public static final String PREDICATE_NAMESPACE_URI = NAMESPACE_URI_PREFIX + "Predicates/"; //$NON-NLS-1$
+ public static final String PREDICATE_NAMESPACE_PREFIX = "ra"; //$NON-NLS-1$
+ public static final String DATA_TYPE_NAMESPACE_URI = NAMESPACE_URI_PREFIX + "DataTypes/"; //$NON-NLS-1$
+ public static final String DATA_TYPE_NAMESPACE_PREFIX = "radt"; //$NON-NLS-1$
+ public static final String PHEROGRAM_ALIGNMENT_NAMESPACE_URI = NAMESPACE_URI_PREFIX + "PherogramAlignment/"; //$NON-NLS-1$
+ public static final String PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX = "pha"; //$NON-NLS-1$
+
+ public static final QName PREDICATE_IS_SINGLE_READ = new QName(PREDICATE_NAMESPACE_URI, "isSingleRead", PREDICATE_NAMESPACE_PREFIX); //$NON-NLS-1$
+ public static final QName PREDICATE_IS_CONSENSUS_SEQUENCE = new QName(PREDICATE_NAMESPACE_URI, "isConsensus", PREDICATE_NAMESPACE_PREFIX); //$NON-NLS-1$
+ public static final QName PREDICATE_IS_REVERSE_COMPLEMENTED = new QName(PREDICATE_NAMESPACE_URI, "isRCed", PREDICATE_NAMESPACE_PREFIX); //$NON-NLS-1$
+ public static final QName PREDICATE_HAS_PHEROGRAM = new QName(PREDICATE_NAMESPACE_URI, "hasPherogram", PREDICATE_NAMESPACE_PREFIX); //$NON-NLS-1$
+ public static final QName PREDICATE_HAS_PHEROGRAM_ALIGNMENT = new QName(PREDICATE_NAMESPACE_URI, "hasPherogramAlignment", PREDICATE_NAMESPACE_PREFIX); //$NON-NLS-1$
+ public static final QName PREDICATE_HAS_LEFT_CUT_POSITION = new QName(PREDICATE_NAMESPACE_URI, "hasLeftCutPosition", PREDICATE_NAMESPACE_PREFIX); //$NON-NLS-1$
+ public static final QName PREDICATE_HAS_RIGHT_CUT_POSITION = new QName(PREDICATE_NAMESPACE_URI, "hasRightCutPosition", PREDICATE_NAMESPACE_PREFIX); //$NON-NLS-1$
+
+ public static final QName DATA_TYPE_PHERORAGM_ALIGNMENT = new QName(DATA_TYPE_NAMESPACE_URI, "pherogramAlignment", DATA_TYPE_NAMESPACE_PREFIX); //$NON-NLS-1$
+
+ public static final QName TAG_SHIFTS = new QName(PHEROGRAM_ALIGNMENT_NAMESPACE_URI, "shifts", PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX); //$NON-NLS-1$
+ public static final QName TAG_SHIFT = new QName(PHEROGRAM_ALIGNMENT_NAMESPACE_URI, "shift", PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX); //$NON-NLS-1$
+ public static final QName ATTR_POSITION = new QName(PHEROGRAM_ALIGNMENT_NAMESPACE_URI, "pos", PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX); //$NON-NLS-1$
+ public static final QName ATTR_SHIFT = new QName(PHEROGRAM_ALIGNMENT_NAMESPACE_URI, "shift", PHEROGRAM_ALIGNMENT_NAMESPACE_PREFIX); //$NON-NLS-1$
}
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import eu.etaxonomy.taxeditor.molecular.Messages;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import eu.etaxonomy.taxeditor.molecular.Messages;
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;
\r
import org.eclipse.jface.wizard.Wizard;\r
\r
+import eu.etaxonomy.taxeditor.molecular.l10n.Messages;\r
+\r
\r
\r
/**\r
\r
\r
public ExportSingleReadAlignmentWizard() {\r
- setWindowTitle("Export single read alignment"); //TODO Use multi language message\r
+ setWindowTitle(Messages.ExportSingleReadAlignmentWizard_EXPORT_SINGLE_READ); //TODO Use multi language message\r
}\r
\r
\r
private IObservableValue fileName = new WritableValue(null, String.class);
private IObservableValue exportSingleReads = new WritableValue(true, Boolean.class);
private IObservableValue exportConsensusSequence = new WritableValue(true, Boolean.class);
- private IObservableValue consensusSequenceLabel = new WritableValue("Consensus", String.class);
+ private IObservableValue consensusSequenceLabel = new WritableValue("Consensus", String.class); //$NON-NLS-1$
private IObservableValue elongateSequences = new WritableValue(false, Boolean.class);
private IObservableValue useGapToken = new WritableValue(true, Boolean.class);
--- /dev/null
+/**
+ * Copyright (C) 2016 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+package eu.etaxonomy.taxeditor.molecular.l10n;
+
+
+import org.eclipse.osgi.util.NLS;
+
+
+
+/**
+ * Provides messages and texts for classes of the molecular plugin.
+ *
+ * @author Ben Stöver
+ * @date 17.11.2016
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "src/main/java/eu.etaxonomy.taxeditor.molecular.l10n.messages"; //$NON-NLS-1$
+
+
+ public static String AlignmentEditor_CUTTING_FAILURE;
+
+
+ public static String AlignmentEditor_EDIT_MODE;
+
+
+ public static String AlignmentEditor_ERROR_SINGLE_READ;
+
+
+ public static String AlignmentEditor_ERROR_SINGLE_READ_MESSAGE;
+
+
+ public static String AlignmentEditor_INSERT;
+
+
+ public static String AlignmentEditor_INSERTION_PHEROGRAM;
+
+
+ public static String AlignmentEditor_LEFT;
+
+
+ public static String AlignmentEditor_LEFT_END_OUTSIDE;
+
+
+ public static String AlignmentEditor_MUST_HAVE_TYPE;
+
+
+ public static String AlignmentEditor_NEW_READ_FAILURE;
+
+
+ public static String AlignmentEditor_NO_ATTACHED_PHEROGRAM;
+
+
+ public static String AlignmentEditor_OVERWRITE;
+
+
+ public static String AlignmentEditor_RIGHT;
+
+
+ public static String AlignmentEditor_RIGHT_END_OUTSIDE;
+
+
+ public static String AlignmentEditor_SAVING_ALIGNMENT;
+
+
+ public static String AlignmentEditorInput_EDITOR_NAME;
+
+
+ public static String AlignmentEditorPasteHandler_CANCEL;
+
+
+ public static String AlignmentEditorPasteHandler_PASTE_FAILURE;
+
+
+ public static String AlignmentEditorPasteHandler_PASTE_FAILURE_MESSAGE;
+
+
+ public static String AlignmentEditorPasteHandler_PASTING_LINES;
+
+
+ public static String AlignmentEditorPasteHandler_PASTING_LINES_FIRST_LINE;
+
+
+ public static String AlignmentEditorPasteHandler_PASTING_LINES_IGNORE;
+
+
+ public static String AlignmentEditorPasteHandler_PASTING_LINES_QUESTION;
+
+
+ public static String CDMPherogramAlignmentObjectTranslator_NOT_IMPLEMENTED;
+
+
+ public static String CDMSequenceMatrixAdapter_EITHER_MUST_BE_TRUE;
+
+
+ public static String CDMSequenceMatrixAdapter_NO_SEQUENCE_FOUND;
+
+
+ public static String CutPherogramLeftHandler_CUT_FAILURE;
+
+
+ public static String CutPherogramRightHandler_CUT_FAILURE;
+
+
+ public static String EditSequenceHandler_COULD_NOT_OPEN;
+
+
+ public static String ExportSingleReadAlignmentWizard_EXPORT_SINGLE_READ;
+
+
+ public static String exportSequenceToFileHandlerIOErrorMessage;
+ public static String exportSequenceToFileHandlerIOErrorTitle;
+ public static String exportSequenceToFileHandlerOverwriteTitle;
+ public static String exportSequenceToFileHandlerOverwriteText;
+
+
+ public static String HandlerTools_COULD_NOT_LOAD_ICON;
+
+
+ public static String LoadPherogramHandler_AB1;
+
+
+ public static String LoadPherogramHandler_ALL;
+
+
+ public static String LoadPherogramHandler_ALL_FORMATS;
+
+
+ public static String LoadPherogramHandler_IMPORT_PHEROGRAM;
+
+
+ public static String LoadPherogramHandler_SCF;
+
+
+ public static String LoadPherogramHandler_UNSUPPORTED_FORMAT;
+
+
+ public static String LoadPherogramHandler_UNSUPPORTED_FORMAT_FILE;
+
+
+ public static String LoadPherogramHandler_UNSUPPORTED_FORMAT_FILE_MESSAGE;
+
+
+ public static String LoadPherogramHandler_UNSUPPORTED_FORMAT_MESSAGE;
+
+
+ public static String PherogramMouseListener_UNABLE_TO_CREATE_VIEW;
+
+ public static String SequenceIDIterator_NO_MORE_SEQUENCES;
+
+
+ public static String SequenceIDIterator_REMOVE_NOT_SUPPORTED;
+
+
+ public static String ShowPherogramHandler_ERROR;
+
+
+ public static String ShowPherogramHandler_NO_PHEROGRAM;
+
+
+ public static String ShowPherogramHandler_NO_PHEROGRAM_MESSAGE;
+
+
+ public static String ToggleInsertOverwriteHandler_SWITCH_INSERTION;
+
+
+ public static String ToggleInsertOverwriteHandler_SWITCH_OVERWRITE;
+
+
+ public static String ToggleLeftRightInsertionHandler_LEFT;
+
+
+ public static String ToggleLeftRightInsertionHandler_RIGHT;
+
+
+ public static String ToggleLeftRightInsertionHandler_SWITCH_LEFT;
+
+
+ public static String ToggleLeftRightInsertionHandler_SWITCH_RIGHT;
+
+
+ public static String wizardExportAlignmentAppendExtensionButton;
+ public static String wizardExportAlignmentBrowseButton;
+ public static String wizardExportAlignmentDataLabel;
+ public static String wizardExportAlignmentDescription;
+ public static String wizardExportAlignmentDestinationLabel;
+ public static String wizardExportAlignmentErrorMissingFileName;
+ public static String wizardExportAlignmentErrorMissingSeqLabel;
+ public static String wizardExportAlignmentErrorNothingToExport;
+ public static String wizardExportAlignmentExportConsensusSeqLabel;
+ public static String wizardExportAlignmentExportFormatLabel;
+ public static String wizardExportAlignmentExportSingleReads;
+ public static String wizardExportAlignmentFileDialogTitle;
+ public static String wizardExportAlignmentFileLabel;
+ public static String wizardExportAlignmentOptionsDescription;
+ public static String wizardExportAlignmentOptionsTitle;
+ public static String wizardExportAlignmentTitle;
+ public static String wizardExportAlignmentWarningFileNameStartsDot;
+ public static String wizardExportAlignmentwarningMissingExtension;
+ public static String wizardExportAlignmentWarningFileExists;
+ public static String wizardExportAlignmentExportedSeqHeading;
+ public static String wizardExportAlignmentAdditionalOptionsHeading;
+ public static String wizardExportAlignmentElongateSeqHeading;
+ public static String wizardExportAlignmentElongateSeqMissingData;
+ public static String wizardExportAlignmentElongateSeqGap;
+
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {}
+}
--- /dev/null
+exportSequenceToFileHandlerIOErrorMessage=An error occurred when trying to export a consensus sequence alignment to the file "%s".
+exportSequenceToFileHandlerIOErrorTitle=I/O error
+exportSequenceToFileHandlerOverwriteTitle=Overwrite file
+exportSequenceToFileHandlerOverwriteText=The file \"%s\" already exists.\n\nDo you want to overwrite it?
+wizardExportAlignmentAppendExtensionButton=Append default extension
+wizardExportAlignmentBrowseButton=Browse...
+wizardExportAlignmentDataLabel=Select the data to export:
+wizardExportAlignmentDescription=Define the output file and format.
+wizardExportAlignmentDestinationLabel=Select the export destination:
+wizardExportAlignmentErrorMissingFileName=The file name must not be empty.
+wizardExportAlignmentErrorMissingSeqLabel=The consensus sequence label must not be empty.
+wizardExportAlignmentErrorNothingToExport=Either single reads or the consensus sequence have to be selected for export.
+wizardExportAlignmentExportConsensusSeqLabel=Export consensus sequence
+wizardExportAlignmentExportFormatLabel=Select the export format:
+wizardExportAlignmentExportSingleReads=Export single reads
+wizardExportAlignmentFileDialogTitle=Export to
+wizardExportAlignmentFileLabel=Alignment file:
+wizardExportAlignmentTitle=Sequence export
+wizardExportAlignmentWarningFileNameStartsDot=File starting with '.' are not supported on all operating systems.
+wizardExportAlignmentwarningMissingExtension=The file name does have a valid extension for the selected format.
+wizardExportAlignmentWarningFileExists=The file already exists and will be overwritten.
+wizardExportAlignmentOptionsDescription=Specify additional export parameters.
+wizardExportAlignmentOptionsTitle=Export options
+wizardExportAlignmentExportedSeqHeading=Specify the sequences to be exported:
+wizardExportAlignmentAdditionalOptionsHeading=Specify additional export options:
+wizardExportAlignmentElongateSeqHeading=Elongate sequences to have equal length with:
+wizardExportAlignmentElongateSeqMissingData=Missing data ('?')"
+wizardExportAlignmentElongateSeqGap=Gap ('-')
+
+AlignmentEditor_CUTTING_FAILURE=Cutting pherograms is only possible if exactly one row is selected.
+AlignmentEditor_EDIT_MODE=Edit mode:
+AlignmentEditor_ERROR_SINGLE_READ=Error
+AlignmentEditor_ERROR_SINGLE_READ_MESSAGE=A single read was skipped because of the following error:\n\n
+AlignmentEditor_INSERT=Insert
+AlignmentEditor_INSERTION_PHEROGRAM=Insertion in pherogram:
+AlignmentEditor_LEFT=Left
+AlignmentEditor_LEFT_END_OUTSIDE=The left end of the selection lies outside the pherogram attached to this sequence.
+AlignmentEditor_MUST_HAVE_TYPE=The editor input must have the type %s
+AlignmentEditor_NEW_READ_FAILURE=Creating new reads from AlignmentEditor not implemented.
+AlignmentEditor_NO_ATTACHED_PHEROGRAM=There is no pherogram attached to the current sequence.
+AlignmentEditor_OVERWRITE=Overwrite
+AlignmentEditor_RIGHT=Right
+AlignmentEditor_RIGHT_END_OUTSIDE=The right end of the selection lies outside the pherogram attached to this sequence.
+AlignmentEditor_SAVING_ALIGNMENT=Saving alignment
+AlignmentEditorInput_EDITOR_NAME=AlignmentEditor
+PherogramMouseListener_UNABLE_TO_CREATE_VIEW=Unable to create pherogram view
+
+CutPherogramLeftHandler_CUT_FAILURE=Unable to cut base call sequence
+CutPherogramRightHandler_CUT_FAILURE=Unable to cut base call sequence
+EditSequenceHandler_COULD_NOT_OPEN=Could not open AlignmentEditor
+HandlerTools_COULD_NOT_LOAD_ICON=Icon "%s" could not be loaded.
+LoadPherogramHandler_AB1=AB1 pherogram files
+LoadPherogramHandler_ALL=All files
+LoadPherogramHandler_ALL_FORMATS=All supported formats
+LoadPherogramHandler_IMPORT_PHEROGRAM=Import pherogram into contig alignment
+LoadPherogramHandler_SCF=SCF pherogram files
+LoadPherogramHandler_UNSUPPORTED_FORMAT=Unsupported format
+LoadPherogramHandler_UNSUPPORTED_FORMAT_FILE=Unsupported format
+LoadPherogramHandler_UNSUPPORTED_FORMAT_FILE_MESSAGE=An IO error occurred while trying to read the file
+LoadPherogramHandler_UNSUPPORTED_FORMAT_MESSAGE=The format of the pherogram file "%s" is not supported. (Only AB1 and SCF are supported.)
+ShowPherogramHandler_ERROR=Error
+ShowPherogramHandler_NO_PHEROGRAM=No pherogram available
+ShowPherogramHandler_NO_PHEROGRAM_MESSAGE=The selected read does not have an associated pherogram.
+ToggleInsertOverwriteHandler_SWITCH_INSERTION=Click to switch to insertion mode
+ToggleInsertOverwriteHandler_SWITCH_OVERWRITE=Click to switch to overwrite mode
+ToggleLeftRightInsertionHandler_LEFT=Left
+ToggleLeftRightInsertionHandler_RIGHT=Right
+ToggleLeftRightInsertionHandler_SWITCH_LEFT=Switch to insert pherogram distorsions left of future edits.
+ToggleLeftRightInsertionHandler_SWITCH_RIGHT=Switch to insert pherogram distorsions right of future edits.
+
+AlignmentEditorPasteHandler_CANCEL=Cancel
+AlignmentEditorPasteHandler_PASTE_FAILURE=Unable to paste multiple lines
+AlignmentEditorPasteHandler_PASTE_FAILURE_MESSAGE=The current cursor height (%1$d) does not match the number of lines to be pasted (%2$d).%3$s%3$sYou can either change the cursor height accordingly or set the cursor height to one allowing you to paste all lines from the clipboard into one sequence.
+AlignmentEditorPasteHandler_PASTING_LINES=Pasting multiple lines
+AlignmentEditorPasteHandler_PASTING_LINES_FIRST_LINE=Only paste the first line from the clipboard
+AlignmentEditorPasteHandler_PASTING_LINES_IGNORE=Ignore line breaks and paste as one sequence
+AlignmentEditorPasteHandler_PASTING_LINES_QUESTION=The text to be pasted contains mutlitple lines (%d) although the current cursor height is 1. What do you want to do?
+
+CDMPherogramAlignmentObjectTranslator_NOT_IMPLEMENTED=Not implemented.
+CDMSequenceMatrixAdapter_EITHER_MUST_BE_TRUE=Either exportConsensus or exportSingleReads must be true. Otherwise no sequences would be contained in this matrix.
+CDMSequenceMatrixAdapter_NO_SEQUENCE_FOUND=No sequence with the ID "%d" could be found.
+SequenceIDIterator_NO_MORE_SEQUENCES=There are no more sequence IDs availble from this iterator.
+SequenceIDIterator_REMOVE_NOT_SUPPORTED=This iterator does not support removing elements.
+
+ExportSingleReadAlignmentWizard_EXPORT_SINGLE_READ=Export single read alignment
--- /dev/null
+exportSequenceToFileHandlerIOErrorMessage=Beim Schreiben der Datei "%s" ist ein Fehler aufgetreten.
+exportSequenceToFileHandlerIOErrorTitle=E/A Fehler
+exportSequenceToFileHandlerOverwriteTitle=Datei überschreiben
+exportSequenceToFileHandlerOverwriteText=Die Datei \"%s\" existiert bereits.\n\nSoll sie überschrieben werden?
+wizardExportAlignmentAppendExtensionButton=Standarddateiendung anhängen
+wizardExportAlignmentBrowseButton=Durchsuchen...
+wizardExportAlignmentDataLabel=Zu exportierende Daten:
+wizardExportAlignmentDescription=Wählen Sie den Zielort und das Zielformat aus!
+wizardExportAlignmentDestinationLabel=Zieldatei:
+wizardExportAlignmentErrorMissingFileName=Der Dateiname darf nicht leer sein.
+wizardExportAlignmentErrorMissingSeqLabel=Der Name der Konsensussequenz darf nicht leer sein.
+wizardExportAlignmentErrorNothingToExport=Es müssen entweder die einzelnen Reads oder die Konsensussequenz zum Export ausgewählt werden.
+wizardExportAlignmentExportConsensusSeqLabel=Konsensussequenz exportieren
+wizardExportAlignmentExportFormatLabel=Zielformat:
+wizardExportAlignmentExportSingleReads=Einzelne Reads exportieren
+wizardExportAlignmentFileDialogTitle=Exportieren nach
+wizardExportAlignmentFileLabel=Alignment Datei:
+wizardExportAlignmentTitle=Sequenzexport
+wizardExportAlignmentWarningFileNameStartsDot=Dateinamen, die mit einem '.' beginnen, werden nicht auf allen Betriebssystemen unterstützt.
+wizardExportAlignmentwarningMissingExtension=Der momentane Dateiname hat keine zum aktuellen Format passende Endung.
+wizardExportAlignmentWarningFileExists=The existiert bereits und würde überschrieben.
+wizardExportAlignmentOptionsDescription=Geben Sie weitere Exportparameter an!
+wizardExportAlignmentOptionsTitle=Exportoptionen
+wizardExportAlignmentExportedSeqHeading=Zu exportierende Sequenzen:
+wizardExportAlignmentAdditionalOptionsHeading=Erweiterte Exportoptionen:
+wizardExportAlignmentElongateSeqHeading=Sequenzen auf einheitliche Länge bringen mit:
+wizardExportAlignmentElongateSeqMissingData=Fehlende Daten ('?')"
+wizardExportAlignmentElongateSeqGap=Lücke ('-')
+
+AlignmentEditor_CUTTING_FAILURE=Beschneiden des Pherogramms ist nur möglich, wenn exakt eine Reihe ausgewählt ist.
+AlignmentEditor_EDIT_MODE=Editier-Modus:
+AlignmentEditor_ERROR_SINGLE_READ=Error
+AlignmentEditor_ERROR_SINGLE_READ_MESSAGE=Ein Single-Read wurde übersprungen wegen folgendem Fehler:\n\n
+AlignmentEditor_INSERT=Einfügen
+AlignmentEditor_INSERTION_PHEROGRAM=Einfügen in Pherogrammm:
+AlignmentEditor_LEFT=Links
+AlignmentEditor_LEFT_END_OUTSIDE=Das linke Ende der Auswahl liegt außerhalb des Pherogramms dieser Sequenz.
+AlignmentEditor_MUST_HAVE_TYPE=Der Editor-Input muss vom Typ %s sein
+AlignmentEditor_NEW_READ_FAILURE=Das Erzeugen neuer Reads im Alignment-Editor ist nicht implementiert.
+AlignmentEditor_NO_ATTACHED_PHEROGRAM=Die ausgewählte Sequenz hat kein angehangenes Pherogramm.
+AlignmentEditor_OVERWRITE=Ãœberschreiben
+AlignmentEditor_RIGHT=REchts
+AlignmentEditor_RIGHT_END_OUTSIDE=Das rechte Ende der Auswahl liegt außerhalb des Pherogramms dieser Sequenz.
+AlignmentEditor_SAVING_ALIGNMENT=Alignment speichern
+AlignmentEditorInput_EDITOR_NAME=Alignment-Editor
+PherogramMouseListener_UNABLE_TO_CREATE_VIEW=Pherogram-View konnte nicht erstellt werden
+
+CutPherogramLeftHandler_CUT_FAILURE=Base-Call-Sequenz konnte nicht beschnitten werden
+CutPherogramRightHandler_CUT_FAILURE=Base-Call-Sequenz konnte nicht beschnitten werden
+EditSequenceHandler_COULD_NOT_OPEN=Alignment-Editor konnte nicht geöffnet werden
+HandlerTools_COULD_NOT_LOAD_ICON=Icon "%s" konnte nicht geladen werden.
+LoadPherogramHandler_AB1=AB1 Pherogramm-Dateien
+LoadPherogramHandler_ALL=Alle Dateien
+LoadPherogramHandler_ALL_FORMATS=Alle unterstützten Formate
+LoadPherogramHandler_IMPORT_PHEROGRAM=Pherogramm in Contig-Alignment importieren
+LoadPherogramHandler_SCF=SCF Pherogramm-Dateien
+LoadPherogramHandler_UNSUPPORTED_FORMAT=Nicht unterstütztes Format
+LoadPherogramHandler_UNSUPPORTED_FORMAT_FILE=Nicht unterstütztes Format
+LoadPherogramHandler_UNSUPPORTED_FORMAT_FILE_MESSAGE=IO-Fehler beim Lesen der Datei
+LoadPherogramHandler_UNSUPPORTED_FORMAT_MESSAGE=Das Format der Pherogramm-Datei "%s" wird nicht unterstützt. (Nur AB1 und SCF werden unterstützt.)
+ShowPherogramHandler_ERROR=Error
+ShowPherogramHandler_NO_PHEROGRAM=Kein Pherogramm verfügbar
+ShowPherogramHandler_NO_PHEROGRAM_MESSAGE=Der ausgewählte Read hat kein Pherogramm
+ToggleInsertOverwriteHandler_SWITCH_INSERTION=Klicken, um zum Einfügen-Modus zu wechseln
+ToggleInsertOverwriteHandler_SWITCH_OVERWRITE=Klicken, um zum Ãœberschreiben-Modus zu wechseln
+ToggleLeftRightInsertionHandler_LEFT=Links
+ToggleLeftRightInsertionHandler_RIGHT=Rechts
+ToggleLeftRightInsertionHandler_SWITCH_LEFT=Wechseln, um Pherogramm-Verzerrungen linksseitig einzufügen.
+ToggleLeftRightInsertionHandler_SWITCH_RIGHT=Wechseln, um Pherogramm-Verzerrungen rechtsseitig einzufügen.
+
+AlignmentEditorPasteHandler_CANCEL=Abbrechen
+AlignmentEditorPasteHandler_PASTE_FAILURE=Konnte mehrere Zeilen nicht einfügen
+AlignmentEditorPasteHandler_PASTE_FAILURE_MESSAGE=Die aktuelle Cursor-Auswahl (%1$d) stimmt nicht mit der Anzahl der einzufügenden Zeilen (%2$d) überein.%3$s%3$sSie können die Cursor-Auswahl entsprechend anpassen oder die Auswahl auf eine Zeile einschränken, um alle Zeilen aus dem Clipboard in die Sequenz einzufügen.
+AlignmentEditorPasteHandler_PASTING_LINES=Füge mehrere Zeilen ein
+AlignmentEditorPasteHandler_PASTING_LINES_FIRST_LINE=Füge nur die erste Zeile aus dem Clipboard ein
+AlignmentEditorPasteHandler_PASTING_LINES_IGNORE=Zeilenumbrüche ignorieren und als eine Sequenz einfügen
+AlignmentEditorPasteHandler_PASTING_LINES_QUESTION=Der einzufügende Text enthält mehrere Zeilen (%d), obwohl die aktuelle Cursor-Auswahl 1 ist. Was wollen Sie tun?
+
+CDMPherogramAlignmentObjectTranslator_NOT_IMPLEMENTED=Nicht implementiert.
+CDMSequenceMatrixAdapter_EITHER_MUST_BE_TRUE=Entweder exportConsensus oder exportSingleReads muss angewählt sein. Ansonsten sind keine Sequenzen in der Matrix enthalten.
+CDMSequenceMatrixAdapter_NO_SEQUENCE_FOUND=Sequenz mit der ID "%d" konnte nicht gefunden werden.
+SequenceIDIterator_NO_MORE_SEQUENCES=Dieser Iterator hat keine weiteren Sequenz-IDs.
+SequenceIDIterator_REMOVE_NOT_SUPPORTED=Dieser Iterator unterstützt das Entfernen von Elementen nicht.
+
+ExportSingleReadAlignmentWizard_EXPORT_SINGLE_READ=Exportiere Single-Read-Alignment
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
<classpathentry including="**/*.java" kind="src" path="src/test/java"/>
Bundle-ManifestVersion: 2
Bundle-Name: Navigation Bundle
Bundle-SymbolicName: eu.etaxonomy.taxeditor.navigation;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
Bundle-Vendor: EDIT
Export-Package: eu.etaxonomy.cdm,
eu.etaxonomy.taxeditor.navigation,
navigatorContent.name.0 = TaxonNode\r
navigatorContent.name.1 = Synonyms (experimental)\r
command.label.moveFactualData = Move factual data to another taxon\r
-command.name.moveFactualData = Move factual data
\ No newline at end of file
+command.name.moveFactualData = Move factual data\r
+command.label.setSecForSubtree = Set secundum for subtree\r
+command.name.setSecForSubtree = set secundum for subtree\r
navigatorContent.name.0 = Taxonknoten\r
navigatorContent.name.1 = Synonyme (experimentell)\r
command.label.moveFactualData = Verschiebe Faktendaten zu Taxon\r
-command.name.moveFactualData = Verschiebe Faktendaten
\ No newline at end of file
+command.name.moveFactualData = Verschiebe Faktendaten\r
+command.label.setSecForSubtree = Setze Secundum für Teilbaum\r
+command.name.setSecForSubtree = Setze Secundum für Teilbaum
\ No newline at end of file
+++ /dev/null
-SearchBar_0=Use "*" for wildcard searching\r
-SearchBar_1=Search\r
-SearchBar_2=Could not execute search\r
-SearchBar_3=Please type at least one character\r
-SearchBar_4=Error opening search result.\r
-SearchBar_6=Taxa\r
-SearchBar_7=Synonyms\r
-SearchBar_8=Names (without taxa)\r
-SearchBar_9=Common Names\r
+++ /dev/null
-SearchBar_0=Benutze "*" f\u00FCr Platzhalter-Suche\r
-SearchBar_1=Suche\r
-SearchBar_2=Suche konnte nicht ausgef\u00FChrt werden\r
-SearchBar_3=Bitte geben Sie mindestens einen Buchstaben ein\r
-SearchBar_4=Fehler beim f\u00fcffnen des Suchergebnisses\r
-SearchBar_6=Taxa\r
-SearchBar_7=Synonyme\r
-SearchBar_8=Namen (ohne Taxa)\r
-SearchBar_9=Umgangsprachliche Namen\r
p2.inf,\
OSGI-INF/l10n/bundle.properties,\
OSGI-INF/l10n/bundle_de.properties,\
- OSGI-INF/l10n/messages.properties,\
- OSGI-INF/l10n/messages_de.properties
+ src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/messages.properties,\
+ src/main/java/eu/etaxonomy/taxeditor/navigation/l10n/messages_de.properties
</reference>
</and>
</visibleWhen>
+ </command>
+ <command
+ commandId="eu.etaxonomy.taxeditor.navigator.command.update.setSecundumForSubtree"
+ label="%command.label.setSecForSubtree"
+ style="push">
+ <visibleWhen
+ checkEnabled="true">
+ <and>
+ <reference
+ definitionId="isCdmStoreConnected">
+ </reference>
+ <reference
+ definitionId="isTaxonNode">
+ </reference>
+ </and>
+ </visibleWhen>
</command>
<command
commandId="eu.etaxonomy.taxeditor.navigation.command.update.moveTaxon"
defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.ChangeAcceptedTaxonToSynonymHandler"
id="eu.etaxonomy.taxeditor.navigator.command.update.changeAcceptedToSynonym"
name="%command.name.5">
+ </command>
+ <command
+ defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.SetSecReferenceForSubtreeHandler"
+ id="eu.etaxonomy.taxeditor.navigator.command.update.setSecundumForSubtree"
+ name="%command.name.setSecForSubtree">
</command>
<command
defaultHandler="eu.etaxonomy.taxeditor.navigation.navigator.handler.NewClassificationHandler"
definitionId="isRemoting">
</reference>
</activeWhen>
+ </handler>
+ <handler
+ class="eu.etaxonomy.taxeditor.navigation.navigator.handler.SetSecReferenceForSubtreeHandler"
+ commandId="eu.etaxonomy.taxeditor.navigator.command.update.setSecundumForSubtree">
+ <activeWhen>
+ <reference
+ definitionId="isRemoting">
+ </reference>
+ </activeWhen>
</handler>
<handler
class="eu.etaxonomy.taxeditor.navigation.navigator.handler.RemotingMoveFactualDataHandler"
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>4.5.1</version>
+ <version>4.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.navigation.internal.TaxeditorNavigationPlugin;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
import eu.etaxonomy.taxeditor.newWizard.NewClassificationWizard;
import eu.etaxonomy.taxeditor.store.CdmStore;
* @version 1.0
*/
public class NavigationUtil extends AbstractUtility{
- private static IUndoContext defaultUndoContext;
+
+ private static final String NOT_IMPLEMENTED_YET = Messages.NavigationUtil_NOT_IMPLEMENTED;
+ private static final String ERROR_OPENING_THE_EDITOR = Messages.NavigationUtil_OPEN_ERROR;
+ private static IUndoContext defaultUndoContext;
/**
* <p>openEditor</p>
cdmBase = CdmStore.getService(INameService.class).load(uuidAndTitleCache.getUuid());
}
else{
- MessagingUtils.warningDialog("Unknown type", NavigationUtil.class, "There is no editor available to open this object.");
+ MessagingUtils.warningDialog(Messages.NavigationUtil_UNKNOWN_TYPE, NavigationUtil.class, Messages.NavigationUtil_UNKNOWN_TYPE_MESSAGE);
}
if(cdmBase!=null){
openEditor(cdmBase);
}
else{
- MessagingUtils.warningDialog("Cdm entity not found", NavigationUtil.class, "CDM entity could not be found in the database.");
+ MessagingUtils.warningDialog(Messages.NavigationUtil_NOT_FOUND, NavigationUtil.class, Messages.NavigationUtil_NOT_FOUND_MESSAGE);
}
}
}else if(selectedObject instanceof PolytomousKey){
EditorUtil.openPolytomousKey(entityUuid);
}else{
- MessagingUtils.warningDialog("Unsupported Type", NavigationUtil.class, "No editor exists for the current selection: " + selectedObject);
+ MessagingUtils.warningDialog(Messages.NavigationUtil_UNSUPPORTED_TYPE, NavigationUtil.class, Messages.NavigationUtil_UNSUPPORTED_TYPE_MESSAGE + selectedObject);
}
} catch (PartInitException e) {
- MessagingUtils.error(NavigationUtil.class, "Error opening the editor", e);
+ MessagingUtils.error(NavigationUtil.class, ERROR_OPENING_THE_EDITOR, e);
} catch (Exception e) {
- MessagingUtils.errorDialog("Could not create Taxon",
+ MessagingUtils.errorDialog(Messages.NavigationUtil_CREATE_FAILED,
NavigationUtil.class,
e.getMessage(), TaxeditorStorePlugin.PLUGIN_ID,
e,
private static void openInBulkEditor(ICdmBase selectedObject) {
ICommandService commandService = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
IHandlerService handlerService = (IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class);
- String openInBulkEditorCommand = "eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity";
+ String openInBulkEditorCommand = "eu.etaxonomy.taxeditor.bulkeditor.openBulkEditorForIdentifiableEntity"; //$NON-NLS-1$
Command command = commandService.getCommand(openInBulkEditorCommand);
if(command.isDefined()){
Map<String, UUID> params = new HashMap<String, UUID>();
- params.put(openInBulkEditorCommand+".uuid", ((ICdmBase) selectedObject).getUuid()); //$NON-NLS-1$
+ params.put(openInBulkEditorCommand+".uuid", selectedObject.getUuid()); //$NON-NLS-1$
ParameterizedCommand parameterizedCommand = ParameterizedCommand.generateCommand(command, params);
try {
if(parameterizedCommand!=null){
try {
EditorUtil.openEmpty(parentNodeUuid);
} catch (PartInitException e) {
- MessagingUtils.error(NavigationUtil.class, "Error opening the editor", e);
+ MessagingUtils.error(NavigationUtil.class, ERROR_OPENING_THE_EDITOR, e);
}
}
handleOpeningOfMultipleTaxa(accTaxa);
}else{
- MessagingUtils.warningDialog("Not implemented yet", NavigationUtil.class, "You chose to open a name that has no connection to a taxon. The Editor does not support editing of such a content type at the moment.");
+ MessagingUtils.warningDialog(NOT_IMPLEMENTED_YET, NavigationUtil.class, Messages.NavigationUtil_ORPHAN_NAME_MESSAGE);
}
}
openEditor(acceptedTaxa.iterator().next());
}else if(acceptedTaxa.size() > 1){
// FIXME implement a dialog that shows all possible taxa and let the user choose which he wants to open.
- MessagingUtils.warningDialog("Not implemented yet", NavigationUtil.class, "The accepted taxon is in multiple taxonomic trees. We currently do not know which one you want to open." +
- " This case is not handled yet by the software.");
+ MessagingUtils.warningDialog(NOT_IMPLEMENTED_YET, NavigationUtil.class, Messages.NavigationUtil_MULTI_TREE);
}else if(acceptedTaxa.size() == 0){
// this is an undesired state
- MessagingUtils.warningDialog("Not implemented yet", NavigationUtil.class, "This taxon is not connected to a classification. Currently editing of such taxa is not supported yet.");
+ MessagingUtils.warningDialog(NOT_IMPLEMENTED_YET, NavigationUtil.class, Messages.NavigationUtil_ORPHAN_TAXON);
}
}
openEditor(taxonNodes.iterator().next());
}else if(taxonNodes.size() > 1){
// FIXME implement a dialog that shows all possible taxa and let the user choose which he wants to open.
- MessagingUtils.warningDialog("Not implemented yet", NavigationUtil.class, "The accepted taxon is in multiple taxonomic trees. We currently do not know which one you want to open." +
- " This case is not handled yet by the software.");
+ MessagingUtils.warningDialog(NOT_IMPLEMENTED_YET, NavigationUtil.class, "The accepted taxon is in multiple taxonomic trees. We currently do not know which one you want to open. This case is not handled yet by the software.");
}else if(taxonNodes.size() == 0){
// this is an undesired state
- MessagingUtils.warningDialog("Incorrect state", NavigationUtil.class, "The accepted taxon is not in a taxonomic view. This should not have happened.");
+ MessagingUtils.warningDialog(Messages.NavigationUtil_INCORRECT_STATE, NavigationUtil.class, Messages.NavigationUtil_INCORRECT_STATE_MESSAGE);
}
}
// The plug-in ID
/** Constant <code>PLUGIN_ID="eu.etaxonomy.taxeditor.navigator"</code> */
- public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.navigator";
+ public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.navigator"; //$NON-NLS-1$
// The shared instance
private static TaxeditorNavigationPlugin plugin;
*/
package eu.etaxonomy.taxeditor.navigation.key.polytomous;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
+
/**
* @author cmathew
* @date 25 Jun 2015
*/
public interface PolytomousKeyViewLabels {
- public static final String DELETE_POLYTOMOUS_KEY_LABEL = "Delete Polytomous Key";
- public static final String UPDATE_ALL_POLYTOMOUS_KEY_NODES_LABEL = "Update All Polytomous Key Nodes";
+ public static final String DELETE_POLYTOMOUS_KEY_LABEL = Messages.PolytomousKeyViewLabels_DELETE;
+ public static final String UPDATE_ALL_POLYTOMOUS_KEY_NODES_LABEL = Messages.PolytomousKeyViewLabels_UPDATE;
- public static final String ERROR_OPENING_KEY_EDITOR_MESSAGE = "Error opening Polytomous Key Editor";
+ public static final String ERROR_OPENING_KEY_EDITOR_MESSAGE = Messages.PolytomousKeyViewLabels_OPEN_ERROR;
}
import eu.etaxonomy.taxeditor.model.DataChangeBridge;
import eu.etaxonomy.taxeditor.model.IContextListener;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
}
- public static final String ID = "eu.etaxonomy.taxeditor.navigation.key.polytomous.polytomousKeyViewPart";
+ public static final String ID = "eu.etaxonomy.taxeditor.navigation.key.polytomous.polytomousKeyViewPart"; //$NON-NLS-1$
- public static final String OPEN_COMMAND_ID = "eu.etaxonomy.taxeditor.navigation.key.polytomous.editNodes";
+ public static final String OPEN_COMMAND_ID = "eu.etaxonomy.taxeditor.navigation.key.polytomous.editNodes"; //$NON-NLS-1$
private class ContextListener extends ContextListenerAdapter{
/* (non-Javadoc)
*/
@Override
public void contextStop(IMemento memento, IProgressMonitor monitor) {
- monitor.subTask("Shutting down Polytomous Key Viewer");
+ monitor.subTask(Messages.PolytomousKeyViewPart_SHUTDOWN);
if(!viewer.getControl().isDisposed()){
viewer.setInput(null);
}
*/
@Override
public void contextStart(IMemento memento, IProgressMonitor monitor) {
- monitor.subTask("Initiating Polytomous Key Viewer");
+ monitor.subTask(Messages.PolytomousKeyViewPart_INIT);
setInput();
}
}
contextListener = new ContextListener();
CdmStore.getContextManager().addContextListener(contextListener);
- text_filter = formFactory.createText(container, "");
+ text_filter = formFactory.createText(container, ""); //$NON-NLS-1$
text_filter.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
text_filter.addModifyListener(new FilterModifyListener());
try {
handlerService.executeCommand(OPEN_COMMAND_ID, null);
} catch (NotDefinedException e) {
- throw new RuntimeException("Could not find open command: " + OPEN_COMMAND_ID);
+ throw new RuntimeException("Could not find open command: " + OPEN_COMMAND_ID); //$NON-NLS-1$
} catch (Exception e) {
- MessagingUtils.error(getClass(), "An exception occured while trying to open a selection", e);
+ MessagingUtils.error(getClass(), Messages.PolytomousKeyViewPart_EXCEPTION, e);
}
}
}
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent.EventType;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.model.AbstractDataChangeBehaviour;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
/**
* @author n.hoffmann
public class PolytomousKeyViewPartDataChangeBehavior extends
AbstractDataChangeBehaviour {
- private final PolytomousKeyViewPart source;
+ private static final String UPDATING_POLYTOMOUS_KEY_VIEWER = Messages.PolytomousKeyViewPartDataChangeBehavior_UPDATE;
+ private final PolytomousKeyViewPart source;
/**
* @param polytomousKeyViewPart
public void reactOnDataChange(CdmDataChangeMap changeEvents) {
if(isRelevant(changeEvents)){
final Display display = Display.getCurrent();
- Job job = new Job("Updating Polytomous Key Viewer") {
-
+ Job job = new Job(UPDATING_POLYTOMOUS_KEY_VIEWER) {
+
@Override
protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("Updating Polytomous Key Viewer", 3);
+ monitor.beginTask(UPDATING_POLYTOMOUS_KEY_VIEWER, 3);
monitor.worked(1);
-
+
// clear the session completely
- monitor.subTask("Clearing Polytomous Key Viewer session");
+ monitor.subTask(Messages.PolytomousKeyViewPartDataChangeBehavior_CLEAR);
display.asyncExec(new Runnable() {
- public void run() {
+ @Override
+ public void run() {
source.getConversationHolder().clear();
}
- });
- // FIXME completely clearing the session is a brute force approach.
+ });
+ // FIXME completely clearing the session is a brute force approach.
// It would be much more elegant to clear only those elements that have been changed.
// I could not get that to work but we should consider workin on this because we might
// run into serious performance issues, especially when it comes to large trees
// at least, we moved this to a job so it can run in a background thred
// seems to improve the situation but not sure if final solution
monitor.worked(1);
-
- monitor.subTask("Refreshing viewer");
-
+
+ monitor.subTask(Messages.PolytomousKeyViewPartDataChangeBehavior_REFRESH);
+
display.asyncExec(new Runnable() {
- public void run() {
+ @Override
+ public void run() {
source.refresh();
}
});
-
-
-
+
+
+
monitor.worked(1);
monitor.done();
return Status.OK_STATUS;
}
};
-
+
job.setPriority(Job.SHORT);
job.schedule();
-
+
}
}
-
+
/**
* @return
*/
for(CdmDataChangeEvent event : changeEvents.getAllEvents()){
EventType eventType = event.getEventType();
CdmBase eventEntity = event.getEntity();
-
+
// all poyltomous key changes are relevant
- if((eventType == EventType.INSERT || eventType == EventType.DELETE || eventType == EventType.UPDATE)
+ if((eventType == EventType.INSERT || eventType == EventType.DELETE || eventType == EventType.UPDATE)
&& eventEntity instanceof PolytomousKey){
return true;
}
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewPart;
import eu.etaxonomy.taxeditor.navigation.key.polytomous.operation.DeleteOperation;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
/**
*/
public class DeleteHandler extends AbstractHandler {
- /* (non-Javadoc)
+ protected static final String CONFIRM_MESSAGE = Messages.DeleteHandler_CONFIRM_MESSAGE;
+ protected static final String CONFIRM = Messages.DeleteHandler_CONFIRM;
+
+ /* (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
@Override
return null;
}
- boolean confirmation = MessagingUtils.confirmDialog("Confirm deletion", "Do you want to delete the selected key" + (keys.size() == 1 ? "" : "s") + "?");
+ boolean confirmation = MessagingUtils.confirmDialog(CONFIRM, CONFIRM_MESSAGE);
if(confirmation){
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
import eu.etaxonomy.cdm.model.description.PolytomousKey;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewPart;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
/**
* @author n.hoffmann
*/
public class EditPolytomousKeyNodesHandler extends AbstractHandler {
- /* (non-Javadoc)
+ protected static final String OPENING_POLYTOMOUS_KEYS = Messages.EditPolytomousKeyNodesHandler_OPEN_KEYS;
+
+ /* (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
PolytomousKeyViewPart view = (PolytomousKeyViewPart) NavigationUtil.getView(PolytomousKeyViewPart.ID, false);
-
- ISelection selection = view.getSite().getSelectionProvider().getSelection();
+
+ ISelection selection = view.getSite().getSelectionProvider().getSelection();
if(selection instanceof StructuredSelection){
-
+
final StructuredSelection structuredSelection = (StructuredSelection) selection;
-
- Job job = new Job("Opening Polytomous Keys"){
+
+ Job job = new Job(OPENING_POLYTOMOUS_KEYS){
@Override
protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("Opening Polytomous Keys", structuredSelection.size());
-
+ monitor.beginTask(OPENING_POLYTOMOUS_KEYS, structuredSelection.size());
+
for(final Object selectedObject : structuredSelection.toArray()){
if(selectedObject instanceof PolytomousKey){
-
+
Display.getDefault().asyncExec(new Runnable(){
@Override
- public void run() {
+ public void run() {
NavigationUtil.openEditor((PolytomousKey) selectedObject);
}
-
+
});
monitor.worked(1);
}
monitor.done();
return Status.OK_STATUS;
}
-
+
};
-
+
job.setPriority(Job.SHORT);
- job.schedule();
-
+ job.schedule();
+
}
return null;
}
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
-
import org.eclipse.swt.widgets.Display;
-
import eu.etaxonomy.cdm.model.description.PolytomousKey;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewPart;
import eu.etaxonomy.taxeditor.navigation.key.polytomous.operation.RefreshNodesOperation;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
*/
public class RefreshPolytomousKeyNodesHandler extends AbstractHandler implements IHandler {
- @Override
+ private static final String REFRESHING_POLYTOMOUS_KEY_NODES = Messages.RefreshPolytomousKeyNodesHandler_REFRESHING;
+
+ @Override
public Object execute(ExecutionEvent event) throws ExecutionException {
final PolytomousKeyViewPart view = (PolytomousKeyViewPart) NavigationUtil.getView(PolytomousKeyViewPart.ID, false);
final List<PolytomousKey> keys = view.getKeys();
-
- final String label = "Refresh Polytomous Key Nodes";
-
+
+ final String label = Messages.RefreshPolytomousKeyNodesHandler_REFRESH;
+
final IUndoContext undoContext = NavigationUtil.getUndoContext();
if (keys.size() > 0) {
- Job job = new Job("Refreshing Polytomous Key Nodes"){
-
+ Job job = new Job(REFRESHING_POLYTOMOUS_KEY_NODES){
+
@Override
protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("Refreshing Polytomous Key Nodes", keys.size());
-
-
- for (final PolytomousKey key : keys) {
+ monitor.beginTask(REFRESHING_POLYTOMOUS_KEY_NODES, keys.size());
+
+
+ for (final PolytomousKey key : keys) {
if(key.getRoot() != null) {
Display.getDefault().asyncExec(new Runnable(){
@Override
- public void run() {
+ public void run() {
AbstractPostOperation operation = new RefreshNodesOperation(label, undoContext, key, view);
NavigationUtil.executeOperation(operation);
}
return Status.CANCEL_STATUS;
}
- boolean confirmation = MessagingUtils.confirmDialog("Confirm deletaion", "Do you want to delete the selected key" + (keysToDelete.size() == 1 ? "" : "s") + "?");
+ boolean confirmation = MessagingUtils.confirmDialog(DeleteHandler.CONFIRM, DeleteHandler.CONFIRM_MESSAGE);
if(!confirmation) {
return Status.CANCEL_STATUS;
final StructuredSelection structuredSelection = (StructuredSelection) selection;
- Job job = new Job("Opening Polytomous Keys"){
+ Job job = new Job(EditPolytomousKeyNodesHandler.OPENING_POLYTOMOUS_KEYS){
@Override
protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("Opening Polytomous Keys", structuredSelection.size());
+ monitor.beginTask(EditPolytomousKeyNodesHandler.OPENING_POLYTOMOUS_KEYS, structuredSelection.size());
for(final Object selectedObject : structuredSelection.toArray()){
if(selectedObject instanceof PolytomousKey){
import eu.etaxonomy.cdm.api.service.DeleteResult;
import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
DeleteResult result = CdmStore.getService(IPolytomousKeyService.class).delete(key);
if (result.isError() && !result.getExceptions().isEmpty()){
- MessageDialog.openError(null, "Delete failed", result.getExceptions().iterator().next().getMessage());
+ MessageDialog.openError(null, Messages.DeleteOperation_FAILED, result.getExceptions().iterator().next().getMessage());
}else if(result.isAbort()){
- MessageDialog.openWarning(null, "Delete abort", "The object could not be deleted, maybe there was no object selected.");
+ MessageDialog.openWarning(null, Messages.DeleteOperation_ABORT, Messages.DeleteOperation_ABORT_MESSAGE);
}
return postExecute(null);
import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
import eu.etaxonomy.cdm.api.service.UpdateResult;
import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
import eu.etaxonomy.taxeditor.store.CdmStore;
*/
public class RemotingDeletePolytomousKeyOperation extends RemotingCdmUpdateOperation {
- private final static String LABEL = "Delete Polytomous Key operation";
+ private final static String LABEL = Messages.RemotingDeletePolytomousKeyOperation_DELETE_OP;
private final List<UUID> keysToDelete;
/**
import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
import eu.etaxonomy.cdm.api.service.IPolytomousKeyService;
import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
import eu.etaxonomy.taxeditor.store.CdmStore;
this.polytomousKeyUuid = null;
}
- private final static String LABEL = "Update All Polytomous Key Nodes operation";
+ private final static String LABEL = Messages.RemotingUpdatePolytomousKeyAllNodesOperation_UPDATE_OP;
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation#doUpdateExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
--- /dev/null
+/**
+ * Copyright (C) 2014 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
+package eu.etaxonomy.taxeditor.navigation.l10n;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author d.schild
+ * @date 18.06.2014
+ *
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "src/main/java/eu.etaxonomy.taxeditor.navigation.l10n.messages"; //$NON-NLS-1$
+ public static String ChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON;
+ public static String ChangeAcceptedTaxonToSynonymHandler_CREATE_FAILED;
+ public static String ChangeAcceptedTaxonToSynonymHandler_MOVE_SYNONYMY;
+ public static String ChangeAcceptedTaxonToSynonymHandler_MOVE_SYNONYMY_MESSAGE;
+ public static String ChangeAcceptedTaxonToSynonymHandler_PREREQUISITE;
+ public static String ChangeAcceptedTaxonToSynonymHandler_PREREQUISITE_MESSAGE;
+ public static String ChangeAcceptedTaxonToSynonymOperation_CREATE_FAIL;
+ public static String ChangeAcceptedTaxonToSynonymOperation_CREATE_SUCCESS;
+ public static String ChangeAcceptedTaxonToSynonymOperation_OP_FAIL;
+ public static String ClassificationLabelProvider_UNNAMED_TREE;
+ public static String CloneClassificationHandler_CLONE_CLASSIFICATION;
+ public static String CreateClassificationHierarchyHandler_CREATE_HIERARCHY;
+ public static String CreateClassificationHierarchyHandler_FAILED;
+ public static String CreateClassificationHierarchyHandler_FAILED_MESSAGE;
+ public static String CreateNewTaxonHierarchyOperation_ADD_HIERARCHY;
+ public static String CreateNewTaxonHierarchyOperation_ADD_HIERARCHY_MESSAGE;
+ public static String CreateTaxonNode_CREATE_FAILED;
+ public static String DeleteHandler_9;
+ public static String DeleteHandler_CONFIRM;
+ public static String DeleteHandler_CONFIRM_DELETE;
+ public static String DeleteHandler_CONFIRM_MESSAGE;
+ public static String DeleteHandler_DELETE_ALL;
+ public static String DeleteHandler_DELETE_CLASSIFICATION;
+ public static String DeleteHandler_DELETE_NODE;
+ public static String DeleteHandler_MOVE_TO_PARENT;
+ public static String DeleteHandler_SKIP;
+ public static String DeleteHandler_THERE_ARE_CHILDNODES;
+ public static String DeleteHandler_THERE_ARE_CHILDREN;
+ public static String DeleteOperation_ABORT;
+ public static String DeleteOperation_ABORT_MESSAGE;
+ public static String DeleteOperation_DELETE_FAIL;
+ public static String DeleteOperation_DELETE_SUCCESS;
+ public static String DeleteOperation_FAILED;
+ public static String EditPolytomousKeyNodesHandler_OPEN_KEYS;
+ public static String MoveFactualDataHandler_CHOOSE_TAXON;
+ public static String MoveFactualDataHandler_CREATE_FAILED;
+ public static String MoveFactualDataHandler_UNSAVED_SOURCE;
+ public static String MoveFactualDataHandler_UNSAVED_SOURCE_MESSAGE;
+ public static String MoveFactualDataHandler_UNSAVED_TARGET;
+ public static String MoveFactualDataHandler_UNSAVED_TARGET_MESSAGE;
+ public static String MoveTaxonHandler_CHOOSE_ABOVE;
+ public static String MoveTaxonHandler_CHOOSE_PARENT;
+ public static String MoveTaxonHandler_MOVE_TO_PARENT;
+ public static String MoveTaxonHandler_TARGET_NODE;
+ public static String MoveTaxonHandler_TARGET_NODE_MESSAGE;
+ public static String MoveTaxonHandler_UNSAVED_PARENT;
+ public static String MoveTaxonHandler_UNSAVED_PARENT_MESSAGE;
+ public static String MoveTaxonOperation_NOT_IMPLEMENTED;
+ public static String NavigationUtil_CREATE_FAILED;
+ public static String NavigationUtil_INCORRECT_STATE;
+ public static String NavigationUtil_INCORRECT_STATE_MESSAGE;
+ public static String NavigationUtil_MULTI_TREE;
+ public static String NavigationUtil_NOT_FOUND;
+ public static String NavigationUtil_NOT_FOUND_MESSAGE;
+ public static String NavigationUtil_NOT_IMPLEMENTED;
+ public static String NavigationUtil_OPEN_ERROR;
+ public static String NavigationUtil_ORPHAN_NAME_MESSAGE;
+ public static String NavigationUtil_ORPHAN_TAXON;
+ public static String NavigationUtil_UNKNOWN_TYPE;
+ public static String NavigationUtil_UNKNOWN_TYPE_MESSAGE;
+ public static String NavigationUtil_UNSUPPORTED_TYPE;
+ public static String NavigationUtil_UNSUPPORTED_TYPE_MESSAGE;
+ public static String PolytomousKeyViewLabels_DELETE;
+ public static String PolytomousKeyViewLabels_OPEN_ERROR;
+ public static String PolytomousKeyViewLabels_UPDATE;
+ public static String PolytomousKeyViewPart_EXCEPTION;
+ public static String PolytomousKeyViewPart_INIT;
+ public static String PolytomousKeyViewPart_SHUTDOWN;
+ public static String PolytomousKeyViewPartDataChangeBehavior_CLEAR;
+ public static String PolytomousKeyViewPartDataChangeBehavior_REFRESH;
+ public static String PolytomousKeyViewPartDataChangeBehavior_UPDATE;
+ public static String RefreshPolytomousKeyNodesHandler_REFRESH;
+ public static String RefreshPolytomousKeyNodesHandler_REFRESHING;
+ public static String RemotingChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON;
+ public static String RemotingChangeAcceptedTaxonToSynonymOperation_CHANGE_OP;
+ public static String RemotingDeletePolytomousKeyOperation_DELETE_OP;
+ public static String RemotingDeleteTaxonNodeHandler_NODE_DELETED;
+ public static String RemotingDeleteTaxonNodeHandler_NODE_DELETED_MESSAGE;
+ public static String RemotingDeleteTaxonNodeOperation_DELETE_OP;
+ public static String RemotingMoveFactualDataHandler_CHOOSE_TAXA;
+ public static String RemotingMoveFactualDataHandler_CREATE_FAILED;
+ public static String RemotingMoveFactualDataOperation_MOVE_OP;
+ public static String RemotingMoveTaxonNodeHandler_BEHIND;
+ public static String RemotingMoveTaxonNodeHandler_CANCEL;
+ public static String RemotingMoveTaxonNodeHandler_CHILD;
+ public static String RemotingMoveTaxonNodeHandler_CHOOSE_PARENT;
+ public static String RemotingMoveTaxonNodeHandler_CHOOSE_TAXON;
+ public static String RemotingMoveTaxonNodeHandler_TARGET_NODE;
+ public static String RemotingMoveTaxonNodeHandler_TARGET_NODE_MESSAGE;
+ public static String RemotingMoveTaxonNodeHandler_UNSAVED_PARENT;
+ public static String RemotingMoveTaxonNodeHandler_UNSAVED_PARENT_MESSAGE;
+ public static String RemotingMoveTaxonOperation_MOVE_OP;
+ public static String RemotingUpdatePolytomousKeyAllNodesOperation_UPDATE_OP;
+ public static String Root_CREATE_CLASSIFICATION;
+ public static String Root_MY_CLASSIFICATION;
+ public static String SearchBar_0;
+ public static String SearchBar_1;
+ public static String SearchBar_2;
+ public static String SearchBar_3;
+ public static String SearchBar_4;
+ public static String SearchBar_6;
+ public static String SearchBar_7;
+ public static String SearchBar_8;
+ public static String SearchBar_9;
+ public static String SearchResultLabelProvider_NAME;
+ public static String SearchResultLabelProvider_SYNONYM;
+ public static String SearchResultLabelProvider_TAXON;
+ public static String SearchResultView_CANCELLED;
+ public static String SearchResultView_CNT_ENTITIES_FOUND;
+ public static String SearchResultView_NO_RESULTS;
+ public static String SearchResultView_PERFORMING_SEARCH;
+ public static String SearchResultView_REMOVE_SEARCH_RESULTS;
+ public static String SearchResultView_SEARCH;
+ public static String SearchResultView_SEARCH_FOR;
+ public static String SearchResultView_SEARCH_STRING;
+ public static String SearchResultView_SEARCHING;
+ public static String SearchResultView_STATUS;
+ public static String SetSecundumForSubtreeOperation_CHANGE_SEC_OP;
+ public static String SetSecundumForSubtreeOperation_SET_SEC_TASK;
+ public static String TaxonLinkHelper_CREATE_FAIL;
+
+ public static String TaxonNavigator_LOAD_DATASOURCE;
+ public static String TaxonNavigator_RESTORE;
+ public static String TaxonNavigator_SAVE_TASK;
+ public static String TaxonNavigator_TAXON_TREE;
+
+ public static String TaxonNavigatorDataChangeBehavior_CLEAR_SESSION;
+ public static String TaxonNavigatorDataChangeBehavior_REFRESH_VIEWER;
+ public static String TaxonNavigatorDataChangeBehavior_UPDATE_NAVIGATOR;
+ public static String TaxonNavigatorLabels_CHANGE_ACC_TAXON;
+ public static String TaxonNavigatorLabels_CLOSE_IMPOSSIBLE;
+ public static String TaxonNavigatorLabels_DELETE_TAXON;
+
+ public static String TaxonNavigatorLabels_MOVE_FACTUAL_DATA;
+ public static String TaxonNavigatorLabels_MOVE_TAXON;
+ public static String TaxonNavigatorLabels_NO_CHILDREN_ALLOWED;
+ public static String TaxonNavigatorLabels_NOT_A_NODE;
+ public static String TaxonNavigatorLabels_NOT_TAXON_SELECTED;
+ public static String TaxonNavigatorLabels_ONLY_SINGLE_TAXON;
+ public static String TaxonNavigatorLabels_SET_SEC_FOR_CHILDREN;
+ public static String TaxonNavigatorLabels_UNSAVED_CHANGES;
+
+ public static String TaxonNodeLabelProvider_NO_TAXON;
+ public static String TaxonNodeLabelProvider_NODE_WITH_NO_TAXON;
+ public static String TaxonNodeLabelProvider_TAXON;
+
+ public static String TreeNodeDropAdapter_10;
+ public static String TreeNodeDropAdapter_BEHIND;
+ public static String TreeNodeDropAdapter_CANCEL;
+ public static String TreeNodeDropAdapter_CHILD;
+ public static String TreeNodeDropAdapter_MOVE_BEHIND;
+ public static String TreeNodeDropAdapter_MOVE_TAXON;
+ public static String TreeNodeDropAdapter_MOVING;
+ public static String TreeNodeDropAdapter_MOVING_MESSAGE;
+ public static String TreeNodeDropAdapter_TARGET_NODE;
+ public static String TreeNodeDropAdapter_UNSAVED_PARENT;
+ public static String TreeNodeDropAdapter_UNSAVED_PARENT_MESSAGE;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
--- /dev/null
+ChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON=Choose the accepted taxon
+ChangeAcceptedTaxonToSynonymHandler_CREATE_FAILED=Could not create Taxon
+ChangeAcceptedTaxonToSynonymHandler_MOVE_SYNONYMY=Moving to synonymy
+ChangeAcceptedTaxonToSynonymHandler_MOVE_SYNONYMY_MESSAGE=The operation move accepted taxon to synonymy is available only for a single taxon.
+ChangeAcceptedTaxonToSynonymHandler_PREREQUISITE=Prerequisite not met
+ChangeAcceptedTaxonToSynonymHandler_PREREQUISITE_MESSAGE=The accepted taxon must not have any childen. You need to move all childen to another taxon node in the TaxonNavigator before attempting to turn the accepted taxon into a synonym.
+ChangeAcceptedTaxonToSynonymOperation_CREATE_FAIL=Synonym creation not possible
+ChangeAcceptedTaxonToSynonymOperation_CREATE_SUCCESS=Synonym created but taxon deletion not possible.
+ChangeAcceptedTaxonToSynonymOperation_OP_FAIL=Operation failed
+ClassificationLabelProvider_UNNAMED_TREE=Unnamed Taxonomic Tree
+CloneClassificationHandler_CLONE_CLASSIFICATION=Clone classification
+CreateClassificationHierarchyHandler_CREATE_HIERARCHY=Create Taxon Hierarchy
+CreateClassificationHierarchyHandler_FAILED=Failed to open Editor
+CreateClassificationHierarchyHandler_FAILED_MESSAGE=Could not open distribution view. The hierarchy is corrupted\!
+CreateNewTaxonHierarchyOperation_ADD_HIERARCHY=Add Hierarchy successful
+CreateNewTaxonHierarchyOperation_ADD_HIERARCHY_MESSAGE=New classification is %s\nCreated Genus: %d\nCreated Subspecies: %d
+CreateTaxonNode_CREATE_FAILED=Could not create taxon node
+DeleteHandler_9=Command name not set
+DeleteHandler_CONFIRM=Confirm deletion
+DeleteHandler_CONFIRM_DELETE=Confirm Deletion
+DeleteHandler_CONFIRM_MESSAGE=Do you want to delete the selected key(s)?
+DeleteHandler_DELETE_ALL=Delete all children
+DeleteHandler_DELETE_CLASSIFICATION=Do you really want to delete the classification?
+DeleteHandler_DELETE_NODE=Do you really want to delete the selected node(s)?
+DeleteHandler_MOVE_TO_PARENT=Move children to parent node
+DeleteHandler_SKIP=Skip
+DeleteHandler_THERE_ARE_CHILDNODES=\ There are childnodes, which will be deleted, too.
+DeleteHandler_THERE_ARE_CHILDREN=\ The tree has children, they will be deleted, too.
+DeleteOperation_ABORT=Delete abort
+DeleteOperation_ABORT_MESSAGE=The object could not be deleted, maybe there was no object selected.
+DeleteOperation_DELETE_FAIL=TaxonNode could not be deleted.
+DeleteOperation_DELETE_SUCCESS=TaxonNode was successfully deleted, but related object(s) could not be deleted
+DeleteOperation_FAILED=Delete failed
+EditPolytomousKeyNodesHandler_OPEN_KEYS=Opening Polytomous Keys
+MoveFactualDataHandler_CHOOSE_TAXON=Choose the accepted taxon
+MoveFactualDataHandler_CREATE_FAILED=Could not create Taxon
+MoveFactualDataHandler_UNSAVED_SOURCE=Unsaved Source Taxon
+MoveFactualDataHandler_UNSAVED_SOURCE_MESSAGE=There are unsaved changes in the source taxon. Please save first.
+MoveFactualDataHandler_UNSAVED_TARGET=Unsaved Target Taxon
+MoveFactualDataHandler_UNSAVED_TARGET_MESSAGE=There are unsaved changes in the target taxon. Please save first.
+MoveTaxonHandler_CHOOSE_ABOVE=Choose the taxon above the moved taxon.
+MoveTaxonHandler_CHOOSE_PARENT=Choose new parent
+MoveTaxonHandler_MOVE_TO_PARENT=Move taxon to new parent
+MoveTaxonHandler_TARGET_NODE=Target node
+MoveTaxonHandler_TARGET_NODE_MESSAGE=The choosen target node should be the parent?
+MoveTaxonHandler_UNSAVED_PARENT=Unsaved Parent Taxon
+MoveTaxonHandler_UNSAVED_PARENT_MESSAGE=There are unsaved changes in the parent taxon. Please save first.
+MoveTaxonOperation_NOT_IMPLEMENTED=Not implemented yet.
+NavigationUtil_CREATE_FAILED=Could not create Taxon
+NavigationUtil_INCORRECT_STATE=Incorrect state
+NavigationUtil_INCORRECT_STATE_MESSAGE=The accepted taxon is not in a taxonomic view. This should not have happened.
+NavigationUtil_MULTI_TREE=The accepted taxon is in multiple taxonomic trees. We currently do not know which one you want to open. This case is not handled yet by the software.
+NavigationUtil_NOT_FOUND=Cdm entity not found
+NavigationUtil_NOT_FOUND_MESSAGE=CDM entity could not be found in the database.
+NavigationUtil_NOT_IMPLEMENTED=Not implemented yet
+NavigationUtil_OPEN_ERROR=Error opening the editor
+NavigationUtil_ORPHAN_NAME_MESSAGE=You chose to open a name that has no connection to a taxon. The Editor does not support editing of such a content type at the moment.
+NavigationUtil_ORPHAN_TAXON=This taxon is not connected to a classification. Currently editing of such taxa is not supported yet.
+NavigationUtil_UNKNOWN_TYPE=Unknown type
+NavigationUtil_UNKNOWN_TYPE_MESSAGE=There is no editor available to open this object.
+NavigationUtil_UNSUPPORTED_TYPE=Unsupported Type
+NavigationUtil_UNSUPPORTED_TYPE_MESSAGE=No editor exists for the current selection:
+PolytomousKeyViewLabels_DELETE=Delete Polytomous Key
+PolytomousKeyViewLabels_OPEN_ERROR=Error opening Polytomous Key Editor
+PolytomousKeyViewLabels_UPDATE=Update All Polytomous Key Nodes
+PolytomousKeyViewPart_EXCEPTION=An exception occured while trying to open a selection
+PolytomousKeyViewPart_INIT=Initiating Polytomous Key Viewer
+PolytomousKeyViewPart_SHUTDOWN=Shutting down Polytomous Key Viewer
+PolytomousKeyViewPartDataChangeBehavior_CLEAR=Clearing Polytomous Key Viewer session
+PolytomousKeyViewPartDataChangeBehavior_REFRESH=Refreshing viewer
+PolytomousKeyViewPartDataChangeBehavior_UPDATE=Updating Polytomous Key Viewer
+RefreshPolytomousKeyNodesHandler_REFRESH=Refresh Polytomous Key Nodes
+RefreshPolytomousKeyNodesHandler_REFRESHING=Refreshing Polytomous Key Nodes
+RemotingChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON=Choose the accepted taxon
+RemotingChangeAcceptedTaxonToSynonymOperation_CHANGE_OP=Change Accepted Taxon to Synonym operation
+RemotingDeletePolytomousKeyOperation_DELETE_OP=Delete Polytomous Key operation
+RemotingDeleteTaxonNodeHandler_NODE_DELETED=Node already deleted
+RemotingDeleteTaxonNodeHandler_NODE_DELETED_MESSAGE=The taxon node was already deleted. Please reopen the taxon navigator to refresh the view.
+RemotingDeleteTaxonNodeOperation_DELETE_OP=Delete Taxon Node operation
+RemotingMoveFactualDataHandler_CHOOSE_TAXA=Choose the accepted taxon
+RemotingMoveFactualDataHandler_CREATE_FAILED=Could not create Taxon
+RemotingMoveFactualDataOperation_MOVE_OP=Move Factual Data operation
+RemotingMoveTaxonNodeHandler_BEHIND=Behind
+RemotingMoveTaxonNodeHandler_CANCEL=Cancel
+RemotingMoveTaxonNodeHandler_CHILD=Child
+RemotingMoveTaxonNodeHandler_CHOOSE_PARENT=Choose new parent
+RemotingMoveTaxonNodeHandler_CHOOSE_TAXON=Choose the taxon above the moved taxon.
+RemotingMoveTaxonNodeHandler_TARGET_NODE=Target node
+RemotingMoveTaxonNodeHandler_TARGET_NODE_MESSAGE=Do you want to move the Taxonnode as child or behind the target node.
+RemotingMoveTaxonNodeHandler_UNSAVED_PARENT=Unsaved Parent Taxon
+RemotingMoveTaxonNodeHandler_UNSAVED_PARENT_MESSAGE=There are unsaved changes in the parent taxon. Please save first.
+RemotingMoveTaxonOperation_MOVE_OP=Move Taxon operation
+RemotingUpdatePolytomousKeyAllNodesOperation_UPDATE_OP=Update All Polytomous Key Nodes operation
+Root_CREATE_CLASSIFICATION=Creating initial classification
+Root_MY_CLASSIFICATION=My Classification
+SearchBar_0=Use "*" for wildcard searching
+SearchBar_1=Search
+SearchBar_2=Could not execute search
+SearchBar_3=Please type at least one character
+SearchBar_4=Error opening search result.
+SearchBar_6=Taxa
+SearchBar_7=Synonyms
+SearchBar_8=Names (without taxa)
+SearchBar_9=Common Names
+SearchResultLabelProvider_NAME=Name:
+SearchResultLabelProvider_SYNONYM=Synonym:
+SearchResultLabelProvider_TAXON=Taxon:
+SearchResultView_CANCELLED=Cancelled
+SearchResultView_CNT_ENTITIES_FOUND=%d entities found
+SearchResultView_NO_RESULTS=Search returned no results
+SearchResultView_PERFORMING_SEARCH=Performing Search
+SearchResultView_REMOVE_SEARCH_RESULTS=Getting rid of search results
+SearchResultView_SEARCH=Search: '%s'
+SearchResultView_SEARCH_FOR=Search for:
+SearchResultView_SEARCH_STRING=Search String:
+SearchResultView_SEARCHING=Searching...
+SearchResultView_STATUS=Status:
+SetSecundumForSubtreeOperation_CHANGE_SEC_OP=Change secundum reference for all children
+SetSecundumForSubtreeOperation_SET_SEC_TASK=Set secundum reference for subtree
+TaxonLinkHelper_CREATE_FAIL=Could not create Taxon
+TaxonNavigator_LOAD_DATASOURCE=Loading datasources
+TaxonNavigator_RESTORE=Restoring Taxon Navigator
+TaxonNavigator_SAVE_TASK=Saving Taxon Navigator State
+TaxonNavigator_TAXON_TREE=Taxonomic Tree
+TaxonNavigatorDataChangeBehavior_CLEAR_SESSION=Clearing Taxon Navigators session
+TaxonNavigatorDataChangeBehavior_REFRESH_VIEWER=Refreshing viewer
+TaxonNavigatorDataChangeBehavior_UPDATE_NAVIGATOR=Updating Taxon Navigator
+TaxonNavigatorLabels_CHANGE_ACC_TAXON=Change Accepted Taxon to Synonym
+TaxonNavigatorLabels_CLOSE_IMPOSSIBLE=Could not close related taxon name editor. Please close it manually and try again.
+TaxonNavigatorLabels_DELETE_TAXON=Delete Taxon Node
+TaxonNavigatorLabels_MOVE_FACTUAL_DATA=Move Factual Data
+TaxonNavigatorLabels_MOVE_TAXON=Move Taxon
+TaxonNavigatorLabels_NO_CHILDREN_ALLOWED=The chosen taxon must not have any childen. You need to move all childen to another taxon node in the TaxonNavigator before attempting to turn the accepted taxon into a synonym.
+TaxonNavigatorLabels_NOT_A_NODE=Selected object is not a taxon tree node
+TaxonNavigatorLabels_NOT_TAXON_SELECTED=No taxon tree node selected for operation.
+TaxonNavigatorLabels_ONLY_SINGLE_TAXON=The chosen operation is available only for a single taxon.
+TaxonNavigatorLabels_SET_SEC_FOR_CHILDREN=Set new Secundum Reference for all children.
+TaxonNavigatorLabels_UNSAVED_CHANGES=There are unsaved changes in the source taxon. Please save first.
+TaxonNodeLabelProvider_NO_TAXON=>NO TAXON<
+TaxonNodeLabelProvider_NODE_WITH_NO_TAXON=The taxon node does not have a taxon attached to it. Please check your import. TaxonNode: %s
+TaxonNodeLabelProvider_TAXON=Taxon:
+TreeNodeDropAdapter_10=\
+TreeNodeDropAdapter_BEHIND=Behind
+TreeNodeDropAdapter_CANCEL=Cancel
+TreeNodeDropAdapter_CHILD=Child
+TreeNodeDropAdapter_MOVE_BEHIND=Do you want to move the Taxonnode as child or behind the target node.
+TreeNodeDropAdapter_MOVE_TAXON=Move Taxon
+TreeNodeDropAdapter_MOVING=Moving taxon
+TreeNodeDropAdapter_MOVING_MESSAGE=The operation move accepted taxon to other parent is available only for a single taxon.
+TreeNodeDropAdapter_TARGET_NODE=Target node
+TreeNodeDropAdapter_UNSAVED_PARENT=Unsaved Parent Taxon
+TreeNodeDropAdapter_UNSAVED_PARENT_MESSAGE=There are unsaved changes in the parent taxon. Pleas save first.
--- /dev/null
+ChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON=Choose the accepted taxon
+ChangeAcceptedTaxonToSynonymHandler_CREATE_FAILED=Could not create Taxon
+ChangeAcceptedTaxonToSynonymHandler_MOVE_SYNONYMY=Moving to synonymy
+ChangeAcceptedTaxonToSynonymHandler_MOVE_SYNONYMY_MESSAGE=The operation move accepted taxon to synonymy is available only for a single taxon.
+ChangeAcceptedTaxonToSynonymHandler_PREREQUISITE=Prerequisite not met
+ChangeAcceptedTaxonToSynonymHandler_PREREQUISITE_MESSAGE=The accepted taxon must not have any childen. You need to move all childen to another taxon node in the TaxonNavigator before attempting to turn the accepted taxon into a synonym.
+ChangeAcceptedTaxonToSynonymOperation_CREATE_FAIL=Synonym creation not possible
+ChangeAcceptedTaxonToSynonymOperation_CREATE_SUCCESS=Synonym created but taxon deletion not possible.
+ChangeAcceptedTaxonToSynonymOperation_OP_FAIL=Operation failed
+ClassificationLabelProvider_UNNAMED_TREE=Unnamed Taxonomic Tree
+CloneClassificationHandler_CLONE_CLASSIFICATION=Clone classification
+CreateClassificationHierarchyHandler_CREATE_HIERARCHY=Create Taxon Hierarchy
+CreateClassificationHierarchyHandler_FAILED=Failed to open Editor
+CreateClassificationHierarchyHandler_FAILED_MESSAGE=Could not open distribution view. The hierarchy is corrupted\!
+CreateNewTaxonHierarchyOperation_ADD_HIERARCHY=Add Hierarchy successful
+CreateNewTaxonHierarchyOperation_ADD_HIERARCHY_MESSAGE=New classification is %s\nCreated Genus: %d\nCreated Subspecies: %d
+CreateTaxonNode_CREATE_FAILED=Could not create taxon node
+DeleteHandler_9=Command name not set
+DeleteHandler_CONFIRM=Confirm deletion
+DeleteHandler_CONFIRM_DELETE=Confirm Deletion
+DeleteHandler_CONFIRM_MESSAGE=Do you want to delete the selected key(s)?
+DeleteHandler_DELETE_ALL=Delete all children
+DeleteHandler_DELETE_CLASSIFICATION=Do you really want to delete the classification?
+DeleteHandler_DELETE_NODE=Do you really want to delete the selected node(s)?
+DeleteHandler_MOVE_TO_PARENT=Move children to parent node
+DeleteHandler_SKIP=Skip
+DeleteHandler_THERE_ARE_CHILDNODES=\ There are childnodes, which will be deleted, too.
+DeleteHandler_THERE_ARE_CHILDREN=\ The tree has children, they will be deleted, too.
+DeleteOperation_ABORT=Delete abort
+DeleteOperation_ABORT_MESSAGE=The object could not be deleted, maybe there was no object selected.
+DeleteOperation_DELETE_FAIL=TaxonNode could not be deleted.
+DeleteOperation_DELETE_SUCCESS=TaxonNode was successfully deleted, but related object(s) could not be deleted
+DeleteOperation_FAILED=Delete failed
+EditPolytomousKeyNodesHandler_OPEN_KEYS=Opening Polytomous Keys
+MoveFactualDataHandler_CHOOSE_TAXON=Choose the accepted taxon
+MoveFactualDataHandler_CREATE_FAILED=Could not create Taxon
+MoveFactualDataHandler_UNSAVED_SOURCE=Unsaved Source Taxon
+MoveFactualDataHandler_UNSAVED_SOURCE_MESSAGE=There are unsaved changes in the source taxon. Please save first.
+MoveFactualDataHandler_UNSAVED_TARGET=Unsaved Target Taxon
+MoveFactualDataHandler_UNSAVED_TARGET_MESSAGE=There are unsaved changes in the target taxon. Please save first.
+MoveTaxonHandler_CHOOSE_ABOVE=Choose the taxon above the moved taxon.
+MoveTaxonHandler_CHOOSE_PARENT=Choose new parent
+MoveTaxonHandler_MOVE_TO_PARENT=Move taxon to new parent
+MoveTaxonHandler_TARGET_NODE=Target node
+MoveTaxonHandler_TARGET_NODE_MESSAGE=The choosen target node should be the parent?
+MoveTaxonHandler_UNSAVED_PARENT=Unsaved Parent Taxon
+MoveTaxonHandler_UNSAVED_PARENT_MESSAGE=There are unsaved changes in the parent taxon. Please save first.
+MoveTaxonOperation_NOT_IMPLEMENTED=Not implemented yet.
+NavigationUtil_CREATE_FAILED=Could not create Taxon
+NavigationUtil_INCORRECT_STATE=Incorrect state
+NavigationUtil_INCORRECT_STATE_MESSAGE=The accepted taxon is not in a taxonomic view. This should not have happened.
+NavigationUtil_MULTI_TREE=The accepted taxon is in multiple taxonomic trees. We currently do not know which one you want to open. This case is not handled yet by the software.
+NavigationUtil_NOT_FOUND=Cdm entity not found
+NavigationUtil_NOT_FOUND_MESSAGE=CDM entity could not be found in the database.
+NavigationUtil_NOT_IMPLEMENTED=Not implemented yet
+NavigationUtil_OPEN_ERROR=Error opening the editor
+NavigationUtil_ORPHAN_NAME_MESSAGE=You chose to open a name that has no connection to a taxon. The Editor does not support editing of such a content type at the moment.
+NavigationUtil_ORPHAN_TAXON=This taxon is not connected to a classification. Currently editing of such taxa is not supported yet.
+NavigationUtil_UNKNOWN_TYPE=Unknown type
+NavigationUtil_UNKNOWN_TYPE_MESSAGE=There is no editor available to open this object.
+NavigationUtil_UNSUPPORTED_TYPE=Unsupported Type
+NavigationUtil_UNSUPPORTED_TYPE_MESSAGE=No editor exists for the current selection:
+PolytomousKeyViewLabels_DELETE=Delete Polytomous Key
+PolytomousKeyViewLabels_OPEN_ERROR=Error opening Polytomous Key Editor
+PolytomousKeyViewLabels_UPDATE=Update All Polytomous Key Nodes
+PolytomousKeyViewPart_EXCEPTION=An exception occured while trying to open a selection
+PolytomousKeyViewPart_INIT=Initiating Polytomous Key Viewer
+PolytomousKeyViewPart_SHUTDOWN=Shutting down Polytomous Key Viewer
+PolytomousKeyViewPartDataChangeBehavior_CLEAR=Clearing Polytomous Key Viewer session
+PolytomousKeyViewPartDataChangeBehavior_REFRESH=Refreshing viewer
+PolytomousKeyViewPartDataChangeBehavior_UPDATE=Updating Polytomous Key Viewer
+RefreshPolytomousKeyNodesHandler_REFRESH=Refresh Polytomous Key Nodes
+RefreshPolytomousKeyNodesHandler_REFRESHING=Refreshing Polytomous Key Nodes
+RemotingChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON=Choose the accepted taxon
+RemotingChangeAcceptedTaxonToSynonymOperation_CHANGE_OP=Change Accepted Taxon to Synonym operation
+RemotingDeletePolytomousKeyOperation_DELETE_OP=Delete Polytomous Key operation
+RemotingDeleteTaxonNodeHandler_NODE_DELETED=Node already deleted
+RemotingDeleteTaxonNodeHandler_NODE_DELETED_MESSAGE=The taxon node was already deleted. Please reopen the taxon navigator to refresh the view.
+RemotingDeleteTaxonNodeOperation_DELETE_OP=Delete Taxon Node operation
+RemotingMoveFactualDataHandler_CHOOSE_TAXA=Choose the accepted taxon
+RemotingMoveFactualDataHandler_CREATE_FAILED=Could not create Taxon
+RemotingMoveFactualDataOperation_MOVE_OP=Move Factual Data operation
+RemotingMoveTaxonNodeHandler_BEHIND=Behind
+RemotingMoveTaxonNodeHandler_CANCEL=Cancel
+RemotingMoveTaxonNodeHandler_CHILD=Child
+RemotingMoveTaxonNodeHandler_CHOOSE_PARENT=Choose new parent
+RemotingMoveTaxonNodeHandler_CHOOSE_TAXON=Choose the taxon above the moved taxon.
+RemotingMoveTaxonNodeHandler_TARGET_NODE=Target node
+RemotingMoveTaxonNodeHandler_TARGET_NODE_MESSAGE=Do you want to move the Taxonnode as child or behind the target node.
+RemotingMoveTaxonNodeHandler_UNSAVED_PARENT=Unsaved Parent Taxon
+RemotingMoveTaxonNodeHandler_UNSAVED_PARENT_MESSAGE=There are unsaved changes in the parent taxon. Please save first.
+RemotingMoveTaxonOperation_MOVE_OP=Move Taxon operation
+RemotingUpdatePolytomousKeyAllNodesOperation_UPDATE_OP=Update All Polytomous Key Nodes operation
+Root_CREATE_CLASSIFICATION=Creating initial classification
+Root_MY_CLASSIFICATION=My Classification
+SearchBar_0=Benutze "*" f\u00FCr Platzhalter-Suche
+SearchBar_1=Suche
+SearchBar_2=Suche konnte nicht ausgef\u00FChrt werden
+SearchBar_3=Bitte geben Sie mindestens einen Buchstaben ein
+SearchBar_4=Fehler beim f\u00fcffnen des Suchergebnisses
+SearchBar_6=Taxa
+SearchBar_7=Synonyme
+SearchBar_8=Namen (ohne Taxa)
+SearchBar_9=Umgangsprachliche Namen
+SearchResultLabelProvider_NAME=Name:
+SearchResultLabelProvider_SYNONYM=Synonym:
+SearchResultLabelProvider_TAXON=Taxon:
+SearchResultView_CANCELLED=Cancelled
+SearchResultView_CNT_ENTITIES_FOUND=%d entities found
+SearchResultView_NO_RESULTS=Search returned no results
+SearchResultView_PERFORMING_SEARCH=Performing Search
+SearchResultView_REMOVE_SEARCH_RESULTS=Getting rid of search results
+SearchResultView_SEARCH=Search: '%s'
+SearchResultView_SEARCH_FOR=Search for:
+SearchResultView_SEARCH_STRING=Search String:
+SearchResultView_SEARCHING=Searching...
+SearchResultView_STATUS=Status:
+SetSecundumForSubtreeOperation_CHANGE_SEC_OP=Change secundum reference for all children
+SetSecundumForSubtreeOperation_SET_SEC_TASK=Set secundum reference for subtree
+TaxonLinkHelper_CREATE_FAIL=Could not create Taxon
+TaxonNavigator_LOAD_DATASOURCE=Loading datasources
+TaxonNavigator_RESTORE=Restoring Taxon Navigator
+TaxonNavigator_SAVE_TASK=Saving Taxon Navigator State
+TaxonNavigator_TAXON_TREE=Taxonomic Tree
+TaxonNavigatorDataChangeBehavior_CLEAR_SESSION=Clearing Taxon Navigators session
+TaxonNavigatorDataChangeBehavior_REFRESH_VIEWER=Refreshing viewer
+TaxonNavigatorDataChangeBehavior_UPDATE_NAVIGATOR=Updating Taxon Navigator
+TaxonNavigatorLabels_CHANGE_ACC_TAXON=Change Accepted Taxon to Synonym
+TaxonNavigatorLabels_CLOSE_IMPOSSIBLE=Could not close related taxon name editor. Please close it manually and try again.
+TaxonNavigatorLabels_DELETE_TAXON=Delete Taxon Node
+TaxonNavigatorLabels_MOVE_FACTUAL_DATA=Move Factual Data
+TaxonNavigatorLabels_MOVE_TAXON=Move Taxon
+TaxonNavigatorLabels_NO_CHILDREN_ALLOWED=The chosen taxon must not have any childen. You need to move all childen to another taxon node in the TaxonNavigator before attempting to turn the accepted taxon into a synonym.
+TaxonNavigatorLabels_NOT_A_NODE=Selected object is not a taxon tree node
+TaxonNavigatorLabels_NOT_TAXON_SELECTED=No taxon tree node selected for operation.
+TaxonNavigatorLabels_ONLY_SINGLE_TAXON=The chosen operation is available only for a single taxon.
+TaxonNavigatorLabels_SET_SEC_FOR_CHILDREN=Set new Secundum Reference for all children.
+TaxonNavigatorLabels_UNSAVED_CHANGES=There are unsaved changes in the source taxon. Please save first.
+TaxonNodeLabelProvider_NO_TAXON=>NO TAXON<
+TaxonNodeLabelProvider_NODE_WITH_NO_TAXON=The taxon node does not have a taxon attached to it. Please check your import. TaxonNode: %s
+TaxonNodeLabelProvider_TAXON=Taxon:
+TreeNodeDropAdapter_10=\
+TreeNodeDropAdapter_BEHIND=Behind
+TreeNodeDropAdapter_CANCEL=Cancel
+TreeNodeDropAdapter_CHILD=Child
+TreeNodeDropAdapter_MOVE_BEHIND=Do you want to move the Taxonnode as child or behind the target node.
+TreeNodeDropAdapter_MOVE_TAXON=Move Taxon
+TreeNodeDropAdapter_MOVING=Moving taxon
+TreeNodeDropAdapter_MOVING_MESSAGE=The operation move accepted taxon to other parent is available only for a single taxon.
+TreeNodeDropAdapter_TARGET_NODE=Target node
+TreeNodeDropAdapter_UNSAVED_PARENT=Unsaved Parent Taxon
+TreeNodeDropAdapter_UNSAVED_PARENT_MESSAGE=There are unsaved changes in the parent taxon. Pleas save first.
+
import org.eclipse.ui.navigator.IDescriptionProvider;
import eu.etaxonomy.cdm.model.taxon.Classification;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
/**
* <p>ClassificationLabelProvider class.</p>
public String getText(Object element) {
if(element instanceof Classification){
String text = ((Classification) element).getName().getText();
- return text != null ? text : "Unnamed Taxonomic Tree";
+ return text != null ? text : Messages.ClassificationLabelProvider_UNNAMED_TREE;
}
return new String();
}
import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.navigation.operation.CreateClassification;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.store.CdmStore;
*/
public List<Classification> getParentBeans() {
List<String> propertyPaths = Arrays.asList(new String[]{
- "name",
- "rootNode.childNodes"});
+ "name", //$NON-NLS-1$
+ "rootNode.childNodes"}); //$NON-NLS-1$
List<Classification> classifications = CdmStore.getService(IClassificationService.class).list(null, null, null, null, propertyPaths);
if(classifications.size() == 0){
- Classification classification = Classification.NewInstance("My Classification");
- AbstractPostOperation operation = new CreateClassification("Creating initial classification", NavigationUtil.getUndoContext(), classification, NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false));
+ Classification classification = Classification.NewInstance(Messages.Root_MY_CLASSIFICATION);
+ AbstractPostOperation operation = new CreateClassification(Messages.Root_CREATE_CLASSIFICATION, NavigationUtil.getUndoContext(), classification, NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false));
NavigationUtil.executeOperation(operation);
classifications = CdmStore.getService(IClassificationService.class).list(null, null, null, null, propertyPaths);
if (element instanceof Synonym &&
((Synonym) element).getName() != null) {
- return "= " + ((Synonym) element).getName().getTitleCache();
+ return "= " + ((Synonym) element).getName().getTitleCache(); //$NON-NLS-1$
}
return new String();
}
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
/**
* When a taxon is open in an editor and this editor has focus, its entry in the
// }
// }
} catch (Exception e) {
- MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
+ MessagingUtils.warningDialog(Messages.TaxonLinkHelper_CREATE_FAIL, this, e.getMessage());
}
}
import eu.etaxonomy.taxeditor.model.IDataChangeBehavior;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
* @author p.ciardelli
* @author n.hoffmann
* @created 02.06.2009
- * @version 1.0
+ * @version 1.0+-
*/
public class TaxonNavigator extends CommonNavigator implements
IPostOperationEnabled, IConversationEnabled, Observer,
ICdmEntitySessionEnabled, ICdmChangeListener {
- /**
+ private static final String RESTORING_TAXON_NAVIGATOR = Messages.TaxonNavigator_RESTORE;
+
+ /**
* Constant
* <code>ID="eu.etaxonomy.taxeditor.navigation.navig"{trunked}</code>
*/
public static final String ID = "eu.etaxonomy.taxeditor.navigation.navigator"; //$NON-NLS-1$
- private static final String TREE_PATH = "treepath";
+ private static final String TREE_PATH = "treepath"; //$NON-NLS-1$
- private static final String TREE_PATHS = "treepaths";
+ private static final String TREE_PATHS = "treepaths"; //$NON-NLS-1$
private ConversationHolder conversation;
IProgressMonitor subProgressMonitor = NavigationUtil
.getSubProgressMonitor(monitor, 1);
- subProgressMonitor.beginTask("Restoring Taxon Navigator",
+ subProgressMonitor.beginTask(RESTORING_TAXON_NAVIGATOR,
1 + mementoWork + 5);
- subProgressMonitor.subTask("Restoring Taxon Navigator");
+ subProgressMonitor.subTask(RESTORING_TAXON_NAVIGATOR);
subProgressMonitor.worked(1);
conversation = CdmStore.createConversation();
return null;
}
- for (String uuid : string.split(" ")) {
+ for (String uuid : string.split(" ")) { //$NON-NLS-1$
CdmBase cdmBaseObject = CdmStore.getService(
IClassificationService.class).getTaxonNodeByUuid(
UUID.fromString(uuid));
memento = memento.createChild(TREE_PATHS);
TreePath[] treePaths = this.getCommonViewer().getExpandedTreePaths();
- monitor.beginTask("Saving Taxon Navigator State", treePaths.length);
+ monitor.beginTask(Messages.TaxonNavigator_SAVE_TASK, treePaths.length);
for (TreePath treePath : treePaths) {
int pathLength = treePath.getSegmentCount();
- String path = "";
+ String path = ""; //$NON-NLS-1$
for (int i = 0; i < pathLength; i++) {
Object segment = treePath.getSegment(i);
if (segment instanceof CdmBase) {
- path += ((CdmBase) segment).getUuid().toString() + " ";
+ path += ((CdmBase) segment).getUuid().toString() + " "; //$NON-NLS-1$
monitor.worked(1);
} else {
MessagingUtils.warn(getClass(),
- "Non-taxon tree path segment " + segment);
+ "Non-taxon tree path segment " + segment); //$NON-NLS-1$
}
}
memento.createChild(TREE_PATH, path.trim());
@Override
public String getFrameToolTipText(Object element) {
if (element instanceof Root) {
- return "Taxonomic Tree";
+ return Messages.TaxonNavigator_TAXON_TREE;
}
return super.getFrameToolTipText(element);
}
getCommonViewer().getControl().setEnabled(!busy);
if (busy) {
partNameCache = getPartName();
- setPartName("Loading datasources");
+ setPartName(Messages.TaxonNavigator_LOAD_DATASOURCE);
} else {
if (partNameCache != null) {
setPartName(partNameCache);
public Map<Object, List<String>> getPropertyPathsMap() {
Map<Object, List<String>> propertyPathsMap = new HashMap<Object, List<String>>();
List<String> taxonNodePropertyPaths = Arrays.asList(new String[] {
- "taxon.name"
+ "taxon.name" //$NON-NLS-1$
});
- propertyPathsMap.put("childNodes", taxonNodePropertyPaths);
+ propertyPathsMap.put("childNodes", taxonNodePropertyPaths); //$NON-NLS-1$
return propertyPathsMap;
}
}
import eu.etaxonomy.taxeditor.model.AbstractDataChangeBehaviour;
import eu.etaxonomy.taxeditor.model.IDataChangeBehavior;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
/**
* <p>TaxonNavigatorDataChangeBehavior class.</p>
public class TaxonNavigatorDataChangeBehavior extends AbstractDataChangeBehaviour implements
IDataChangeBehavior {
- private final TaxonNavigator source;
+ private static final String UPDATING_TAXON_NAVIGATOR = Messages.TaxonNavigatorDataChangeBehavior_UPDATE_NAVIGATOR;
+
+ private final TaxonNavigator source;
private Set<CdmBase> staleObjects;
Set<CdmBase> affectedObjects = event.getAffectedObjects();
if(affectedObjects != null) {
for(CdmBase cb : affectedObjects) {
- staleObjects.add((CdmBase)HibernateProxyHelper.deproxy(cb));
+ staleObjects.add(HibernateProxyHelper.deproxy(cb));
}
}
if(isRelevant(events)){
final Display display = Display.getCurrent();
- Job job = new Job("Updating Taxon Navigator") {
+ Job job = new Job(UPDATING_TAXON_NAVIGATOR) {
@Override
protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("Updating Taxon Navigator", 3);
+ monitor.beginTask(UPDATING_TAXON_NAVIGATOR, 3);
monitor.worked(1);
// clear the session completely
- monitor.subTask("Clearing Taxon Navigators session");
+ monitor.subTask(Messages.TaxonNavigatorDataChangeBehavior_CLEAR_SESSION);
display.asyncExec(new Runnable() {
@Override
public void run() {
// seems to improve the situation but not sure if final solution
monitor.worked(1);
- monitor.subTask("Refreshing viewer");
+ monitor.subTask(Messages.TaxonNavigatorDataChangeBehavior_REFRESH_VIEWER);
display.asyncExec(new Runnable() {
@Override
*/
package eu.etaxonomy.taxeditor.navigation.navigator;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
+
/**
* @author cmathew
* @date 19 Jun 2015
*/
public interface TaxonNavigatorLabels {
- public static final String CHANGE_ACCEPTED_TAXON_TO_SYNONYM_LABEL = "Change Accepted Taxon to Synonym";
- public static final String MOVE_TAXON_LABEL = "Move Taxon";
- public static final String MOVE_FACTUAL_DATA_LABEL = "Move Factual Data";
- public static final String DELETE_TAXON_NODE_LABEL = "Delete Taxon Node";
+ public static final String CHANGE_ACCEPTED_TAXON_TO_SYNONYM_LABEL = Messages.TaxonNavigatorLabels_CHANGE_ACC_TAXON;
+ public static final String MOVE_TAXON_LABEL = Messages.TaxonNavigatorLabels_MOVE_TAXON;
+ public static final String MOVE_FACTUAL_DATA_LABEL = Messages.TaxonNavigatorLabels_MOVE_FACTUAL_DATA;
+ public static final String DELETE_TAXON_NODE_LABEL = Messages.TaxonNavigatorLabels_DELETE_TAXON;
- public static final String NO_TAXON_SELECTION_MESSAGE = "No taxon tree node selected for operation.";
- public static final String SINGLE_TAXON_SELECTION_MESSAGE = "The chosen operation is available only for a single taxon.";
- public static final String SOURCE_TAXON_HAS_CHILDREN_MESSAGE = "The chosen taxon must not have any childen. You need to move all childen to " +
- "another taxon node in the TaxonNavigator before attempting to turn the accepted " +
- "taxon into a synonym.";
- public static final String RELATED_EDITOR_NOT_CLOSED_MESSAGE = "Could not close related taxon name editor. " +
- "Please close it manually and try again.";
- public static final String SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE = "Selected object is not a taxon tree node";
- public static final String UNSAVED_CHANGES_MESSAGE = "There are unsaved changes in the source taxon. Please save first.";
+ public static final String NO_TAXON_SELECTION_MESSAGE = Messages.TaxonNavigatorLabels_NOT_TAXON_SELECTED;
+ public static final String SINGLE_TAXON_SELECTION_MESSAGE = Messages.TaxonNavigatorLabels_ONLY_SINGLE_TAXON;
+ public static final String SOURCE_TAXON_HAS_CHILDREN_MESSAGE = Messages.TaxonNavigatorLabels_NO_CHILDREN_ALLOWED;
+ public static final String RELATED_EDITOR_NOT_CLOSED_MESSAGE = Messages.TaxonNavigatorLabels_CLOSE_IMPOSSIBLE;
+ public static final String SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE = Messages.TaxonNavigatorLabels_NOT_A_NODE;
+ public static final String UNSAVED_CHANGES_MESSAGE = Messages.TaxonNavigatorLabels_UNSAVED_CHANGES;
+ public static final String CHANGE_SECUNDUM_FOR_SUBTREE = Messages.TaxonNavigatorLabels_SET_SEC_FOR_CHILDREN;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.preference.Resources;
import eu.etaxonomy.taxeditor.security.RequiredPermissions;
import eu.etaxonomy.taxeditor.store.CdmStore;
TaxonNode taxonNode = (TaxonNode) HibernateProxyHelper.deproxy(element);
try{
- Taxon taxon = (Taxon) HibernateProxyHelper.deproxy(taxonNode.getTaxon());
+ Taxon taxon = HibernateProxyHelper.deproxy(taxonNode.getTaxon());
if(taxon == null){
- MessagingUtils.error(getClass(), "The taxon node does not have a taxon attached to it. Please check your import. TaxonNode: " + element, null);
+ MessagingUtils.error(getClass(), String.format(Messages.TaxonNodeLabelProvider_NODE_WITH_NO_TAXON, element), null);
// throw new RuntimeException("The data your are trying to view is corrupt. Please check your import.");
}else{
try{
public String getDescription(Object anElement) {
if (anElement instanceof TaxonNode) {
Taxon data = ((TaxonNode) anElement).getTaxon();
- return "Taxon: " + (data != null ? data.getTitleCache() : ">NO TAXON<");
+ return Messages.TaxonNodeLabelProvider_TAXON + (data != null ? data.getTitleCache() : Messages.TaxonNodeLabelProvider_NO_TAXON);
}
return null;
}
public class TaxonNodeNavigatorComparator extends ViewerComparator{
+ Comparator<TaxonNode> comparator;
public TaxonNodeNavigatorComparator(Comparator<TaxonNode> comparator){
- super(comparator);
+ super();
+ this.comparator = comparator;
}
if (e1 instanceof Classification && e2 instanceof Classification){
return ((Classification)e1).getTitleCache().compareTo(((Classification)e2).getTitleCache());
} else{
- if (this.getComparator() instanceof TaxonNaturalComparator){
- return this.getComparator().compare((TaxonNode)e1, (TaxonNode)e2);
- }else{
- return this.getComparator().compare(e1,e2);
- }
+ return comparator.compare((TaxonNode)e1, (TaxonNode)e2);
+
}
}
}
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
public class TaxonNodePropertyTester extends PropertyTester {
- private static final Object HAS_SYNONYMS = "hasSynonyms";
- private static final Object HAS_TAXA = "hasTaxa";
+ private static final Object HAS_SYNONYMS = "hasSynonyms"; //$NON-NLS-1$
+ private static final Object HAS_TAXA = "hasTaxa"; //$NON-NLS-1$
/** {@inheritDoc} */
public boolean test(Object receiver, String property, Object[] args,
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.cdm.persistence.hibernate.permission.CRUD;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.navigation.navigator.operation.MoveTaxonOperation;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
*/
public class TreeNodeDropAdapter extends ViewerDropAdapter implements IPostOperationEnabled {
- private static final Logger logger = Logger.getLogger(TreeNodeDropAdapter.class);
+ protected static final String TREE_NODE_DROP_ADAPTER_UNSAVED_PARENT_MESSAGE = Messages.TreeNodeDropAdapter_UNSAVED_PARENT_MESSAGE;
+ protected static final String TREE_NODE_DROP_ADAPTER_UNSAVED_PARENT = Messages.TreeNodeDropAdapter_UNSAVED_PARENT;
+ protected static final String TREE_NODE_DROP_ADAPTER_MOVE_TAXON = Messages.TreeNodeDropAdapter_MOVE_TAXON;
+ protected static final String TREE_NODE_DROP_ADAPTER_CANCEL = Messages.TreeNodeDropAdapter_CANCEL;
+ protected static final String TREE_NODE_DROP_ADAPTER_BEHIND = Messages.TreeNodeDropAdapter_BEHIND;
+ protected static final String TREE_NODE_DROP_ADAPTER_CHILD = Messages.TreeNodeDropAdapter_CHILD;
+ protected static final String DO_YOU_WANT_TO_MOVE_THE_TAXONNODE_AS_CHILD_OR_BEHIND_THE_TARGET_NODE = Messages.TreeNodeDropAdapter_MOVE_BEHIND;
+ protected static final String TARGET_NODE = Messages.TreeNodeDropAdapter_TARGET_NODE;
+
+ private static final Logger logger = Logger.getLogger(TreeNodeDropAdapter.class);
private final TaxonNavigatorViewer navigatorViewer;
-
+
/**
* @param viewer
*/
if (taxonNodes.size() == 1){
return moveTaxon(taxonNodes, targetTreeNode);
} else{
- if( MessageDialog.openConfirm(null, "Moving taxon", "The operation move accepted taxon to other parent is available only for a single taxon.")){
+ if( MessageDialog.openConfirm(null, Messages.TreeNodeDropAdapter_MOVING, Messages.TreeNodeDropAdapter_MOVING_MESSAGE)){
return true;
}
}
Boolean hasTargetTaxonPermission = CdmStore.currentAuthentiationHasPermission(targetNode.getTaxon(), UPDATE);
if(logger.isDebugEnabled()){
- logger.debug("target: " + targetNode.getTaxon().getTitleCache());
+ logger.debug("target: " + targetNode.getTaxon().getTitleCache()); //$NON-NLS-1$
}
if(!hasTargetNodePermission || ! hasTargetNodePermission){
if(logger.isDebugEnabled()){
- logger.debug("CANCEL_STATUS for target node: " + hasTargetNodePermission.toString() + " " + hasTargetTaxonPermission.toString() + " ");
+ logger.debug("CANCEL_STATUS for target node: " + hasTargetNodePermission.toString() + " " + hasTargetTaxonPermission.toString() + " "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
return false;
}
// do not allow to drop onto itself and
// check users permissions with all selected taxon nodes and taxa
for(TaxonNode taxonNode : getSelectedTaxa()){
- logger.debug("selectedTaxa: " + taxonNode.getTaxon().getTitleCache());
+ logger.debug("selectedTaxa: " + taxonNode.getTaxon().getTitleCache()); //$NON-NLS-1$
Boolean isSameTaxonNode = taxonNode.equals(target);
Boolean hasTaxonNodePermission = CdmStore.currentAuthentiationHasPermission(taxonNode, UPDATE);
Boolean hasTaxonPermission = CdmStore.currentAuthentiationHasPermission(taxonNode.getTaxon(), UPDATE);
|| !hasTaxonPermission
) {
if(logger.isDebugEnabled()){
- logger.debug("CANCEL_STATUS for selected " + isSameTaxonNode.toString() + " " + hasTaxonNodePermission.toString() + " " + hasTaxonPermission.toString() + " ");
+ logger.debug("CANCEL_STATUS for selected " + isSameTaxonNode.toString() + Messages.TreeNodeDropAdapter_10 + hasTaxonNodePermission.toString() + " " + hasTaxonPermission.toString() + " "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
return false;
}
}
- logger.debug("OK_STATUS");
+ logger.debug("OK_STATUS"); //$NON-NLS-1$
return true;
}
- logger.debug("CANCEL_STATUS");
+ logger.debug("CANCEL_STATUS"); //$NON-NLS-1$
return false;
}
TaxonNode targetTaxonNode = (TaxonNode) targetITaxonTreeNode;
// Make sure parent taxon does not have unsaved changes
if (NavigationUtil.isDirty(targetTaxonNode)){
- MessageDialog.openWarning(NavigationUtil.getShell(), "Unsaved Parent Taxon", "There are unsaved " +
- "changes in the parent taxon. Pleas save first.");
+ MessageDialog.openWarning(NavigationUtil.getShell(), TREE_NODE_DROP_ADAPTER_UNSAVED_PARENT, TREE_NODE_DROP_ADAPTER_UNSAVED_PARENT_MESSAGE);
return false;
}
if (!PreferencesUtil.getSortNodesNaturally()){
IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
if (workspaceUndoContext == null) {
- logger.error("Workspace undo context is null. DND operation cancelled");
+ logger.error("Workspace undo context is null. DND operation cancelled"); //$NON-NLS-1$
return false;
}
AbstractPostOperation<?> operation = new MoveTaxonOperation
- ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, MovingType.CHILD);
+ (TREE_NODE_DROP_ADAPTER_MOVE_TAXON, workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, MovingType.CHILD);
NavigationUtil.executeOperation(operation);
- logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+ logger.info("Moved taxa to new parent " + targetITaxonTreeNode); //$NON-NLS-1$
return true;
}else{
- String[] buttonLables = {"Child", "Behind","Cancel"};
- MessageDialog dialog = new MessageDialog(null, "Target node", null, "Do you want to move the Taxonnode as child or behind the target node.", MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
+ String[] buttonLables = {TREE_NODE_DROP_ADAPTER_CHILD, TREE_NODE_DROP_ADAPTER_BEHIND,TREE_NODE_DROP_ADAPTER_CANCEL};
+ MessageDialog dialog = new MessageDialog(null, TARGET_NODE, null, DO_YOU_WANT_TO_MOVE_THE_TAXONNODE_AS_CHILD_OR_BEHIND_THE_TARGET_NODE, MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
dialog.open();
int returnCode = dialog.getReturnCode();
if (returnCode == 0){
IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
if (workspaceUndoContext == null) {
- logger.error("Workspace undo context is null. DND operation cancelled");
+ logger.error("Workspace undo context is null. DND operation cancelled"); //$NON-NLS-1$
return false;
}
AbstractPostOperation<?> operation = new MoveTaxonOperation
- ("Move Taxon", workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, MovingType.CHILD);
+ (TREE_NODE_DROP_ADAPTER_MOVE_TAXON, workspaceUndoContext, uuids, targetITaxonTreeNode, this, taxonNavigator, MovingType.CHILD);
NavigationUtil.executeOperation(operation);
- logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+ logger.info("Moved taxa to new parent " + targetITaxonTreeNode); //$NON-NLS-1$
return true;
}else if (returnCode == 1){
IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
if (workspaceUndoContext == null) {
- logger.error("Workspace undo context is null. DND operation cancelled");
+ logger.error("Workspace undo context is null. DND operation cancelled"); //$NON-NLS-1$
return false;
}
TaxonNode targetNode = (TaxonNode) targetITaxonTreeNode;
AbstractPostOperation<?> operation = new MoveTaxonOperation
- ("Move Taxon", workspaceUndoContext, uuids, targetNode, this, taxonNavigator, MovingType.PREVIOUS);
+ (TREE_NODE_DROP_ADAPTER_MOVE_TAXON, workspaceUndoContext, uuids, targetNode, this, taxonNavigator, MovingType.PREVIOUS);
NavigationUtil.executeOperation(operation);
- logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+ logger.info("Moved taxa to new parent " + targetITaxonTreeNode); //$NON-NLS-1$
return true;
}
// } else if (returnCode == 2){
import eu.etaxonomy.cdm.persistence.hibernate.permission.CRUD;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
import eu.etaxonomy.taxeditor.navigation.navigator.TreeNodeDropAdapter.MovingType;
-import eu.etaxonomy.taxeditor.navigation.navigator.operation.MoveTaxonOperation;
import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingMoveTaxonOperation;
-import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.store.CdmStore;
Boolean hasTargetTaxonPermission = CdmStore.currentAuthentiationHasPermission(targetNode.getTaxon(), UPDATE);
if(logger.isDebugEnabled()){
- logger.debug("target: " + targetNode.getTaxon().getTitleCache());
+ logger.debug("target: " + targetNode.getTaxon().getTitleCache()); //$NON-NLS-1$
}
if(!hasTargetNodePermission || ! hasTargetNodePermission){
if(logger.isDebugEnabled()){
- logger.debug("CANCEL_STATUS for target node: " + hasTargetNodePermission.toString() + " " + hasTargetTaxonPermission.toString() + " ");
+ logger.debug("CANCEL_STATUS for target node: " + hasTargetNodePermission.toString() + " " + hasTargetTaxonPermission.toString() + " "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
return Status.CANCEL_STATUS;
}
// do not allow to drop onto itself and
// check users permissions with all selected taxon nodes and taxa
for(TaxonNode taxonNode : getSelectedTaxa()){
- logger.debug("selectedTaxa: " + taxonNode.getTaxon().getTitleCache());
+ logger.debug("selectedTaxa: " + taxonNode.getTaxon().getTitleCache()); //$NON-NLS-1$
Boolean isSameTaxonNode = taxonNode.equals(target);
Boolean hasTaxonNodePermission = CdmStore.currentAuthentiationHasPermission(taxonNode, UPDATE);
Boolean hasTaxonPermission = CdmStore.currentAuthentiationHasPermission(taxonNode.getTaxon(), UPDATE);
|| !hasTaxonPermission
) {
if(logger.isDebugEnabled()){
- logger.debug("CANCEL_STATUS for selected " + isSameTaxonNode.toString() + " " + hasTaxonNodePermission.toString() + " " + hasTaxonPermission.toString() + " ");
+ logger.debug("CANCEL_STATUS for selected " + isSameTaxonNode.toString() + " " + hasTaxonNodePermission.toString() + " " + hasTaxonPermission.toString() + " "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
return Status.CANCEL_STATUS;
}
}
- logger.debug("OK_STATUS");
+ logger.debug("OK_STATUS"); //$NON-NLS-1$
return Status.OK_STATUS;
}
- logger.debug("CANCEL_STATUS");
+ logger.debug("CANCEL_STATUS"); //$NON-NLS-1$
return Status.CANCEL_STATUS;
}
TaxonNode targetTaxonNode = (TaxonNode) targetITaxonTreeNode;
// Make sure parent taxon does not have unsaved changes
if (NavigationUtil.isDirty(targetTaxonNode)){
- MessageDialog.openWarning(NavigationUtil.getShell(), "Unsaved Parent Taxon", "There are unsaved " +
- "changes in the parent taxon. Pleas save first.");
+ MessageDialog.openWarning(NavigationUtil.getShell(), TreeNodeDropAdapter.TREE_NODE_DROP_ADAPTER_UNSAVED_PARENT, TreeNodeDropAdapter.TREE_NODE_DROP_ADAPTER_UNSAVED_PARENT_MESSAGE);
return Status.CANCEL_STATUS;
}
if (!PreferencesUtil.getSortNodesNaturally()){
IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
if (workspaceUndoContext == null) {
- logger.error("Workspace undo context is null. DND operation cancelled");
+ logger.error("Workspace undo context is null. DND operation cancelled"); //$NON-NLS-1$
return Status.CANCEL_STATUS;
}
AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, (TaxonNode)targetITaxonTreeNode, MovingType.CHILD);
NavigationUtil.executeOperation(operation, null);
-
- logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+
+ logger.info("Moved taxa to new parent " + targetITaxonTreeNode); //$NON-NLS-1$
return Status.OK_STATUS;
}else{
- String[] buttonLables = {"Child", "Behind", "Cancel"};
- MessageDialog dialog = new MessageDialog(null, "Target node", null, "Do you want to move the taxon as child, before or behind the target.", MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
+ String[] buttonLables = {TreeNodeDropAdapter.TREE_NODE_DROP_ADAPTER_CHILD, TreeNodeDropAdapter.TREE_NODE_DROP_ADAPTER_BEHIND, TreeNodeDropAdapter.TREE_NODE_DROP_ADAPTER_CANCEL};
+ MessageDialog dialog = new MessageDialog(null, TreeNodeDropAdapter.TARGET_NODE, null, TreeNodeDropAdapter.DO_YOU_WANT_TO_MOVE_THE_TAXONNODE_AS_CHILD_OR_BEHIND_THE_TARGET_NODE, MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
dialog.open();
int returnCode = dialog.getReturnCode();
if (returnCode == 0){
IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
if (workspaceUndoContext == null) {
- logger.error("Workspace undo context is null. DND operation cancelled");
+ logger.error("Workspace undo context is null. DND operation cancelled"); //$NON-NLS-1$
return Status.CANCEL_STATUS;
}
AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, (TaxonNode)targetITaxonTreeNode, MovingType.CHILD);
NavigationUtil.executeOperation(operation, null);
-
- logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+
+ logger.info("Moved taxa to new parent " + targetITaxonTreeNode); //$NON-NLS-1$
return Status.OK_STATUS;
}else if (returnCode == 1){
IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
if (workspaceUndoContext == null) {
- logger.error("Workspace undo context is null. DND operation cancelled");
+ logger.error("Workspace undo context is null. DND operation cancelled"); //$NON-NLS-1$
return Status.CANCEL_STATUS;
}
TaxonNode targetNode = (TaxonNode) targetITaxonTreeNode;
AbstractOperation operation = new RemotingMoveTaxonOperation(taxonNavigator, false, uuids, targetNode, MovingType.BEHIND);
NavigationUtil.executeOperation(operation, null);
-
- logger.info("Moved taxa to new parent " + targetITaxonTreeNode);
+
+ logger.info("Moved taxa to new parent " + targetITaxonTreeNode); //$NON-NLS-1$
return Status.OK_STATUS;
// }else if (returnCode == 2){
// IUndoContext workspaceUndoContext = NavigationUtil.getWorkbenchUndoContext();
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.navigation.navigator.operation.ChangeAcceptedTaxonToSynonymOperation;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
TreeSelection selection = (TreeSelection) HandlerUtil.getCurrentSelection(event);
- String plural = selection.size() > 1 ? "s" : "";
// Prompt user for confirmation
// check if taxon has no children
if(((TaxonNode)oldAcceptedTaxonNode).getCountChildren() > 0) {
- MessagingUtils.warningDialog("Prerequisite not met", this,
- "The accepted taxon must not have any childen. You need to move all childen to " +
- "another taxon node in the TaxonNavigator before attempting to turn the accepted " +
- "taxon into a synonym.");
+ MessagingUtils.warningDialog(Messages.ChangeAcceptedTaxonToSynonymHandler_PREREQUISITE, this,
+ Messages.ChangeAcceptedTaxonToSynonymHandler_PREREQUISITE_MESSAGE);
return null;
}
/*if(((TaxonNode)oldAcceptedTaxonNode).getTaxon().hasSynonyms()) {
excludeTaxa.add(((TaxonNode)oldAcceptedTaxonNode).getTaxon().getUuid());
TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
taxonNavigator.getConversationHolder(),
- "Choose the accepted taxon",
+ Messages.ChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON,
excludeTaxa,
null,
((TaxonNode)oldAcceptedTaxonNode).getClassification());
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set");
+ MessagingUtils.warn(getClass(), "Command name not set"); //$NON-NLS-1$
}
} else{
- if( MessageDialog.openConfirm(HandlerUtil.getActiveShell(event), "Moving to synonymy", "The operation move accepted taxon to synonymy is available only for a single taxon.")){
+ if( MessageDialog.openConfirm(HandlerUtil.getActiveShell(event), Messages.ChangeAcceptedTaxonToSynonymHandler_MOVE_SYNONYMY, Messages.ChangeAcceptedTaxonToSynonymHandler_MOVE_SYNONYMY_MESSAGE)){
return null;
}
}
MessagingUtils.error(this.getClass(), e);
throw new RuntimeException(e);
} catch (Exception e) {
- MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
+ MessagingUtils.warningDialog(Messages.ChangeAcceptedTaxonToSynonymHandler_CREATE_FAILED, this, e.getMessage());
}
}
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
import eu.etaxonomy.taxeditor.navigation.operation.CloneClassificationOperation;
import eu.etaxonomy.taxeditor.store.StoreUtil;
TaxonRelationshipType relationType = wizard.getRelationType();
Reference reference = wizard.getReference();
- CloneClassificationOperation operation = new CloneClassificationOperation("Clone classification",
+ CloneClassificationOperation operation = new CloneClassificationOperation(Messages.CloneClassificationHandler_CLONE_CLASSIFICATION,
StoreUtil.getUndoContext(), classification, classificationName, reference, relationType,
NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false));
IStatus status = NavigationUtil.executeOperation(operation);\r
\r
} catch (NotDefinedException e) {\r
- MessagingUtils.warn(getClass(), "Command name not set");\r
+ MessagingUtils.warn(getClass(), "Command name not set"); //$NON-NLS-1$\r
}\r
}\r
}\r
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
import eu.etaxonomy.taxeditor.navigation.operation.CreateNewTaxonHierarchyOperation;
import eu.etaxonomy.taxeditor.store.StoreUtil;
// service.getSortedGenusList(classification.getAllNodes());
- CreateNewTaxonHierarchyOperation operation = new CreateNewTaxonHierarchyOperation("Create Taxon Hierarchy", StoreUtil.getUndoContext(),classification,NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false) );
+ CreateNewTaxonHierarchyOperation operation = new CreateNewTaxonHierarchyOperation(Messages.CreateClassificationHierarchyHandler_CREATE_HIERARCHY, StoreUtil.getUndoContext(),classification,NavigationUtil.getNavigator(false), NavigationUtil.getNavigator(false) );
AbstractUtility.executeOperation(operation);
// UpdateResult result = service.createHierarchyInClassification(classification, null);
//Success
taxonNavigator.refresh();
} catch (Exception e) {
- MessagingUtils.messageDialog("Failed to open Editor", CreateClassificationHierarchyHandler.class,
- "Could not open distribution view. The hierarchy is corrupted!", e);
+ MessagingUtils.messageDialog(Messages.CreateClassificationHierarchyHandler_FAILED, CreateClassificationHierarchyHandler.class,
+ Messages.CreateClassificationHierarchyHandler_FAILED_MESSAGE, e);
}
}
}
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.handlers.HandlerUtil;
+import eu.etaxonomy.cdm.api.service.config.NodeDeletionConfigurator.ChildHandling;
import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
import eu.etaxonomy.cdm.api.service.config.TaxonNodeDeletionConfigurator;
-import eu.etaxonomy.cdm.api.service.config.NodeDeletionConfigurator.ChildHandling;
import eu.etaxonomy.cdm.model.common.ITreeNode;
import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
import eu.etaxonomy.taxeditor.navigation.navigator.operation.DeleteOperation;
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
-import eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator.DeleteConfiguratorDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator.DeleteConfiguratorDialog;
/**
* <p>DeleteTreeNodeHandler class.</p>
*/
public class DeleteHandler extends AbstractHandler{
- protected IWorkbenchPage activePage;
+ protected static final String SKIP = Messages.DeleteHandler_SKIP;
+ protected static final String MOVE_CHILDREN_TO_PARENT_NODE = Messages.DeleteHandler_MOVE_TO_PARENT;
+ protected static final String DELETE_ALL_CHILDREN = Messages.DeleteHandler_DELETE_ALL;
+ protected static final String THERE_ARE_CHILDNODES_WHICH_WILL_BE_DELETED_TOO = Messages.DeleteHandler_THERE_ARE_CHILDNODES;
+ protected static final String THE_TREE_HAS_CHILDREN_THEY_WILL_BE_DELETED_TOO = Messages.DeleteHandler_THERE_ARE_CHILDREN;
+ protected static final String DO_YOU_REALLY_WANT_TO_DELETE_THE_SELECTED_NODE_S = Messages.DeleteHandler_DELETE_NODE;
+ protected static final String DO_YOU_REALLY_WANT_TO_DELETE_THE_CLASSIFICATION = Messages.DeleteHandler_DELETE_CLASSIFICATION;
+ protected static final String CONFIRM_DELETION = Messages.DeleteHandler_CONFIRM_DELETE;
+
+ protected IWorkbenchPage activePage;
protected TaxonNavigator taxonNavigator;
/** {@inheritDoc} */
TreeSelection selection = (TreeSelection) HandlerUtil.getCurrentSelection(event);
- String plural = selection.size() > 1 ? "s" : "";
// Prompt user for confirmation
//configNodes.setDeleteTaxon(false);
if (taxonNode instanceof Classification && taxonNode.hasChildNodes()){
- if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the classification? The tree has children, they will be deleted, too.")){
+ if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(config, HandlerUtil.getActiveShell(event), CONFIRM_DELETION, DO_YOU_REALLY_WANT_TO_DELETE_THE_CLASSIFICATION+THE_TREE_HAS_CHILDREN_THEY_WILL_BE_DELETED_TOO)){
return null;
}
} else if (taxonNode instanceof Classification && !taxonNode.hasChildNodes()){
- if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the classification?")){
+ if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(config, HandlerUtil.getActiveShell(event), CONFIRM_DELETION, DO_YOU_REALLY_WANT_TO_DELETE_THE_CLASSIFICATION)){
return null;
}
} else {
DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(
config,
HandlerUtil.getActiveShell(event),
- "Confirm Deletion",
+ CONFIRM_DELETION,
null,
- "Do you really want to delete the selected node? It has childnodes, they will be deleted, too.",
- MessageDialog.WARNING, new String[] { "Delete all children",
- "Move children to parent node", "Skip" }, 0);
+ DO_YOU_REALLY_WANT_TO_DELETE_THE_SELECTED_NODE_S+THERE_ARE_CHILDNODES_WHICH_WILL_BE_DELETED_TOO,
+ MessageDialog.WARNING, new String[] { DELETE_ALL_CHILDREN,
+ MOVE_CHILDREN_TO_PARENT_NODE, SKIP }, 0);
int dialog_result = dialog.open();
if (dialog_result == 0){
}
}else{
- if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(configNodes, HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the selected node?")){
+ if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(configNodes, HandlerUtil.getActiveShell(event), CONFIRM_DELETION, DO_YOU_REALLY_WANT_TO_DELETE_THE_SELECTED_NODE_S)){
return null;
}
config.setTaxonNodeConfig(configNodes);
} catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set");
+ MessagingUtils.warn(getClass(), "Command name not set"); //$NON-NLS-1$
} catch (Exception e){
MessagingUtils.error(getClass(), e);
}
} else{
try{
- if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(config, HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the selected nodes?")){
+ if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(config, HandlerUtil.getActiveShell(event), CONFIRM_DELETION, DO_YOU_REALLY_WANT_TO_DELETE_THE_SELECTED_NODE_S)){
return null;
}
if (allEditorsClosed){
}
}catch (NotDefinedException e) {
- MessagingUtils.warn(getClass(), "Command name not set");
+ MessagingUtils.warn(getClass(), Messages.DeleteHandler_9);
} catch (Exception e){
MessagingUtils.error(getClass(), e);
}
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
TaxonNode taxonNode = HibernateProxyHelper.deproxy(object, TaxonNode.class);
final TaxonNode sourceTaxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNode.getUuid());
if(NavigationUtil.isDirty(sourceTaxonNode)){
- MessageDialog.openWarning(HandlerUtil.getActiveShell(event), "Unsaved Source Taxon", "There are unsaved " +
- "changes in the source taxon. Please save first.");
+ MessageDialog.openWarning(HandlerUtil.getActiveShell(event), Messages.MoveFactualDataHandler_UNSAVED_SOURCE, Messages.MoveFactualDataHandler_UNSAVED_SOURCE_MESSAGE);
return null;
}
//reload to avoid session conflicts
excludeTaxa.add(taxon.getUuid());
TaxonNode dialogTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
navigator.getConversationHolder(),
- "Choose the accepted taxon",
+ Messages.MoveFactualDataHandler_CHOOSE_TAXON,
excludeTaxa,
sourceTaxonNode,
sourceTaxonNode.getClassification());
//reload to avoid session conflicts
final TaxonNode targetTaxonNode = CdmStore.getService(ITaxonNodeService.class).load(dialogTaxonNode.getUuid());
if(NavigationUtil.isDirty(targetTaxonNode)){
- MessageDialog.openWarning(HandlerUtil.getActiveShell(event), "Unsaved Target Taxon", "There are unsaved " +
- "changes in the target taxon. Please save first.");
+ MessageDialog.openWarning(HandlerUtil.getActiveShell(event), Messages.MoveFactualDataHandler_UNSAVED_TARGET, Messages.MoveFactualDataHandler_UNSAVED_TARGET_MESSAGE);
return null;
}
CdmStore.getService(IDescriptionService.class).moveTaxonDescriptions(taxon.getUuid(),targetTaxonNode.getTaxon().getUuid());
MessagingUtils.error(this.getClass(), e);
throw new RuntimeException(e);
} catch (Exception e) {
- MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
+ MessagingUtils.warningDialog(Messages.MoveFactualDataHandler_CREATE_FAILED, this, e.getMessage());
}
}
import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator;
import eu.etaxonomy.taxeditor.navigation.navigator.TreeNodeDropAdapter.MovingType;
import eu.etaxonomy.taxeditor.navigation.navigator.operation.MoveTaxonOperation;
Classification classification = taxonNodes.iterator().next().getClassification();
MovingType moveToNewParent = MovingType.CHILD;
if (PreferencesUtil.getSortNodesNaturally()){
- if(!MessageDialog.openQuestion(null, "Target node", "The choosen target node should be the parent?")){
+ if(!MessageDialog.openQuestion(null, Messages.MoveTaxonHandler_TARGET_NODE, Messages.MoveTaxonHandler_TARGET_NODE_MESSAGE)){
moveToNewParent = MovingType.BEHIND;
}
- parentTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), taxonNavigator.getConversationHolder(), "Choose the taxon above the moved taxon.", excludeTaxa, null, classification);
+ parentTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), taxonNavigator.getConversationHolder(), Messages.MoveTaxonHandler_CHOOSE_ABOVE, excludeTaxa, null, classification);
}else{
- parentTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), taxonNavigator.getConversationHolder(), "Choose new parent", excludeTaxa, null, classification);
+ parentTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), taxonNavigator.getConversationHolder(), Messages.MoveTaxonHandler_CHOOSE_PARENT, excludeTaxa, null, classification);
}
if(parentTaxonNode != null){
if(NavigationUtil.isDirty(parentTaxonNode)){
- MessageDialog.openWarning(HandlerUtil.getActiveShell(event), "Unsaved Parent Taxon", "There are unsaved " +
- "changes in the parent taxon. Please save first.");
+ MessageDialog.openWarning(HandlerUtil.getActiveShell(event), Messages.MoveTaxonHandler_UNSAVED_PARENT, Messages.MoveTaxonHandler_UNSAVED_PARENT_MESSAGE);
return null;
}
AbstractPostOperation<?> operation = new MoveTaxonOperation
- ("Move taxon to new parent", NavigationUtil.getUndoContext(),
+ (Messages.MoveTaxonHandler_MOVE_TO_PARENT, NavigationUtil.getUndoContext(),
taxonNodeUUIDs, parentTaxonNode, taxonNavigator, taxonNavigator, moveToNewParent); //$NON-NLS-1$
NavigationUtil.executeOperation(operation);
taxonNavigator.refresh();
import eu.etaxonomy.cdm.api.conversation.ConversationHolderMock;
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingChangeAcceptedTaxonToSynonymOperation;
import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
// check that only a single taxon tree node has been selected
if(selection.size() > 1) {
return new Status(IStatus.ERROR,
- "unknown",
+ "unknown", //$NON-NLS-1$
TaxonNavigatorLabels.SINGLE_TAXON_SELECTION_MESSAGE);
}
// check for no taxon tree node selected
if(selection.size() == 0) {
return new Status(IStatus.ERROR,
- "unknown",
+ "unknown", //$NON-NLS-1$
TaxonNavigatorLabels.NO_TAXON_SELECTION_MESSAGE);
}
oldTaxonNode = (ITaxonTreeNode)obj;
} else {
return new Status(IStatus.ERROR,
- "unknown",
+ "unknown", //$NON-NLS-1$
TaxonNavigatorLabels.SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE);
}
// check that the source taxon node does not have children
if(((TaxonNode)oldTaxonNode).getCountChildren() > 0) {
return new Status(IStatus.ERROR,
- "unknown",
+ "unknown", //$NON-NLS-1$
TaxonNavigatorLabels.SOURCE_TAXON_HAS_CHILDREN_MESSAGE);
}
boolean editorClosed = NavigatorHandlerUtils.closeObsoleteEditor(event, (TaxonNode) oldTaxonNode);
if(editorClosed != true) {
return new Status(IStatus.ERROR,
- "unknown",
+ "unknown", //$NON-NLS-1$
TaxonNavigatorLabels.RELATED_EDITOR_NOT_CLOSED_MESSAGE);
}
excludeTaxa.add(((TaxonNode)oldTaxonNode).getTaxon().getUuid());
TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
new ConversationHolderMock(),
- "Choose the accepted taxon",
+ Messages.RemotingChangeAcceptedTaxonToSynonymHandler_CHOOSE_TAXON,
excludeTaxa,
null,
((TaxonNode)oldTaxonNode).getClassification());
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.editor.EditorUtil;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingDeleteTaxonNodeOperation;
import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
-import eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator.DeleteConfiguratorDialog;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator.DeleteConfiguratorDialog;
/**
* @author cmathew
}
if(!allEditorsClosed) {
return new Status(IStatus.WARNING,
- "unknown",
+ "unknown", //$NON-NLS-1$
TaxonNavigatorLabels.RELATED_EDITOR_NOT_CLOSED_MESSAGE);
}
taxonNode = CdmApplicationState.getCurrentAppConfig().getTaxonNodeService().load(taxonNode.getUuid());
}
if (taxonNode == null){
- MessagingUtils.informationDialog("Node already deleted", "The taxon node was already deleted. Please reopen the taxon navigator to refresh the view.");
+ MessagingUtils.informationDialog(Messages.RemotingDeleteTaxonNodeHandler_NODE_DELETED, Messages.RemotingDeleteTaxonNodeHandler_NODE_DELETED_MESSAGE);
return Status.CANCEL_STATUS;
}
if (taxonNode instanceof Classification) {
String message;
if (taxonNode.hasChildNodes()) {
- message = "Do you really want to delete the classification? The tree has children, they will be deleted, too.";
+ message = DeleteHandler.DO_YOU_REALLY_WANT_TO_DELETE_THE_CLASSIFICATION+DeleteHandler.THE_TREE_HAS_CHILDREN_THEY_WILL_BE_DELETED_TOO;
} else {
- message = "Do you really want to delete the classification?";
+ message = DeleteHandler.DO_YOU_REALLY_WANT_TO_DELETE_THE_CLASSIFICATION;
}
if (!DeleteConfiguratorDialog.openConfirm(
- HandlerUtil.getActiveShell(event), "Confirm Deletion",
+ HandlerUtil.getActiveShell(event), DeleteHandler.CONFIRM_DELETION,
message)) {
return Status.CANCEL_STATUS;
}
DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(
config,
HandlerUtil.getActiveShell(event),
- "Confirm Deletion",
+ DeleteHandler.CONFIRM_DELETION,
null,
- "Do you really want to delete the selected node? It has childnodes, they will be deleted, too.",
- MessageDialog.WARNING, new String[] { "Delete all children",
- "Move children to parent node", "Skip" }, 0);
+ DeleteHandler.DO_YOU_REALLY_WANT_TO_DELETE_THE_SELECTED_NODE_S+DeleteHandler.THERE_ARE_CHILDNODES_WHICH_WILL_BE_DELETED_TOO,
+ MessageDialog.WARNING, new String[] { DeleteHandler.DELETE_ALL_CHILDREN,
+ DeleteHandler.MOVE_CHILDREN_TO_PARENT_NODE, DeleteHandler.SKIP }, 0);
int result = dialog.open();
if (result == 0){
return Status.CANCEL_STATUS;
}
} else{
- if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(configNodes, HandlerUtil.getActiveShell(event), "Confirm Deletion", "Do you really want to delete the selected node?")){
+ if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(configNodes, HandlerUtil.getActiveShell(event), DeleteHandler.CONFIRM_DELETION, DeleteHandler.DO_YOU_REALLY_WANT_TO_DELETE_THE_SELECTED_NODE_S)){
return Status.CANCEL_STATUS;
}
config.setTaxonNodeConfig(configNodes);
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingMoveFactualDataOperation;
import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
// check that only a single taxon tree node has been selected
if(selection.size() > 1) {
return new Status(IStatus.ERROR,
- "unknown",
+ "unknown", //$NON-NLS-1$
TaxonNavigatorLabels.SINGLE_TAXON_SELECTION_MESSAGE);
}
// check for no taxon tree node selected
if(selection.size() == 0) {
return new Status(IStatus.ERROR,
- "unknown",
+ "unknown", //$NON-NLS-1$
TaxonNavigatorLabels.NO_TAXON_SELECTION_MESSAGE);
}
sourceTaxonNode = (TaxonNode)obj;
} else {
return new Status(IStatus.ERROR,
- "unknown",
+ "unknown", //$NON-NLS-1$
TaxonNavigatorLabels.SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE);
}
if(NavigationUtil.isDirty(sourceTaxonNode)) {
return new Status(IStatus.ERROR,
- "unknown",
+ "unknown", //$NON-NLS-1$
TaxonNavigatorLabels.UNSAVED_CHANGES_MESSAGE);
}
targetTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
new ConversationHolderMock(),
- "Choose the accepted taxon",
+ Messages.RemotingMoveFactualDataHandler_CHOOSE_TAXA,
excludeTaxa,
null,
sourceTaxonNode.getClassification());
if(targetTaxonNode == null) {
return new Status(IStatus.CANCEL,
- "unknown",
- "");
+ "unknown", //$NON-NLS-1$
+ ""); //$NON-NLS-1$
}
if(NavigationUtil.isDirty(targetTaxonNode)){
return new Status(IStatus.ERROR,
- "unknown",
+ "unknown", //$NON-NLS-1$
TaxonNavigatorLabels.UNSAVED_CHANGES_MESSAGE);
}
return Status.OK_STATUS;
MessagingUtils.error(this.getClass(), e);
throw new RuntimeException(e);
} catch (Exception e) {
- MessagingUtils.warningDialog("Could not create Taxon", this, e.getMessage());
+ MessagingUtils.warningDialog(Messages.RemotingMoveFactualDataHandler_CREATE_FAILED, this, e.getMessage());
}
}
import eu.etaxonomy.cdm.api.conversation.ConversationHolderMock;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
import eu.etaxonomy.taxeditor.navigation.navigator.TreeNodeDropAdapter.MovingType;
import eu.etaxonomy.taxeditor.navigation.navigator.operation.RemotingMoveTaxonOperation;
// check that only a single taxon tree node has been selected
if(selection.size() > 1) {
return new Status(IStatus.ERROR,
- "unknown",
+ "unknown", //$NON-NLS-1$
TaxonNavigatorLabels.SINGLE_TAXON_SELECTION_MESSAGE);
}
// check for no taxon tree node selected
if(selection.size() == 0) {
return new Status(IStatus.ERROR,
- "unknown",
+ "unknown", //$NON-NLS-1$
TaxonNavigatorLabels.NO_TAXON_SELECTION_MESSAGE);
}
// check that selected object is a taxon node
oldTaxonNode = (TaxonNode)obj;
} else {
return new Status(IStatus.ERROR,
- "unknown",
+ "unknown", //$NON-NLS-1$
TaxonNavigatorLabels.SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE);
}
return Status.OK_STATUS;
parentTaxonNode = TaxonNodeSelectionDialog.select(activeShell,
new ConversationHolderMock(),
- "Choose the taxon above the moved taxon.",
+ Messages.RemotingMoveTaxonNodeHandler_CHOOSE_TAXON,
excludeTaxa,
null,
oldTaxonNode.getClassification());
- String[] buttonLables = {"Child", "Behind","Cancel"};
- MessageDialog dialog = new MessageDialog(null, "Target node", null, "Do you want to move the Taxonnode as child or behind the target node.", MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
+ String[] buttonLables = {Messages.RemotingMoveTaxonNodeHandler_CHILD, Messages.RemotingMoveTaxonNodeHandler_BEHIND,Messages.RemotingMoveTaxonNodeHandler_CANCEL};
+ MessageDialog dialog = new MessageDialog(null, Messages.RemotingMoveTaxonNodeHandler_TARGET_NODE, null, Messages.RemotingMoveTaxonNodeHandler_TARGET_NODE_MESSAGE, MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
dialog.open();
int returnCode = dialog.getReturnCode();
if (returnCode == 0){
} else {
parentTaxonNode = TaxonNodeSelectionDialog.select(activeShell,
new ConversationHolderMock(),
- "Choose new parent",
+ Messages.RemotingMoveTaxonNodeHandler_CHOOSE_PARENT,
excludeTaxa,
null,
oldTaxonNode.getClassification());
if(parentTaxonNode != null){
if(NavigationUtil.isDirty(parentTaxonNode)){
MessageDialog.openWarning(activeShell,
- "Unsaved Parent Taxon",
- "There are unsaved changes in the parent taxon. Please save first.");
+ Messages.RemotingMoveTaxonNodeHandler_UNSAVED_PARENT,
+ Messages.RemotingMoveTaxonNodeHandler_UNSAVED_PARENT_MESSAGE);
return null;
}
--- /dev/null
+/**
+* Copyright (C) 2017 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.navigation.navigator.handler;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.operations.AbstractOperation;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+import eu.etaxonomy.cdm.api.service.config.SetSecundumForSubtreeConfigurator;
+import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigatorLabels;
+import eu.etaxonomy.taxeditor.navigation.navigator.operation.SetSecundumForSubtreeOperation;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.SetSecundumForSubtreeConfigurationWizard;
+
+/**
+ * @author k.luther
+ * @date 10.02.2017
+ *
+ */
+public class SetSecReferenceForSubtreeHandler extends RemotingCdmHandler {
+
+ private static final Logger logger = Logger
+ .getLogger(SetSecReferenceForSubtreeHandler.class);
+
+
+ private ITaxonTreeNode taxonNode;
+ private SetSecundumForSubtreeConfigurator configurator;
+
+ /**
+ * @param label
+ */
+ public SetSecReferenceForSubtreeHandler() {
+ super(TaxonNavigatorLabels.CHANGE_SECUNDUM_FOR_SUBTREE);
+ }
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#allowOperations(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public IStatus allowOperations(ExecutionEvent event) {
+ TreeSelection selection = (TreeSelection) HandlerUtil.getCurrentSelection(event);
+ // check that only a single taxon tree node has been selected
+ if(selection.size() > 1) { }
+
+ // check for no taxon tree node selected
+ if(selection.size() == 0) {
+ return new Status(IStatus.ERROR,
+ "unknown", //$NON-NLS-1$
+ TaxonNavigatorLabels.NO_TAXON_SELECTION_MESSAGE);
+ }
+
+ // check that selected object is a taxon node
+ Object obj = selection.iterator().next();
+ if(obj instanceof ITaxonTreeNode) {
+ taxonNode = (ITaxonTreeNode)obj;
+ } else {
+ return new Status(IStatus.ERROR,
+ "unknown", //$NON-NLS-1$
+ TaxonNavigatorLabels.SELECTED_OBJECT_NOT_TREE_NODE_MESSAGE);
+ }
+
+
+ // check if corresponding name editor is closed
+ boolean editorClosed = NavigatorHandlerUtils.closeObsoleteEditor(event, (TaxonNode) taxonNode);
+ if(editorClosed != true) {
+ return new Status(IStatus.ERROR,
+ "unknown", //$NON-NLS-1$
+ TaxonNavigatorLabels.RELATED_EDITOR_NOT_CLOSED_MESSAGE);
+ }
+
+ configurator = new SetSecundumForSubtreeConfigurator(taxonNode.getUuid());
+ SetSecundumForSubtreeConfigurationWizard wizard = new SetSecundumForSubtreeConfigurationWizard(configurator);
+
+ WizardDialog dialog = new WizardDialog(StoreUtil.getShell(), wizard);
+
+ if (dialog.open() == Window.OK) {
+ return Status.OK_STATUS;
+ }else{
+ return Status.CANCEL_STATUS;
+ }
+
+// if(!SetSecundumForSubtreeConfigurationWizard.openConfirmWithConfigurator(configurator)){
+//
+// return Status.CANCEL_STATUS;
+// }
+//
+//
+// return Status.OK_STATUS;
+ }
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#doOperations(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public AbstractOperation prepareOperation(ExecutionEvent event) {
+ List<UUID> excludeTaxa = new ArrayList<UUID>();
+ excludeTaxa.add(((TaxonNode)taxonNode).getTaxon().getUuid());
+
+
+
+
+ SetSecundumForSubtreeOperation operation =
+ new SetSecundumForSubtreeOperation(event.getTrigger(),
+ false,
+ taxonNode.getUuid(),
+ configurator);
+
+ return operation;
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.operation.RemotingCdmHandler#onComplete(org.eclipse.core.commands.ExecutionEvent)
+ */
+ @Override
+ public void onComplete() {
+ // TODO Auto-generated method stub
+
+ }
+
+
+
+
+
+
+}
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.navigation.internal.TaxeditorNavigationPlugin;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
import eu.etaxonomy.taxeditor.store.CdmStore;
if (!result.getExceptions().isEmpty() && result.isOk()){
- String separator = ", ";
- String exceptionString = "";
+ String separator = ", "; //$NON-NLS-1$
+ String exceptionString = ""; //$NON-NLS-1$
int count = result.getExceptions().size();
int n = 0;
for (Exception exception : result.getExceptions()) {
}
}
- MessagingUtils.informationDialog("Synonym created but taxon deletion not possible.", exceptionString);
+ MessagingUtils.informationDialog(Messages.ChangeAcceptedTaxonToSynonymOperation_CREATE_SUCCESS, exceptionString);
} else if (result.isAbort() || result.isError()){
- MessagingUtils.errorDialog("Synonym creation not possible", null, result.toString(), TaxeditorNavigationPlugin.PLUGIN_ID, null, true);
+ MessagingUtils.errorDialog(Messages.ChangeAcceptedTaxonToSynonymOperation_CREATE_FAIL, null, result.toString(), TaxeditorNavigationPlugin.PLUGIN_ID, null, true);
}
} catch (IllegalArgumentException e) {
- MessagingUtils.errorDialog("Operation failed", this, e.getMessage(), TaxeditorNavigationPlugin.PLUGIN_ID, e, false);
+ MessagingUtils.errorDialog(Messages.ChangeAcceptedTaxonToSynonymOperation_OP_FAIL, this, e.getMessage(), TaxeditorNavigationPlugin.PLUGIN_ID, e, false);
return Status.CANCEL_STATUS;
}
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
import eu.etaxonomy.cdm.api.service.DeleteResult;
import eu.etaxonomy.cdm.api.service.IClassificationService;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.model.DeleteResultMessagingUtils;
import eu.etaxonomy.taxeditor.navigation.internal.TaxeditorNavigationPlugin;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
*/
public class DeleteOperation extends AbstractPersistentPostOperation{
+ private static final String TAXON_NODE_COULD_NOT_BE_DELETED = Messages.DeleteOperation_DELETE_FAIL;
private Set<ITaxonTreeNode> treeNodes;
protected final TaxonDeletionConfigurator config;
private final ICdmEntitySessionEnabled cdmEntitySessionEnabled;
bind();
monitor.worked(20);
- ICdmApplicationConfiguration controller = CdmStore.getCurrentApplicationConfiguration();
+ ICdmRepository controller = CdmStore.getCurrentApplicationConfiguration();
ITaxonNodeService service = controller.getTaxonNodeService();
if(taxonNode != null && taxonNode instanceof TaxonNode){
//((TaxonNode) treeNode).delete();
DeleteResult result = service.deleteTaxonNode((TaxonNode)taxonNode, config);
if (result.isError() && !result.getExceptions().isEmpty()){
- DeleteResultMessagingUtils.messageDialogWithDetails(result, "TaxonNode could not be deleted.", TaxeditorNavigationPlugin.PLUGIN_ID);
+ DeleteResultMessagingUtils.messageDialogWithDetails(result, TAXON_NODE_COULD_NOT_BE_DELETED, TaxeditorNavigationPlugin.PLUGIN_ID);
} else if (!result.getExceptions().isEmpty()){
- String separator = ", ";
- String exceptionString = "";
+ String separator = ", "; //$NON-NLS-1$
+ String exceptionString = ""; //$NON-NLS-1$
for (Exception exception : result.getExceptions()) {
exceptionString += exception.getLocalizedMessage()+separator;
}
- DeleteResultMessagingUtils.messageDialogWithDetails(result, "TaxonNode was successfully deleted, but related object(s) could not be deleted", TaxeditorNavigationPlugin.PLUGIN_ID);
+ DeleteResultMessagingUtils.messageDialogWithDetails(result, Messages.DeleteOperation_DELETE_SUCCESS, TaxeditorNavigationPlugin.PLUGIN_ID);
}
DeleteResult result = CdmStore.getService(IClassificationService.class).delete(taxonomicTree.getUuid());
if (result.isError() && !result.getExceptions().isEmpty()){
//TODO:Error message!
- DeleteResultMessagingUtils.messageDialogWithDetails(result, "TaxonNode could not be deleted.", TaxeditorNavigationPlugin.PLUGIN_ID);
+ DeleteResultMessagingUtils.messageDialogWithDetails(result, TAXON_NODE_COULD_NOT_BE_DELETED, TaxeditorNavigationPlugin.PLUGIN_ID);
}
} else {
Set<UUID> treeNodeUuids = new HashSet<UUID>();
DeleteResult result = service.deleteTaxonNodes(treeNodeUuids, config);
if (result.isError() && !result.getExceptions().isEmpty()){
//TODO:Error message!
- DeleteResultMessagingUtils.messageDialogWithDetails(result, "TaxonNode could not be deleted.", TaxeditorNavigationPlugin.PLUGIN_ID);
+ DeleteResultMessagingUtils.messageDialogWithDetails(result, TAXON_NODE_COULD_NOT_BE_DELETED, TaxeditorNavigationPlugin.PLUGIN_ID);
}
}
import eu.etaxonomy.cdm.api.service.UpdateResult;
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.navigation.navigator.TreeNodeDropAdapter.MovingType;
import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
@Override
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- MessagingUtils.warn(this.getClass(), "Not implemented yet.");
+ MessagingUtils.warn(this.getClass(), Messages.MoveTaxonOperation_NOT_IMPLEMENTED);
// iterate over oldParentTreeNodes, delete each TaxonNode from its actual parent and add to its former parent
import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
private final UUID newAcceptedTaxonNodeUuid;
- private final static String LABEL = "Change Accepted Taxon to Synonym operation";
+ private final static String LABEL = Messages.RemotingChangeAcceptedTaxonToSynonymOperation_CHANGE_OP;
/**
* @param label
import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.cdm.model.taxon.ITaxonTreeNode;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
/**
*/
public class RemotingDeleteTaxonNodeOperation extends RemotingCdmUpdateOperation {
- private final static String LABEL = "Delete Taxon Node operation";
+ private final static String LABEL = Messages.RemotingDeleteTaxonNodeOperation_DELETE_OP;
private final Set<ITaxonTreeNode> treeNodes;
private final TaxonDeletionConfigurator config;
import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
import eu.etaxonomy.cdm.api.service.IDescriptionService;
import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
/**
*/
public class RemotingMoveFactualDataOperation extends RemotingCdmUpdateOperation {
- private final static String LABEL = "Move Factual Data operation";
+ private final static String LABEL = Messages.RemotingMoveFactualDataOperation_MOVE_OP;
private final UUID sourceTaxonUuid;
private final UUID targetParentTaxonUuid;
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
import eu.etaxonomy.cdm.api.service.UpdateResult;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.navigation.navigator.TreeNodeDropAdapter.MovingType;
import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
*/
public class RemotingMoveTaxonOperation extends RemotingCdmUpdateOperation {
- private final static String LABEL = "Move Taxon operation";
+ private final static String LABEL = Messages.RemotingMoveTaxonOperation_MOVE_OP;
private final Set<UUID> taxonNodesToMoveUuid;
private final UUID newParentTreeNodeUuid;
default:
UpdateResult result = new UpdateResult();
result.setAbort();
- result.addException(new Exception("The moving type is invalid."));
+ result.addException(new Exception("The moving type is invalid.")); //$NON-NLS-1$
return result;
}
}
--- /dev/null
+/**
+* Copyright (C) 2017 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.navigation.navigator.operation;
+
+import java.util.UUID;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import eu.etaxonomy.cdm.api.application.CdmApplicationState;
+import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
+import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
+import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.api.service.config.SetSecundumForSubtreeConfigurator;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
+import eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation;
+
+/**
+ * @author k.luther
+ * @date 10.02.2017
+ *
+ */
+public class SetSecundumForSubtreeOperation extends RemotingCdmUpdateOperation{
+
+ private final static String LABEL = Messages.SetSecundumForSubtreeOperation_CHANGE_SEC_OP;
+
+ UUID parentUuid;
+ SetSecundumForSubtreeConfigurator config;
+
+ /**
+ * @param label
+ * @param action
+ * @param source
+ * @param async
+ */
+ public SetSecundumForSubtreeOperation(Object source,
+ boolean async,
+ UUID taxonNodeUuid,
+ SetSecundumForSubtreeConfigurator config) {
+ super(LABEL, Action.Update, source, async);
+ parentUuid = taxonNodeUuid;
+ this.config = config;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
+ monitor.beginTask(Messages.SetSecundumForSubtreeOperation_SET_SEC_TASK, 10);
+ UpdateResult result = CdmApplicationState.getService(ITaxonNodeService.class).setSecundumForSubtree(config, null);
+ monitor.done();
+ return result;
+ }
+
+}
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.store.CdmStore;
Set<CdmBase> unchangedObjects = result.getUnchangedObjects();
Classification classification2 = CdmBase.deproxy(result.getCdmEntity(), Classification.class);
- MessagingUtils.informationDialog("Add Hierarchy successful", "New classification is "
- + classification2.getTitleCache() + "\nCreated Genus: " + updatedObjects.size()
- +"\nCreated Subspecies: " + unchangedObjects.size());
+ MessagingUtils.informationDialog(Messages.CreateNewTaxonHierarchyOperation_ADD_HIERARCHY,
+ String.format(Messages.CreateNewTaxonHierarchyOperation_ADD_HIERARCHY_MESSAGE,
+ classification2.getTitleCache(), updatedObjects.size(), unchangedObjects.size()));
return postExecute(result.getCdmEntity());
}
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.operation.AbstractPersistentPostOperation;
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
return postExecute(childTaxonNode);
}catch(Exception e){
- MessagingUtils.messageDialog("Could not create taxon node", getClass(), e.getLocalizedMessage(), e);
+ MessagingUtils.messageDialog(Messages.CreateTaxonNode_CREATE_FAILED, getClass(), e.getLocalizedMessage(), e);
return Status.CANCEL_STATUS;
}
}
public IStatus undo(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
- MessagingUtils.warn(this.getClass(), "Not yet implemented.");
+ MessagingUtils.warn(this.getClass(), "Not yet implemented."); //$NON-NLS-1$
return null;
}
}
+++ /dev/null
-/**\r
- * Copyright (C) 2014 EDIT\r
- * European Distributed Institute of Taxonomy\r
- * http://www.e-taxonomy.eu\r
- *\r
- * The contents of this file are subject to the Mozilla Public License Version 1.1\r
- * See LICENSE.TXT at the top of this package for the full license terms.\r
- */\r
-package eu.etaxonomy.taxeditor.navigation.search;\r
-\r
-import org.eclipse.osgi.util.NLS;\r
-\r
-/**\r
- * @author d.schild\r
- * @date 18.06.2014\r
- *\r
- */\r
-public class Messages extends NLS {\r
- private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$\r
- public static String SearchBar_0;\r
- public static String SearchBar_1;\r
- public static String SearchBar_2;\r
- public static String SearchBar_3;\r
- public static String SearchBar_4;\r
- public static String SearchBar_6;\r
- public static String SearchBar_7;\r
- public static String SearchBar_8;\r
- public static String SearchBar_9;\r
- static {\r
- // initialize resource bundle\r
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);\r
- }\r
-\r
- private Messages() {\r
- }\r
-}\r
import eu.etaxonomy.taxeditor.model.IContextListener;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.navigation.internal.TaxeditorNavigationPlugin;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.preference.Resources;
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
import eu.etaxonomy.taxeditor.model.ImageResources;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.preference.Resources;
/**
if(element instanceof UuidAndTitleCache){
Class type = ((UuidAndTitleCache) element).getType();
if(type == Taxon.class){
- return NavigationUtil.getColorRegistry().get("eu.etaxonomy.taxeditor.preferences.searchResult.fontColorAccepted");
+ return NavigationUtil.getColorRegistry().get("eu.etaxonomy.taxeditor.preferences.searchResult.fontColorAccepted"); //$NON-NLS-1$
}else if(type == Synonym.class){
- return NavigationUtil.getColorRegistry().get("eu.etaxonomy.taxeditor.preferences.searchResult.fontColorSynonym");
+ return NavigationUtil.getColorRegistry().get("eu.etaxonomy.taxeditor.preferences.searchResult.fontColorSynonym"); //$NON-NLS-1$
}
}
- return NavigationUtil.getColorRegistry().get("eu.etaxonomy.taxeditor.preferences.searchResult.fontColorDefault");
+ return NavigationUtil.getColorRegistry().get("eu.etaxonomy.taxeditor.preferences.searchResult.fontColorDefault"); //$NON-NLS-1$
}
/* (non-Javadoc)
public String getToolTipText(Object element) {
if(element instanceof TaxonBase){
if(element instanceof Synonym){
- return "Synonym: " + ((TaxonBase<?>) element).getName().getTitleCache();
+ return Messages.SearchResultLabelProvider_SYNONYM + ((TaxonBase<?>) element).getName().getTitleCache();
}else{
- return "Taxon: " + ((TaxonBase<?>) element).getName().getTitleCache();
+ return Messages.SearchResultLabelProvider_TAXON + ((TaxonBase<?>) element).getName().getTitleCache();
}
}
- return "Name: " + element.toString();
+ return Messages.SearchResultLabelProvider_NAME + element.toString();
}
import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;
import eu.etaxonomy.taxeditor.model.IContextListener;
import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
+import eu.etaxonomy.taxeditor.navigation.l10n.Messages;
import eu.etaxonomy.taxeditor.navigation.search.SearchBar.SearchOption;
import eu.etaxonomy.taxeditor.store.CdmStore;
*/
@Override
public void contextStop(IMemento memento, IProgressMonitor monitor) {
- monitor.subTask("Getting rid of search results");
+ monitor.subTask(Messages.SearchResultView_REMOVE_SEARCH_RESULTS);
AbstractUtility.hideView(SearchResultView.this);
}
}
composite.setLayout(new GridLayout(2, false));
Label searchStringLabel = new Label(composite, SWT.NULL);
- searchStringLabel.setText("Search String:");
+ searchStringLabel.setText(Messages.SearchResultView_SEARCH_STRING);
searchString = new Text(composite, SWT.NULL);
searchString.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
// searchString.setText(" ");
Label configurationDescriptionLabel = new Label(composite, SWT.NULL);
- configurationDescriptionLabel.setText("Search for:");
+ configurationDescriptionLabel.setText(Messages.SearchResultView_SEARCH_FOR);
configurationLabel = new Text(composite, SWT.WRAP);
configurationLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
configurationLabel.setEditable(false);
Label statusLabel = new Label(composite, SWT.NULL);
- statusLabel.setText("Status:");
+ statusLabel.setText(Messages.SearchResultView_STATUS);
status = new Text(composite, SWT.NULL);
status.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
* @param configurator a {@link eu.etaxonomy.cdm.api.service.config.ITaxonServiceConfigurator} object.
*/
public void performSearch(IFindTaxaAndNamesConfigurator configurator){
- setPartName("Search: '" + configurator.getTitleSearchString() + "'");
+ setPartName(String.format(Messages.SearchResultView_SEARCH, configurator.getTitleSearchString()));
searchString.setText(configurator.getTitleSearchString());
}
configurator.setMatchMode(MatchMode.LIKE);
- String includedEntitiesString = "";
+ String includedEntitiesString = ""; //$NON-NLS-1$
for (int i = 0; i < includedEntities.size(); i++){
includedEntitiesString += includedEntities.get(i);
if(i < includedEntities.size() -1){
- includedEntitiesString += ", ";
+ includedEntitiesString += ", "; //$NON-NLS-1$
}
}
configurationLabel.setText(includedEntitiesString);
- status.setText("Searching...");
+ status.setText(Messages.SearchResultView_SEARCHING);
searchJob = new SearchJob(Display.getCurrent(), configurator);
searchJob.schedule();
protected void displaySearchResult(List<UuidAndTitleCache<IdentifiableEntity>> result) {
if(result.size() > 0){
resultViewer.setInput(result);
- status.setText(result.size() + " entities found");
+ status.setText(String.format(Messages.SearchResultView_CNT_ENTITIES_FOUND, result.size()));
}else{
resultViewer.setInput(EMPTY);
- status.setText("Search returned no results");
+ status.setText(Messages.SearchResultView_NO_RESULTS);
}
}
* @param name
*/
public SearchJob(Display display, IFindTaxaAndNamesConfigurator configurator) {
- super("Performing Search");
+ super(Messages.SearchResultView_PERFORMING_SEARCH);
this.display = display;
this.configurator = configurator;
}
*/
@Override
protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("", 100);
+ monitor.beginTask("", 100); //$NON-NLS-1$
monitor.worked(20);
final List<UuidAndTitleCache<IdentifiableEntity>> searchResult = CdmStore.getSearchManager().findTaxaAndNames(configurator);
display.asyncExec(new Runnable() {
@Override
public void run() {
- status.setText("Cancelled");
+ status.setText(Messages.SearchResultView_CANCELLED);
}
});
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
<classpathentry kind="output" path="target/classes"/>
Bundle-ManifestVersion: 2
Bundle-Name: Printpublisher Bundle
Bundle-SymbolicName: eu.etaxonomy.taxeditor.printpublisher;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
Require-Bundle: org.eclipse.osgi,
org.eclipse.ui,
eu.etaxonomy.taxeditor.cdmlib,
<parent>
<artifactId>taxeditor-parent</artifactId>
<groupId>eu.etaxonomy</groupId>
- <version>4.5.1</version>
+ <version>4.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
import org.eclipse.ui.handlers.HandlerUtil;
import org.jdom.Element;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
import eu.etaxonomy.cdm.print.IXMLEntityFactory;
import eu.etaxonomy.cdm.print.PublishConfigurator;
import eu.etaxonomy.cdm.print.out.pdf.PdfOutputModule;
return null;
}
- configurator = PublishConfigurator.NewLocalInstance((ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration());
+ configurator = PublishConfigurator.NewLocalInstance((ICdmRepository) CdmStore.getCurrentApplicationConfiguration());
Element taxonNodeElement = getTaxonNodeElement((TaxonEditorInput) input);
configurator.addSelectedTaxonNodeElements(taxonNodeElement);
import org.eclipse.swt.widgets.Text;
import org.jdom.Element;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
import eu.etaxonomy.cdm.print.IXMLEntityFactory;
import eu.etaxonomy.cdm.print.PublishConfigurator;
import eu.etaxonomy.cdm.print.XMLHelper;
text_serviceUrl.setEnabled(false);
- setConfigurator(PublishConfigurator.NewLocalInstance((ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration()));
+ setConfigurator(PublishConfigurator.NewLocalInstance((ICdmRepository) CdmStore.getCurrentApplicationConfiguration()));
getConfigurator().addOutputModule(getOutputModule());
refresh();
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry including="**/*.java" kind="src" path="src/main/java"/>
<classpathentry including="**/*.java" kind="src" path="src/test/java"/>
Bundle-ManifestVersion: 2
Bundle-Name: DataStore Bundle
Bundle-SymbolicName: eu.etaxonomy.taxeditor.store;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
Bundle-Activator: eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin
Bundle-Vendor: EDIT
Export-Package: eu.etaxonomy.cdm,
eu.etaxonomy.taxeditor.ui.bar,
eu.etaxonomy.taxeditor.ui.combo,
eu.etaxonomy.taxeditor.ui.dialog,
- eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator,
+ eu.etaxonomy.taxeditor.ui.dialog.configurator,
+ eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator,
eu.etaxonomy.taxeditor.ui.dialog.selection,
eu.etaxonomy.taxeditor.ui.element,
eu.etaxonomy.taxeditor.ui.group.grantedauthority,
OSGI-INF/,\
OSGI-INF/l10n/bundle.properties,\
OSGI-INF/l10n/bundle_de.properties,\
- OSGI-INF/l10n/messages.properties,\
- OSGI-INF/l10n/messages_de.properties,\
+ src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties,\
+ src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties
id="eu.etaxonomy.taxeditor.preferences.typeDesignation"
name="%page.name.25">
</page>
- <page
+ <!-- <page
category="eu.etaxonomy.taxeditor.preferences.general"
class="eu.etaxonomy.taxeditor.preference.SpecimenOrObservationPreferences"
id="eu.etaxonomy.taxeditor.preference.SpecimenOrObservationPreferences"
name="%page.name.26">
- </page>
+ </page>-->
<page
category="eu.etaxonomy.taxeditor.preferences.general"
class="eu.etaxonomy.taxeditor.preference.MediaPreferences"
id="eu.etaxonomy.taxeditor.preference.ChecklistEditorGeneralPreferencePage"
name="%page.name.28">
</page>
- <page
+ <!-- <page
category="eu.etaxonomy.taxeditor.preferences.general"
class="eu.etaxonomy.taxeditor.preference.TemplatePreferencePage"
id="eu.etaxonomy.taxeditor.preference.TemplatePreferencePage"
name="%page.name.29">
- </page>
+ </page>-->
<page
category="eu.etaxonomy.taxeditor.preferences.general"
class="eu.etaxonomy.taxeditor.preference.LanguageEditorPreferencePage"
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>4.5.1</version>
+ <version>4.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.NomenclaturalCodeHelper;
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
import eu.etaxonomy.taxeditor.preference.NameDetailsConfigurator;
*/
public class DatabasePreferencesPage extends WizardPage implements IWizardPage{
-
-
CdmPreference preferedNomenclaturalCode;
NameDetailsConfigurator config ;
+ CdmPreference isRedListPreference;
+ CdmPreference determinationOnlyForFieldUnitsPreference;
+ CdmPreference showCollectingAreaInGeneralSectionPreference;
+ CdmPreference showTaxonAssociationsPreference;
+
+
TabFolder tabFolder;
- // private int maxNumOfColumns;
+
IPreferenceStore preferenceStore;
Composite composite;
boolean isSimpleDetailsViewActivated;
Composite child ;
private Combo nomenclaturalCodeCombo;
-
private Label nomenclaturalCodeLabel;
+// private UriWithLabelElement nomenclaturalCodeCombo;
+// private Label nomenclaturalCodeLabel;
+
String[][] labelAndValues;
/*
this.preferenceStore = store;
}
-// @Override
-// protected void createFieldEditors() {
-// setMessage("Choose the preferences for the whole cdm store.");
-// tabFolder = new TabFolder(getFieldEditorParent(), SWT.NONE);
-//
-// createNomenclaturalCodeTab();
-// createNameDetailsConfiguration();
-//
-//
-// }
-
-
-
-//
-// /***
-// * Adjust the layout of the field editors so that they are properly aligned.
-// */
-// @Override
-// protected void adjustGridLayout() {
-// if (tabFolder != null){
-// TabItem[] items = tabFolder.getItems();
-// for (int j = 0; j < items.length; j++){
-// GridLayout layout = ((GridLayout) ((Composite) items[j].getControl()).getLayout());
-// layout.numColumns = this.maxNumOfColumns;
-// layout.marginHeight = 5;
-// layout.marginWidth = 5;
-// }
-// }
-// // need to call super.adjustGridLayout() since fieldEditor.adjustForNumColumns() is protected
-// super.adjustGridLayout();
-//
-// // reset the main container to a single column
-// ((GridLayout) super.getFieldEditorParent().getLayout()).numColumns = 1;
-// }
-
-// /***
-// * Returns a parent composite for a field editor.
-// * <p>
-// * This value must not be cached since a new parent may be created each time this method called. Thus this method
-// * must be called each time a field editor is constructed.
-// * </p>
-// * @return a parent
-// */
-// @Override
-// protected Composite getEditorParent(){
-// if (tabFolder == null || tabFolder.getItemCount() == 0){
-// return super.getWizard();
-// }
-// return (Composite) tabFolder.getItem(tabFolder.getItemCount() - 1).getControl();
-// }
+
+
/***
* Adds a tab to the page.
if (composite == null){
composite = parent;
}
- composite = addTab("Name Details View Configuration");
+ composite = addTab(Messages.DatabasePreferencesPage_details_view_configuration);
// TabItem tbtmNameDetailsConfiguration = new TabItem(tabFolder, SWT.NONE);
// Composite c2 = new Composite(tabFolder, SWT.BORDER);
// c2.setLayout(new GridLayout(1, true));
isSimpleDetailsViewActivated= PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION);
final Button activateCheckButton = new Button(composite, SWT.CHECK);
- activateCheckButton.setText("Show only a simple name details view");
+ activateCheckButton.setText(Messages.DatabasePreferencesPage_show_only_simple_details_view);
activateCheckButton.setSelection(isSimpleDetailsViewActivated);
activateCheckButton.addSelectionListener(new SelectionAdapter(){
@Override
final Button showTaxon = new Button(child, SWT.CHECK);
boolean isShowTaxon = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON);
- showTaxon.setText("Show taxon of the name");
+ showTaxon.setText(Messages.DatabasePreferencesPage_show_taxon);
showTaxon.setSelection(isShowTaxon);
showTaxon.addSelectionListener(new SelectionAdapter(){
@Override
final Button showLsid = new Button(child, SWT.CHECK);
boolean isShowLSID = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID);
- showLsid.setText("Show Lsid of the name");
+ showLsid.setText(Messages.DatabasePreferencesPage_show_lsid);
showLsid.setSelection(isShowLSID);
showLsid.addSelectionListener(new SelectionAdapter(){
@Override
final Button showNomenclaturalCode = new Button(child, SWT.CHECK);
boolean isShowNomenclaturalCode = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE);
- showNomenclaturalCode.setText("Show the nomenclatural code");
+ showNomenclaturalCode.setText(Messages.DatabasePreferencesPage_show_nomenclatural_code);
showNomenclaturalCode.setSelection(isShowNomenclaturalCode);
showNomenclaturalCode.addSelectionListener(new SelectionAdapter(){
@Override
final Button showNameCache = new Button(child, SWT.CHECK);
boolean isShowNameCache = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE);
- showNameCache.setText("Show nameCache of the name (only the scientific name without the author and year)");
+ showNameCache.setText(Messages.DatabasePreferencesPage_show_namecache);
showNameCache.setSelection(isShowNomenclaturalCode);
showNameCache.addSelectionListener(new SelectionAdapter(){
@Override
});
final Button showAppendedPhrase = new Button(child, SWT.CHECK);
boolean isShowAppendedPhrase = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE);
- showAppendedPhrase.setText("Show appended phrase");
+ showAppendedPhrase.setText(Messages.DatabasePreferencesPage_show_appended_phrase);
showAppendedPhrase.setSelection(isShowAppendedPhrase);
showAppendedPhrase.addSelectionListener(new SelectionAdapter(){
@Override
final Button showRank = new Button(child, SWT.CHECK);
boolean isShowRank = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK);
- showRank.setText("Show rank of the name");
+ showRank.setText(Messages.DatabasePreferencesPage_show_rank);
showRank.setSelection(isShowRank);
showRank.addSelectionListener(new SelectionAdapter(){
@Override
});
final Button showEpithets = new Button(child, SWT.CHECK);
boolean isShowEpithets = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS);
- showEpithets.setText("Show atomised epithets");
+ showEpithets.setText(Messages.DatabasePreferencesPage_show_atomised_epithets);
showEpithets.setSelection(isShowEpithets);
showEpithets.addSelectionListener(new SelectionAdapter(){
@Override
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS, isShowEpithets);
}
});
+ final Button showAuthorshipCache = new Button(child, SWT.CHECK);
+ boolean isShowAuthorshipCache = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE);
+ showAuthorshipCache.setText(Messages.DatabasePreferencesPage_show_authorship_cache);
+ showAuthorshipCache.setSelection(isShowAuthorshipCache);
+ showAuthorshipCache.addSelectionListener(new SelectionAdapter(){
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ boolean isShowAuthorshipCache = showAuthorshipCache.getSelection();
+ PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE, isShowAuthorshipCache);
+ }
+ });
+
final Button showAuthorship = new Button(child, SWT.CHECK);
boolean isShowAuthorship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP);
- showAuthorship.setText("Show authorship section");
+ showAuthorship.setText(Messages.DatabasePreferencesPage_show_author_section);
showAuthorship.setSelection(isShowAuthorship);
showAuthorship.addSelectionListener(new SelectionAdapter(){
@Override
final Button showNomenclaturalRef = new Button(child, SWT.CHECK);
boolean isShowNomenclaturalRef = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE);
- showNomenclaturalRef.setText("Show nomenclatural reference section");
+ showNomenclaturalRef.setText(Messages.DatabasePreferencesPage_Show_nomenclatural_Ref);
showNomenclaturalRef.setSelection(isShowNomenclaturalRef);
showNomenclaturalRef.addSelectionListener(new SelectionAdapter(){
@Override
final Button showNomenclaturalStatus = new Button(child, SWT.CHECK);
boolean isShowNomenclaturalStatus = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS);
- showNomenclaturalStatus.setText("Show nomenclatural status section");
+ showNomenclaturalStatus.setText(Messages.DatabasePreferencesPage_Show_nomenclaturalStatus);
showNomenclaturalStatus.setSelection(isShowNomenclaturalStatus);
showNomenclaturalStatus.addSelectionListener(new SelectionAdapter(){
@Override
final Button showProtologue = new Button(child, SWT.CHECK);
boolean isShowProtologue = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE);
- showProtologue.setText("Show protologue section");
+ showProtologue.setText(Messages.DatabasePreferencesPage_Show_Protologue);
showProtologue.setSelection(isShowProtologue);
showProtologue.addSelectionListener(new SelectionAdapter(){
@Override
final Button showTypeDesignation = new Button(child, SWT.CHECK);
boolean isShowTypeDesignation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION);
- showTypeDesignation.setText("Show name type designation section");
+ showTypeDesignation.setText(Messages.DatabasePreferencesPage_Show_Type_designation);
showTypeDesignation.setSelection(isShowTypeDesignation);
showTypeDesignation.addSelectionListener(new SelectionAdapter(){
@Override
final Button showNameRelationship = new Button(child, SWT.CHECK);
boolean isShowNameRelationship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP);
- showNameRelationship.setText("Show name relationship section");
+ showNameRelationship.setText(Messages.DatabasePreferencesPage_Show_NameRelations);
showNameRelationship.setSelection(isShowNameRelationship);
showNameRelationship.addSelectionListener(new SelectionAdapter(){
@Override
// Label emptyLabel = new Label(getFieldEditorParent(), 0);
-// addField(new BooleanFieldEditor(
-// IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION, "show simple (configurable) details", getFieldEditorParent()));
-// addField(new SpacerFieldEditor(getFieldEditorParent()));
-//
-// addField(new BooleanFieldEditor(
-// IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON,
-// "show taxon section",
-// getFieldEditorParent()));
-//
-// addField(new BooleanFieldEditor(
-// IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_CACHE,
-// "show name cache",
-// getFieldEditorParent()));
-//
-// addField(new BooleanFieldEditor(
-// IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID,
-// "show LSID of the name",
-// getFieldEditorParent()));
-//
-//
-// addField(new BooleanFieldEditor(
-// IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE,
-// "show nomenclatural code of the name",
-// getFieldEditorParent()));
-//
-//
-// addField(new BooleanFieldEditor(
-// IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE,
-// "show appended phrase",
-// getFieldEditorParent()));
-//
-//
-// addField(new BooleanFieldEditor(
-// IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK,
-// "show rank of the name",
-// getFieldEditorParent()));
-//
-//
-// addField(new BooleanFieldEditor(
-// IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS,
-// "show atomised epithets of the name",
-// getFieldEditorParent()));
-//
-// addField(new BooleanFieldEditor(
-// IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP,
-// "show authorship section",
-// getFieldEditorParent()));
-//
-//
-// addField(new BooleanFieldEditor(
-// IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE,
-// "show nomenclatural reference section",
-// getFieldEditorParent()));
-//
-//
-// addField( new BooleanFieldEditor(
-// IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS,
-// "show nomenclatural status section",
-// getFieldEditorParent()));
-//
-//
-// addField(new BooleanFieldEditor(
-// IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE,
-// "show protologue section",
-// getFieldEditorParent()));
-//
-//
-// addField(new BooleanFieldEditor(
-// IPreferenceKeys.ALLOW_OVERRIDE_NAMEDETAILS,
-// "allow to use local preference",
-// getFieldEditorParent()));
+
}
}
return labelAndValues;
}
-// @Override
-// public boolean performOk() {
-// if (doGetPreferenceStore()== null){
-// setPreferenceStore(PreferencesUtil.getPreferenceStore());
-// }
-//
-//
-// String value =doGetPreferenceStore().getString(IPreferenceKeys.CDM_NOMENCLATURAL_CODE_KEY);
-// boolean allowOverride = doGetPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY);
-// CdmPreference pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.NomenclaturalCode, value);
-// pref.setAllowOverride(allowOverride);
-// ICdmApplicationConfiguration controller = CdmStore.getCurrentApplicationConfiguration();
-// if (controller == null){
-// return false;
-// }
-// IPreferenceService service = controller.getPreferenceService();
-// service.set(pref);
-// createNameDetailsViewConfig();
-// value =config.toString();
-// allowOverride = doGetPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_NAMEDETAILS);
-// pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.NameDetailsView, value);
-// pref.setAllowOverride(allowOverride);
-// service.set(pref);
-//
-// return true;
-// }
+
/**
*
}
public void createNomenclaturalCodeTab(Composite parent){
- composite = addTab("Nomenclatural Code");
+ composite = addTab(Messages.DatabasePreferencesPage_Define_Default_NomenclaturalCode);
nomenclaturalCodeCombo = new Combo(composite, SWT.READ_ONLY);
List<NomenclaturalCode> supportedCodes = NomenclaturalCodeHelper
.getSupportedCodes();
}
getLabelAndValues();
+ //get the actual nomenclatural code and set it as selection: doGetPreferenceStore().getString(IPreferenceKeys.CDM_NOMENCLATURAL_CODE_KEY);
nomenclaturalCodeCombo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent evt) {
final Button useLocalPreference = new Button(composite, SWT.CHECK);
boolean isUseLocalPreference = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY);
- useLocalPreference.setText("allow to use local preference");
+ useLocalPreference.setText(Messages.DatabasePreferencesPage_UseLocalPreferences);
useLocalPreference.setSelection(isUseLocalPreference);
useLocalPreference.addSelectionListener(new SelectionAdapter(){
@Override
});
- // Label emptyLabel = new Label(getFieldEditorParent(), 0);
- // addField(new ComboFieldEditor(
-// IPreferenceKeys.CDM_NOMENCLATURAL_CODE_KEY,
-// "Choose which nomenclatural code you would like to use for scientific names unless otherwise specified.", getLabelAndValues(),
-// getFieldEditorParent()));
-//
-//
-// addField(new BooleanFieldEditor(
-// IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY,
-// "allow to use local preference",
-// getFieldEditorParent()));
-// adjustGridLayout();
}
+ public void createBiocaseProviderTab(Composite parent){
+ composite = addTab(Messages.DatabasePreferencesPage_Biocase_Provider);
+ nomenclaturalCodeCombo = new Combo(composite, SWT.READ_ONLY);
+ List<NomenclaturalCode> supportedCodes = NomenclaturalCodeHelper
+ .getSupportedCodes();
+ for (NomenclaturalCode code: supportedCodes) {
+ nomenclaturalCodeCombo.add(NomenclaturalCodeHelper
+ .getDescription(code));
+
+ }
+ getLabelAndValues();
+ //get the actual nomenclatural code and set it as selection: doGetPreferenceStore().getString(IPreferenceKeys.CDM_NOMENCLATURAL_CODE_KEY);
+ nomenclaturalCodeCombo.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent evt) {
+
+ String name = nomenclaturalCodeCombo.getText();
+ String selectedPreferenceKey = null;
+ for (String[] labelAndValue: labelAndValues){
+ if (labelAndValue[0].equals(name)){
+ selectedPreferenceKey = labelAndValue[1];
+ }
+ }
+
+
+ PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.CDM_NOMENCLATURAL_CODE_KEY, selectedPreferenceKey);
+
+ }
+ });
+ nomenclaturalCodeLabel = new Label(composite, SWT.READ_ONLY);
+
+
+ final Button useLocalPreference = new Button(composite, SWT.CHECK);
+ boolean isUseLocalPreference = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY);
+ useLocalPreference.setText(Messages.DatabasePreferencesPage_UseLocalPreferences);
+ useLocalPreference.setSelection(isUseLocalPreference);
+ useLocalPreference.addSelectionListener(new SelectionAdapter(){
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ boolean isUseLocalPreference = useLocalPreference.getSelection();
+ PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.ALLOW_OVERRIDE_NOMENCLATURAL_CODE_KEY, isUseLocalPreference);
+ }
+ });
+
+
+
+ }
+
+
+ public void createSpecimenOrObservationTab(Composite parent){
+ composite = addTab(Messages.DatabasePreferencesPage_Specimen_Or_Observation);
+
+ final Button showCollectingAreaInGeneralSectionButton = new Button(composite, SWT.CHECK);
+ boolean isShowCollectingAreaInGeneralSection = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION);
+ showCollectingAreaInGeneralSectionButton.setText(Messages.DatabasePreferncesPage_Show_Collecting_Areas_in_general_section);
+ showCollectingAreaInGeneralSectionButton.setSelection(isShowCollectingAreaInGeneralSection);
+ showCollectingAreaInGeneralSectionButton.addSelectionListener(new SelectionAdapter(){
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ boolean isShowCollectingAreaInGeneralSection = showCollectingAreaInGeneralSectionButton.getSelection();
+ PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION, isShowCollectingAreaInGeneralSection);
+ }
+ });
+
+ final Button determinationOnlyForFieldUnitsButton = new Button(composite, SWT.CHECK);
+ boolean isDeterminationOnlyForFieldUnits = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS);
+ determinationOnlyForFieldUnitsButton.setText(Messages.DatabasePreferncesPage_Determination_only_for_field_unnits);
+ determinationOnlyForFieldUnitsButton.setSelection(isDeterminationOnlyForFieldUnits);
+ determinationOnlyForFieldUnitsButton.addSelectionListener(new SelectionAdapter(){
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ boolean isDeterminationOnlyForFieldUnits = determinationOnlyForFieldUnitsButton.getSelection();
+ PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS, isDeterminationOnlyForFieldUnits);
+ }
+ });
+
+ final Button showTaxonAssociationButton = new Button(composite, SWT.CHECK);
+ boolean isShowTaxonAssociation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS);
+ showTaxonAssociationButton.setText(Messages.DatabasePreferncesPage_Taxon_Associations);
+ showTaxonAssociationButton.setSelection(isShowTaxonAssociation);
+ showTaxonAssociationButton.addSelectionListener(new SelectionAdapter(){
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ boolean isShowTaxonAssociation = showTaxonAssociationButton.getSelection();
+ PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS, isShowTaxonAssociation);
+ }
+ });
+
+
+
+ }
/**
* {@inheritDoc}
public void createControl(Composite parent) {
createNameDetailsConfiguration(parent);
createNomenclaturalCodeTab(parent);
+
+ createSpecimenOrObservationTab(parent);
setControl(parent);
}
import org.eclipse.jface.wizard.Wizard;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
import eu.etaxonomy.cdm.api.service.IPreferenceService;
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
public class DatabasePreferencesWizard extends Wizard {
- private final DatabasePreferencesPage preferencePage;
+ public DatabasePreferencesPage preferencePage;
public DatabasePreferencesWizard() {
setWindowTitle("Database Preferences Wizard");
- preferencePage = new DatabasePreferencesPage("Nomenclatural Code");
+ preferencePage = new DatabasePreferencesPage("Database Preferences");
// preferencePage.setDescription("Choose which nomenclatural code you would like to use for scientific names unless otherwise specified.");
// preferencePage.init(PlatformUI.getWorkbench());
}
+ /**
+ * @return the preferencePage
+ */
+ public DatabasePreferencesPage getPreferencePage() {
+ return preferencePage;
+ }
/**
* {@inheritDoc}
*/
CdmPreference pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.NomenclaturalCode, value);
pref.setAllowOverride(allowOverride);
- ICdmApplicationConfiguration controller = CdmStore.getCurrentApplicationConfiguration();
+ ICdmRepository controller = CdmStore.getCurrentApplicationConfiguration();
if (controller == null){
return false;
}
pref.setAllowOverride(allowOverride);
service.set(pref);
+
+ boolean isDeterminationOnlyForFieldUnit= getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS );
+ pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.DeterminationOnlyForFieldUnits, String.valueOf(isDeterminationOnlyForFieldUnit));
+ pref.setAllowOverride(false);
+ service.set(pref);
+
+ boolean isShowCollectingAreasInGeneralsecion= getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION );
+ pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.ShowCollectingAreasInGeneralSection, String.valueOf(isShowCollectingAreasInGeneralsecion));
+ pref.setAllowOverride(false);
+ service.set(pref);
+
+ boolean isShowTaxonAssociations= getPreferencePage().doGetPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS);
+ pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.ShowTaxonAssociations, String.valueOf(isShowTaxonAssociations));
+ pref.setAllowOverride(false);
+ service.set(pref);
+
return true;
}
- /**
- * @return the preferencePage
- */
- public DatabasePreferencesPage getPreferencePage() {
- return preferencePage;
- }
+
@Override
public void addPages() {
import org.eclipse.swt.widgets.Composite;
import eu.etaxonomy.cdm.io.common.SortIndexUpdaterConfigurator;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
/**
* @author k.luther
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
/**
* @author k.luther
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
/**
* @author k.luther
* @return a {@link java.util.List} object.
*/
public static List<ICdmSource> getAll() {
- List<ICdmSource> remoteSources = new ArrayList<ICdmSource>();
+ List<ICdmSource> remoteSources = new ArrayList<>();
+ if (CdmPersistentDataSource.getAllDataSources() == null){
+ MessagingUtils.errorDialog("Could not read root element", CdmPersistentDataSource.class,
+ "Could not read element in datasources.xml in .cdmLibrary folder. Maybe your datasources.xml file is broken.",
+ TaxeditorStorePlugin.PLUGIN_ID, null, true);
+ return remoteSources;
+ }
for(ICdmDataSource dataSource : CdmPersistentDataSource.getAllDataSources()){
try {
remoteSources.add(CdmPersistentDataSource.NewInstance(dataSource.getName()));
import org.eclipse.ui.menus.CommandContributionItemParameter;
import eu.etaxonomy.cdm.model.common.TermType;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
/**
* Menu used in the store plugin xml to dynamically generate menu (sub-menu) contribution items
//add Feature and NamedArea to top level
dtMenuManager.add(addChildTermsToMenuManager(TermType.Feature));
dtMenuManager.add(addChildTermsToMenuManager(TermType.NamedArea));
+ dtMenuManager.add(new Separator());
MenuManager otherMenuManager =
new MenuManager("Others","eu.etaxonomy.taxeditor.store.term.other.menu");
}
// term type has children, so create sub menu
MenuManager dtMenuManager =
- new MenuManager(termType.getMessage(),"eu.etaxonomy.taxeditor.store." + termType.getKey() + "Menu");
+ new MenuManager(termType.getMessage(PreferencesUtil.getGlobalLanguage()),"eu.etaxonomy.taxeditor.store." + termType.getKey() + "Menu");
dtMenuManager.setVisible(true);
dtMenuManager.add(createDefaultMenuItem(termType));
private class SortByTermTypeMessage implements Comparator<TermType> {
@Override
public int compare(TermType t1, TermType t2) {
- return t1.getMessage().compareTo(t2.getMessage());
+ if (t1.equals(t2)){
+ return 0;
+ }
+ int result = t1.getMessage().compareTo(t2.getMessage());
+ if (result == 0){
+ return t1.compareTo(t2);
+ }
+ return result;
}
}
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.ui.progress.IProgressConstants;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
import eu.etaxonomy.cdm.io.common.IIoConfigurator;
/**
*/
public abstract class AbstractIOManager<CONFIGURATOR extends IIoConfigurator> {
- protected ICdmApplicationConfiguration applicationConfiguration;
+ protected ICdmRepository applicationConfiguration;
public static enum TYPE {
Jaxb, Tcs, Excel_Taxa, Endnote, Sdd, Abcd, SpecimenCdmExcel, Excel_Name, SpecimenSearch, Gbif
* a CONFIGURATOR object.
*/
protected AbstractIOManager(
- ICdmApplicationConfiguration applicationConfiguration) {
+ ICdmRepository applicationConfiguration) {
this.applicationConfiguration = applicationConfiguration;
}
import org.eclipse.ui.IWorkbenchPart;
import eu.etaxonomy.cdm.api.application.CdmApplicationState;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
import eu.etaxonomy.cdm.io.common.CdmDefaultExport;
import eu.etaxonomy.cdm.io.common.ExportResult;
*
* @param applicationConfiguration
*/
- private ExportManager(ICdmApplicationConfiguration applicationConfiguration) {
+ private ExportManager(ICdmRepository applicationConfiguration) {
super(applicationConfiguration);
}
* @return a {@link eu.etaxonomy.taxeditor.io.ExportManager} object.
*/
public static ExportManager NewInstance(
- ICdmApplicationConfiguration applicationConfiguration) {
+ ICdmRepository applicationConfiguration) {
return new ExportManager(applicationConfiguration);
}
import org.eclipse.ui.PlatformUI;
import eu.etaxonomy.cdm.api.application.CdmApplicationState;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
import eu.etaxonomy.cdm.common.monitor.IRemotingProgressMonitor;
import eu.etaxonomy.cdm.io.common.CacheUpdaterConfigurator;
import eu.etaxonomy.cdm.io.common.CdmDefaultImport;
/**
* @param applicationConfiguration
*/
- private ImportManager(ICdmApplicationConfiguration applicationConfiguration) {
+ private ImportManager(ICdmRepository applicationConfiguration) {
super(applicationConfiguration);
}
* @return a {@link eu.etaxonomy.taxeditor.io.ImportManager} object.
*/
public static ImportManager NewInstance(
- ICdmApplicationConfiguration applicationConfiguration) {
+ ICdmRepository applicationConfiguration) {
return new ImportManager(applicationConfiguration);
}
ImportResult result = ioService.importDataFromStream(configurator);
monitor.done();
- display.asyncExec(new Runnable() {
-
- @Override
- public void run() {
- CdmStore.getContextManager().notifyContextRefresh();
- }
- });
+// display.asyncExec(new Runnable() {
+//
+// @Override
+// public void run() {
+// CdmStore.getContextManager().notifyContextRefresh();
+// }
+// });
return Status.OK_STATUS;
}
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
+import java.io.IOException;
import java.net.URI;
-import org.apache.log4j.Logger;
+import org.apache.commons.io.IOUtils;
+import org.apache.log4j.Logger;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TreeSelection;
import eu.etaxonomy.cdm.io.common.IImportConfigurator.SOURCE_TYPE;
import eu.etaxonomy.cdm.io.excel.taxa.NormalExplicitImportConfigurator;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-
import eu.etaxonomy.taxeditor.store.CdmStore;
} catch (FileNotFoundException e) {
logger.error("Error while reading file" + source.toString());
}
-
+ try {
+ configurator.setStream(IOUtils.toByteArray(fis));
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
Job job = CdmStore.getImportManager().createIOServiceJob(configurator,file , SOURCE_TYPE.INPUTSTREAM);
CdmStore.getImportManager().run(job);
-
+
return true;
}
public static final String XML = "xml";
public static final String CSV = "csv";
-
-
+
+
public static final String ZIP = "zip";
private static boolean csvExport = false;
-
+
private static boolean csvNameExport = false;
private static String CSV_PRINT_EXPORT ="CSV_PRINT_EXPORT";
private final String extension;
private Combo classificationSelectionCombo;
-
+
private List<Classification> classifications;
-
+
private Classification selectedClassification;
/**
"Export the contents of the currently selected database into Comma Separated Value format.",
CSV);
}
-
+
/**
* @return
*/
"Export the names of the currently selected database into Semicolon Separated Value format.",
CSV);
}
-
+
/**
* @return
*/
@Override
public int compare(Classification o1, Classification o2) {
- return o1.getTitleCache().compareTo(o2.getTitleCache());
+ if (o1.equals(o2)){
+ return 0;
+ }
+ int result = o1.getTitleCache().compareTo(o2.getTitleCache());
+ if (result == 0){
+ return o1.getUuid().compareTo(o2.getUuid());
+ }
+ return result;
}
});
-
+
selectedClassification = classifications.iterator().next();
}
if(csvExport || csvPrintExport){
Label comboBoxLabel = new Label(composite, SWT.NONE);
comboBoxLabel.setText("Classification");
-
+
createClassificationSelectionCombo(composite);
classificationSelectionCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
true, false, 2, 1));
}
-
-
+
+
Label fileLabel = new Label(composite, SWT.NONE);
@Override
public void widgetSelected(SelectionEvent e) {
selectedClassification = classifications.get(classificationSelectionCombo.getSelectionIndex());
-
+
}
@Override
public void widgetDefaultSelected(SelectionEvent e) {
//not needed here
-
+
}
public UUID getSelectedClassificationUUID() {
-
+
return selectedClassification.getUuid();
}
*/
@Override
public int compare(Method o1, Method o2) {
+ if (o1.equals(o2)){
+ return 0;
+ }
if(o1.getName()==null && o2.getName()!=null){
return -1;
}
return 1;
}
if(o1.getName()==null && o2.getName()==null){
- return 0;
+ return o1.toString().compareTo(o1.toString());
+ }
+ int result = o1.getName().compareTo(o2.getName());
+ if (result == 0){
+ return o1.toString().compareTo(o1.toString());
}
- return o1.getName().compareTo(o2.getName());
+ return result;
}
});
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor;
+package eu.etaxonomy.taxeditor.l10n;
import org.eclipse.osgi.util.NLS;
*
*/
public class Messages extends NLS {
- private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "src/main/java/eu.etaxonomy.taxeditor.l10n.messages"; //$NON-NLS-1$
public static String AuthenticatedUserBar_LOGGED_IN_AS;
public static String DeleteConfiguration_media_deleteIfUsedInTaxonDescription;
public static String DeleteConfiguration_media_deleteIfUsedInSpecimenDescription;
public static String DeleteConfiguration_media_delete;
- static {
+ public static String NewGrantedAuthority_AlreadyInDb;
+
+ public static String SetSecundumConfiguration_IncludeAcceptedTaxa;
+ public static String SetSecundumConfiguration_IncludeSynonyms;
+ public static String SetSecundumConfiguration_OverwriteExistingAccepted;
+ public static String SetSecundumConfiguration_OverwriteExistingSynonyms;
+ public static String SetSecundumConfiguration_EmptySecundumDetail;
+ public static String SetSecundumConfiguration_IncludeSharedtaxa;
+ public static String SetSecundumConfiguration_NewSecundum_Label;
+ public static String SetSecundumConfiguration_Description;
+
+ public static String DatabasePreferncesPage_Is_redList;
+ public static String DatabasePreferncesPage_Determination_only_for_field_unnits;
+ public static String DatabasePreferncesPage_Show_Collecting_Areas_in_general_section;
+ public static String DatabasePreferncesPage_Taxon_Associations;
+
+ public static String DatabasePreferencesPage_Biocase_Provider;
+ public static String DatabasePreferencesPage_details_view_configuration;
+ public static String DatabasePreferencesPage_show_only_simple_details_view;
+ public static String DatabasePreferencesPage_show_taxon;
+ public static String DatabasePreferencesPage_show_lsid;
+ public static String DatabasePreferencesPage_show_nomenclatural_code;
+ public static String DatabasePreferencesPage_show_namecache;
+ public static String DatabasePreferencesPage_show_appended_phrase;
+ public static String DatabasePreferencesPage_show_rank;
+ public static String DatabasePreferencesPage_show_atomised_epithets;
+ public static String DatabasePreferencesPage_show_authorship_cache;
+ public static String DatabasePreferencesPage_show_author_section;
+ public static String DatabasePreferencesPage_Show_nomenclatural_Ref;
+ public static String DatabasePreferencesPage_Show_nomenclaturalStatus;
+ public static String DatabasePreferencesPage_Show_Protologue;
+ public static String DatabasePreferencesPage_Show_Type_designation;
+ public static String DatabasePreferencesPage_Show_NameRelations;
+ public static String DatabasePreferencesPage_Define_Default_NomenclaturalCode;
+ public static String DatabasePreferencesPage_UseLocalPreferences;
+ public static String DatabasePreferencesPage_Specimen_Or_Observation;
+
+ static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
DeleteConfiguration_media_removeFromGallery=Remove the media from the image gallery but leave it in database
DeleteConfiguration_media_deleteIfUsedInTaxonDescription=Delete also if media is used in taxon description
DeleteConfiguration_media_deleteIfUsedInSpecimenDescription=Delete also if media is used in specimen description
-DeleteConfiguration_media_delete=Delete the media completely
\ No newline at end of file
+DeleteConfiguration_media_delete=Delete the media completely
+
+NewGrantedAuthority_AlreadyInDb=The granted authority already exists.
+
+SetSecundumConfiguration_IncludeAcceptedTaxa=include accepted taxa
+SetSecundumConfiguration_IncludeSynonyms=include synonyms
+SetSecundumConfiguration_OverwriteExistingAccepted=overwrite existing references for accepted taxa
+SetSecundumConfiguration_OverwriteExistingSynonyms=overwrite existing references for synonyms
+SetSecundumConfiguration_EmptySecundumDetail=empty existing details
+SetSecundumConfiguration_IncludeSharedtaxa=include shared taxa
+SetSecundumConfiguration_NewSecundum_Label=new secundum reference
+SetSecundumConfiguration_Description=If no reference is chosen existing secundum references are deleted
+
+DatabasePreferncesPage_Is_redList=Red List 2020
+DatabasePreferncesPage_Determination_only_for_field_unnits=Determinations only for field units
+DatabasePreferncesPage_Show_Collecting_Areas_in_general_section=Show collecting areas in general section
+DatabasePreferncesPage_Taxon_Associations=Show taxon associations of a specimen in details view
+
+DatabasePreferencesPage_Biocase_Provider=Biocase provider selection
+DatabasePreferencesPage_details_view_configuration=Details view configuration
+DatabasePreferencesPage_show_only_simple_details_view=Show only simple details view
+DatabasePreferencesPage_show_taxon=Show taxon
+DatabasePreferencesPage_show_lsid=Show LSID
+DatabasePreferencesPage_show_nomenclatural_code=Show nomenclatural code
+DatabasePreferencesPage_show_namecache=Show name cache
+DatabasePreferencesPage_show_appended_phrase=Show appended phrase
+DatabasePreferencesPage_show_rank=Show rank
+DatabasePreferencesPage_show_atomised_epithets=Show atomised epithets
+DatabasePreferencesPage_show_authorship_cache=Show authorship cache
+DatabasePreferencesPage_show_author_section=Show author section
+DatabasePreferencesPage_Show_nomenclatural_Ref=Show nomenclatural reference
+DatabasePreferencesPage_Show_nomenclaturalStatus=Show nomenclatural status
+DatabasePreferencesPage_Show_Protologue=Show protologue
+DatabasePreferencesPage_Show_Type_designation=Show type designation
+DatabasePreferencesPage_Show_NameRelations=Show name relations
+DatabasePreferencesPage_Define_Default_NomenclaturalCode=Define default nomenclatural code
+DatabasePreferencesPage_UseLocalPreferences=Allow to use local preference
+DatabasePreferencesPage_Specimen_Or_Observation=Specimen or observation configuration
+
+
DeleteConfiguration_media_deleteIfUsedInTaxonDescription=Lösche das Medienobjekt, auch wenn es von einem Taxon verwendet wird
DeleteConfiguration_media_deleteIfUsedInSpecimenDescription=Lösche das Medienobjekt, auch wenn es von einem Specimen verwendet wird
DeleteConfiguration_media_delete=Lösche das Medienobjekt
+
+NewGrantedAuthority_AlreadyInDb=Die GrantedAuthority ist bereits in der DB enthalten.
+
+SetSecundumConfiguration_IncludeAcceptedTaxa=anwenden auf akzeptierte Taxa
+SetSecundumConfiguration_IncludeSynonyms=anwenden auf Synonyme
+SetSecundumConfiguration_OverwriteExistingAccepted=bestehende Secundum Referenzen bei akzeptierten Taxa überschreiben
+SetSecundumConfiguration_OverwriteExistingSynonyms=bestehende Secundum Referenzen bei Synonymen überschreiben
+SetSecundumConfiguration_EmptySecundumDetail=bestehende Details von Secundum Referenzen löschen
+SetSecundumConfiguration_IncludeSharedtaxa=auch mehrfach verwendete Taxa mit einbeziehen
+SetSecundumConfiguration_NewSecundum_Label=neue Secundum Referenz
+SetSecundumConfiguration_Description=Wenn keine Referenz ausgewählt wird, werden die bestehenden Secundum Referenzen gelöscht
+
+DatabasePreferncesPage_Is_redList=Rote Liste 2020
+DatabasePreferncesPage_Determination_only_for_field_unnits=Determinations nur für Field Units
+DatabasePreferncesPage_Show_Collecting_Areas_in_general_section=Zeige Sammelgebiete im allgemeinen Teil
+DatabasePreferncesPage_Taxon_Associations=Zeige Taxon Assoziationen eines Specimen im Details View
+
+DatabasePreferencesPage_Biocase_Provider=Biocase Provider Auswahl
+DatabasePreferencesPage_details_view_configuration=Details view Konfiguration
+DatabasePreferencesPage_show_only_simple_details_view=Zeige nur einen einfachen (konfigurierbaren) Details View
+DatabasePreferencesPage_show_taxon=Zeige Taxon
+DatabasePreferencesPage_show_lsid=Zeige LSID
+DatabasePreferencesPage_show_nomenclatural_code=Zeige Nomenklatorischen Code
+DatabasePreferencesPage_show_namecache=Zeige Namecache
+DatabasePreferencesPage_show_appended_phrase=Zeige appended phrase
+DatabasePreferencesPage_show_rank=Zeige Rang
+DatabasePreferencesPage_show_atomised_epithets=Zeige atomisierte Epithete
+DatabasePreferencesPage_show_authorship_cache=Zeige Autoren Cache
+DatabasePreferencesPage_show_author_section=Zeige den Autoren Bereich
+DatabasePreferencesPage_Show_nomenclatural_Ref=Zeige nomenklatorische Referenz
+DatabasePreferencesPage_Show_nomenclaturalStatus=Zeige nomenklatorischen Status
+DatabasePreferencesPage_Show_Protologue=Zeige den Protologue
+DatabasePreferencesPage_Show_Type_designation=Zeige Type Designations
+DatabasePreferencesPage_Show_NameRelations=Zeige Namensrelationen
+DatabasePreferencesPage_Define_Default_NomenclaturalCode=Festlegen des default Nomenklatorischen Codes
+DatabasePreferencesPage_UseLocalPreferences=Erlaube das lokale Ãœberschreiben
+DatabasePreferencesPage_Specimen_Or_Observation=Konfiguration von Specimen und Observationen
/**
* Copyright (C) 2009 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
* Implements a {@link Comparator} for {@link DefinedTermBase} objects based on the term's label.
* The compare algorithm compares a term's label. Example: If used on an unsorted list of terms, the
* list will be alphabetically sorted by label afterwards.
- *
+ *
* @author n.hoffmann
* @date Jan 18, 2012
*
}
String label1 = o1.getLabel(CdmStore.getDefaultLanguage()) != null ? o1.getLabel(CdmStore.getDefaultLanguage()) : o1.getTitleCache();
String label2 = o2.getLabel(CdmStore.getDefaultLanguage()) != null ? o2.getLabel(CdmStore.getDefaultLanguage()) : o2.getTitleCache();
- return label1.compareTo(label2);
+ int result = label1.compareTo(label2);
+ if (result == 0){
+ return o1.getUuid().compareTo(o2.getUuid());
+ }
+ return result;
}
};
import eu.etaxonomy.cdm.model.description.Distribution;
import eu.etaxonomy.cdm.model.description.Feature;
import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
+import eu.etaxonomy.cdm.model.description.KeyStatement;
import eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm;
import eu.etaxonomy.cdm.model.description.QuantitativeData;
import eu.etaxonomy.cdm.model.description.SpecimenDescription;
*/
public static String getCache(DescriptionElementBase element,
Language language) {
-
+
String mainElementLabel= null;
DescriptionBase<?> descr = element.getInDescription();
+ descr = CdmBase.deproxy(descr, DescriptionBase.class);
+
if (descr != null){
if (descr.isInstanceOf(TaxonDescription.class)){
Taxon taxon = CdmBase.deproxy(descr, TaxonDescription.class).getTaxon();
}
}
}
-
+
+
String cache = null;
if (element instanceof TextData) {
- cache = ((TextData) element).getText(language);
+ //cache = ((TextData) element).getText(language);
+ cache = "Text Data";
}
if (element instanceof CommonTaxonName) {
cache = ((CommonTaxonName) element).getName();
* @return a {@link java.lang.String} object.
*/
public static String getObjectDescription(Object element) {
+ String resultString = null;
if (element instanceof IdentifiableEntity) {
try{
- return ((IdentifiableEntity) element).getTitleCache();
+ resultString = ((IdentifiableEntity) element).getTitleCache();
}catch(LazyInitializationException e){
String result = "No Session to initialize title cache for IdentifiableEntity";
MessagingUtils.error(DescriptionHelper.class, result, e);
- return "TODO: " + result;
+ resultString = "TODO: " + result;
}
}else if (element instanceof OriginalSourceBase) {
try{
OriginalSourceBase<?> originalSource = (OriginalSourceBase<?>) element;
// ISourceable sourcedObject = originalSource.getSourcedObj();
- //due to #5743 the bidirectionality for sourced object had to be removed
+ //due to #5743 the bidirectionality for sourced object had to be removed
String sourceObjectTitle = "sourced object data not available (#5743)";
// if(sourcedObject instanceof IIdentifiableEntity){
// sourceObjectTitle = ((IdentifiableEntity) sourcedObject).getTitleCache();
// throw new IllegalStateException("Unknown ISourceable object for given OriginalSourceBase");
// }
- return CdmUtils.concat("; ", new String[]{originalSource.getIdNamespace(), originalSource.getIdInSource(), sourceObjectTitle});
+ resultString = CdmUtils.concat("; ", new String[]{originalSource.getIdNamespace(), originalSource.getIdInSource(), sourceObjectTitle});
}catch(LazyInitializationException e){
String result = "Error initializing title cache for ISourceable of an OriginalSourceBase";
MessagingUtils.error(DescriptionHelper.class, result, e);
- return "TODO: " + result;
+ resultString = "TODO: " + result;
}
}else if (element instanceof LanguageStringBase) {
- return ((LanguageStringBase) element).getText();
+ resultString = ((LanguageStringBase) element).getText();
}else if (element instanceof DescriptionElementBase) {
- return getCache((DescriptionElementBase) element);
+ resultString = getCache((DescriptionElementBase) element);
}else if (element instanceof RelationshipBase<?, ?, ?>) {
- return getCache((RelationshipBase<?, ?, ?>) element);
+ resultString = getCache((RelationshipBase<?, ?, ?>) element);
}else if (element instanceof TypeDesignationBase<?>) {
- return getCache((TypeDesignationBase<?>) element);
+ resultString = getCache((TypeDesignationBase<?>) element);
}else if (element instanceof HomotypicalGroup) {
- return getCache((HomotypicalGroup) element);
+ resultString = getCache((HomotypicalGroup) element);
}else if (element instanceof TaxonNode) {
- return getCache((TaxonNode) element);
+ resultString = getCache((TaxonNode) element);
}else if (element instanceof DeterminationEvent) {
- return getCache((DeterminationEvent) element);
+ resultString = getCache((DeterminationEvent) element);
}else if (element instanceof Marker) {
Marker marker = (Marker) element;
MarkerType type = marker.getMarkerType();
- return (type == null ? "- no marker type -" : marker.getMarkerType().getLabel()) + " (" + marker.getFlag() + ")";
+ resultString = (type == null ? "- no marker type -" : marker.getMarkerType().getLabel()) + " (" + marker.getFlag() + ")";
}else if (element instanceof User) {
User user = (User) element;
- return user.getUsername();
+ resultString = user.getUsername();
}else if (element instanceof Group) {
Group group = (Group) element;
- return group.getName();
- }else{
+ resultString = group.getName();
+ }else if (element instanceof KeyStatement) {
+ KeyStatement keyStatement = (KeyStatement) element;
+ resultString = getCache(keyStatement);
+ }else{
// TODO write return texts for HomotypicalGroup, etc.
- return element.toString();
+ resultString = element.toString();
+ }
+
+ if (resultString == null){
+ resultString = element.toString();
}
+ return resultString;
}
if (StringUtils.isBlank(taxonStr)){
taxonStr = "no or unlabled taxon";
}
-
-
+
+
//unit
SpecimenOrObservationBase<?> unit = detEvent.getIdentifiedUnit();
String unitStr;
}else{
unitStr = "no unit";
}
-
+
String result = CdmUtils.concat(" determined as ", unitStr, taxonStr);
return result;
}
}
result = CdmUtils.concat(": ", result, parentStr);
-
+
return result;
}
if (designation.isInstanceOf(SpecimenTypeDesignation.class)){
to = ((SpecimenTypeDesignation)designation).getTypeSpecimen();
}else if (designation.isInstanceOf(NameTypeDesignation.class)){
- to = ((NameTypeDesignation)designation).getTypeName();
+ to = ((NameTypeDesignation)designation).getTypeName();
}else{
throw new RuntimeException("Type Designation class not supported: " + designation.getClass().getName());
}
for (TaxonNameBase<?,?> name : from){
CdmUtils.concat(",", fromString, name.getTitleCache());
}
- String result = CdmUtils.concat(" ", new String[]{from == null ? null : fromString,
+ String result = CdmUtils.concat(" ", new String[]{from == null ? null : fromString,
typeLabel, to == null? null : to.getTitleCache()});
return result;
}
if (StringUtils.isBlank(typeLabel)){
typeLabel = "->";
}
- String result = CdmUtils.concat(" ", new String[]{from == null ? null : from.getTitleCache(),
+ String result = CdmUtils.concat(" ", new String[]{from == null ? null : from.getTitleCache(),
typeLabel, to == null? null : to.getTitleCache()});
return result;
}
-
+
private static String getCache(HomotypicalGroup hg) {
String result = "";
return result;
}
+ private static String getCache(KeyStatement ks) {
+ String result = "";
+
+ result = "KeyStatement";
+
+ return result;
+ }
+
/**
* <p>getObjectClassname</p>
*
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
@Override
public int compare(DescriptionElementBase o1, DescriptionElementBase o2) {
- return DescriptionHelper.getLabel(o1).compareTo(DescriptionHelper.getLabel(o2));
+ if (o1.equals(o2)){
+ return 0;
+ }
+ int result = DescriptionHelper.getLabel(o1).compareTo(DescriptionHelper.getLabel(o2));
+ if (result == 0){
+ return o1.getUuid().compareTo(o2.getUuid());
+ }
+ return result;
}
};
-
+
private Set<FeatureNodeContainer> featureNodeContainers = new HashSet<FeatureNodeContainer>();
-
+
private FeatureNodeContainer root;
private DescriptionBase description;
private FeatureTree featureTree;
-
+
public FeatureNodeContainerTree(DescriptionBase description, FeatureTree featureTree){
this.description = description;
this.featureTree = featureTree;
-
+
root = new FeatureNodeContainer(this);
-
+
buildTree();
}
-
+
/**
* Traverses the given {@link FeatureNode} and computes a FeatureNodeContainer branch if the
* given {@link TaxonDescription} has elements for the given feature node or any of its children
*/
public void buildTree(){
List<FeatureNode> children = featureTree.getRootChildren();
-
+
// if(description.getElements().isEmpty()){
// return;
// }
-
+
for(FeatureNode featureNode : children){
root.findLeaves(featureNode);
}
}
-
+
/**
* <p>getFeatureNodeContainerForDescriptionElement</p>
*
*/
public FeatureNodeContainer getFeatureNodeContainerForDescriptionElement (DescriptionElementBase descriptionElement) {
List<FeatureNodeContainer> leafs = root.getLeafs();
-
+
for(FeatureNodeContainer container : leafs){
if(container.getDescriptionElements().contains(descriptionElement)){
return container;
}
return null;
}
-
+
/**
* Returns all elements contained in the given {@link DescriptionBase description} that have the given {@link Feature feature}.
- *
+ *
* @param description
* @param feature
* @return a list of description elements with the given feature alphabetically sorted by {@link DescriptionHelper#getLabel(Object)}
*/
public List<DescriptionElementBase> getDescriptionsElementsForFeature(Feature feature) {
List<DescriptionElementBase> featureElements = new ArrayList<DescriptionElementBase>();
-
+
Set<DescriptionElementBase> elements = description.getElements();
-
+
if (elements != null) {
for (DescriptionElementBase element : elements) {
- Feature elementFeature = (Feature) HibernateProxyHelper.deproxy(element.getFeature());
-
+ Feature elementFeature = HibernateProxyHelper.deproxy(element.getFeature());
+
if (feature.equals(elementFeature)) {
featureElements.add(element);
}
}
}
-
+
if(featureElements.size() != 0){
Collections.sort(featureElements, comparator);
}
-
+
return featureElements;
}
-
-
- public FeatureNodeContainer getFeatureNodeContainer(Feature feature) {
+
+
+ public FeatureNodeContainer getFeatureNodeContainer(Feature feature) {
List<FeatureNodeContainer> leafs = root.getLeafs();
-
+
for(FeatureNodeContainer container : leafs){
if(container.getFeature().equals(feature)){
return container;
}
return null;
}
-
+
public FeatureNodeContainer getFeatureNodeContainer(FeatureNode featureNode){
List<FeatureNodeContainer> leafs = root.getLeafs();
-
+
for(FeatureNodeContainer container : leafs){
if(container.getFeatureNode().equals(featureNode)){
return container;
}
return null;
}
-
+
public void addContainer(FeatureNodeContainer container){
featureNodeContainers.add(container);
}
/**
- *
+ *
*/
public void removeContainer(FeatureNodeContainer container) {
featureNodeContainers.remove(container);
}
-
+
public FeatureNodeContainer getRoot() {
return root;
}
public FeatureTree getFeatureTree() {
return featureTree;
}
-
+
}
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.ext.ipni.IIpniService;
import eu.etaxonomy.cdm.ext.ipni.IpniService;
setDescription("Query IPNI service for references");
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
/** {@inheritDoc} */
@Override
public void createControl(Composite parent) {
@Override
public void widgetSelected(SelectionEvent e) {
String query = text_query.getText();
- List<Reference> publications = ipniService.getPublications(query, null, (ICdmApplicationConfiguration) CdmStore.getCurrentApplicationConfiguration(), null);
+ List<Reference> publications = ipniService.getPublications(query, null, (ICdmRepository) CdmStore.getCurrentApplicationConfiguration(), null);
viewer.setInput(publications);
}
public NewDerivedUnitBaseWizard() {
super();
- CdmStore.getCurrentSessionManager().bindNullSession();
}
public NewDerivedUnitBaseWizard(SpecimenOrObservationType specOrObsType) {
@Override
protected void saveEntity() {
setEntity(CdmStore.getService(IOccurrenceService.class).merge(getEntity()));
-
+
}
import eu.etaxonomy.cdm.api.service.IGrantedAuthorityService;
import eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl;
+import eu.etaxonomy.taxeditor.l10n.Messages;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetailWizardPage;
*/
@Override
protected void saveEntity() {
- CdmStore.getService(IGrantedAuthorityService.class).merge(getEntity(), true);
-
+ try{
+ CdmStore.getService(IGrantedAuthorityService.class).merge(getEntity(), true);
+ }catch (Exception e){
+ MessagingUtils.info(Messages.NewGrantedAuthority_AlreadyInDb);
+ }
+
}
/* (non-Javadoc)
import eu.etaxonomy.cdm.model.name.BotanicalName;
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
import eu.etaxonomy.cdm.model.name.ZoologicalName;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.store.CdmStore;
protected NonViralName createNewEntity() {
NomenclaturalCode code = PreferencesUtil.getPreferredNomenclaturalCode();
if(code.equals(NomenclaturalCode.ICNAFP )){
- return BotanicalName.NewInstance(null);
+ return TaxonNameFactory.NewBotanicalInstance(null);
}else if(code.equals(NomenclaturalCode.ICZN)){
- return ZoologicalName.NewInstance(null);
+ return TaxonNameFactory.NewZoologicalInstance(null);
}
return null;
}
import eu.etaxonomy.cdm.api.service.ITaxonService;
import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameWizardPage;
/** {@inheritDoc} */
@Override
protected Taxon createNewEntity() {
- return Taxon.NewInstance(NonViralName.NewInstance(null), null);
+ return Taxon.NewInstance(TaxonNameFactory.NewNonViralInstance(null), null);
}
/** {@inheritDoc} */
* @date 04.12.2013
*
*/
-public abstract class AbstractDescriptionPostOperation<T extends IDescribable<D>, D extends DescriptionBase<?>> extends AbstractPostOperation<T> {
+public abstract class AbstractDescriptionPostOperation<T extends IDescribable, D extends DescriptionBase> extends AbstractPostOperation<T> {
protected D description;
this.isImageGallery = isImageGallery;
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.operations.AbstractOperation#execute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
/** {@inheritDoc} */
@Override
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
+import eu.etaxonomy.cdm.model.name.INonViralName;
+import eu.etaxonomy.cdm.model.name.ITaxonNameBase;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.name.Rank;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
/**
* The name that should get parsed
*/
- private NonViralName name;
+ private INonViralName name;
private boolean doResolveInReferences;
return name;
}
- public static NonViralName parseName(String unparsedNameString, Rank rank){
- NonViralName name = nonViralNameParser.parseFullName(unparsedNameString,
+ public static TaxonNameBase<?,?> parseName(String unparsedNameString, Rank rank){
+ INonViralName name = nonViralNameParser.parseFullName(unparsedNameString,
PreferencesUtil.getPreferredNomenclaturalCode(), rank);
-
- return name;
+
+ return (TaxonNameBase<?,?>)name;
}
/**
*
* @return a {@link eu.etaxonomy.cdm.model.name.TaxonNameBase} object.
*/
- public static NonViralName createEmptyName(){
- return nonViralNameParser.getNonViralNameInstance("", PreferencesUtil.getPreferredNomenclaturalCode());
+ public static TaxonNameBase<?,?> createEmptyName(){
+ return (TaxonNameBase<?,?>)nonViralNameParser.getNonViralNameInstance("", PreferencesUtil.getPreferredNomenclaturalCode());
}
/**
*
* @return The parsed NonViralName object
*/
- public NonViralName parse(String unparsedNameString){
+ public INonViralName parse(String unparsedNameString){
// String unparsedNameString = "";
// try {
*
* @return The parsed NonViralName object
*/
- public NonViralName parseAndResolveDuplicates(String unparsedNameString){
+ public INonViralName parseAndResolveDuplicates(String unparsedNameString){
- NonViralName parsedName = parse(unparsedNameString);
+ INonViralName parsedName = parse(unparsedNameString);
MatchMatrix matchMatrix = findMatches(parsedName);
/**
* @param name The name to resolve duplicates for.
*/
- private void resolveDuplicates(NonViralName name, MatchMatrix matchMatrix) {
+ private void resolveDuplicates(INonViralName name, MatchMatrix matchMatrix) {
resolveDuplicateNames(name, matchMatrix);
resolveAllDuplicateAuthors(name, matchMatrix);
/**
* @param name The name to resolve duplicates for.
*/
- private void resolveDuplicateNames(NonViralName name, MatchMatrix matchMatrix) {
+ private void resolveDuplicateNames(INonViralName name, MatchMatrix matchMatrix) {
if (matchMatrix.duplicateNames.size() == 1){
- name = (NonViralName) matchMatrix.duplicateNames.iterator().next();
+ name = matchMatrix.duplicateNames.iterator().next();
}else if(matchMatrix.duplicateNames.size() > 1){
// FIXME TODO resolve multiple duplications. Use first match for a start
- name = (NonViralName) matchMatrix.duplicateNames.iterator().next();
+ name = matchMatrix.duplicateNames.iterator().next();
}
}
/**
* @param name The name to resolve duplicates for.
*/
- private void resolveDuplicateReferences(NonViralName name, MatchMatrix matchMatrix) {
+ private void resolveDuplicateReferences(INonViralName name, MatchMatrix matchMatrix) {
if(matchMatrix.duplicateReferences.size() == 1){
// exactly one match. We assume that the user wants this reference
INomenclaturalReference duplicate = matchMatrix.duplicateReferences.iterator().next();
/**
* @param name The name to resolve duplicates for.
*/
- private void resolveDuplicateInReferences(NonViralName name, MatchMatrix matchMatrix) {
+ private void resolveDuplicateInReferences(INonViralName name, MatchMatrix matchMatrix) {
Reference reference = (Reference) HibernateProxyHelper.deproxy(name.getNomenclaturalReference());
if(matchMatrix.duplicateInReferences.size() > 0){
/**
* @param name The name to resolve duplicates for.
*/
- private void resolveAllDuplicateAuthors(NonViralName name, MatchMatrix matchMatrix) {
+ private void resolveAllDuplicateAuthors(INonViralName name, MatchMatrix matchMatrix) {
if(matchMatrix.duplicateCombinationAuthorships.size() > 0){
name.setCombinationAuthorship(matchMatrix.duplicateCombinationAuthorships.iterator().next());
*
* @param name The NonViralName to find matches for.
*/
- private MatchMatrix findMatches(NonViralName name){
+ private MatchMatrix findMatches(INonViralName name){
MatchMatrix matchMatrix = new MatchMatrix();
* @param taxonNameBase The TaxonNameBase to find matches for.
* @return A <code>List</code> of possibly matching TaxonNameBase's.
*/
- private List<TaxonNameBase> findMatchingLatinNames(TaxonNameBase taxonNameBase) {
+ private List<TaxonNameBase> findMatchingLatinNames(ITaxonNameBase taxonNameBase) {
try {
- return CdmStore.getCommonService().findMatching(taxonNameBase, MatchStrategy.NonViralName);
+ return CdmStore.getCommonService().findMatching(TaxonNameBase.castAndDeproxy(taxonNameBase), MatchStrategy.NonViralName);
} catch (MatchException e) {
public static final String PROMPT_FOR_OPEN_SPECIMEN_IN_EDITOR = "eu.etaxonomy.taxeditor.specimen.promptForOpenSpecimenInEditor";
// TODO RL
- public static final String IS_RL = "eu.etaxonomy.taxeditor.isRL";
+
public static final String DEFAULT_LANGUAGE_EDITOR = "eu.etaxonomy.taxeditor.default.language";
*/
public static final String P2_REPOSITORY_LIST = "eu.etaxonomy.taxeditor.p2.repositories";
public static final String ALLOW_OVERRIDE_NAMEDETAILS = "eu.etaxonomy.taxeditor.details.allow_override";
+ public static final String ALLOW_OVERRIDE_RL = "eu.etaxonomy.taxeditor.isRL.allow_override";
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.PlatformUI;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
/**
private boolean isRankActivated = true;
private boolean isAtomisedEpithetsActivated = true;
private boolean isAuthorshipSectionActivated = true;
+ private boolean isAuthorCacheActivated = true;
private boolean isNomenclaturalReferenceSectionActivated = true;
private boolean isNomenclaturalStatusSectionActivated = true;
private boolean isTypeDesignationSectionActivated = true;
StringBuffer result = new StringBuffer();
//the preference value is build like this:
//<section1>:true;<section2>:false....
+ result.append("simpleViewActivated");
+ result.append(":");
+ result.append(this.isSimpleDetailsViewActivated);
+ result.append(";");
+
result.append("taxon");
result.append(":");
result.append(this.isTaxonSectionActivated);
return result.toString();
}
+ /**
+ * @return the isAuthorCacheActivated
+ */
+ public boolean isAuthorCacheActivated() {
+ return isAuthorCacheActivated;
+ }
+
+ /**
+ * @param isAuthorCacheActivated the isAuthorCacheActivated to set
+ */
+ public void setAuthorCacheActivated(boolean isAuthorCacheActivated) {
+ this.isAuthorCacheActivated = isAuthorCacheActivated;
+ }
+
}
package eu.etaxonomy.taxeditor.preference;
+import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.jface.preference.PreferencePage;
public class NameDetailsViewConfiguration extends PreferencePage implements IWorkbenchPreferencePage {
Composite child ;
@Override
public void init(IWorkbench workbench) {
-
+
}
/*
*/
@Override
protected Control createContents(Composite parent) {
-
+
Composite composite = new Composite(parent, SWT.NULL);
composite.setLayout(new GridLayout());
+
+ //boolean isAllowOverride = PreferencesUtil
isSimpleDetailsViewActivated = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION);
final Button activateCheckButton = new Button(composite, SWT.CHECK);
activateCheckButton.setText("Show only a simple name details view");
}
}
});
-
+
child = new Composite(composite, SWT.NULL);
child.setLayout(new GridLayout());
child.setVisible(isSimpleDetailsViewActivated);
-
+
final Button showTaxon = new Button(child, SWT.CHECK);
boolean isShowTaxon = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON);
showTaxon.setText("Show taxon of the name");
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON, isShowTaxon);
}
});
-
+
final Button showLsid = new Button(child, SWT.CHECK);
boolean isShowLSID = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID);
showLsid.setText("Show Lsid of the name");
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID, isShowLSID);
}
});
-
+
final Button showNomenclaturalCode = new Button(child, SWT.CHECK);
boolean isShowNomenclaturalCode = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE);
showNomenclaturalCode.setText("Show the nomenclatural code");
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE, isShowNomenclaturalCode);
}
});
-
+
final Button showNameCache = new Button(child, SWT.CHECK);
boolean isShowNameCache = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE);
showNameCache.setText("Show nameCache of the name (only the scientific name without the author and year)");
@Override
public void widgetSelected(SelectionEvent e) {
boolean isShowAppendedPhrase = showAppendedPhrase.getSelection();
- PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAMECACHE, isShowAppendedPhrase);
+ PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_APPENDED_PHRASE, isShowAppendedPhrase);
}
});
-
+
final Button showRank = new Button(child, SWT.CHECK);
boolean isShowRank = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_RANK);
showRank.setText("Show rank of the name");
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP, isShowAuthorship);
}
});
-
+
final Button showNomenclaturalRef = new Button(child, SWT.CHECK);
boolean isShowNomenclaturalRef = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE);
showNomenclaturalRef.setText("Show nomenclatural reference section");
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE, isShowNomenclaturalRef);
}
});
-
+
final Button showNomenclaturalStatus = new Button(child, SWT.CHECK);
boolean isShowNomenclaturalStatus = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS);
showNomenclaturalStatus.setText("Show nomenclatural status section");
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS, isShowNomenclaturalStatus);
}
});
-
+
final Button showProtologue = new Button(child, SWT.CHECK);
boolean isShowProtologue = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE);
showProtologue.setText("Show protologue section");
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE, isShowProtologue);
}
});
-
+
final Button showTypeDesignation = new Button(child, SWT.CHECK);
boolean isShowTypeDesignation = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION);
showTypeDesignation.setText("Show name type designation section");
PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION, isShowTypeDesignation);
}
});
-
-
+
+
final Button showNameRelationship = new Button(child, SWT.CHECK);
boolean isShowNameRelationship = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP);
showNameRelationship.setText("Show name relationship section");
@Override
public void widgetSelected(SelectionEvent e) {
boolean isShowNameRelationship = showNameRelationship.getSelection();
- PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION, isShowNameRelationship);
+ PreferencesUtil.getPreferenceStore().setValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP, isShowNameRelationship);
}
});
-
+
if(isSimpleDetailsViewActivated){
child.setEnabled(true);
}else{
return composite;
-
+
}
import org.eclipse.ui.IWorkbench;\r
import org.eclipse.ui.IWorkbenchPreferencePage;\r
\r
-import eu.etaxonomy.taxeditor.Messages;\r
+import eu.etaxonomy.taxeditor.l10n.Messages;\r
\r
public class OrderPreferences extends PreferencePage implements IWorkbenchPreferencePage {\r
\r
Composite composite = new Composite(parent, SWT.NULL);\r
composite.setLayout(new GridLayout());\r
\r
+ Label label = new Label(composite, SWT.NONE);\r
+ label.setText("Sorting");\r
+\r
+\r
isNaturalOrderActivated = PreferencesUtil.getSortNodesNaturally();\r
final Button activateNaturalOrderCheckButton = new Button(composite, SWT.RADIO);\r
activateNaturalOrderCheckButton.setText("Enable Natural Order");\r
\r
isRankAndNameOrderActivated = !PreferencesUtil.getSortNodesStrictlyAlphabetically() && !PreferencesUtil.getSortNodesNaturally();\r
final Button activateRankAndNameOrderActivatedCheckButton = new Button(composite, SWT.RADIO);\r
- activateRankAndNameOrderActivatedCheckButton.setText("Enable Rank and Aplhabetical Order");\r
+ activateRankAndNameOrderActivatedCheckButton.setText("Enable Rank and Alphabetical Order");\r
activateRankAndNameOrderActivatedCheckButton.setSelection(isRankAndNameOrderActivated);\r
\r
isAlphabeticalOrderActivated = PreferencesUtil.getSortNodesStrictlyAlphabetically();\r
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeConfigurator;
import eu.etaxonomy.cdm.api.service.IFeatureTreeService;
import eu.etaxonomy.cdm.api.service.ITermService;
getPreferenceKey(preferredCode));
}
else{
- ICdmApplicationConfiguration controller;
+ ICdmRepository controller;
controller = CdmStore.getCurrentApplicationConfiguration();
PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewDatabaseInstance(), PreferencePredicate.NomenclaturalCode);
CdmPreference preference = null;
* @return a {@link eu.etaxonomy.cdm.model.name.NomenclaturalCode} object.
*/
public static NomenclaturalCode getPreferredNomenclaturalCode(boolean useLocal) {
- ICdmApplicationConfiguration controller;
+
CdmPreference pref = null;
if (!useLocal){
- try{
- controller = CdmStore.getCurrentApplicationConfiguration();
- PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewDatabaseInstance(), PreferencePredicate.NomenclaturalCode);
- pref = controller.getPreferenceService().find(key);
- }catch(Exception e){
- e.printStackTrace();
- }
+ pref = getPreferenceFromDB(PreferencePredicate.NomenclaturalCode);
}
String preferredCode;
return null;
}
+
+ private static CdmPreference getPreferenceFromDB(PreferencePredicate predicate){
+ ICdmRepository controller;
+ CdmPreference pref = null;
+
+ try{
+ controller = CdmStore.getCurrentApplicationConfiguration();
+ PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewDatabaseInstance(), predicate);
+ pref = controller.getPreferenceService().find(key);
+ }catch(Exception e){
+ e.printStackTrace();
+ }
+
+ return pref;
+
+ }
+
+
public static String getPreferredDefaultLangugae(){
String preferredLanguage = getPreferenceStore().getString(DEFAULT_LANGUAGE_EDITOR);
if(StringUtils.isNotEmpty(preferredLanguage) && StringUtils.isNotBlank(preferredLanguage)){
getPreferenceStore().setDefault(IPreferenceKeys.DISTRIBUTION_AREA_PREFRENCES_ACTIVE, false);
getPreferenceStore().setDefault(CHECKLIST_ID_IN_VOCABULARY, true);
getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_ATOMISED_EPITHETS, true);
+ getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_AUTHORSHIP_CACHE, true);
getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_AUTHORSHIP, true);
getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_HYBRID, true);
getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_LSID, true);
getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_PROTOLOGUE, true);
getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_RANK, true);
getPreferenceStore().setDefault(SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION, true);
+ getPreferenceStore().setDefault(SORT_NODES_NATURALLY, false);
+ getPreferenceStore().setDefault(SORT_NODES_ALPHABETICALLY, false);
+
}
/**
}
public static void setNomenclaturalCodePreferences(){
- ICdmApplicationConfiguration controller;
+ ICdmRepository controller;
controller = CdmStore.getCurrentApplicationConfiguration();
PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewDatabaseInstance(), PreferencePredicate.NomenclaturalCode);
CdmPreference preference = null;
* <p>
* getSortRanksNaturally
* </p>
- *
- * @return a boolean.
+ *
+ * @return a boolean.
*/
public static boolean getSortNodesNaturally() {
return getPreferenceStore().getBoolean(SORT_NODES_NATURALLY);
*/
public static NameDetailsConfigurator setPreferredNameDetailsConfiguration( boolean local) {
NameDetailsConfigurator config = new NameDetailsConfigurator(true);
- ICdmApplicationConfiguration controller;
- controller = CdmStore.getCurrentApplicationConfiguration();
- PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewDatabaseInstance(), PreferencePredicate.NameDetailsView);
+
CdmPreference preference = null;
- if (controller == null){
- return null;
+
+ if (!local) {
+ preference = getPreferenceFromDB(PreferencePredicate.NameDetailsView);
}
- preference = controller.getPreferenceService().find(key);
if (preference == null){
return null;
}
+
getPreferenceStore().setValue(ALLOW_OVERRIDE_NAMEDETAILS, preference.isAllowOverride());
//the preference value is build like this:
return config;
}
+ public static boolean getIsDeterminiationOnlyForFieldUnit(boolean local){
+ CdmPreference preference = null;
+
+ if (!local) {
+ preference = getPreferenceFromDB(PreferencePredicate.DeterminationOnlyForFieldUnits);
+ }
+ if (preference == null){
+ return getPreferenceStore().getBoolean(DETERMINATION_ONLY_FOR_FIELD_UNITS);
+ }
+ return Boolean.valueOf(preference.getValue());
+ }
+
+ public static boolean getIsShowCollectingAreasInGeneralSection(boolean local){
+ CdmPreference preference = null;
+
+ if (!local) {
+ preference = getPreferenceFromDB(PreferencePredicate.ShowCollectingAreasInGeneralSection);
+ }
+ if (preference == null){
+ return getPreferenceStore().getBoolean(SHOW_COLLECTING_AREAS_IN_GENERAL_SECTION);
+ }
+ return Boolean.valueOf(preference.getValue());
+ }
+
+ public static boolean getIsShowTaxonAssociations(boolean local){
+ CdmPreference preference = null;
+
+ if (!local) {
+ preference = getPreferenceFromDB(PreferencePredicate.ShowTaxonAssociations);
+ }
+ if (preference == null){
+ return getPreferenceStore().getBoolean(SHOW_TAXON_ASSOCIATIONS);
+ }
+ return Boolean.valueOf(preference.getValue());
+ }
+
+
+
+
}
+++ /dev/null
-/**
-* Copyright (C) 2014 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.taxeditor.preference;
-
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-/**
- * @author a.oppermann
- * @date 13.08.2014
- *
- */
-public class TemplatePreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
-
- @Override
- public void init(IWorkbench workbench) {
- setPreferenceStore(PreferencesUtil.getPreferenceStore());
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
- */
- @Override
- protected void createFieldEditors() {
- addField(new BooleanFieldEditor(IPreferenceKeys.IS_RL, "Rote Liste 2020", getFieldEditorParent()));
- }
-
-}
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
import eu.etaxonomy.cdm.api.service.IPreferenceService;
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
import eu.etaxonomy.cdm.model.metadata.CdmPreference.PrefKey;
setPreferenceStore(TaxeditorStorePlugin.getDefault()
.getPreferenceStore());
- ICdmApplicationConfiguration controller = CdmStore.getCurrentApplicationConfiguration();
+ ICdmRepository controller = CdmStore.getCurrentApplicationConfiguration();
if (controller != null){
IPreferenceService service = controller.getPreferenceService();
PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewDatabaseInstance(), PreferencePredicate.NomenclaturalCode);
// if (result){
// String value = getPreferenceStore().getString(IPreferenceKeys.PREFERRED_NOMENCLATURAL_CODE_KEY);
// CdmPreference pref = CdmPreference.NewDatabaseInstance( PreferencePredicate.NomenclaturalCode, value);
-// ICdmApplicationConfiguration controller = CdmStore.getCurrentApplicationConfiguration();
+// ICdmRepository controller = CdmStore.getCurrentApplicationConfiguration();
// if (controller == null){
// return false;
// }
import eu.etaxonomy.cdm.api.application.CdmApplicationException;
import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController;
import eu.etaxonomy.cdm.api.application.CdmApplicationState;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
import eu.etaxonomy.cdm.api.cache.CdmServiceCacher;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.service.IAgentService;
private static CdmStore instance;
- //private final ICdmApplicationConfiguration applicationConfiguration;
+ //private final ICdmRepository applicationConfiguration;
private static ContextManager contextManager = new ContextManager();
CdmApplicationState.dispose();
}
- static void setInstance(ICdmApplicationConfiguration applicationController,
+ static void setInstance(ICdmRepository applicationController,
ICdmSource cdmSource) {
instance = new CdmStore(applicationController, cdmSource);
CdmApplicationState.setCdmServiceCacher(new CdmServiceCacher());
}
- private CdmStore(ICdmApplicationConfiguration applicationController,
+ private CdmStore(ICdmRepository applicationController,
ICdmSource cdmSource) {
CdmApplicationState.setCurrentAppConfig(applicationController);
CdmApplicationState.setCurrentDataChangeService(new CdmUIDataChangeService());
*
* @return
*/
- private ICdmApplicationConfiguration getApplicationConfiguration() {
+ private ICdmRepository getApplicationConfiguration() {
try {
return CdmApplicationState.getCurrentAppConfig();
} catch (Exception e) {
* {@link eu.etaxonomy.cdm.remote.api.application.CdmApplicationController}
* object.
*/
- public static ICdmApplicationConfiguration getCurrentApplicationConfiguration() {
+ public static ICdmRepository getCurrentApplicationConfiguration() {
if (getDefault() != null) {
return getDefault().getApplicationConfiguration();
}
}
/**
- * Generic method that will scan the getters of {@link ICdmApplicationConfiguration} for the given service
+ * Generic method that will scan the getters of {@link ICdmRepository} for the given service
* interface. If a matching getter is found the according service implementation is returned by
* invoking the getter otherwise the method returns <code>null</code>.
*
import eu.etaxonomy.cdm.api.application.CdmApplicationController;
import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController;
-import eu.etaxonomy.cdm.api.application.ICdmApplicationConfiguration;
+import eu.etaxonomy.cdm.api.application.ICdmRepository;
import eu.etaxonomy.cdm.config.CdmSourceException;
import eu.etaxonomy.cdm.config.ICdmSource;
import eu.etaxonomy.cdm.database.DbSchemaValidation;
import eu.etaxonomy.cdm.model.metadata.CdmMetaData;
import eu.etaxonomy.cdm.model.name.NomenclaturalStatusType;
import eu.etaxonomy.cdm.model.name.Rank;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.CdmProgressMonitorAdapter;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
CdmStore.close(monitor);
}
- ICdmApplicationConfiguration applicationController = null;
+ ICdmRepository applicationController = null;
if (!monitor.isCanceled()) {
CdmProgressMonitorAdapter subprogressMonitor = CdmProgressMonitorAdapter
}
});
- ICdmApplicationConfiguration applicationController = null;
+ ICdmRepository applicationController = null;
if (!monitor.isCanceled()) {
CdmProgressMonitorAdapter subprogressMonitor = CdmProgressMonitorAdapter
}
- private ICdmApplicationConfiguration getApplicationController(ICdmSource cdmSource, CdmProgressMonitorAdapter subprogressMonitor) {
+ private ICdmRepository getApplicationController(ICdmSource cdmSource, CdmProgressMonitorAdapter subprogressMonitor) {
if(cdmSource instanceof ICdmDataSource) {
return CdmApplicationController.NewInstance(applicationContextBean,
(ICdmDataSource)cdmSource,
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import org.eclipse.ui.menus.WorkbenchWindowControlContribution;
import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.remoting.source.CdmRemoteSource;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.util.ApplicationUtil;
Color color = AbstractUtility.getColor(colorId);
combo.setBackground(color);
+ if (label != null) {
+ label.setBackground(color);
+ }
+ colorId = !irrelevant ? Resources.COLOR_COMPOSITE_IRRELEVANT
+ : Resources.COLOR_COMPOSITE_BACKGROUND;
+ color = AbstractUtility.getColor(colorId);
+ combo.setForeground(color);
+
}
public void setVisibleItemCount(int count){
combo.addSelectionListener(this);
}
+
+
private String getDefaultLabelString() {
if(enumType.equals(ReferenceType.class)){
return "Reference Type";
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.cdm.api.application.CdmApplicationState;
import eu.etaxonomy.cdm.api.service.IUserService;
import eu.etaxonomy.cdm.model.metadata.CdmMetaData;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator;
+package eu.etaxonomy.taxeditor.ui.dialog.configurator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
* @date Feb 16, 2015
*
*/
-public class DeleteConfiguratorComposite extends Composite implements IExpansionListener{
+public class ConfiguratorComposite extends Composite implements IExpansionListener{
private final FormToolkit toolkit = new FormToolkit(Display.getCurrent());
private final Section sctnConfigure;
* @param parent
* @param style
*/
- public DeleteConfiguratorComposite(final Composite parent, int style) {
+ public ConfiguratorComposite(final Composite parent, int style) {
super(parent, SWT.NONE);
addDisposeListener(new DisposeListener() {
--- /dev/null
+/**
+* Copyright (C) 2017 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.dialog.configurator;
+
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.databinding.beans.PojoProperties;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wb.swt.ResourceManager;
+
+import eu.etaxonomy.cdm.api.service.config.SetSecundumForSubtreeConfigurator;
+import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.taxeditor.l10n.Messages;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.SelectionDialogFactory;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
+
+/**
+ * @author k.luther
+ * @date 10.02.2017
+ *
+ */
+public class SetSecundumConfiguratorWizardPage extends WizardPage implements Listener {
+ private DataBindingContext m_bindingContext;
+
+ private final static CdmFormFactory toolkit = new CdmFormFactory(Display.getCurrent());
+ private final SetSecundumForSubtreeConfigurator configurator;
+
+ private Button btnBrowseReference = null;
+ private Text textReference = null;
+ private Button btnClear = null;
+ private EntitySelectionElement<Reference> selectReference;
+ private Button btnIncludeAcceptedTaxa;
+ private Button btnIncludeSynonyms;
+ private Button btnOverwriteExistingAccepted;
+ private Button btnOverwriteExistingSynonyms;
+ private Button btnEmptySecundumDetail;
+ private Button btnIncludeSharedTaxa;
+
+
+ /**
+ * Create the composite.
+ * @param parent
+ * @param style
+ */
+ public SetSecundumConfiguratorWizardPage(SetSecundumForSubtreeConfigurator configurator, Wizard parent, int style ) {
+ super("Set Secundum Reference Configuration");
+ this.configurator = configurator;
+ this.setDescription(Messages.SetSecundumConfiguration_Description);
+
+// addDisposeListener(new DisposeListener() {
+// @Override
+// public void widgetDisposed(DisposeEvent e) {
+// toolkit.dispose();
+// }
+// });
+ // toolkit.paintBordersFor(this);
+// setLayout(new GridLayout());
+// setBackground(getBackground());
+
+
+
+
+ }
+
+ /**
+ * @return
+ */
+ private DataBindingContext initDataBindings() {
+ DataBindingContext bindingContext = new DataBindingContext();
+
+ IObservableValue observeSelectionBtnIncludeAcceptedTaxa = WidgetProperties.selection().observe(btnIncludeAcceptedTaxa);
+ IObservableValue includeAcceptedTaxaConfiguratorObserveValue = PojoProperties.value("includeAcceptedTaxa").observe(configurator);
+ bindingContext.bindValue(observeSelectionBtnIncludeAcceptedTaxa, includeAcceptedTaxaConfiguratorObserveValue, null, null);
+
+ IObservableValue observeSelectionBtnIncludeSynonyms = WidgetProperties.selection().observe(btnIncludeSynonyms);
+ IObservableValue includeSynonymsConfiguratorObserveValue = PojoProperties.value("includeSynonyms").observe(configurator);
+ bindingContext.bindValue(observeSelectionBtnIncludeSynonyms, includeSynonymsConfiguratorObserveValue, null, null);
+
+ IObservableValue observeSelectionBtnOverwriteExistingAccepted = WidgetProperties.selection().observe(btnOverwriteExistingAccepted);
+ IObservableValue overwriteExistingAcceptedConfiguratorObserveValue = PojoProperties.value("overwriteExistingAccepted").observe(configurator);
+ bindingContext.bindValue(observeSelectionBtnOverwriteExistingAccepted, overwriteExistingAcceptedConfiguratorObserveValue, null, null);
+
+ IObservableValue observeSelectionBtnOverwriteExistingSynonyms = WidgetProperties.selection().observe(btnOverwriteExistingSynonyms);
+ IObservableValue overwriteExistingSynonymsConfiguratorObserveValue = PojoProperties.value("overwriteExistingSynonyms").observe(configurator);
+ bindingContext.bindValue(observeSelectionBtnOverwriteExistingSynonyms, overwriteExistingSynonymsConfiguratorObserveValue, null, null);
+
+ IObservableValue observeSelectionBtnEmptySecundumDetail = WidgetProperties.selection().observe(btnEmptySecundumDetail);
+ IObservableValue emptySecundumDetailConfiguratorObserveValue = PojoProperties.value("emptySecundumDetail").observe(configurator);
+ bindingContext.bindValue(observeSelectionBtnEmptySecundumDetail, emptySecundumDetailConfiguratorObserveValue, null, null);
+
+ IObservableValue observeSelectionBtnIncludeSharedTaxal = WidgetProperties.selection().observe(btnIncludeSharedTaxa);
+ IObservableValue includeSharedTaxaConfiguratorObserveValue = PojoProperties.value("includeSharedTaxa").observe(configurator);
+ bindingContext.bindValue(observeSelectionBtnIncludeSharedTaxal, includeSharedTaxaConfiguratorObserveValue, null, null);
+ return bindingContext;
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+
+ final Composite composite = new Composite(parent, SWT.NULL);
+
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.numColumns = 1;
+
+ composite.setLayout(gridLayout);
+ final Composite compositeRef = new Composite(composite, SWT.NULL);
+
+ GridLayout gridLayoutRef = new GridLayout();
+ gridLayoutRef.numColumns = 4;
+
+ compositeRef.setLayout(gridLayoutRef);
+ compositeRef.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, true));
+ Label label = new Label(compositeRef, SWT.NONE);
+ label.setText(Messages.SetSecundumConfiguration_NewSecundum_Label);
+ label.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
+
+ textReference = new Text(compositeRef, SWT.BORDER);
+ textReference.setEditable(false);
+ textReference.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+ textReference.setTextLimit(Text.LIMIT);
+
+ btnBrowseReference = new Button(compositeRef, SWT.NONE);
+ btnBrowseReference.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/open.gif"));
+ btnBrowseReference.addListener(SWT.Selection, this);
+ btnClear = new Button(compositeRef, SWT.NONE);
+ btnClear.setImage(ResourceManager.getPluginImage("eu.etaxonomy.taxeditor.store", "icons/trash.gif"));
+ btnClear.addListener(SWT.Selection, this);
+
+ // selectReference = toolkit.createSelectionElement(Rights.class, getConversationHolder(), composite, "Rights", null, EntitySelectionElement.SELECTABLE);
+ final Composite control = new Composite(composite, SWT.NULL);
+ GridLayout gridLayoutControl = new GridLayout();
+ gridLayoutControl.numColumns = 1;
+
+ control.setLayout(gridLayoutControl);
+ control.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, true));
+ // Composite control = toolkit.createComposite(composite);
+ btnIncludeAcceptedTaxa = new Button(control, SWT.CHECK);
+ btnIncludeAcceptedTaxa.setText(Messages.SetSecundumConfiguration_IncludeAcceptedTaxa);
+ btnIncludeAcceptedTaxa.setSelection(configurator.isIncludeAcceptedTaxa());
+ btnIncludeAcceptedTaxa.addListener(SWT.Selection, new Listener() {
+ @Override
+ public void handleEvent(Event e) {
+ Button b = (Button) e.widget;
+ GridData data = (GridData) btnIncludeAcceptedTaxa.getLayoutData();
+ data.exclude = b.getSelection();
+ btnOverwriteExistingAccepted.setVisible(data.exclude);
+ btnIncludeSharedTaxa.setVisible(data.exclude);
+ if (!btnIncludeSynonyms.getSelection() && !data.exclude){
+ btnEmptySecundumDetail.setVisible(false);
+ setPageComplete(false);
+ }else{
+ btnEmptySecundumDetail.setVisible(true);
+ setPageComplete(true);
+ }
+ }
+ });
+
+ btnOverwriteExistingAccepted = new Button(control, SWT.CHECK);
+ btnOverwriteExistingAccepted.setText(Messages.SetSecundumConfiguration_OverwriteExistingAccepted);
+
+ btnIncludeSynonyms = new Button(control, SWT.CHECK);
+ btnIncludeSynonyms.setText(Messages.SetSecundumConfiguration_IncludeSynonyms);
+ btnIncludeSynonyms.setSelection(configurator.isIncludeSynonyms());
+ btnIncludeSynonyms.addListener(SWT.Selection, new Listener() {
+ @Override
+ public void handleEvent(Event e) {
+ Button b = (Button) e.widget;
+ GridData data = (GridData) btnIncludeSynonyms.getLayoutData();
+ data.exclude = b.getSelection();
+ btnOverwriteExistingSynonyms.setVisible(data.exclude);
+ if (!btnIncludeAcceptedTaxa.getSelection() && !data.exclude){
+ btnEmptySecundumDetail.setVisible(false);
+ setPageComplete(false);
+ }else{
+ btnEmptySecundumDetail.setVisible(true);
+ setPageComplete(true);
+ }
+
+ }
+ });
+
+ btnOverwriteExistingAccepted.setSelection(configurator.isOverwriteExistingAccepted());
+ btnOverwriteExistingSynonyms = new Button(control, SWT.CHECK);
+ btnOverwriteExistingSynonyms.setText(Messages.SetSecundumConfiguration_OverwriteExistingSynonyms);
+ btnOverwriteExistingSynonyms.setSelection(configurator.isOverwriteExistingSynonyms());
+ btnEmptySecundumDetail = new Button(control, SWT.CHECK);
+ btnEmptySecundumDetail.setText(Messages.SetSecundumConfiguration_EmptySecundumDetail);
+ btnEmptySecundumDetail.setSelection(configurator.isEmptySecundumDetail());
+
+ btnIncludeSharedTaxa = new Button(control, SWT.CHECK);
+ btnIncludeSharedTaxa.setText(Messages.SetSecundumConfiguration_IncludeSharedtaxa);
+ btnIncludeSharedTaxa.setSelection(configurator.isIncludeSharedTaxa());
+
+ m_bindingContext = initDataBindings();
+ setControl(composite);
+ }
+
+
+
+ @Override
+ public void handleEvent(Event event) {
+ Reference reference;
+ if(event.widget==btnBrowseReference){
+ reference = SelectionDialogFactory.getSelectionFromDialog(Reference.class, this.getShell(), null, null);
+ if(reference!=null){
+ this.configurator.setNewSecundum(reference);
+ textReference.setText(reference.getTitleCache());
+
+ }
+
+ } else if(event.widget==btnClear){
+ reference = null;
+ textReference.setText("");
+ this.configurator.setNewSecundum(null);
+ } else{
+ reference = null;
+ textReference.setText("");
+ this.configurator.setNewSecundum(null);
+ }
+
+ }
+
+// /**
+// * {@inheritDoc}
+// */
+// @Override
+// public AbstractCdmDetailElement createElement(ICdmFormElement rootElement) {
+// // TODO Auto-generated method stub
+// return null;
+// }
+
+
+
+
+}
--- /dev/null
+/**
+* Copyright (C) 2017 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.dialog.configurator;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+
+import eu.etaxonomy.cdm.api.service.config.SetSecundumForSubtreeConfigurator;
+import eu.etaxonomy.cdm.model.reference.Reference;
+
+/**
+ * @author k.luther
+ * @date 10.02.2017
+ *
+ */
+public class SetSecundumForSubtreeConfigurationWizard extends Wizard {
+
+ Reference newSecRef;
+ private final SetSecundumForSubtreeConfigurator configurator;
+
+
+ private SetSecundumConfiguratorWizardPage page;
+
+
+
+ /**
+ * @param parentShell
+ * @param dialogTitle
+ * @param dialogTitleImage
+ * @param dialogMessage
+ * @param dialogImageType
+ * @param dialogButtonLabels
+ * @param defaultIndex
+ * @param config
+ */
+ public SetSecundumForSubtreeConfigurationWizard(SetSecundumForSubtreeConfigurator config) {
+ super();
+ // super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
+ this.configurator = config;
+ setNeedsProgressMonitor(true);
+
+
+
+ }
+
+
+
+ /**
+ * @param configurator
+ * @param activeShell
+ * @param setSecundumHandler_confirm
+ * @param setSecundumHandler_configureSettings
+ * @return
+ */
+ public static void openConfirmWithConfigurator(SetSecundumForSubtreeConfigurator configurator, Shell parent, String title, String message) {
+
+ SetSecundumForSubtreeConfigurationWizard wizard = new SetSecundumForSubtreeConfigurationWizard(configurator);
+
+
+ }
+
+
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean performFinish() {
+ if (!(configurator.isIncludeAcceptedTaxa() || configurator.isIncludeSynonyms())){
+ return false;
+ }else{
+ return true;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#addPages()
+ */
+ /** {@inheritDoc} */
+ @Override
+ public void addPages() {
+ page = new SetSecundumConfiguratorWizardPage(configurator, this, SWT.NONE);
+ addPage(page);
+ }
+
+
+}
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator;
+package eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import eu.etaxonomy.cdm.api.service.config.SynonymDeletionConfigurator;
import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
import eu.etaxonomy.cdm.api.service.config.TaxonNodeDeletionConfigurator;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.ConfiguratorComposite;
/**
* Abstract subclass of MessageDialog providing the functionality to configure
@Override
protected Control createCustomArea(Composite parent) {
- DeleteConfiguratorComposite composite = new DeleteConfiguratorComposite(parent, NONE);
+ ConfiguratorComposite composite = new ConfiguratorComposite(parent, NONE);
if(configurator instanceof TaxonDeletionConfigurator){
composite.addConfiguratorComposite(new DeleteTaxonConfiguratorComposite((TaxonDeletionConfigurator) configurator, composite.getSectionConfigure(), SWT.NONE));
}else if (configurator instanceof SynonymDeletionConfigurator){
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator;
+package eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.beans.PojoProperties;
import org.eclipse.ui.forms.widgets.FormToolkit;
import eu.etaxonomy.cdm.api.service.config.MediaDeletionConfigurator;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
/**
* @author k.luther
-package eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator;
+package eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.beans.PojoProperties;
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator;
+package eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.beans.PojoProperties;
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator;
+package eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.beans.PojoProperties;
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-package eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator;
+package eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator;
import java.util.List;
-/**\r
-* Copyright (C) 2016 EDIT\r
-* European Distributed Institute of Taxonomy\r
-* http://www.e-taxonomy.eu\r
-*\r
-* The contents of this file are subject to the Mozilla Public License Version 1.1\r
-* See LICENSE.TXT at the top of this package for the full license terms.\r
-*/\r
-package eu.etaxonomy.taxeditor.ui.dialog.deleteConfigurator;\r
-\r
-import org.eclipse.core.databinding.beans.PojoProperties;\r
-import org.eclipse.core.databinding.observable.value.IObservableValue;\r
-import org.eclipse.jface.databinding.swt.WidgetProperties;\r
-import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.widgets.Button;\r
-import org.eclipse.swt.widgets.Composite;\r
-\r
-import eu.etaxonomy.cdm.api.service.config.TaxonBaseDeletionConfigurator;\r
-\r
-/**\r
- * @author k.luther\r
- * @date 19.04.2016\r
- *\r
- */\r
-public class DeleteTaxonConfiguratorComposite extends DeleteTaxonBaseConfiguratorComposite {\r
-\r
- private final Button btnDeleteSynonyms;\r
- private final Button btnDeleteMisappliedNamesAndInvalidDesignations;\r
- private final Button btnTaxonRelationships;\r
- private final Button btnConceptRelationships;\r
- /**\r
- * @param configurator\r
- * @param parent\r
- * @param style\r
- */\r
- public DeleteTaxonConfiguratorComposite(TaxonBaseDeletionConfigurator configurator, Composite parent, int style) {\r
- super(configurator, parent, style);\r
- btnDeleteSynonyms = new Button(this, SWT.CHECK);\r
- btnDeleteSynonyms.setText("Delete synonyms if possible");\r
- btnDeleteSynonyms.setSelection(true);\r
-\r
- btnDeleteMisappliedNamesAndInvalidDesignations = new Button(this, SWT.CHECK);\r
- btnDeleteMisappliedNamesAndInvalidDesignations.setText("Delete misapplied names and invalid designations if possible");\r
- btnDeleteMisappliedNamesAndInvalidDesignations.setSelection(true);\r
-\r
-\r
- btnTaxonRelationships = new Button(this, SWT.CHECK);\r
- btnTaxonRelationships.setText("Delete taxon relations if possible");\r
- btnTaxonRelationships.setSelection(true);\r
-\r
- btnConceptRelationships = new Button(this, SWT.CHECK);\r
- btnConceptRelationships.setText("Delete concept relations if possible");\r
- btnConceptRelationships.setSelection(true);\r
- initDataBindingsTaxon();\r
- }\r
-\r
- protected void initDataBindingsTaxon() {\r
-\r
- IObservableValue observeSelectionBtnDeleteSynonymsObserveWidget = WidgetProperties.selection().observe(btnDeleteSynonyms);\r
- IObservableValue deleteSynonymsConfiguratorObserveValue = PojoProperties.value("deleteSynonymsIfPossible").observe(configurator);\r
- m_bindingContext.bindValue(observeSelectionBtnDeleteSynonymsObserveWidget, deleteSynonymsConfiguratorObserveValue, null, null);\r
-\r
- IObservableValue observeSelectionbtnDeleteMisappliedNamesAndInvalidDesignationsObserveWidget = WidgetProperties.selection().observe(btnDeleteMisappliedNamesAndInvalidDesignations);\r
- IObservableValue deleteMisappliedNamesAndInvalidDesignationsConfiguratorObserveValue = PojoProperties.value("deleteMisappliedNamesAndInvalidDesignationsIfPossible").observe(configurator);\r
- m_bindingContext.bindValue(observeSelectionbtnDeleteMisappliedNamesAndInvalidDesignationsObserveWidget, deleteMisappliedNamesAndInvalidDesignationsConfiguratorObserveValue, null, null);\r
-\r
- IObservableValue observeSelectionbtnTaxonRelationshipsObserveWidget = WidgetProperties.selection().observe(btnTaxonRelationships);\r
- IObservableValue deleteTaxonRelationshipsConfiguratorObserveValue = PojoProperties.value("deleteTaxonRelationships").observe(configurator);\r
- m_bindingContext.bindValue(observeSelectionbtnTaxonRelationshipsObserveWidget, deleteTaxonRelationshipsConfiguratorObserveValue, null, null);\r
-\r
- IObservableValue observeSelectionbtnConceptRelationshipsObserveWidget = WidgetProperties.selection().observe(btnConceptRelationships);\r
- IObservableValue deleteConceptRelationshipsConfiguratorObserveValue = PojoProperties.value("deleteConceptRelationships").observe(configurator);\r
- m_bindingContext.bindValue(observeSelectionbtnConceptRelationshipsObserveWidget, deleteConceptRelationshipsConfiguratorObserveValue, null, null);\r
-\r
- }\r
-}\r
+/**
+* Copyright (C) 2016 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator;
+
+import org.eclipse.core.databinding.beans.PojoProperties;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+
+import eu.etaxonomy.cdm.api.service.config.TaxonBaseDeletionConfigurator;
+
+/**
+ * @author k.luther
+ * @date 19.04.2016
+ *
+ */
+public class DeleteTaxonConfiguratorComposite extends DeleteTaxonBaseConfiguratorComposite {
+
+ private final Button btnDeleteSynonyms;
+ private final Button btnDeleteMisappliedNamesAndInvalidDesignations;
+ private final Button btnTaxonRelationships;
+ private final Button btnConceptRelationships;
+ /**
+ * @param configurator
+ * @param parent
+ * @param style
+ */
+ public DeleteTaxonConfiguratorComposite(TaxonBaseDeletionConfigurator configurator, Composite parent, int style) {
+ super(configurator, parent, style);
+ btnDeleteSynonyms = new Button(this, SWT.CHECK);
+ btnDeleteSynonyms.setText("Delete synonyms if possible");
+ btnDeleteSynonyms.setSelection(true);
+
+ btnDeleteMisappliedNamesAndInvalidDesignations = new Button(this, SWT.CHECK);
+ btnDeleteMisappliedNamesAndInvalidDesignations.setText("Delete misapplied names and invalid designations if possible");
+ btnDeleteMisappliedNamesAndInvalidDesignations.setSelection(true);
+
+
+ btnTaxonRelationships = new Button(this, SWT.CHECK);
+ btnTaxonRelationships.setText("Delete taxon relations if possible");
+ btnTaxonRelationships.setSelection(true);
+
+ btnConceptRelationships = new Button(this, SWT.CHECK);
+ btnConceptRelationships.setText("Delete concept relations if possible");
+ btnConceptRelationships.setSelection(true);
+ initDataBindingsTaxon();
+ }
+
+ protected void initDataBindingsTaxon() {
+
+ IObservableValue observeSelectionBtnDeleteSynonymsObserveWidget = WidgetProperties.selection().observe(btnDeleteSynonyms);
+ IObservableValue deleteSynonymsConfiguratorObserveValue = PojoProperties.value("deleteSynonymsIfPossible").observe(configurator);
+ m_bindingContext.bindValue(observeSelectionBtnDeleteSynonymsObserveWidget, deleteSynonymsConfiguratorObserveValue, null, null);
+
+ IObservableValue observeSelectionbtnDeleteMisappliedNamesAndInvalidDesignationsObserveWidget = WidgetProperties.selection().observe(btnDeleteMisappliedNamesAndInvalidDesignations);
+ IObservableValue deleteMisappliedNamesAndInvalidDesignationsConfiguratorObserveValue = PojoProperties.value("deleteMisappliedNamesAndInvalidDesignationsIfPossible").observe(configurator);
+ m_bindingContext.bindValue(observeSelectionbtnDeleteMisappliedNamesAndInvalidDesignationsObserveWidget, deleteMisappliedNamesAndInvalidDesignationsConfiguratorObserveValue, null, null);
+
+ IObservableValue observeSelectionbtnTaxonRelationshipsObserveWidget = WidgetProperties.selection().observe(btnTaxonRelationships);
+ IObservableValue deleteTaxonRelationshipsConfiguratorObserveValue = PojoProperties.value("deleteTaxonRelationships").observe(configurator);
+ m_bindingContext.bindValue(observeSelectionbtnTaxonRelationshipsObserveWidget, deleteTaxonRelationshipsConfiguratorObserveValue, null, null);
+
+ IObservableValue observeSelectionbtnConceptRelationshipsObserveWidget = WidgetProperties.selection().observe(btnConceptRelationships);
+ IObservableValue deleteConceptRelationshipsConfiguratorObserveValue = PojoProperties.value("deleteConceptRelationships").observe(configurator);
+ m_bindingContext.bindValue(observeSelectionbtnConceptRelationshipsObserveWidget, deleteConceptRelationshipsConfiguratorObserveValue, null, null);
+
+ }
+}
private ConversationHolder conversation;
- protected List<T> model;
- private String settings;
-
-
-
+ protected List<T> model;
+ private String settings;
+
+
+
/**
* <p>Constructor for AbstractFilteredCdmResourceSelectionDialog.</p>
*
* @param shell a {@link org.eclipse.swt.widgets.Shell} object.
- * @param conversation
+ * @param conversation
* @param title a {@link java.lang.String} object.
* @param multi a boolean.
* @param settings a {@link java.lang.String} object.
* @param cdmEnum a T object.
* @param <T> a T object.
*/
- protected AbstractFilteredCdmEnumSelectionDialog(Shell shell,
- ConversationHolder conversation,
- String title,
- boolean multi,
+ protected AbstractFilteredCdmEnumSelectionDialog(Shell shell,
+ ConversationHolder conversation,
+ String title,
+ boolean multi,
String settings,
T cdmEnum) {
super(shell, multi);
setTitle(title);
setMessage("Use * for wildcard, or ? to see all entries");
this.settings = settings;
-
+
this.conversation = conversation;
-
+
init();
-
+
initModel();
-
+
String objectTitle = getTitle(cdmEnum);
if (objectTitle != null) {
setInitialPattern(objectTitle);
}
-
+
setListLabelProvider(createListLabelProvider());
setDetailsLabelProvider(createDetailsLabelProvider());
-
+
setSelectionHistory(new ResourceSelectionHistory());
}
-
+
/**
* By default, we are returning the standard list label provider
- *
- * Override in subclasses if you want different behavior
- *
+ *
+ * Override in subclasses if you want different behavior
+ *
* @return
*/
protected ILabelProvider createDetailsLabelProvider() {
}
/**
- *
+ *
* @return
*/
protected ILabelProvider createListLabelProvider() {
* Will run before initModel()
*/
protected void init() {
-
+
}
-
+
/**
* <p>getSelectionFromDialog</p>
*
* @return a TYPE object.
*/
protected static <TYPE extends IEnumTerm> TYPE getSelectionFromDialog(AbstractFilteredCdmEnumSelectionDialog<TYPE> dialog) {
-
+
int result = dialog.open();
-
+
if (result == Window.CANCEL) {
return null;
}
-
+
return dialog.getSelectedEnumTerm();
}
protected String getTitle(T cdmEnum) {
return cdmEnum.getMessage();
}
-
+
/** {@inheritDoc} */
@Override
public void refresh() {
- initModel();
+ initModel();
super.refresh();
}
-
+
/**
* <p>initModel</p>
*/
public boolean equalsFilter(ItemsFilter filter) {
return false;
}
-
+
@Override
public boolean isConsistentItem(Object item) {
return false;
}
return text != null ? matches(text) : false;
}
-
+
};
}
-
+
/**
* Set the filter input to the Agent's title cache
* @param cdmObject a T object.
*/
protected void setPattern(T cdmObject) {
- // FilteredSelection does some very tricky caching to make sure it
- // runs with high performance.
+ // FilteredSelection does some very tricky caching to make sure it
+ // runs with high performance.
// This works for most use cases, but we want to change the model while the dialog is open
// and all the clever caching prevents the content provider from knowing that the model has changed
- // I am aware, that this is a hack, but the FilteredSelectionDialog API does not offer a convenient
+ // I am aware, that this is a hack, but the FilteredSelectionDialog API does not offer a convenient
// way to solve the problem.
try {
Field lastCompletedFilter = this.getClass().getSuperclass().getSuperclass().getDeclaredField("lastCompletedFilter");
} catch (IllegalAccessException e) {
MessagingUtils.error(getClass(), e);
}
-
- // this also is not the nicest way to do it.
+
+ // this also is not the nicest way to do it.
// I am still amazed, that FilteredSelectionDialog does not offer any methods to change its data
// once it was opened. Am I doing it wrong?
String pattern = getTitle(cdmObject);
((Text) getPatternControl()).setText(pattern);
}
-
+
/* (non-Javadoc)
* @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog#fillContentProvider(org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.AbstractContentProvider, org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.ItemsFilter, org.eclipse.core.runtime.IProgressMonitor)
*/
ItemsFilter itemsFilter, IProgressMonitor progressMonitor)
throws CoreException {
try {
- if(model != null){
+ if(model != null){
progressMonitor.beginTask("Looking for entities", model.size());
for(T element : model){
contentProvider.add(element, itemsFilter);
@Override
protected Comparator getItemsComparator() {
return new Comparator<IEnumTerm>() {
- public int compare(IEnumTerm entity1,
+ @Override
+ public int compare(IEnumTerm entity1,
IEnumTerm entity2) {
- Collator collator = Collator.getInstance();
- return collator.compare(entity1.getMessage(), entity2.getMessage());
+ if (entity1.equals(entity2)){
+ return 0;
+ }
+ Collator collator = Collator.getInstance();
+
+ int result = collator.compare(entity1.getMessage(), entity2.getMessage());
+ if (result == 0){
+ return entity1.getUuid().compareTo(entity2.getUuid());
+ }
+ return result;
}
};
}
protected IStatus validateItem(Object item) {
return Status.OK_STATUS;
}
-
+
/**
* <p>getSelectedUuidAndTitleCache</p>
*
Object[] result = getResult();
return result[0] == null ? null : (T) result[0];
}
-
+
/**
* <p>Getter for the field <code>settings</code>.</p>
*
}
return settings;
}
-
+
/**
- *
+ *
* @author n.hoffmann
* @created Oct 19, 2009
* @version 1.0
/*
* @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.SelectionHistory#restoreItemFromMemento(org.eclipse.ui.IMemento)
*/
- protected Object restoreItemFromMemento(IMemento element) {
+ @Override
+ protected Object restoreItemFromMemento(IMemento element) {
return element.getString("resource"); //$NON-NLS-1$
}
/*
* @see org.eclipse.ui.dialogs.FilteredItemsSelectionDialog.SelectionHistory#storeItemToMemento(java.lang.Object,
* org.eclipse.ui.IMemento)
*/
- protected void storeItemToMemento(Object item, IMemento element) {
+ @Override
+ protected void storeItemToMemento(Object item, IMemento element) {
element.putString("resource", item.toString()); //$NON-NLS-1$
}
}
-
+
/**
* <p>getNewWizardLinkText</p>
*
* @return a {@link java.lang.String} object.
*/
protected abstract String getNewWizardLinkText();
-
+
/**
* <p>getNewEntityWizard</p>
- * @param parameter
+ * @param parameter
* @return a {@link eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard} object.
*/
protected abstract AbstractNewEntityWizard getNewEntityWizard(String parameter);
-
+
public class FilteredCdmResourceLabelProvider extends LabelProvider {
- public String getText(Object element) {
+ @Override
+ public String getText(Object element) {
if (element == null) {
return null;
}
return ((IEnumTerm) element).getMessage();
- }
+ }
};
/* (non-Javadoc)
}
return null;
}
-
+
protected SelectionListener getNewWizardLinkSelectionListener(){
return new SelectionAdapter() {
-
+
/* (non-Javadoc)
* @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
*/
@Override
public void widgetSelected(SelectionEvent e) {
-
+
AbstractNewEntityWizard wizard = getNewEntityWizard(e.text);
wizard.init(null, null);
WizardDialog dialog = new WizardDialog(getShell(), wizard);
int status = dialog.open();
-
+
if (status == IStatus.OK) {
-
+
T entity = (T) wizard.getEntity();
refresh();
}
};
}
-
+
/**
* <p>getConversationHolder</p>
*
* @return a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
*/
- public ConversationHolder getConversationHolder() {
+ @Override
+ public ConversationHolder getConversationHolder() {
return conversation;
}
-
+
/** {@inheritDoc} */
- public void update(CdmDataChangeMap changeEvents) {}
+ @Override
+ public void update(CdmDataChangeMap changeEvents) {}
}
public int compare(UuidAndTitleCache entity1,
UuidAndTitleCache entity2) {
Collator collator = Collator.getInstance();
- return collator.compare(entity1.getTitleCache(), entity2.getTitleCache());
+ if (entity1.getUuid().equals(entity2.getUuid())){
+ return 0;
+ }
+ int result = collator.compare(entity1.getTitleCache(), entity2.getTitleCache());
+ if (result == 0){
+ result = entity1.getUuid().compareTo(entity2.getUuid());
+ }
+ return result;
}
};
}
// model.add(new UuidAndTitleCache<T>(entity.getUuid(), entity.getId(), getTitle(entity)));
refresh();
setPattern(entity);
- getConversationHolder().bind();
+ if (getConversationHolder() != null){
+ getConversationHolder().bind();
+ }
}
//FIXME : Need to make sure this is a stable fix (ticket 3822)
- getConversationHolder().commit();
+ if (getConversationHolder() != null){
+ getConversationHolder().commit();
+ }
}
}
}
@Override
public int compare(UuidAndTitleCache entity1,
UuidAndTitleCache entity2) {
+
+ if (entity1.getUuid().equals(entity2.getUuid())){
+ return 0;
+ }
Collator collator = Collator.getInstance();
String compareString1 = "";
if (entity1.getAbbrevTitleCache() != null){
}
- return collator.compare(compareString1, compareString2);
+ int result =collator.compare(compareString1, compareString2);
+ if (result == 0){
+ result = entity1.getUuid().compareTo(entity2.getUuid());
+ }
+ return result;
}
};
}
protected NomenclaturalReferenceSelectionDialog(Shell shell,
ConversationHolder conversation, String title, boolean multi,
- Reference reference) {
+ Reference reference, boolean inReference) {
super(shell, conversation, title, multi, reference);
// TODO Auto-generated constructor stub
}
public static Reference select(Shell shell, ConversationHolder conversation, Reference reference) {
NomenclaturalReferenceSelectionDialog dialog = new NomenclaturalReferenceSelectionDialog(shell, conversation,
- "Choose a reference", false, reference);
+ "Choose a reference", isInReference, reference, false);
return getSelectionFromDialog(dialog);
}
};
@Override
- protected Comparator getItemsComparator() {
- return new Comparator<UuidAndTitleCache>() {
- @Override
- public int compare(UuidAndTitleCache entity1,
- UuidAndTitleCache entity2) {
- Collator collator = Collator.getInstance();
- String compareString1 = "";
- if (entity1.getAbbrevTitleCache() != null){
- compareString1 = entity1.getAbbrevTitleCache();
- }
- if (entity1.getTitleCache() != null){
- compareString1 += entity1.getTitleCache();
- }
- String compareString2 = "";
- if (entity2.getAbbrevTitleCache() != null){
- compareString2 = entity2.getAbbrevTitleCache();
- }
- if (entity2.getTitleCache() != null){
- compareString2 += entity2.getTitleCache();
- }
- return collator.compare(compareString1, compareString2);
- }
- };
- }
-
+ protected Comparator getItemsComparator() {
+ return new Comparator<UuidAndTitleCache>() {
+ @Override
+ public int compare(UuidAndTitleCache entity1,
+ UuidAndTitleCache entity2) {
+
+ if (entity1.getUuid().equals(entity2.getUuid())){
+ return 0;
+ }
+ Collator collator = Collator.getInstance();
+ String compareString1 = "";
+ if (entity1.getAbbrevTitleCache() != null){
+ compareString1 = entity1.getAbbrevTitleCache();
+ }
+ if (entity1.getTitleCache() != null){
+ compareString1 += entity1.getTitleCache();
+ }
+
+
+ String compareString2 = "";
+ if (entity2.getAbbrevTitleCache() != null){
+ compareString2 = entity2.getAbbrevTitleCache();
+ }
+ if (entity2.getTitleCache() != null){
+ compareString2 += entity2.getTitleCache();
+ }
+
+
+ int result =collator.compare(compareString1, compareString2);
+ if (result == 0){
+ result = entity1.getUuid().compareTo(entity2.getUuid());
+ }
+ return result;
+ }
+ };
+ }
@Override
protected String getTitle(Reference cdmObject) {
if(cdmObject == null){
*/
public class ReferenceSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog<Reference> {
+ protected static boolean isInReference = false;
+ private Reference currentReference;
/**
* <p>select</p>
*
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
* @return a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
*/
- public static Reference select(Shell shell, ConversationHolder conversation, Reference reference) {
+ public static Reference select(Shell shell, ConversationHolder conversation, Reference reference, boolean isInReference) {
ReferenceSelectionDialog dialog = new ReferenceSelectionDialog(shell, conversation,
- "Choose a reference", false, reference);
+ "Choose a reference", false, reference, isInReference);
return getSelectionFromDialog(dialog);
}
+ /**
+ * <p>select</p>
+ *
+ * @param reference a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
+ * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
+ * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+ * @return a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
+ */
+ public static Reference select(Shell shell, ConversationHolder conversation, Reference reference) {
+ ReferenceSelectionDialog dialog = new ReferenceSelectionDialog(shell, conversation,
+ "Choose a reference", false, reference);
+ return getSelectionFromDialog(dialog);
+ }
+
+
/**
* <p>Constructor for FilteredReferenceSelectionDialog.</p>
*/
protected ReferenceSelectionDialog(Shell shell, ConversationHolder conversation, String title, boolean multi, Reference reference) {
super(shell, conversation, title, multi, ReferenceSelectionDialog.class.getCanonicalName(), null);
+ this.currentReference = reference;
}
+
+
+ /**
+ * <p>Constructor for FilteredReferenceSelectionDialog.</p>
+ *
+ * @param shell a {@link org.eclipse.swt.widgets.Shell} object.
+ * @param title a {@link java.lang.String} object.
+ * @param reference a {@link eu.etaxonomy.cdm.model.reference.ReferenceBase} object.
+ * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+ * @param multi a boolean.
+ */
+ protected ReferenceSelectionDialog(Shell shell, ConversationHolder conversation, String title, boolean multi, Reference reference, boolean isInReference) {
+ super(shell, conversation, title, multi, ReferenceSelectionDialog.class.getCanonicalName(), null);
+ this.isInReference = isInReference;
+ this.currentReference = reference;
+ }
+
+
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.dialogs.AbstractFilteredCdmResourceSelectionDialog#getPersistentObject(java.util.UUID)
*/
}
if (pattern == null || pattern.equals("?")){
- model = CdmStore.getService(IReferenceService.class).getUuidAndTitleCache(null,null);
+ if (isInReference && currentReference != null){
+ model = CdmStore.getService(IReferenceService.class).getUuidAndTitleCache(null,null,currentReference.getType());
+ }else{
+ model = CdmStore.getService(IReferenceService.class).getUuidAndTitleCache(null,null);
+ }
}else{
- model = CdmStore.getService(IReferenceService.class).getUuidAndTitleCache(limitOfInitialElements,pattern);
+ if (isInReference && currentReference != null){
+ model = CdmStore.getService(IReferenceService.class).getUuidAndTitleCache(limitOfInitialElements,pattern, currentReference.getType());
+ }else{
+ model = CdmStore.getService(IReferenceService.class).getUuidAndTitleCache(limitOfInitialElements,pattern);
+ }
}
}
--- /dev/null
+/**
+* Copyright (C) 2017 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.taxeditor.ui.dialog.selection;
+
+import java.util.UUID;
+
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
+import eu.etaxonomy.cdm.api.service.IRightsService;
+import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.media.Rights;
+import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+
+/**
+ * @author k.luther
+ * @date 15.02.2017
+ *
+ */
+public class RightsSelectionDialog extends AbstractFilteredCdmResourceSelectionDialog<Rights> {
+
+
+ public static Rights select(Shell shell, ConversationHolder conversation, Rights rights){
+ RightsSelectionDialog dialog = new RightsSelectionDialog(shell, conversation,
+ "Choose Rights", false, RightsSelectionDialog.class.getCanonicalName(), rights);
+ return getSelectionFromDialog(dialog);
+ }
+
+ /**
+ * <p>Constructor for FilteredDerivedUnitSelectionDialog.</p>
+ */
+ protected RightsSelectionDialog(Shell shell, ConversationHolder conversation, String title,
+ boolean multi, String settings, Rights rights) {
+ super(shell, conversation, title, multi, settings, rights);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected Rights getPersistentObject(UUID uuid) {
+ Object object = CdmStore.getService(IRightsService.class).load(uuid);
+
+ Rights rights= (Rights) HibernateProxyHelper.deproxy(object);
+
+ if(rights != null){
+ return rights;
+ }
+ MessagingUtils.error(this.getClass(), "Selected element is not rights", null);
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getNewWizardLinkText() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected AbstractNewEntityWizard getNewEntityWizard(String parameter) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void initModel() {
+ Control control = getPatternControl();
+ String pattern = null;
+ if (control != null){
+ pattern = ((Text)control).getText();
+ }
+
+ if (pattern == null || pattern.equals("?")){
+ model = CdmStore.getService(IRightsService.class).getUuidAndLabelText(null,null);
+
+ }else{
+
+ model = CdmStore.getService(IRightsService.class).getUuidAndLabelText(limitOfInitialElements,pattern);
+
+ }
+
+ }
+
+}
import eu.etaxonomy.cdm.model.location.Country;
import eu.etaxonomy.cdm.model.location.NamedArea;
import eu.etaxonomy.cdm.model.media.Media;
+import eu.etaxonomy.cdm.model.media.Rights;
import eu.etaxonomy.cdm.model.molecular.Amplification;
import eu.etaxonomy.cdm.model.molecular.Primer;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.taxeditor.ui.section.agent.TeamMemberElement;
import eu.etaxonomy.taxeditor.ui.section.name.AuthorshipDetailElement;
import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailElement;
/**
* @author n.hoffmann
return (T) NomenclaturalReferenceSelectionDialog.select(shell, conversation, (Reference) currentSelection);
}
if(clazz.equals(Reference.class)){
+ if (parentElement instanceof ReferenceDetailElement){
+ return (T) ReferenceSelectionDialog.select(shell, conversation, ((ReferenceDetailElement) parentElement).getEntity(), true);
+ }
return (T) ReferenceSelectionDialog.select(shell, conversation, (Reference) currentSelection);
}
if(clazz.equals(Media.class)){
return (T) MediaSelectionDialog.select(shell, conversation, (Media) currentSelection);
}
+ if(clazz.equals(Rights.class)){
+ return (T) RightsSelectionDialog.select(shell, conversation, (Rights) currentSelection);
+ }
return null;
}
@Override
public int compare(Classification o1, Classification o2) {
- return o1.getTitleCache().compareTo(o2.getTitleCache());
+ if (o1.equals(o2)){
+ return 0;
+ }
+ int result = o1.getTitleCache().compareTo(o2.getTitleCache());
+ if (result == 0){
+ return o1.getUuid().compareTo(o2.getUuid());
+ }
+ return result;
}
});
if (this.cdmBaseToBeFiltered == null){
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.forms.widgets.TableWrapLayout;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
/**
*
} else if (entity instanceof User) {
element = new MemberDetailElement(this, parentElement, (User) entity, removeListener, style);
} else if (entity instanceof GrantedAuthority) {
- element = new GrantedAuthorityCollectionElement(this, parentElement, (GrantedAuthorityImpl) entity,
+ element = new GrantedAuthorityCollectionElement(this, parentElement, (GrantedAuthorityImpl) entity, ((Group)parentElement.getEntity()),
removeListener, style);
} else if (entity instanceof Group) {
element = new GroupsByUserDetailElement(this, parentElement, (Group) entity, removeListener, style);
element = new StatisticalMeasureCollectionElement(this, parentElement, (StatisticalMeasure) entity, removeListener, backgroundColor, style);
}
+ //check for parent section when entity is null
+ //this happens when AbstractUnboundEntityCollectionSection is used
+ if(entity==null){
+ if(parentElement instanceof ScopeSection || parentElement instanceof ScopeRestrictionSection){
+ element = new ScopeElement(this,
+ parentElement,
+ (DefinedTerm) entity,
+ removeListener,
+ style);
+ }
+ else if(parentElement instanceof ModifierSection){
+ element = new ModifierElement(this,
+ parentElement,
+ (DefinedTerm) entity,
+ removeListener,
+ style);
+ }
+ }
+
if (element == null) {
MessagingUtils.messageDialog("No element for entity", this,
private void updateMinimum() {
switch(unitType) {
case ELEVATION:
- getEntity().setAbsoluteElevation(text_minVal.getDouble()!=null?text_minVal.getDouble().intValue():null);
+ getEntity().setAbsoluteElevation(text_minVal.getDouble()!=null ? text_minVal.getDouble().intValue(): null);
break;
case DIST_TO_GROUND:
getEntity().setDistanceToGround(text_minVal.getDouble());
private void updateMaximum() {
switch(unitType) {
case ELEVATION:
- getEntity().setAbsoluteElevationMax(text_maxVal.getDouble()!=null?text_maxVal.getDouble().intValue():null);
+ getEntity().setAbsoluteElevationMax(text_maxVal.getDouble() != null ? text_maxVal.getDouble().intValue() : null);
break;
case DIST_TO_GROUND:
getEntity().setDistanceToGroundMax(text_maxVal.getDouble());
*
* @author n.hoffmann
* @created Mar 22, 2010
- * @version 1.0
*/
public class NumberWithLabelElement extends TextWithLabelElement {
if(super.getText()!=null){
String text = super.getText().trim();
try {
- return StringUtils.isBlank(text) ? 0 : new Integer(text);
+ return StringUtils.isBlank(text) ? null : new Integer(text);
} catch (NumberFormatException e) {
exception = e;
}
public Float getFloat(){
String text = super.getText();
try {
- return StringUtils.isBlank(text) ? 0 : new Float(text);
+ return StringUtils.isBlank(text) ? null : new Float(text);
} catch (NumberFormatException e) {
exception = e;
}
public Double getDouble(){
String text = super.getText();
try {
- return new Double(text);
+ return StringUtils.isBlank(text) ? null : new Double(text);
} catch (NumberFormatException e) {
exception = e;
}
return null;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.AbstractCdmFormElement#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
/** {@inheritDoc} */
@Override
public void modifyText(ModifyEvent event) {
}
try{
-
- Float number = Float.parseFloat(value);
-
+ Float number = Float.parseFloat(value);
if((start != null && number < start) || (end != null && number > end)){
exception = new NumberFormatException("You entered a number that is not within the allowed bounds.");
throw exception;
}
-
}catch(NumberFormatException e){
text.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
firePropertyChangeEvent(new CdmPropertyChangeEvent(this, event));
package eu.etaxonomy.taxeditor.ui.element;
import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.forms.widgets.TableWrapLayout;
+import org.joda.time.IllegalFieldValueException;
import org.joda.time.Partial;
import eu.etaxonomy.cdm.model.common.TimePeriod;
*
* @author n.hoffmann
* @created Mar 31, 2010
- * @version 1.0
*/
public class PartialElement extends AbstractCdmFormElement implements ISelectable {
addControl(label);
number_year = formFactory.createNumberTextWithLabelElement(this, "Year", null, style);
- number_year.setLimits(4, -9999, 9999);
+ number_year.setLimits(4, 0, 9999);
number_month = formFactory.createNumberTextWithLabelElement(this, "Month", null, style);
number_month.setLimits(2, 1, 12);
return partial;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.AbstractCdmFormElement#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
/** {@inheritDoc} */
@Override
public void propertyChange(PropertyChangeEvent event) {
}
private void handleEvent(Object eventSource){
- if(eventSource == number_month){
- if (number_month.getInteger() == 0){
- partial = TimePeriod.setPartialField(partial, null, TimePeriod.MONTH_TYPE);
- } else{
- partial = TimePeriod.setPartialField(partial, number_month.getInteger(), TimePeriod.MONTH_TYPE);
- }
-
- }else if(eventSource == number_day){
- if (number_day.getInteger() == 0){
- partial = TimePeriod.setPartialField(partial, null, TimePeriod.DAY_TYPE);
- } else{
- partial = TimePeriod.setPartialField(partial, number_day.getInteger(), TimePeriod.DAY_TYPE);
- }
-
-
- }else if(eventSource == number_year){
- if (number_year.getInteger() == 0){
- partial = TimePeriod.setPartialField(partial, null, TimePeriod.YEAR_TYPE);
- } else{
- partial = TimePeriod.setPartialField(partial, number_year.getInteger(), TimePeriod.YEAR_TYPE);
+ if (eventSource instanceof NumberWithLabelElement){
+ try{
+ if(eventSource == number_month && number_month.getException()==null){
+ partial = TimePeriod.setPartialField(partial, number_month.getInteger(), TimePeriod.MONTH_TYPE);
+ }else if(eventSource == number_day && number_day.getException()==null){
+ partial = TimePeriod.setPartialField(partial, number_day.getInteger(), TimePeriod.DAY_TYPE);
+ }else if(eventSource == number_year && number_year.getException()==null){
+ partial = TimePeriod.setPartialField(partial, number_year.getInteger(), TimePeriod.YEAR_TYPE);
+ }
+ } catch (IndexOutOfBoundsException | IllegalFieldValueException e) {
+ ((NumberWithLabelElement)eventSource).text.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
}
-
- }
- firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
+ }
+ firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
}
/** {@inheritDoc} */
*
* @author n.hoffmann
* @created Oct 15, 2010
- * @version 1.0
*/
public class PointElement extends AbstractCdmFormElement implements
IEntityElement<Point>, ISelectable {
}
}
- /*
- * (non-Javadoc)
- *
- * @see eu.etaxonomy.taxeditor.forms.IEntityElement#getEntity()
- */
/** {@inheritDoc} */
@Override
public Point getEntity() {
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.ImageResources;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
import eu.etaxonomy.cdm.api.service.IUserService;
import eu.etaxonomy.cdm.model.common.User;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
import eu.etaxonomy.cdm.api.service.IUserService;
import eu.etaxonomy.cdm.model.common.User;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
CdmStore.getService(IUserService.class).changePasswordForUser(user.getUsername(), passwordPage.getNewPassword());
}
CdmStore.getService(IUserService.class).loadWithUpdate(user.getUuid());
+ CdmStore.getLoginManager().authenticate(user.getUsername(), passwordPage.getNewPassword());
internalConversation.commit(false);
internalConversation.unbind();
internalConversation.close();
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
super.setEntity(entity);
setSectionTitle();
layout();
+
}
protected void setSectionTitle() {
if (label == null){
label = ((DefinedTermBase<?>)getEntity()).getLabel();
}
-
+
} else if (getEntity() instanceof TextData){
label = ((TextData)getEntity()).getLanguageText(PreferencesUtil.getGlobalLanguage()).getText();
if (label == null){
label =((IdentifiableEntity) getEntity()).getTitleCache();
}
title = ": " + label;
-
+
// we have to duplicate ampersands otherwise they are treated as
// mnenomic (see Label.setText() documentation)
// see also #4302
@Override
public void setIrrelevant(boolean irrelevant) {
if (detailElement != null) {
+
detailElement.setIrrelevant(irrelevant);
}
}
}
combo_modifier.setTerms(modifierTerms);
}
- if(entity.getId()>0){
+ if(entity!=null && entity.getId()>0){
combo_modifier.setSelection(entity);
combo_modifier.removeEmptyElement();
}
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.DefinedTerm;
-import eu.etaxonomy.cdm.model.common.TermType;
import eu.etaxonomy.cdm.model.description.IModifiable;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
/** {@inheritDoc} */
@Override
public DefinedTerm createNewElement() {
- return DefinedTerm.NewInstance(TermType.Modifier,"","Untitled","");
+ return null;
}
/** {@inheritDoc} */
import eu.etaxonomy.cdm.model.common.DefinedTerm;
import eu.etaxonomy.cdm.model.common.TermType;
import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.cdm.model.description.TaxonDescription;
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
@Override
public void setEntity(DefinedTerm entity) {
this.entity = entity;
- if(entity.getId()!=0){
+ if(entity!=null && entity.getId()!=0){
combo_scope.setSelection(entity);
combo_scope.removeEmptyElement();
}
key.addScopeRestriction(scopeTerm);
entity = scopeTerm;
}
+ else if(getParentElement() instanceof ScopeSection){
+ TaxonDescription description = ((ScopeSection)getParentElement()).getEntity();
+ description.removeScope(entity);
+ description.addScope(scopeTerm);
+ entity = scopeTerm;
+
+ }
}
}
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.DefinedTerm;
-import eu.etaxonomy.cdm.model.common.TermType;
import eu.etaxonomy.cdm.model.description.TaxonDescription;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
/** {@inheritDoc} */
@Override
public DefinedTerm createNewElement() {
- return DefinedTerm.NewInstance(TermType.Scope,"","","");
+ return null;
}
/** {@inheritDoc} */
Reference citation1 = o1.getCitation();
Reference citation2 = o2.getCitation();
+ int result = 0;
+
// the newly created should always be on top
- if (id1 == 0 && id2!=0) {
- return -1;
- }
- else if (id2==0) {
- return 1;
+ if (id1 == 0){
+ if(id2!=0) {
+ result = -1;
+ }
+ else{
+ result = 0;
+ }
+ } else if(id2==0){
+ result = 1;
}
// sort by type (Primary taxonomic > Primary Media > others
// alphabetically by reference title cache)
- if (type1 != null && type1.equals(OriginalSourceType.PrimaryTaxonomicSource)
- && (type2 == null || !type2.equals(OriginalSourceType.PrimaryTaxonomicSource))) {
- return -1;
- }
- if ((type1 == null || !type1.equals(OriginalSourceType.PrimaryTaxonomicSource))
- && type2 != null && type2.equals(OriginalSourceType.PrimaryTaxonomicSource)) {
- return 1;
+ else if (type1 == null){
+ if(type2==null){
+ result = 0;
+ }
+ else{
+ result = 1;
+ }
+ } else if (type2 == null){
+ result = -1;
+ } else if(type1.equals(type2)){
+ result = 0;
+ } else if (type1.equals(OriginalSourceType.PrimaryTaxonomicSource)){
+ result = -1;
+ } else if (type2.equals(OriginalSourceType.PrimaryTaxonomicSource)){
+ result = 1;
+ } else if (type1.equals(OriginalSourceType.PrimaryMediaSource)){
+ result = -1;
+ } else if (type2.equals(OriginalSourceType.PrimaryMediaSource)){
+ result = 1;
}
- if ((type1 == null || type1.equals(OriginalSourceType.PrimaryMediaSource))
- && (type2==null || !type2.equals(OriginalSourceType.PrimaryMediaSource))) {
- return -1;
- }
- if (type2 != null && type2.equals(OriginalSourceType.PrimaryMediaSource)
- && type1!=null && !type1.equals(OriginalSourceType.PrimaryMediaSource)) {
- return 1;
- }
-
- //sort by citation title cache
- if(citation1!=null && citation2!=null){
- return citation1.getTitleCache().compareTo(citation2.getTitleCache());
- }
+ //sort by citation title cache if types are equal
+ if (result == 0){
+ if(citation1!=null && citation2!=null){
+ result = citation1.getTitleCache().compareTo(citation2.getTitleCache());
+ }
- if(o2.getCreated()!=null && o1.getCreated()!=null){
- return o2.getCreated().compareTo(o1.getCreated());
+ if(o2.getCreated()!=null && o1.getCreated()!=null){
+ result = o2.getCreated().compareTo(o1.getCreated());
+ }
+ if (result == 0){
+ //default fallback
+ return o1.getId() - o2.getId();
+ }
}
+ return result;
- //default fallback
- return o1.getId() - o2.getId();
}
}
/**
* Copyright (C) 2012 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl;
+import eu.etaxonomy.cdm.model.common.Group;
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
*
*/
public class GrantedAuthorityCollectionElement extends AbstractEntityCollectionElement<GrantedAuthorityImpl> {
-
+
private EntitySelectionElement<GrantedAuthorityImpl> selection_authority;
+ private Group grantedAuthorityUser;
public GrantedAuthorityCollectionElement(CdmFormFactory formFactory,
- AbstractFormSection section, GrantedAuthorityImpl entity,
+ AbstractFormSection section, GrantedAuthorityImpl entity, Group group,
SelectionListener removeListener, int style) {
- super(formFactory, section, entity, removeListener, null, style);
+ super(formFactory, section, entity, removeListener, null, style);
+ this.grantedAuthorityUser = group;
// TODO Auto-generated constructor stub
}
*/
@Override
public void setEntity(GrantedAuthorityImpl entity) {
- selection_authority.setEntity(entity);
-
+ this.entity = entity;
+
}
/* (non-Javadoc)
@Override
public void handleEvent(Object eventSource) {
if (eventSource == selection_authority) {
+ GrantedAuthorityImpl oldGrantedAuthority = entity;
+ grantedAuthorityUser.removeGrantedAuthority(entity);
+
setEntity(selection_authority.getEntity());
+ grantedAuthorityUser.addGrantedAuthority(entity);
+
}
}
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* European Distributed Institute of Taxonomy
* http://www.e-taxonomy.eu
-*
+*
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
package eu.etaxonomy.taxeditor.ui.section.grantedAuthority;
import eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl;
-import eu.etaxonomy.cdm.persistence.hibernate.permission.CdmAuthority;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
public class GrantedAuthorityDetailElement extends AbstractCdmDetailElement<GrantedAuthorityImpl> {
private TextWithLabelElement text_authority;
-
+
/**
* @param formFactory
* @param formElement
@Override
protected void createControls(ICdmFormElement formElement,
GrantedAuthorityImpl entity, int style) {
-
- String labelText = GrantedAuthorityLabelTextProvider.getText(entity);
- text_authority = formFactory.createTextWithLabelElement(formElement, "Authority", labelText, style);
-
+
+ String labelText = null;
+ if (entity.getAuthority() != null){
+ labelText = GrantedAuthorityLabelTextProvider.getText(entity);
+ }
+ text_authority = formFactory.createTextWithLabelElement(formElement, "Authority", null, style);
+
}
@Override
if(eventSource == text_authority){
getEntity().setAuthority(text_authority.getText());
}
-
+
}
-
+
}
*/
@Override
public GrantedAuthority addExisting() {
+ System.err.println("Test");
return null;
}
getEntity().setTitleCache(textLabel.getText(), true);
}
else if(eventSource==numberStartNumber){
- getEntity().setStartNumber(numberStartNumber.getInteger());
+ int startNumber = numberStartNumber.getInteger() == null? 0 : numberStartNumber.getInteger();
+ getEntity().setStartNumber(startNumber);
}
firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
}
/**
- *
+ *
*/
package eu.etaxonomy.taxeditor.ui.section.key;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.DefinedTerm;
-import eu.etaxonomy.cdm.model.common.TermType;
import eu.etaxonomy.cdm.model.description.PolytomousKey;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
}
@Override
- public DefinedTerm createNewElement() {
- return DefinedTerm.NewInstance(TermType.Scope,"","Untitled","");
-
+ public DefinedTerm createNewElement() {
+ return null;
+
}
@Override
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
import eu.etaxonomy.cdm.model.name.NonViralName;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
import eu.etaxonomy.cdm.model.name.ZoologicalName;
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
toggleable_cache = formFactory.createToggleableTextField(this,
"Authorship Cache", entity.getAuthorshipCache(),
entity.isProtectedAuthorshipCache(), style);
- //TODO RL
- if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
- toggleable_cache.setVisible(false);
- }
- }
+ addElement(toggleable_cache);
+ }
NomenclaturalCode code = entity.getNomenclaturalCode();
if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP)){
@Override
public void updateContent() {
if (getEntity() == null) {
- setEntity(NonViralName.NewInstance(null));
+ setEntity(TaxonNameFactory.NewNonViralInstance(null));
}
super.updateContent();
package eu.etaxonomy.taxeditor.ui.section.name;
import java.util.Arrays;
+import java.util.Collection;
import org.apache.log4j.Logger;
import org.eclipse.swt.SWT;
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.name.Rank;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
import eu.etaxonomy.cdm.model.name.ZoologicalName;
import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
text_appendedPhrase = formFactory.createTextWithLabelElement(formElement, "Appended Phrase", nonViralName.getAppendedPhrase(), style);
}
}
+
}
/**
@Override
protected void updateContent() {
if(getEntity() == null){
- setEntity(NonViralName.NewInstance(null));
+ setEntity(TaxonNameFactory.NewNonViralInstance(null));
}
super.updateContent();
- if (isAdvancedView){
- if(isIrrelevant()){
- setIrrelevant(isIrrelevant());
- }else{
- setIrrelevant(toggleable_cache.getState(), Arrays.asList(new Object[]{toggleable_cache}));
+ if (toggleable_cache != null){
+ toggleable_cache.setEnabled(getEntity().isProtectedNameCache());
+
+ if (isAdvancedView){
+ if(isIrrelevant()){
+ setIrrelevant(isIrrelevant());
+ }else{
+ setIrrelevant(toggleable_cache.getState(), Arrays.asList(new Object[]{toggleable_cache}));
+ }
}
}
}
switch(nonViralName.getNomenclaturalCode()){
case ICNAFP :
// TODO RL
- if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL) && isAdvancedView)
+ if(isAdvancedView)
{
createBotanicalNameParts(formElement, nonViralName, style);
}
if (eventSource == toggleable_cache) {
getEntity().setNameCache(toggleable_cache.getText(),
toggleable_cache.getState());
- if (!isIrrelevant()) {
+ //if (!isIrrelevant()) {
setIrrelevant(toggleable_cache.getState(),
Arrays.asList(new Object[] { toggleable_cache }));
- }
+ //}
}
else if(eventSource == combo_rank){
getEntity().setRank(combo_rank.getSelection());
updateToggleableCacheField();
}
+ @Override
+ public void setIrrelevant(boolean irrelevant, Collection<Object> except){
+ if (toggleable_cache != null){
+ if (toggleable_cache.getState() == irrelevant){
+ super.setIrrelevant(irrelevant, except);
+ }
+ if (except == null || except.isEmpty()){
+ toggleable_cache.setIrrelevant(irrelevant);
+ }
+ }
+
+ }
+
@Override
public void createControls(ICdmFormElement element, int style) {
TermVocabulary vocabulary = CdmStore.getService(IVocabularyService.class).find(VocabularyEnum.NomenclaturalStatusType.getUuid());
- nomenclaturalStatusTypeCombo = formFactory.createDefinedTermComboElement(vocabulary, this, "Nomenclatural Status Type", null,style);
+ nomenclaturalStatusTypeCombo = formFactory.createDefinedTermComboElement(vocabulary, this, "Nomenclatural Status Type", null,false, style, true);
ruleConsideredText = formFactory.createTextWithLabelElement(this, "Rule Considered", "", style);
super.createControls(element, style);
combo_nomenclaturalCode = formFactory.createEnumComboElement(NomenclaturalCode.class, formElement, style);
combo_nomenclaturalCode.setSelection(entity.getNomenclaturalCode());
textLsid = formFactory.createLsidWithExceptionLabelElement(formElement, "Lsid", entity.getLsid(), style);
- //TODO RL
- if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
- toggleable_cache.setVisible(false);
- combo_nomenclaturalCode.setVisible(false);
- }
+
}else{
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_CACHE)){
toggleable_cache = formFactory.createToggleableTextField(formElement, "Cache", entity.getTitleCache(), entity.isProtectedTitleCache() || entity.isProtectedFullTitleCache(), style);
- if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
- toggleable_cache.setVisible(false);
- }
- }
+
+ }
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_CODE)){
combo_nomenclaturalCode = formFactory.createEnumComboElement(NomenclaturalCode.class, formElement, style);
combo_nomenclaturalCode.setSelection(entity.getNomenclaturalCode());
- if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
- combo_nomenclaturalCode.setVisible(false);
- }
}
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_LSID)){
textLsid = formFactory.createLsidWithExceptionLabelElement(formElement, "Lsid", entity.getLsid(), style);
}
//TODO RL
if (isAdvancedView || PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_HYBRID)){
- if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
- section_hybrid = formFactory.createHybridDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE);
- section_hybrid.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
- addControl(section_hybrid);
- addElement(section_hybrid);
- }
+ section_hybrid = formFactory.createHybridDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE);
+ section_hybrid.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+ addControl(section_hybrid);
+ addElement(section_hybrid);
+
}
@Override
protected void updateContent() {
super.updateContent();
-
// disable nomenclatural code, because changing of nom.code is not
// implemented on library side
if(combo_nomenclaturalCode!=null){
combo_nomenclaturalCode.setEnabled(false);
}
-
+ toggleable_cache.setEnabled(getEntity().isProtectedTitleCache() || getEntity().isProtectedFullTitleCache());
if(toggleable_cache!=null){
setIrrelevant(toggleable_cache.getState(),
- Arrays.asList(new Object[] { toggleable_cache }));
+ Arrays.asList(new Object[] { toggleable_cache, textLsid }));
}
}
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.taxeditor.model.ImageResources;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
-import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.ui.dialog.selection.NameSelectionDialog;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
protected Control createToolbar() {
ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
- if(nameChoosable && !PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
+ if(nameChoosable ){
//choose name
Action chooseNameAction = new Action("Choose Name", IAction.AS_PUSH_BUTTON){
@Override
/**
* Sorts source type combo alphabetically <b>except</b> for PrimaryTaxonomicSource resp.
- * PrimaryMediaSource which are alway on top depending on the IdentifiableSource;
+ * PrimaryMediaSource which are always on top depending on the IdentifiableSource;
+ * <br>
+ * The last two are always "Other" followed by "Unknown"
* @author pplitzner
* @date Jan 6, 2017
*
*/
@Override
public int compare(OriginalSourceType o1, OriginalSourceType o2) {
- if(o1!=null && o2==null){
- return 1;
+ if(o1==null){
+ if(o2==null){
+ return 0;
+ }
+ else{
+ return -1;
+ }
}
- else if(o1==null && o2!=null){
- return -1;
+ if(o2==null){
+ return 1;
}
- else if(o1!=null && o2 !=null){
- //both are either taxonomic or media
- if(o1.equals(OriginalSourceType.PrimaryTaxonomicSource)
- && o2.equals(OriginalSourceType.PrimaryMediaSource)){
- if(entity.getType().equals(OriginalSourceType.PrimaryMediaSource)){
- return 1;
- }
- else{
- return -1;
- }
+ //both are either taxonomic or media
+ else if(o1.equals(OriginalSourceType.PrimaryTaxonomicSource)
+ && o2.equals(OriginalSourceType.PrimaryMediaSource)){
+ if(entity.getType().equals(OriginalSourceType.PrimaryMediaSource)){
+ return 1;
}
- else if(o2.equals(OriginalSourceType.PrimaryTaxonomicSource)
- && o1.equals(OriginalSourceType.PrimaryMediaSource)){
- if(entity.getType().equals(OriginalSourceType.PrimaryMediaSource)){
- return -1;
- }
- else{
- return 1;
- }
+ else{
+ return -1;
+ }
+ }
+ else if(o2.equals(OriginalSourceType.PrimaryTaxonomicSource)
+ && o1.equals(OriginalSourceType.PrimaryMediaSource)){
+ if(entity.getType().equals(OriginalSourceType.PrimaryMediaSource)){
+ return -1;
}
- //one is not taxonomic or media
else{
- if(o1.equals(OriginalSourceType.PrimaryTaxonomicSource)
- ||o1.equals(OriginalSourceType.PrimaryMediaSource)){
- return -1;
+ return 1;
+ }
+ }
+ //one is not taxonomic or media
+ else if(o1.equals(OriginalSourceType.PrimaryTaxonomicSource)
+ ||o1.equals(OriginalSourceType.PrimaryMediaSource)){
+ return -1;
- }
- else if(o2.equals(OriginalSourceType.PrimaryTaxonomicSource)
- || o2.equals(OriginalSourceType.PrimaryMediaSource)){
- return 1;
- }
- String message1 = o1.getKey();
- String message2 = o2.getKey();
- return message1.compareTo(message2);
+ }
+ else if(o2.equals(OriginalSourceType.PrimaryTaxonomicSource)
+ || o2.equals(OriginalSourceType.PrimaryMediaSource)){
+ return 1;
+ }
+ //The last two are always "Other" followed by "Unknown"
+ else if(o1.equals(OriginalSourceType.Other)){
+ if(o2.equals(OriginalSourceType.Unknown)){
+ return -11;
}
+ else{
+ return 1;
+ }
+ }
+ if(o2.equals(OriginalSourceType.Other)){
+ return 1;
+ }
+ else{
+ String message1 = o1.getKey();
+ String message2 = o2.getKey();
+ return message1.compareTo(message2);
}
- return 0;
}
}
/**
- *
+ *
*/
package eu.etaxonomy.taxeditor.ui.section.supplemental;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
import eu.etaxonomy.cdm.model.media.Rights;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.RightsSelectionDialog;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
*/
@Override
public Rights addExisting() {
- // TODO Auto-generated method stub
- return null;
+ return RightsSelectionDialog.select(getShell(), getConversationHolder(), null);
}
/**
*/
@Override
public boolean allowAddExisting() {
- // TODO Auto-generated method stub
- return false;
+ return true;
}
+
+
+
}
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.cdm.persistence.hibernate.permission.Role;
-import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
//TODO RL
boolean rl=true;
- if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
- toggleable_cache.setVisible(false);
- }
- if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
- text_appendedPhrase = formFactory.createTextWithLabelElement(
+
+ text_appendedPhrase = formFactory.createTextWithLabelElement(
formElement, "Appended Phrase", entity.getAppendedPhrase(),
SWT.WRAP);
- }
+
selection_secundum = formFactory.createSelectionElement(Reference.class,
getConversationHolder(), formElement, "Secundum",
entity.getSecMicroReference(),null,
SWT.WRAP);
- // TODO RL
- if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)) {
- checkbox_useNameCache = formFactory.createCheckbox(formElement,
+
+ checkbox_useNameCache = formFactory.createCheckbox(formElement,
"Exclude Authorship", entity.isUseNameCache(), style);
- checkbox_doubtful = formFactory.createCheckbox(formElement,
+ checkbox_doubtful = formFactory.createCheckbox(formElement,
entity.getClass().getSimpleName() + " is doubtful", entity.isDoubtful(), style);
- }
+
if (entity instanceof Taxon) {
checkbox_published = formFactory.createCheckbox(formElement,
import eu.etaxonomy.cdm.model.common.TermVocabulary;
import eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.ImageResources;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeNode;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.common.ICdmBase;
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
if (selectedObject instanceof UuidAndTitleCache){
selectedObject = CdmStore.getCommonService().find(CdmBase.class, ((UuidAndTitleCache)selectedObject).getUuid());
}
+ //for tree nodes get the value resp. the object of the node
+ else if (selectedObject instanceof TreeNode){
+ selectedObject = ((TreeNode) selectedObject).getValue();
+ }
if(selectedObject instanceof ICdmBase){
params.put(command.getId()+".uuid", ((ICdmBase) selectedObject).getUuid()); //$NON-NLS-1$
}
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.TreeNode;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ICommandService;
UuidAndTitleCache uuidAndTitleCache = (UuidAndTitleCache)input;
input = CdmStore.getCommonService().find(uuidAndTitleCache.getType(), uuidAndTitleCache.getUuid());
}
+ //for tree nodes get the value resp. the object of the node
+ else if (input instanceof TreeNode){
+ TreeNode treeNode = (TreeNode)input;
+ input = treeNode.getValue();
+ }
IExtensionRegistry reg = Platform.getExtensionRegistry();
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import java.util.UUID;
import org.apache.http.client.ClientProtocolException;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.Action;
-import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PlatformUI;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.api.service.IClassificationService;
-import eu.etaxonomy.cdm.api.service.IOccurrenceService;
import eu.etaxonomy.cdm.api.service.ITermService;
import eu.etaxonomy.cdm.ext.occurrence.OccurenceQuery;
import eu.etaxonomy.cdm.ext.occurrence.gbif.DataSetResponse;
import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifQueryServiceWrapper;
import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifResponse;
import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator;
-import eu.etaxonomy.cdm.io.specimen.gbif.in.*;
+import eu.etaxonomy.cdm.io.specimen.gbif.in.GbifImportConfigurator;
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
-import eu.etaxonomy.cdm.model.common.ICdmBase;
-import eu.etaxonomy.cdm.model.name.TaxonNameBase;
-import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
-import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.ui.dialog.selection.SelectionDialogFactory;
public class SaveImportedSpecimenAction extends Action {
private final Logger logger = Logger.getLogger(SaveImportedSpecimenAction.class);
-
+
private Comparator<GbifResponse> comparator;
/* (non-Javadoc)
Set<String[]> unitIdsGbif = new HashSet<String[]>();
Set<String[]> unitIdsBioCase = new HashSet<String[]>();
List<GbifResponse> biocaseResponses = new ArrayList<GbifResponse>();
-
+
for(TableItem item:table.getItems()){
if(item.getChecked()){
//Save Specimen
for (GbifResponse response:checkedResults){
if (response != null){
tripleId = response.getTripleID();
-
+
if (response.getDataSetProtocol().equals(GbifDataSetProtocol.BIOCASE)){
biocaseResponses.add(response);
-
+
}else{
unitIdsGbif.add(tripleId);
}
-
-
+
+
}
}
- Collections.sort(biocaseResponses, getComparator());
+ Collections.sort(biocaseResponses, getComparator());
URI dataSetUri = null;
Abcd206ImportConfigurator configuratorAbcd;
-
+
List<Abcd206ImportConfigurator> abcdConfigurators = new ArrayList<Abcd206ImportConfigurator>();
DataSetResponse dataSetResponse;
OccurenceQuery bioCaseOccurrenceQuery = null;
if (!response.getDataSetUri().equals(dataSetUri)){
configuratorAbcd = Abcd206ImportConfigurator.NewInstance(dataSetUri, null, false);
configuratorAbcd.addMediaAsMediaSpecimen(true);
+ configuratorAbcd.setIgnoreAuthorship(true);
+ configuratorAbcd.setMoveNewTaxaToDefaultClassification(false);
if (configuratorAbcd != null){
abcdConfigurators.add(configuratorAbcd);
}
if (dataImportView.getClassification() != null){
configuratorAbcd.setClassificationUuid(dataImportView.getClassification().getUuid());
}
-
+
}
tripleId = response.getTripleID();
unitIdsBioCase.add(tripleId);
}
-
+
OccurenceQuery query = new OccurenceQuery(unitIdsGbif);
GbifImportConfigurator configurator = GbifImportConfigurator.newInstance(query);
configurator.setSourceReferenceTitle("Import Gbif data");
-
-
-
+
+
+
// configurator.setQuery(query);
-
+
Job bioCaseJob = CdmStore.getImportManager().createIOServiceJob(abcdConfigurators);
CdmStore.getImportManager().run(bioCaseJob);
-
+
Job gbifJob = CdmStore.getImportManager().createIOServiceJob(configurator);
CdmStore.getImportManager().run(gbifJob);
-
-
-
+
+
+
}
}
-
-
+
+
private void persistTerm(DefinedTermBase<?> term, ITermService termService, ConversationHolder conversation){
if(term!=null){
//if the term does not exist in the DB save it
}
}
}
-
+
/* (non-Javadoc)
* @see org.eclipse.jface.action.Action#getText()
*/
public String getText() {
return "Import";
}
-
+
private Comparator<GbifResponse> getComparator(){
if (comparator == null){
comparator = new GbifResponseComparator();
}
return comparator;
}
-
-
+
+
}
import java.util.Collection;
import org.apache.http.client.ClientProtocolException;
-import org.eclipse.core.runtime.jobs.Job;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
import eu.etaxonomy.cdm.ext.occurrence.bioCase.BioCaseQueryServiceWrapper;
-import eu.etaxonomy.cdm.io.common.CdmDefaultImport;
-import eu.etaxonomy.cdm.io.common.IImportConfigurator.SOURCE_TYPE;
+import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206DataHolder;
import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator;
-import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
-import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportParser;
+import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportState;
+import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206XMLFieldGetter;
+import eu.etaxonomy.cdm.io.specimen.abcd206.in.AbcdParseUtility;
+import eu.etaxonomy.cdm.io.specimen.abcd206.in.UnitAssociationWrapper;
/**
* @author pplitzner
* @date Sep 3, 2014
*
*/
-public class SpecimenImportView extends DataImportView<SpecimenOrObservationBase<?>> {
+public class SpecimenImportView extends DataImportView<Abcd206DataHolder> {
public static final String ID = "eu.etaxonomy.taxeditor.view.dataimport.SpecimenImportView"; //$NON-NLS-1$
* @see eu.etaxonomy.taxeditor.view.dataimport.DataImportView#getTextForTableItem(java.lang.Object)
*/
@Override
- protected String getTextForTableItem(SpecimenOrObservationBase<?> item) {
- return item.getTitleCache();
+ protected String getTextForTableItem(Abcd206DataHolder item) {
+ //TODO: define a suitable toString method
+ return item.toString();
}
/* (non-Javadoc)
public void query() {
String errorMessage = "Could not execute query " + query;
- Collection<SpecimenOrObservationBase<?>> results = new ArrayList<SpecimenOrObservationBase<?>>();
+ Collection<Abcd206DataHolder> results = new ArrayList<Abcd206DataHolder>();
try {
//FIXME move ABCD import to cdmlib -> this will also get rid of the transient services
InputStream resultStream;
resultStream = new BioCaseQueryServiceWrapper().query(query, endPoint);
Abcd206ImportConfigurator configurator = Abcd206ImportConfigurator.NewInstance(null, null);
-// TransientCdmRepository repo =
+ configurator.setSourceUri(endPoint);
+
+ // TransientCdmRepository repo =
// new TransientCdmRepository(CdmStore.getCurrentApplicationConfiguration());
//configurator.setCdmAppController(repo);
+
+ //TODO: do not query all data but with the selected triple IDs -> see GbifResponseImportView
configurator.setAddMediaAsMediaSpecimen(true);
configurator.setAllowReuseOtherClassifications(true);
-
- Job job = CdmStore.getImportManager().createIOServiceJob(configurator, resultStream, SOURCE_TYPE.INPUTSTREAM);
- CdmStore.getImportManager().run(job);
-
+ configurator.setMoveNewTaxaToDefaultClassification(false);
+ UnitAssociationWrapper unitAssociationWrapper = AbcdParseUtility.parseUnitsNodeList(resultStream, null);
+ NodeList unitsList = unitAssociationWrapper.getAssociatedUnits();
+ Abcd206DataHolder dataHolder = new Abcd206DataHolder();
+ Abcd206XMLFieldGetter abcdFieldGetter = new Abcd206XMLFieldGetter(dataHolder, unitAssociationWrapper.getPrefix());
+ Abcd206ImportState state = new Abcd206ImportState(configurator);
+ state.setDataHolder(dataHolder);
+ for (int i = 0; i <unitsList.getLength(); i++){
+ Element item = (Element) unitsList.item(i);
+ //dataHolder = new Abcd206DataHolder();
+ Abcd206ImportParser.setUnitPropertiesXML(item, abcdFieldGetter, state);
+ results.add(dataHolder);
+ }
+
+// Job job = CdmStore.getImportManager().createIOServiceJob(configurator, resultStream, SOURCE_TYPE.INPUTSTREAM);
+// CdmStore.getImportManager().run(job);
+
setResults(results);
} catch (ClientProtocolException e) {
logger.error(errorMessage, e);
logger.error(errorMessage, e);
}
- setResults(results);
+ // setResults(results);
}
import eu.etaxonomy.cdm.ext.occurrence.OccurenceQuery;
import eu.etaxonomy.cdm.ext.occurrence.bioCase.BioCaseQueryServiceWrapper;
import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator;
-
import eu.etaxonomy.cdm.io.specimen.abcd206.in.AbcdParseUtility;
import eu.etaxonomy.cdm.io.specimen.abcd206.in.SpecimenImportReport;
import eu.etaxonomy.cdm.io.specimen.abcd206.in.UnitAssociationWrapper;
configurator.setAddMediaAsMediaSpecimen(true);
configurator.setDbSchemaValidation(DbSchemaValidation.CREATE);
configurator.setIgnoreAuthorship(true);
-
+ configurator.setMoveNewTaxaToDefaultClassification(false);
+
+
//Job job = CdmStore.getImportManager().createIOServiceJob(configurator, new File(source), SOURCE_TYPE.INPUTSTREAM);
//CdmStore.getImportManager().run(job);
try {
NodeList nodeList = unitNodesList.getAssociatedUnits();
String prefix = unitNodesList.getPrefix();
String associationType = unitNodesList.getAssociationType();
- URI uri =AbcdParseUtility.parseFirstUri(nodeList, report);
- String content = AbcdParseUtility.parseFirstTextContent(nodeList);
- System.out.println(content);
+ if (nodeList != null){
+ URI uri =AbcdParseUtility.parseFirstUri(nodeList, report);
+ String content = AbcdParseUtility.parseFirstTextContent(nodeList);
+ System.out.println(content);
+ }
+
SpecimenImportView specimenImportView = new SpecimenImportView();
} else{
try {
-
+
dataImportView = (GbifResponseImportView) activePart.showView(GbifResponseImportView.ID, "query_"+query.toString().replaceAll(",", ""), IWorkbenchPage.VIEW_ACTIVATE);
- dataImportView.setQuery(query);
+ dataImportView.setQuery(query);
// (GbifResponseImportView) activePart.showView(GbifResponseImportView.ID);getWorkbench().getActiveWorkbenchWindow().getActivePage()
// .showView(GbifResponseImportView.ID, "query_"+query.toString().replaceAll(",", ""),IWorkbenchPage.VIEW_ACTIVATE);
e.printStackTrace();
}
// CdmStore.getImportManager().run(configurator);
-
+
// try {
// switch (providerSelectionPage.getQueryType()) {
// case BIOCASE:
//// }
//// });
Job queryJob = new QueryJob("Query specimen provider", dataImportView);
- queryJob.schedule();
+ queryJob.schedule();
return true;
}
import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
import eu.etaxonomy.cdm.config.ICdmSource;
-import eu.etaxonomy.taxeditor.Messages;
import eu.etaxonomy.taxeditor.datasource.CdmDataSourceRepository;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;
import eu.etaxonomy.taxeditor.model.IContextListener;
import eu.etaxonomy.taxeditor.store.CdmStore;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.handlers.HandlerUtil;
-import eu.etaxonomy.taxeditor.Messages;
import eu.etaxonomy.taxeditor.datasource.CdmDataSourceRepository;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.view.datasource.CdmMetaDataAwareDataSourceContainer;
import eu.etaxonomy.cdm.model.occurrence.MediaSpecimen;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
+import eu.etaxonomy.cdm.strategy.cache.common.IdentifiableEntityDefaultCacheStrategy;
import eu.etaxonomy.taxeditor.model.ImageResources;
import eu.etaxonomy.taxeditor.store.CdmStore;
if(element instanceof TreeNode){
element = ((TreeNode) element).getValue();
}
- FormatKey[] formatKeys = {
- FormatKey.GATHERING_COUNTRY, FormatKey.SPACE,
- FormatKey.GATHERING_LOCALITY_TEXT, FormatKey.SPACE,
- FormatKey.GATHERING_DATE, FormatKey.SPACE,
- FormatKey.GATHERING_COLLECTOR, FormatKey.SPACE,
- FormatKey.FIELD_NUMBER, FormatKey.SPACE,
- FormatKey.COLLECTION_CODE, FormatKey.SPACE,
- FormatKey.MOST_SIGNIFICANT_IDENTIFIER, FormatKey.SPACE,
-// FormatKey.KIND_OF_UNIT, FormatKey.SPACE,
- FormatKey.SAMPLE_DESIGNATION, FormatKey.SPACE,
- FormatKey.SINGLE_READ_PHEROGRAM_TITLE_CACHE, FormatKey.SPACE,
- FormatKey.SEQUENCE_DNA_MARKER, FormatKey.SPACE,
- FormatKey.AMPLIFICATION_LABEL, FormatKey.SPACE,
- FormatKey.MEDIA_TITLE, FormatKey.SPACE,
- FormatKey.MEDIA_ARTIST, FormatKey.SPACE
- };
- String text = CdmFormatterFactory.format(element, formatKeys);
- if(element instanceof IdentifiableEntity){
+ String text = null;
+
+ //check if collection code does not exist -> use collection name then
+ FormatKey collectionKey = FormatKey.COLLECTION_CODE;
+ text = CdmFormatterFactory.format(element,new FormatKey[]{FormatKey.COLLECTION_CODE});
+ if(CdmUtils.isBlank(text)){
+ collectionKey = FormatKey.COLLECTION_NAME;
+ }
+
+ //Use titlecache for FieldUnits
+ if(element instanceof FieldUnit){
+ return ((FieldUnit) element).getTitleCache();
+ }
+ else if(element instanceof MediaSpecimen){
+ text = CdmFormatterFactory.format(element,
+ new FormatKey[]{
+ FormatKey.MEDIA_TITLE_CACHE, FormatKey.SPACE,
+ collectionKey, FormatKey.SPACE,
+ FormatKey.MOST_SIGNIFICANT_IDENTIFIER, FormatKey.SPACE,
+ FormatKey.MEDIA_TITLE, FormatKey.SPACE,
+ FormatKey.MEDIA_ARTIST, FormatKey.SPACE,
+ });
+ }
+ else if (element instanceof DnaSample) {
+ text = CdmFormatterFactory.format(element,
+ new FormatKey[] {
+ collectionKey, FormatKey.SPACE,
+ FormatKey.MOST_SIGNIFICANT_IDENTIFIER, FormatKey.SPACE,
+ FormatKey.SAMPLE_DESIGNATION, FormatKey.SPACE
+ });
+ }
+ else if (element instanceof DerivedUnit) {
+ text = CdmFormatterFactory.format(element,
+ new FormatKey[] {
+ collectionKey, FormatKey.SPACE,
+ FormatKey.MOST_SIGNIFICANT_IDENTIFIER, FormatKey.SPACE
+ });
+ }
+ else if (element instanceof Sequence) {
+ text = CdmFormatterFactory.format(element,
+ new FormatKey[] {
+ FormatKey.SEQUENCE_DNA_MARKER, FormatKey.SPACE
+ });
+ }
+ else if (element instanceof SingleRead) {
+ text = CdmFormatterFactory.format(element,
+ new FormatKey[] {
+ FormatKey.SINGLE_READ_PHEROGRAM_TITLE_CACHE, FormatKey.SPACE,
+ FormatKey.AMPLIFICATION_LABEL, FormatKey.SPACE,
+ });
+ }
+ else if(element instanceof IdentifiableEntity){
IdentifiableEntity identifiableEntity = (IdentifiableEntity) element;
if(identifiableEntity.isProtectedTitleCache()){
text = identifiableEntity.getTitleCache();
}
}
- if(CdmUtils.isBlank(text)){
- return "[-]";
+ if(CdmUtils.isBlank(text) || text.equals(IdentifiableEntityDefaultCacheStrategy.TITLE_CACHE_GENERATION_NOT_IMPLEMENTED)){
+ if(element instanceof CdmBase){
+ text = ((CdmBase) element).getUuid().toString();
+ }
+ else{
+ text = element.toString();
+ }
}
return text;
}
if(derivedUnit.getRecordBasis()==SpecimenOrObservationType.PreservedSpecimen){
//check for type designation
if(typeDesignations.get(derivedUnit)==null){
- for (SpecimenTypeDesignation specimenTypeDesignation : CdmStore.getService(IOccurrenceService.class).listTypeDesignations(derivedUnit, null, null, null, null)) {
+ for (SpecimenTypeDesignation specimenTypeDesignation : derivedUnit.getSpecimenTypeDesignations()) {
addTypeDesignation(derivedUnit, specimenTypeDesignation);
}
}
derivedUnits.add(HibernateProxyHelper.deproxy(specimenOrObservationBase, DerivedUnit.class));
}
}
- typeDesignations = CdmStore.getService(IOccurrenceService.class).listTypeDesignations(derivedUnits, null, null, null, null);
+ for (DerivedUnit derivedUnit : derivedUnits) {
+ if(!derivedUnit.getSpecimenTypeDesignations().isEmpty()){
+ typeDesignations.put(derivedUnit, derivedUnit.getSpecimenTypeDesignations());
+ }
+ }
}
}
import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.cdm.model.description.Feature;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
import eu.etaxonomy.taxeditor.model.IContextListener;
public class DetailsViewer extends AbstractCdmDataViewer {
private ISelection selection;
-
+
public DetailsViewer(Composite parent, AbstractCdmViewPart viewPart) {
super(parent, viewPart);
}
TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
+
addPart(taxonBaseDetailSection);
}
}
.createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE))){
+ if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE))){
NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(referenceDetailSection);
-
+
}
if ( !PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS))){
NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(nomenclaturalStatusSection);
}
- if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL) ){
- if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE))){
- ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(protologSection);
- }
-
- if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION))){
- TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(typeDesignationSection);
- }
-
- if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP))){
- NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(nameRelationshipSection);
- }
- }
+
+ if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE))){
+ ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ addPart(protologSection);
+ }
+
+ if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION))){
+ TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ addPart(typeDesignationSection);
+ }
+
+ if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP))){
+ NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ addPart(nameRelationshipSection);
+ }
+
addPart(parsingMessagesSection);
addPart(nonViralNameSection);
addPart(nomenclaturalStatusSection);
addPart(referenceDetailSection);
-//TODO RL
- if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
- ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ addPart(protologSection);
+ addPart(typeDesignationSection);
+ addPart(nameRelationshipSection);
- NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(protologSection);
- addPart(typeDesignationSection);
- addPart(nameRelationshipSection);
- }
}
private void createReferenceSections(RootElement parent) {
@Override
public void update(CdmDataChangeMap arg0) {
-
+
}
}
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifResponse;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
-import eu.etaxonomy.taxeditor.Messages;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
import eu.etaxonomy.cdm.model.common.DefaultTermInitializer;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.name.Rank;
+import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
/**
* @author n.hoffmann
(new DefaultTermInitializer()).initialize();
- name = NonViralName.NewInstance(Rank.SPECIES());
+ name = TaxonNameFactory.NewNonViralInstance(Rank.SPECIES());
name.setGenusOrUninomial("Joe");
name.setSpecificEpithet("mama");
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry including="**/*.java" kind="src" path="src/test/java"/>
<classpathentry excluding="**/*.java" kind="src" path="src/test/resources"/>
Bundle-ManifestVersion: 2
Bundle-Name: eu.etaxonomy.taxeditor.test
Bundle-SymbolicName: eu.etaxonomy.taxeditor.test;singleton:=true
-Bundle-Version: 4.4.0.qualifier
+Bundle-Version: 4.6.0
Bundle-ActivationPolicy: lazy
Bundle-Vendor: EDIT
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
org.apache.log4j,
org.hamcrest,
org.eclipse.swtbot.eclipse.core,
- org.eclipse.swtbot.eclipse.finder,
- eu.etaxonomy.taxeditor.webapp;bundle-version="3.13.0"
+ org.eclipse.swtbot.eclipse.finder
Eclipse-RegisterBuddy: org.apache.log4j, org.eclipse.swtbot.swt.finder
Bundle-ClassPath: .,
lib/byte-buddy-0.5.1.jar,
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>4.4.0-SNAPSHOT</version>
+ <version>4.6.0</version>
</parent>
<artifactId>eu.etaxonomy.taxeditor.test</artifactId>
<packaging>eclipse-test-plugin</packaging>
<removeAll />
</filter>
</filters>
+ <dependency-resolution>
+ <extraRequirements>
+ <requirement>
+ <type>eclipse-feature</type>
+ <id>eu.etaxonomy.taxeditor.feature</id>
+ <versionRange>1.0.0</versionRange>
+ </requirement>
+ </extraRequirements>
+ </dependency-resolution>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho.version}</version>
- <configuration>
- <!-- currently we run only the non-ui unit tests so we don't the
- harness -->
- <!-- <useUIHarness>true</useUIHarness> -->
- <dependencies>
- <!-- This will pull the feature and its dependent plugins into
- the classpath for the tests. Note that this requires ALL taxeditor projects
- to be installed. -->
- <dependency>
- <type>eclipse-feature</type>
- <artifactId>eu.etaxonomy.taxeditor.feature</artifactId>
- <!-- This is the minimum required version -->
- <version>1.0.0</version>
- </dependency>
- </dependencies>
- </configuration>
+
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
- <version>9.1.3.v20140225</version><!-- do not update, since later versions are no longer compatible to java 7 -->
- <!--
- To see the detailed list of parameters that can be configured for a particular goal:
- mvn jetty:help -Ddetail=true -Dgoal= goal-name
- -->
+ <version>9.4.1.v20170120</version>
<configuration>
<systemProperties>
<force>true</force>
import eu.etaxonomy.cdm.model.name.BotanicalName;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
public void testCDMEntitySaveLazyNew() {
Team combAuthor = Team.NewInstance();
combAuthor.addTeamMember(Person.NewTitledInstance("test member"));
- BotanicalName name = BotanicalName.NewInstance(null, "Test1", null, null, null, null, null, null, null);
+ BotanicalName name = TaxonNameFactory.NewBotanicalInstance(null, "Test1", null, null, null, null, null, null, null);
name.setCombinationAuthorship(combAuthor);
Taxon tax1 = Taxon.NewInstance(name, null);
UUID taxonUuid1 = taxonService.save(tax1).getUuid();
import eu.etaxonomy.cdm.model.name.BotanicalName;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
Team combAuthor = Team.NewInstance();
combAuthor.addTeamMember(Person.NewTitledInstance("test member"));
- BotanicalName name = BotanicalName.NewInstance(null, "Test1", null, null, null, null, null, null, null);
+ BotanicalName name = TaxonNameFactory.NewBotanicalInstance(null, "Test1", null, null, null, null, null, null, null);
name.setCombinationAuthorship(combAuthor);
Taxon taxon = Taxon.NewInstance(name, null);
UUID taxonUuid = taxonService.save(taxon).getUuid();
public void testCDMEntitySaveLazyNew() {
Team combAuthor = Team.NewInstance();
combAuthor.addTeamMember(Person.NewTitledInstance("test member"));
- BotanicalName name = BotanicalName.NewInstance(null, "Test1", null, null, null, null, null, null, null);
+ BotanicalName name = TaxonNameFactory.NewBotanicalInstance(null, "Test1", null, null, null, null, null, null, null);
name.setCombinationAuthorship(combAuthor);
Taxon tax1 = Taxon.NewInstance(name, null);
UUID taxonUuid1 = taxonService.save(tax1).getUuid();
import eu.etaxonomy.cdm.model.name.HomotypicalGroup;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
+import eu.etaxonomy.cdm.model.name.TaxonNameFactory;
import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
TaxonNode taxonNode = taxonNodeService.load(taxonNodeUuid);
Taxon taxon = taxonNode.getTaxon();
HomotypicalGroup group = taxon.getHomotypicGroup();
- BotanicalName newSynonymName = BotanicalName.NewInstance(null);
+ BotanicalName newSynonymName = TaxonNameFactory.NewBotanicalInstance(null);
newSynonymName.setTitleCache("New Synonym", true);
operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
undoContext, taxon, group, newSynonymName, postOperation);
TaxonNode taxonNode = taxonNodeService.load(taxonNodeUuid);
Taxon taxon = taxonNode.getTaxon();
HomotypicalGroup group = taxon.getHomotypicGroup();
- BotanicalName newSynonymName = BotanicalName.NewInstance(null);
+ BotanicalName newSynonymName = TaxonNameFactory.NewBotanicalInstance(null);
newSynonymName.setTitleCache("New Synonym", true);
operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
undoContext, taxon, group, newSynonymName, postOperation);
TaxonNode taxonNode = taxonNodeService.load(taxonNodeUuid);
Taxon taxon = taxonNode.getTaxon();
HomotypicalGroup group = taxon.getHomotypicGroup();
- BotanicalName newSynonymName = BotanicalName.NewInstance(null);
+ BotanicalName newSynonymName = TaxonNameFactory.NewBotanicalInstance(null);
newSynonymName.setTitleCache("New Synonym", true);
operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
undoContext, taxon, group, newSynonymName, postOperation);
taxonNodeService.merge(taxonNode);
- newSynonymName = BotanicalName.NewInstance(null);
+ newSynonymName = TaxonNameFactory.NewBotanicalInstance(null);
newSynonymName.setTitleCache("Another New Synonym", true);
operation = new CreateSynonymInExistingHomotypicalGroupOperation("Create Synonym In Existing Homotypical Group",
undoContext, taxon, group, newSynonymName, postOperation);
@Test
public void addTaxon() {
- NonViralName taxonName = NonViralName.NewInstance(null);
+ NonViralName taxonName = TaxonNameFactory.NewNonViralInstance(null);
Taxon taxon = Taxon.NewInstance(taxonName, null);
taxonService.merge(taxon);
}
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
- <bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>
+ <bean id="dataSource" class="org.unitils.database.UnitilsDataSourceFactoryBean"/>
</beans>
<classpathentry exported="true" kind="lib" path="lib/javax.servlet-api-3.1.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jetty-all-9.2.9.v20150224.jar"/>
<classpathentry exported="true" kind="lib" path="lib/log4j-1.2.17.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
Bundle-ManifestVersion: 2
Bundle-Name: Webapp
Bundle-SymbolicName: eu.etaxonomy.taxeditor.webapp;singleton:=true
-Bundle-Version: 4.5.1
+Bundle-Version: 4.6.0
Require-Bundle: org.eclipse.core.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>4.5.1</version>
+ <version>4.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>eu.etaxonomy.taxeditor.webapp</artifactId>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="src" path="/eu.etaxonomy.taxeditor.application"/>
<classpathentry kind="src" path="/eu.etaxonomy.taxeditor.bulkeditor"/>
<classpathentry kind="src" path="/eu.etaxonomy.taxeditor.cdmlib"/>
<classpathentry kind="src" path="/eu.etaxonomy.taxeditor.navigation"/>
<classpathentry kind="src" path="/eu.etaxonomy.taxeditor.printpublisher"/>
<classpathentry kind="src" path="/eu.etaxonomy.taxeditor.store"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?><product application="eu.etaxonomy.taxeditor.application.application" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" includeLaunchers="true" name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product" useFeatures="true" version="4.5.1">
+<?pde version="3.5"?><product application="eu.etaxonomy.taxeditor.application.application" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" includeLaunchers="true" name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product" useFeatures="true" version="4.6.0">
<aboutInfo>
<image path="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
<text>
<launcherArgs>
<programArgs>-data @user.home/.cdmLibrary -Dserver_port=58080
</programArgs>
- <vmArgs>-Xmx512M -XX:MaxPermSize=256M -Dorg.eclipse.update.reconcile=false -Declipse.p2.unsignedPolicy=allow
+ <vmArgs>-Xmx512M -Dorg.eclipse.update.reconcile=false -Declipse.p2.unsignedPolicy=allow
</vmArgs>
<vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
</vmArgsMac>
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
-<product name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product.jre" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" application="eu.etaxonomy.taxeditor.application.application" version="4.5.1" useFeatures="true" includeLaunchers="true">
+<product name="EDIT Taxonomic Editor" uid="eu.etaxonomy.taxeditor.product.jre" id="eu.etaxonomy.taxeditor.application.eu_etaxonomy_taxeditor_product" application="eu.etaxonomy.taxeditor.application.application" version="4.6.0" useFeatures="true" includeLaunchers="true">
<aboutInfo>
<image path="/eu.etaxonomy.taxeditor.application/icons/256color_48x48.gif"/>
<parent>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>4.5.1</version>
+ <version>4.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<lifecycleMappingMetadata>
+ <lifecycleMappings>
+ <lifecycleMapping>
+ <packagingType>maven-plugin</packagingType>
+ <lifecycleMappingId>org.eclipse.m2e.jdt.JarLifecycleMapping</lifecycleMappingId>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <versionRange>[2.3,)</versionRange>
+ <goals>
+ <goal>descriptor</goal>
+ <goal>helpmojo</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <execute>
+ <runOnIncremental>false</runOnIncremental>
+ </execute>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMapping>
+
+ <lifecycleMapping>
+ <packagingType>nexus-plugin</packagingType>
+ <lifecycleMappingId>org.eclipse.m2e.jdt.JarLifecycleMapping</lifecycleMappingId>
+ </lifecycleMapping>
+
+ <lifecycleMapping>
+ <packagingType>war</packagingType>
+ <lifecycleMappingId>org.eclipse.m2e.jdt.JarLifecycleMapping</lifecycleMappingId>
+ </lifecycleMapping>
+ </lifecycleMappings>
+
+ <pluginExecutions>
+ <!-- standard maven plugins -->
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <goals>
+ <goal>resources</goal>
+ <goal>testResources</goal>
+ <goal>copy-resources</goal>
+ </goals>
+ <versionRange>[2.4,)</versionRange>
+ </pluginExecutionFilter>
+ <action>
+ <execute/>
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <goals>
+ <goal>resources</goal>
+ <goal>testResources</goal>
+ <goal>copy-resources</goal>
+ </goals>
+ <versionRange>[0.0.1,2.4)</versionRange>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <goals>
+ <goal>copy-dependencies</goal>
+ <goal>unpack</goal>
+ </goals>
+ <versionRange>[2.0,)</versionRange>
+ </pluginExecutionFilter>
+ <action>
+ <ignore>
+ <message>maven-dependency-plugin (goals "copy-dependencies", "unpack") is not supported by m2e.</message>
+ </ignore>
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <versionRange>[1.0-alpha-1,)</versionRange>
+ </pluginExecutionFilter>
+ <action>
+ <ignore>
+ <message>maven-enforcer-plugin (goal "enforce") is ignored by m2e.</message>
+ </ignore>
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <goals>
+ <goal>install</goal>
+ </goals>
+ <versionRange>[1.6-SONATYPE-r940877,)</versionRange>
+ </pluginExecutionFilter>
+ <action>
+ <ignore>
+ <message>maven-invoker-plugin (goal "install") is ignored by m2e.</message>
+ </ignore>
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-remote-resources-plugin</artifactId>
+ <versionRange>[1.0,)</versionRange>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore>
+ <message>maven-remote-resources-plugin (goal "process") is ignored by m2e.</message>
+ </ignore>
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <versionRange>[0,)</versionRange>
+ <goals>
+ <goal>configure-workspace</goal>
+ <goal>eclipse</goal>
+ <goal>clean</goal>
+
+ <goal>to-maven</goal>
+ <goal>install-plugins</goal>
+ <goal>make-artifacts</goal>
+
+ <goal>myeclipse</goal>
+ <goal>myeclipse-clean</goal>
+
+ <goal>rad</goal>
+ <goal>rad-clean</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <error>
+ <message>maven-eclipse-plugin is not compatible with m2e</message>
+ </error>
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <versionRange>[2.0,)</versionRange>
+ <goals>
+ <goal>jar-no-fork</goal>
+ <goal>test-jar-no-fork</goal>
+ <!-- theoretically, the following goals should not be bound to lifecycle, but ignore them just in case -->
+ <goal>jar</goal>
+ <goal>aggregate</goal>
+ <goal>test-jar</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore/>
+ </action>
+ </pluginExecution>
+
+ <!-- commonly used codehaus plugins -->
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.codehaus.enunciate</groupId>
+ <artifactId>maven-enunciate-plugin</artifactId>
+ <goals>
+ <goal>docs</goal>
+ </goals>
+ <versionRange>[1.20-SONATYPE-r919,)</versionRange>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>animal-sniffer-maven-plugin</artifactId>
+ <versionRange>[1.0,)</versionRange>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
+ <versionRange>[1.0-beta-1,)</versionRange>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+
+
+ <!-- commonly use sonatype plugins -->
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>provided-dependencies-maven-plugin</artifactId>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <versionRange>[1.4,)</versionRange>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>app-lifecycle-maven-plugin</artifactId>
+ <goals>
+ <goal>check-dependencies</goal>
+ </goals>
+ <versionRange>[1.1,)</versionRange>
+ </pluginExecutionFilter>
+ <action>
+ <execute />
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>app-lifecycle-maven-plugin</artifactId>
+ <goals>
+ <goal>generate-metadata</goal>
+ <goal>inject-artifact-handler</goal>
+ </goals>
+ <versionRange>[1.1,)</versionRange>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>nexus-test-environment-maven-plugin</artifactId>
+ <goals>
+ <goal>setup-environment</goal>
+ </goals>
+ <versionRange>[1.6-SNAPSHOT,)</versionRange>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>net.sf.alchim</groupId>
+ <artifactId>yuicompressor-maven-plugin</artifactId>
+ <goals>
+ <goal>compress</goal>
+ </goals>
+ <versionRange>[0.7.1,)</versionRange>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>yuicompressor-maven-plugin</artifactId>
+ <goals>
+ <goal>aggregate</goal>
+ </goals>
+ <versionRange>[0.0.1,)</versionRange>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.sonatype.plugins</groupId>
+ <artifactId>maven-properties-plugin</artifactId>
+ <versionRange>[0.0.3-SNAPSHOT,)</versionRange>
+ <goals>
+ <goal>filter-file</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <execute />
+ </action>
+ </pluginExecution>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <versionRange>[1.7,)</versionRange>
+ </pluginExecutionFilter>
+ <action>
+ <execute/>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+</lifecycleMappingMetadata>
\ No newline at end of file
</prerequisites>
<groupId>eu.etaxonomy</groupId>
<artifactId>taxeditor-parent</artifactId>
- <version>4.5.1</version>
+ <version>4.6.0</version>
<name>EDIT Taxonomic Editor</name>
<description>The Taxonomic Editor for EDIT's platform for
cybertaxonomy
<inceptionYear>2007</inceptionYear>
<packaging>pom</packaging>
<properties>
- <java.codelevel>1.7</java.codelevel>
+ <java.codelevel>1.8</java.codelevel>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <cdmlib.version>4.5.1</cdmlib.version>
+ <cdmlib.version>4.6.0</cdmlib.version>
<!-- TODO can we use project.version ????? -->
+ <!-- Increasing tycho above 0.22.0 will fail for the macosx build because
+ for higher version numbers tycho needs to be build against Eclipse Mars or
+ higher -->
<tycho.version>0.22.0</tycho.version>
- <taxeditor.version>4.5.1</taxeditor.version>
+ <taxeditor.version>4.6.0</taxeditor.version>
<update.dir>snapshot</update.dir>
<unitils.version>3.4.2</unitils.version>
<log4j.version>1.2.17</log4j.version>
<module>eu.etaxonomy.taxeditor.feature</module>
<module>eu.etaxonomy.taxeditor.feature.jre.linux64</module>
<module>eu.etaxonomy.taxeditor</module>
+ <module>eu.etaxonomy.taxeditor.test</module>
</modules>
<scm>
- <connection>scm:svn:http://dev.e-taxonomy.eu/svn/trunk/taxeditor/
+ <connection>scm:git:https://dev.e-taxonomy.eu/git/taxeditor.git
</connection>
- <developerConnection>scm:svn:https://dev.e-taxonomy.eu/svn/trunk/taxeditor/
+ <developerConnection>scm:git:ssh://git@dev.e-taxonomy.eu/var/git/taxeditor.git
</developerConnection>
- <url>https://dev.e-taxonomy.eu/trac/browser/trunk/taxeditor/</url>
+ <url>https://dev.e-taxonomy.eu/gitweb/taxeditor.git/tree</url>
</scm>
<mailingLists>
<mailingList>
</developers>
<issueManagement>
<system>Trac</system>
- <url>http://dev.e-taxonomy.eu/trac/</url>
+ <url>https://dev.e-taxonomy.eu/redmine/projects/edit/</url>
</issueManagement>
<ciManagement>
<system>Jenkins</system>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.2</version>
+ <version>3.6.1</version>
<configuration>
- <source>1.7</source>
- <target>1.7</target>
+ <source>${java.codelevel}</source>
+ <target>${java.codelevel}</target>
</configuration>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
- <version>3.0</version>
+ <version>3.3</version>
<configuration>
<locales>en</locales>
</configuration>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
- <version>2.1.2</version>
+ <version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<allowUntracked>true</allowUntracked>
</configuration>
<dependencies>
- <!--
- upgrading dependency jsch.agent.version of jgit-flow plugin to 0.1.53
- in order have ssl key exchange algorithms compatible with openssh 6.7
- -->
+ <!-- upgrading dependency jsch.agent.version of jgit-flow plugin
+ to 0.1.53 in order have ssl key exchange algorithms compatible with openssh
+ 6.7 -->
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
--- /dev/null
+#!/bin/bash
+
+echo -n "Use the local repo? [y,n]"
+read choice
+
+if [ "$choice" == "y" ]; then
+ mvn_profile='-P local-repository'
+fi
+
+mvn clean install -DskipTests
+mvn $mvn_profile -Dlocalrepo=~/.m2/repository validate -pl eu.etaxonomy.taxeditor.cdmlib,eu.etaxonomy.taxeditor.molecular.lib
</p>
</answer>
</faq>
+ <faq id="windows_domain_active_directory">
+ <question>Note for using the EDITor in a Windows Domain/Active directory</question>
+ <answer>
+ <p>Using the EDITor from a user account in an active directory is possible but in the case user profile folders are located on network folders, one of the following problems may occurr, when working with CDM databases:
+ </p>
+ <p>
+ 1) Problems are known, if the user profile path is an UNC path (e.g. "\\server\share").
+ 2) CDM Information may be written to the local machine's profile copy (if the %USERPROFILE% evironment variable is set respectively) and get lost during synchronization.
+ </p>
+ <p>
+ If one of the described problems occurs, the following workaround can solve the problem:
+ </p>
+ <p>
+ - Connect a network drive with the UNC path of your network profile root folder (if that is not already done within your group policies). (Make sure to check the option to reconnect the drive on the next login.)
+ - Start the EDITor with the additional command line option "-Duser.home=I:\", where "I" should be replaced by the letter used for the network drive.
+ </p>
+ <p>
+ Now all CDM Information will directly be accessed on the network resource. (Note that with such a configuration, it is not recommended to run multiple instances of the EDITor in different machines of the domain using the same user profile in parallel.)
+ </p>
+ </answer>
+ </faq>
</part>
</faqs>
<item name="Manual" href="manual.html"/>
<!--item name="FAQ" href="faq.html"/-->
<item name="Releases" href="changes-report.html"/>
- <item name="Download" href="http://wp5.e-taxonomy.eu/download/taxeditor/"/>
+ <item name="Download" href="https://cybertaxonomy.eu/download/taxeditor/"/>
</menu>
<menu name="Developer">
<item name="Getting started" href="getting-started.html"/>
<item name="Javadocs" href="apidocs/index.html"/>
<item name="Troubleshooting" href="troubleshooting.html"/>
- <item name="Wiki" href="http://dev.e-taxonomy.eu/trac/wiki/TaxonomicEditorDev"/>
+ <item name="Wiki" href="https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/TaxonomicEditorDev"/>
</menu>
<menu name="Project">
<item name="Mailing Lists" href="mail-lists.html"/>
<item name="Project Team" href="team-list.html"/>
<item name="Continuous Integration" href="integration.html"/>
- <item name="Issue Tracking" href="http://dev.e-taxonomy.eu/trac/"/>
+ <item name="Issue Tracking" href="https://dev.e-taxonomy.eu/redmine/projects/edit"/>
<item name="Source Repository" href="source-repository.html"/>
<item name="License" href="license.html"/>
</menu>