* 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.perspective;
import org.eclipse.ui.IFolderLayout;
/**
* @author a.oppermann
* @created Nov 18, 2014
- * @version 1.0
*/
public class ChecklistPerspective extends Default {
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui
- * .IPageLayout)
- */
@Override
public void createInitialLayout(IPageLayout layout) {
IFolderLayout navigationFolder = layout.createFolder("navigation",
layout.addPlaceholder(MEDIA_VIEW, IPageLayout.RIGHT, 0.5f, FACTUAL_DATA_VIEW);
createAdditionalFolder(layout, layout.getEditorArea());
-
}
-}
+}
\ No newline at end of file
*
* @author p.ciardelli
* @created 25.06.2009
- * @version 1.0
* @param <T>
*/
public interface IEntityContainer<T> {
/**
* <p>getEntity</p>
- *
- * @param <T> a T object.
- * @return a T object.
*/
T getEntity();
/**
* <p>getEditableText</p>
- *
- * @return a {@link java.lang.String} object.
*/
String getEditableText();
/**
* <p>getAttachedEntities</p>
- *
- * @return a {@link java.util.Set} object.
*/
Set<T> getAttachedEntities();
/**
* <p>markAsMerged</p>
- *
- * @param mergeTarget a T object.
*/
void markAsMerged(T mergeTarget);
/**
* <p>setText</p>
- *
- * @param text a {@link java.lang.String} object.
*/
void setText(String text);
* 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;
import java.util.Map;
-
/**
* <p>IEntityCreator interface.</p>
*
* @author p.ciardelli
* @created 03.07.2009
- * @version 1.0
*/
public interface IEntityCreator<T> {
* <p>createEntity</p>
*
* @param text a {@link java.lang.String} object.
- * @param <T> a T object.
* @return a T object.
*/
- T createEntity(String text);
+ public T createEntity(String text);
/**
* <p>createEntity</p>
* @param text a {@link java.lang.String} object.
* @return a T object.
*/
- T createEntity(Object key, String text);
+ public T createEntity(Object key, String text);
/**
* Get a map of keys for all objects that can be created by this entity creator
*
* @return a {@link java.util.Map} object.
*/
- Map<? extends Object, String> getKeyLabelPairs();
+ public Map<? extends Object, String> getKeyLabelPairs();
/**
* Return a flag indicating whether this creator also saves the entities
*
* @return true or false
*/
- boolean savesEntity();
-
-
-}
+ public boolean savesEntity();
+}
\ No newline at end of file
* 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;
import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
import eu.etaxonomy.cdm.api.service.exception.ReferencedObjectUndeletableException;
-
/**
* Performs the retrieving and saving of a list of entities edited by a <code>ListEditor</code>,
* interacting with the persistence layer.
*
* @author p.ciardelli
* @created 07.07.2009
- * @version 1.0
*/
public interface IEntityPersistenceService<T> {
/**
* <p>create</p>
- *
- * @param entity a {@link java.lang.Object} object.
* @return a boolean.
*/
- T create(T entity);
+ public T create(T entity);
/**
* <p>save</p>
* @param entity a {@link java.lang.Object} object.
* @return a boolean.
*/
- T save(T entity);
+ public T save(T entity);
/**
* <p>merge</p>
* @param mergeTarget a {@link java.lang.Object} object.
* @return a boolean.
*/
- boolean merge(T entity, T mergeTarget);
+ public boolean merge(T entity, T mergeTarget);
/**
* <p>delete</p>
* @return a boolean.
* @throws ReferencedObjectUndeletableException
*/
- boolean delete(T entity, DeleteConfiguratorBase config) throws ReferencedObjectUndeletableException;
-}
+ public boolean delete(T entity, DeleteConfiguratorBase config) throws ReferencedObjectUndeletableException;
+}
\ No newline at end of file
* 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.command;
import org.apache.log4j.Logger;
/**
* @author p.ciardelli
* @created 21.09.2009
- * @version 1.0
*/
public class BulkEditorPropertyTester extends PropertyTester {
@SuppressWarnings("unused")
- private static final Logger logger = Logger
- .getLogger(BulkEditorPropertyTester.class);
+ private static final Logger logger = Logger.getLogger(BulkEditorPropertyTester.class);
private static final String IS_MERGING_ENABLED = "isMergingEnabled";
}
return false;
}
-}
+}
\ No newline at end of file
* 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.e4;
import java.io.File;
* @author e.-m.lee
* @author n.hoffmann
* @created 17.08.2009
- * @version 1.0
*/
public class BulkEditorSearchE4 {
private Button btnManageState;
-
public Object ORDER_BY = new Object();
public BulkEditorSearchE4(BulkEditorE4Composite editor, Composite parent, int style) {
}
}
-
/**
* Creates the search textfield.
*/
text.setFocus();
}
}
-}
+}
\ No newline at end of file
+/**
+* Copyright (C) 2007 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.handler.defaultHandler;
import org.eclipse.e4.ui.workbench.modeling.EPartService;
public class OpenBulkEditorForIdentifiableEntityE4 extends DefaultOpenHandlerBaseE4<Object>{
- /**
- * {@inheritDoc}
- */
// @Override
// protected IdentifiableEntity getEntity(UUID uuid) {
// return CdmStore.getCommonService().find(IdentifiableEntity.class, uuid);
// }
- /**
- * {@inheritDoc}
- */
@Override
protected void open(Object entity, Shell shell, EPartService partService) {
@SuppressWarnings("rawtypes")
BulkEditorUtil.openBulkEditor(input, modelService, partService, application);
}
- /**
- * {@inheritDoc}
- */
@Override
protected boolean canExecute(Object entity) {
if (entity instanceof UuidAndTitleCache){
* @created 25.06.2009
*/
public abstract class AbstractBulkEditorInput<T extends CdmBase>
- extends CdmEntitySessionInput
+ extends CdmEntitySessionInput<T>
implements IEntityPersistenceService<T> {
-
private static final String PROPERTY_PROTECTED_TITLECACHE = "Protect TitleCache";
private static final String TYPE_PROPERTY = Messages.BulkEditorE4_TYPE;
private static final String ID_PROPERTY = "Id"; //$NON-NLS-1$
this.conversation = CdmStore.createConversation();
}
- static public AbstractBulkEditorInput NewInstance(BulkEditorInputType inputType) {
+ static public AbstractBulkEditorInput<?> NewInstance(BulkEditorInputType inputType) {
return BulkEditorInputType.getInput(inputType);
}
- public static AbstractBulkEditorInput NewInstance(IdentifiableEntity entity) {
+ public static AbstractBulkEditorInput<?> NewInstance(IdentifiableEntity entity) {
BulkEditorInputType inputType = BulkEditorInputType.getByType(entity.getClass());
return editorInput;
}
- public static AbstractBulkEditorInput NewInstance(Class clazz, UUID uuid) {
+ public static AbstractBulkEditorInput<?> NewInstance(Class clazz, UUID uuid) {
BulkEditorInputType inputType = BulkEditorInputType.getByType(clazz);
return getModel();
}
-
@Override
public Map<Object, List<String>> getPropertyPathsMap() {
// TODO Auto-generated method stub
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
-
/**
* @author p.ciardelli
* @created 25.06.2009
- * @version 1.0
*/
public class AgentEditorInput extends AbstractBulkEditorInput<TeamOrPersonBase> {
- private static final long serialVersionUID = 3387950621617078479L;
-
public static final String ID = "bulkeditor.input.author";
private static AgentEditorInput instance;
* 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.input;
import java.util.ArrayList;
/**
* @author n.hoffmann
* @created Mar 9, 2011
- * @version 1.0
*/
public class GroupEditorInput extends AbstractBulkEditorInput<Group> {
MessagingUtils.messageDialog(Messages.GROUP_CREATOR_Name_not_accepted, getClass(), Messages.GROUP_CREATOR_Name_not_accepted_message);
return null;
}
-
}
@Override
public void setSaveUserCandidates(Set<User> saveUserCandidates) {
this.saveUserCandidates = saveUserCandidates;
}
-
-
-}
+}
\ No newline at end of file
+/**\r
+* Copyright (C) 2007 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.bulkeditor.input;\r
\r
import java.util.ArrayList;\r
* 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.input;
import java.util.ArrayList;
/**
* @author n.hoffmann
* @created Mar 9, 2011
- * @version 1.0
*/
public class UserEditorInput extends AbstractBulkEditorInput<User> {
return CdmStore.getSearchManager().findUsers(configurator);
}
-
@Override
protected IEntityCreator<User> createEntityCreator() {
return new UserCreator();
public Comparator<User> getTitleComparator(){
return new UserNameComparator();
}
-
-}
+}
\ No newline at end of file
* 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.input.entitycreator;
import java.util.HashMap;
/**
* @author n.hoffmann
* @created Mar 9, 2011
- * @version 1.0
*/
public class UserCreator implements IEntityCreator<User>{
public static final String USER = "User"; //$NON-NLS-1$
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.String)
- */
@Override
public User createEntity(String text) {
return createEntity(null, text);
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#createEntity(java.lang.Object, java.lang.String)
- */
@Override
public User createEntity(Object key, String text) {
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.annotatedlineeditor.IEntityCreator#getKeyLabelPairs()
- */
@Override
public Map<Object, String> getKeyLabelPairs() {
Map<Object, String> result = new HashMap<Object, String>();
// TODO Auto-generated method stub
return false;
}
-
-}
+}
\ No newline at end of file
* 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.input.sortprovider;
import java.util.Comparator;
/**
* @author n.hoffmann
* @created Dec 14, 2010
- * @version 1.0
*/
public abstract class AbstractDateComparator<T extends ICdmBase> implements Comparator<T>{
* 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.input.sortprovider;
import java.util.Comparator;
/**
* @author n.hoffmann
* @created Dec 14, 2010
- * @version 1.0
*/
public class AbstractSortProvider<T> implements IBulkEditorSortProvider<T> {
- Map<String, Comparator<T>> comparators = new HashMap<String, Comparator<T>>();
+ protected Map<String, Comparator<T>> comparators = new HashMap<>();
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider#getComparators()
- */
@Override
public Map<String, Comparator<T>> getComparators() {
return comparators;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider#getComparatorNames()
- */
@Override
public Set<String> getComparatorNames() {
return comparators.keySet();
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorSortProvider#getComparatorByName(java.lang.String)
- */
@Override
public Comparator<T> getComparatorByName(String name) {
return comparators.get(name);
}
-
-}
+}
\ No newline at end of file
* 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.input.sortprovider;
import org.joda.time.DateTime;
/**
* @author n.hoffmann
* @created Dec 14, 2010
- * @version 1.0
*/
public class CdmBaseSortProvider<T extends ICdmBase> extends AbstractSortProvider<T> {
- /**
- *
- */
public CdmBaseSortProvider() {
comparators.put("Created When", new CreatedDateComparator());
}
private class CreatedDateComparator extends AbstractDateComparator<T>{
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.AbstractDateComparator#getDate(eu.etaxonomy.cdm.model.common.ICdmBase)
- */
@Override
protected DateTime getDate(T object) {
return object.getCreated();
- }
-
+ }
}
-}
+}
\ No newline at end of file
* 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.input.sortprovider;
import eu.etaxonomy.cdm.model.common.IIdentifiableEntity;
/**
* @author n.hoffmann
* @created Dec 14, 2010
- * @version 1.0
*/
public class IdentifiableEntitySortProvider<T extends IIdentifiableEntity> extends AbstractSortProvider<T> {
public IdentifiableEntitySortProvider(){
comparators.put("Title Cache", new TitleCacheComparator<T>());
}
-
-}
+}
\ No newline at end of file
* 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.input.sortprovider;
import java.util.Comparator;
/**
* @author n.hoffmann
* @created Dec 14, 2010
- * @version 1.0
*/
public class ReferenceSortProvider extends AbstractSortProvider<Reference> {
- /**
- *
- */
public ReferenceSortProvider() {
comparators.put("Type", new ReferenceTypeComparator());
comparators.put("Year", new ReferenceYearComparator());
private class ReferenceYearComparator implements Comparator<Reference> {
- /**
- * @param o1
- * @return
- */
private String getYearString(Reference o) {
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)
- */
@Override
public int compare(Reference o1, Reference o2) {
String yearString1 = getYearString(o1);
}
return returnVal;
-
}
}
private class ReferenceTypeComparator implements Comparator<Reference> {
- /* (non-Javadoc)
- * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
- */
@Override
public int compare(Reference o1, Reference o2) {
String typeString1 = o1.getClass().toString();
}
}
}
-
-
-}
+}
\ No newline at end of file
+/**
+* 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.session;
import java.util.Collection;
import eu.etaxonomy.cdm.model.common.CdmBase;
-public interface ICdmEntitySessionEnabled {
+public interface ICdmEntitySessionEnabled<T extends CdmBase> {
public ICdmEntitySession getCdmEntitySession();
- public <T extends CdmBase> Collection<T> getRootEntities();
+ public Collection<T> getRootEntities();
public Map<Object, List<String>> getPropertyPathsMap();
* @since Nov 21, 2017
*
*/
-public class DescriptiveDataSetEditor implements IE4SavablePart, IConversationEnabled, ICdmEntitySessionEnabled,
-IPartContentHasDetails, IPartContentHasSupplementalData, IDirtyMarkable, IDescriptiveDataSetEditor {
+public class DescriptiveDataSetEditor implements IE4SavablePart, IConversationEnabled,
+ ICdmEntitySessionEnabled<DescriptiveDataSet>, IPartContentHasDetails,
+ IPartContentHasSupplementalData, IDirtyMarkable, IDescriptiveDataSetEditor {
private DescriptiveDataSetComposite composite;
* @date 12.12.2017
*
*/
-public class DescriptiveDataSetNavigator implements IConversationEnabled, ICdmEntitySessionEnabled, IContextListener{
+public class DescriptiveDataSetNavigator
+ implements IConversationEnabled, ICdmEntitySessionEnabled<DescriptiveDataSet>, IContextListener{
private ListViewer viewer;
refresh();
}
- /**
- * {@inheritDoc}
- */
@Override
public void update(CdmDataChangeMap arg0) {
}
- /**
- * {@inheritDoc}
- */
@Override
public ICdmEntitySession getCdmEntitySession() {
return cdmEntitySession;
}
- /**
- * {@inheritDoc}
- */
@Override
- public <T extends CdmBase> Collection<T> getRootEntities() {
+ public Collection<DescriptiveDataSet> getRootEntities() {
return null;
}
- /**
- * {@inheritDoc}
- */
@Override
public Map<Object, List<String>> getPropertyPathsMap() {
return null;
}
- /**
- * {@inheritDoc}
- */
@Override
public ConversationHolder getConversationHolder() {
return conversation;
}
}
- /**
- * {@inheritDoc}
- */
@Override
public void contextAboutToStop(IMemento memento, IProgressMonitor monitor) {
// TODO Auto-generated method stub
}
- /**
- * {@inheritDoc}
- */
@Override
public void contextStop(IMemento memento, IProgressMonitor monitor) {
}
- /**
- * {@inheritDoc}
- */
@Override
public void contextStart(IMemento memento, IProgressMonitor monitor) {
if(viewer!=null && viewer.getControl()!=null && !viewer.getControl().isDisposed()){
}
}
- /**
- * {@inheritDoc}
- */
@Override
public void contextRefresh(IProgressMonitor monitor) {
}
- /**
- * {@inheritDoc}
- */
@Override
public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
}
-
-}
+}
\ No newline at end of file
-// $Id$
/**
* Copyright (C) 2017 EDIT
* European Distributed Institute of Taxonomy
* Editor for combining structure and property terms to characters.
* @author pplitzner
* @date 24.05.2017
- *
*/
public class CharacterEditor implements ICharacterEditor, IConversationEnabled, ISelectionChangedListener,
- ModifyListener, IE4ViewerPart, IPartContentHasDetails, IPartContentHasSupplementalData, IDirtyMarkable, IE4SavablePart {
+ ModifyListener, IE4ViewerPart, IPartContentHasDetails, IPartContentHasSupplementalData,
+ IDirtyMarkable, IE4SavablePart {
private FeatureTreeDtoEditorComposite characterTreeEditorComposite;
private final FormToolkit formToolkit = new FormToolkit(Display.getDefault());
* Character matrix editor for editing specimen/taxon descriptions in a table
* @author pplitzner
* @since Nov 26, 2017
- *
*/
public class CharacterMatrixPart implements IE4SavablePart, IConversationEnabled, IDirtyMarkable,
-ICdmEntitySessionEnabled, IPartContentHasSupplementalData, IPartContentHasDetails{
+ ICdmEntitySessionEnabled<DescriptiveDataSet>, IPartContentHasSupplementalData,
+ IPartContentHasDetails {
private static final List<String> WS_PROPERTY_PATH = Arrays.asList(new String[] {
"descriptions", //$NON-NLS-1$
* 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.e4;
import java.util.ArrayList;
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
-
/**
* @author pplitzner
* @date Aug 24, 2017
*/
-public class TaxonEditorInputE4 extends CdmEntitySessionInput implements IConversationEnabled {
+public class TaxonEditorInputE4 extends CdmEntitySessionInput<TaxonNode>
+ implements IConversationEnabled {
private static final String INCORRECT_STATE = Messages.TaxonEditorInput_INCORRECT_STATE;
*
* @author cmathew
* @created Mar 28, 2013
- *
*/
-
-public class CdmAuthorityEditorInput extends CdmEntitySessionInput implements IConversationEnabled {
+public class CdmAuthorityEditorInput
+ extends CdmEntitySessionInput<Group>
+ implements IConversationEnabled {
+
private ConversationHolder conversation;
private Group group;
return null;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.persistence.hibernate.ICdmPostDataChangeObserver#update(eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap)
- */
+
@Override
public void update(CdmDataChangeMap changeEvents) {
// TODO Auto-generated method stub
-
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.api.conversation.IConversationEnabled#getConversationHolder()
- */
+
@Override
public ConversationHolder getConversationHolder() {
return this.conversation;
}
+
public String getName() {
return group.getName();
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object object) {
if (object instanceof CdmAuthorityEditorInput
return super.equals(object);
}
- /**
- * Getter method for group member.
- *
- * @return
- */
public Group getGroup() {
return this.group;
}
-
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
- */
+
@Override
public Collection<Group> getRootEntities() {
return Arrays.asList(group);
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
- */
@Override
public void merge() {
group = CdmStore.getService(IGroupService.class).merge(group, true).getMergedEntity();
-
}
-}
+}
\ No newline at end of file
/**
- *
- */
+* Copyright (C) 2007 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.key;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
/**
* @author n.hoffmann
- *
*/
public abstract class AbstractIdentificationEditorInput<T extends IIdentificationKey>
extends CdmEntitySessionInput implements IConversationEnabled {
public void update(CdmDataChangeMap changeEvents) {
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
// TODO Auto-generated method stub
boolean result = super.equals(obj);
return result;
}
-
-}
+}
\ No newline at end of file
/**
- *
- */
+* Copyright (C) 2007 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.key.polytomous;
import java.util.ArrayList;
/**
* @author n.hoffmann
- *
*/
public class PolytomousKeyEditorInput extends AbstractIdentificationEditorInput<PolytomousKey> {
// this.name = name;
// }
-
public static PolytomousKeyEditorInput NewInstance(UUID polytomousKeyUuid) throws Exception{
try{
ConversationHolder conversation = CdmStore.createConversation();
}
}
-
@Override
public PolytomousKey getKey() {
return key;
}
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object object) {
if (object instanceof PolytomousKeyEditorInput
return super.equals(object);
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
- */
@Override
public List<PolytomousKey> getRootEntities() {
return Arrays.asList(key);
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.editor.CdmEntitySessionInput#merge()
- */
@Override
public void merge() {
key = CdmStore.getService(IPolytomousKeyService.class).merge(key,true).getMergedEntity();
-
}
@Override
propertyPathsMap.put("children", polytomousKeyNodePropertyPaths); //$NON-NLS-1$
return propertyPathsMap;
}
-
-}
+}
\ No newline at end of file
import eu.etaxonomy.taxeditor.store.CdmStore;
/**
- *
* @author a.oppermann
* @date 25.04.2014
- *
*/
-public class ChecklistEditorInput extends CdmEntitySessionInput implements IPersistable {
+public class ChecklistEditorInput extends CdmEntitySessionInput<TaxonNode> implements IPersistable {
/**
* The selected classification
*/
private TaxonNode taxonNode = null;
- private List<TaxonBase> taxa = new ArrayList();
+ private List<TaxonBase> taxa = new ArrayList<>();
private Classification classification = null;
private final ConversationHolder conversation;
- private List<TaxonBase> taxaToSave = new ArrayList();
+ private List<TaxonBase> taxaToSave = new ArrayList<>();
/**
}
-
- /**
- * @param taxonNode2
- */
private void getChildTaxa(TaxonNode taxonNode2) {
taxonNode2.removeNullValueFromChildren();
if (taxonNode2.hasChildNodes()){
getChildTaxa(node);
}
}
-
-
}
/**
}
-
-
public List<TaxonBase> getTaxa() {
return taxa;
}
}
}
-
- /**
- * @return the taxonNode
- */
public TaxonNode getTaxonNode() {
return taxonNode;
}
- /**
- * @return classification
- */
public Classification getClassification(){
return classification;
}
-// /**
-// * @return the conversationHolder
-// */
// public ConversationHolder getConversationHolder() {
// return conversationHolder;
// }
-
-
-// /* (non-Javadoc)
-// * @see java.lang.Object#hashCode()
-// */
// @Override
// public int hashCode() {
// final int prime = 31;
// return result;
// }
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.IPersistable#saveState(org.eclipse.ui.IMemento)
- */
@Override
public void saveState(IMemento memento) {
UUID uuid = classification.getUuid();
CdmStore.getService(ITaxonService.class).merge(taxaToSave, true);
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getRootEntities()
- */
@Override
public List<TaxonNode> getRootEntities() {
return Arrays.asList(taxonNode);
}
- /**
- * @return the conversation
- */
public ConversationHolder getConversation() {
return conversation;
}
return taxonBasePropertyPaths;
}
-
public void setTaxa(List<TaxonBase> taxonList) {
this.taxa = taxonList;
}
-
/**
* @param element
*/
// super.dispose();
// }
-}
+}
\ No newline at end of file
*
*/
public class DistributionEditorPart implements IE4SavablePart, IConversationEnabled, IDirtyMarkable,
-ICdmEntitySessionEnabled, IPartContentHasSupplementalData, IPartContentHasDetails, IDistributionEditorPart{
+ ICdmEntitySessionEnabled<DescriptionBase>, IPartContentHasSupplementalData, IPartContentHasDetails,
+ IDistributionEditorPart {
private static final List<String> TAXONNODE_PROPERTY_PATH = Arrays.asList(new String[] {
"taxon", //$NON-NLS-1$
return editor;
}
- /**
- * {@inheritDoc}
- */
@Override
public void update(CdmDataChangeMap changeEvents) {
// TODO Auto-generated method stub
-
}
+
@PreDestroy
public void dispose(){
if (conversation != null) {
cdmEntitySession = null;
}
dirty.setDirty(false);
-
}
-
- /**
- * {@inheritDoc}
- */
@Override
public ICdmEntitySession getCdmEntitySession() {
-
return cdmEntitySession;
}
return rootEntities;
}
- /**
- * {@inheritDoc}
- */
@Override
public Map<Object, List<String>> getPropertyPathsMap() {
// TODO Auto-generated method stub
return null;
}
- /**
- * {@inheritDoc}
- */
@Override
public void changed(Object element) {
if (element != null){
dirty.setDirty(true);
}
-
}
- /**
- * {@inheritDoc}
- */
@Override
public void forceDirty() {
// TODO Auto-generated method stub
-
}
- /**
- * {@inheritDoc}
- */
@Override
public ConversationHolder getConversationHolder() {
-
return conversation;
}
-
@Persist
@Override
public void save(IProgressMonitor monitor) {
}
protected void saveDistributions() {
- Set<TaxonDistributionDTO> coll = new HashSet();
+ Set<TaxonDistributionDTO> coll = new HashSet<>();
editor.getDescriptionsToSave().forEach(dto->coll.add(dto));
- Set<TaxonDistributionDTO> removeList = new HashSet();
+ Set<TaxonDistributionDTO> removeList = new HashSet<>();
for (TaxonDistributionDTO dto: coll){
Taxon taxon = null;
for(TaxonDescription desc: dto.getDescriptionsWrapper().getDescriptions()){
editor.getDescriptionsToSave().clear();
}
- /**
- * {@inheritDoc}
- */
@Override
public boolean isDirty() {
return this.dirty.isDirty();
public void setDirty() {
this.dirty.setDirty(true);
}
-
-
-
-
-}
+}
\ No newline at end of file
+/**
+* Copyright (C) 2007 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.view.derivate;
import java.util.ArrayList;
/**
* Displays the derivate hierarchy of the specimen specified in the editor input.
- *
*/
public class DerivateView implements IPartContentHasFactualData, IConversationEnabled,
- ICdmEntitySessionEnabled, IDirtyMarkable, IPostOperationEnabled, IPartContentHasDetails, IPartContentHasSupplementalData, IPartContentHasMedia,
+ ICdmEntitySessionEnabled<SpecimenOrObservationBase<?>>, IDirtyMarkable, IPostOperationEnabled, IPartContentHasDetails, IPartContentHasSupplementalData, IPartContentHasMedia,
IContextListener, IE4SavablePart, ICollapsableExpandable {
private static final String SPECIMEN_EDITOR = Messages.DerivateView_SPECIMEN_EDITOR;
public DerivateView() {
}
- /**
- * {@inheritDoc}
- */
public void init(DerivateViewEditorInput editorInput){
this.derivateToRootEntityMap = new HashMap<>();
this.rootElements = new HashSet<>();
}
}
-
public void updateRootEntities(List<SpecimenOrObservationBase> derivates) {
if(derivates!=null){
eventBroker.post(WorkbenchEventConstants.CURRENT_ACTIVE_EDITOR, null);
this.derivateToRootEntityMap = new HashMap<>();
this.rootElements = new HashSet<>();
- for (SpecimenOrObservationBase derivate : derivates) {
+ for (SpecimenOrObservationBase<?> derivate : derivates) {
if(derivate instanceof FieldUnit){
derivateToRootEntityMap.put(derivate, derivate);
labelProvider.updateLabelCache(rootElements);
viewer.setInput(rootElements);
viewer.setComparator(new ViewerComparator() {
- @Override
- @SuppressWarnings("unchecked")
- public int compare(Viewer testViewer, Object e1, Object e2) {
- if (((TreeNode)e1).getValue() instanceof SpecimenOrObservationBase){
- return ((SpecimenOrObservationBase)((TreeNode)e1).getValue()).getTitleCache().compareTo(((SpecimenOrObservationBase)((TreeNode)e2).getValue()).getTitleCache());
- }else{
- return e1.toString().compareTo(e2.toString());
- }
- //return (((SpecimenOrObservationBase) e1).getTitleCache()).compareTo(((SpecimenOrObservationBase) e2).getTitleCache());
+ @Override
+ public int compare(Viewer testViewer, Object e1, Object e2) {
+ if (((TreeNode)e1).getValue() instanceof SpecimenOrObservationBase){
+ return ((SpecimenOrObservationBase)((TreeNode)e1).getValue()).getTitleCache().compareTo(((SpecimenOrObservationBase)((TreeNode)e2).getValue()).getTitleCache());
+ }else{
+ return e1.toString().compareTo(e2.toString());
+ }
+ //return (((SpecimenOrObservationBase) e1).getTitleCache()).compareTo(((SpecimenOrObservationBase) e2).getTitleCache());
}
});
obj = ((TreeNode)obj).getValue();
}
rootElements.remove(obj);
- Object o = this.derivateToRootEntityMap.remove(obj);
+ this.derivateToRootEntityMap.remove(obj);
viewer.setInput(rootElements);
}
else if(selection != null){
Object selectedElement = selection.getFirstElement();
if(selectedElement instanceof TaxonNodeDto){
- TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).load(((TaxonNodeDto)selectedElement).getTaxonUuid());
+ TaxonBase<?> taxonBase = CdmStore.getService(ITaxonService.class).load(((TaxonNodeDto)selectedElement).getTaxonUuid());
if(HibernateProxyHelper.isInstanceOf(taxonBase, Taxon.class)){
selectedTaxon = HibernateProxyHelper.deproxy(taxonBase, Taxon.class);
}
if(selectedTaxon!=null){
Collection<SpecimenOrObservationBase> fieldUnits = CdmStore.getService(IOccurrenceService.class).listFieldUnitsByAssociatedTaxon(selectedTaxon, null, null);
Collection<UUID> uuids = new HashSet<>();
- for (SpecimenOrObservationBase specimenOrObservationBase : fieldUnits) {
+ for (SpecimenOrObservationBase<?> specimenOrObservationBase : fieldUnits) {
uuids.add(specimenOrObservationBase.getUuid());
}
checkWarnThreshold(uuids);
return viewer;
}
- /**
- * {@inheritDoc}
- */
@Override
public List<SpecimenOrObservationBase<?>> getRootEntities() {
return new ArrayList<>(rootElements);
return listenToSelectionChange;
}
- /**
- * {@inheritDoc}
- */
@Override
public void contextAboutToStop(IMemento memento, IProgressMonitor monitor) {
}
- /**
- * {@inheritDoc}
- */
@Override
public void contextStop(IMemento memento, IProgressMonitor monitor) {
//close view when workbench closes
//nothing
}
}
-
- /**
- * {@inheritDoc}
- */
+
@Override
public void contextStart(IMemento memento, IProgressMonitor monitor) {
}
- /**
- * {@inheritDoc}
- */
@Override
public void contextRefresh(IProgressMonitor monitor) {
}
- /**
- * {@inheritDoc}
- */
@Override
public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
}
-
@Override
public boolean isDirty() {
return dirty.isDirty();
public void expand() {
viewer.expandAll();
}
-
-}
+}
\ No newline at end of file
-// $Id$
/**
* Copyright (C) 2017 EDIT
* European Distributed Institute of Taxonomy
* @date 15.08.2017
*/
public class FactualDataPartE4 extends AbstractCdmEditorPartE4
- implements IPartContentHasDetails, IPartContentHasSupplementalData, ICdmEntitySessionEnabled,
- ICollapsableExpandable {
+ implements IPartContentHasDetails, IPartContentHasSupplementalData,
+ ICdmEntitySessionEnabled<CdmBase>, ICollapsableExpandable {
/**
* Maps {@link FeatureNodeContainerTree} to their corresponding {@link TaxonDescritpion}.<br>
* This serves as input for the {@link ITreeContentProvider} of the {@link TreeViewer}
*/
- protected Map<DescriptionBase<?>, FeatureNodeContainerTree> featureNodeContainerCache = new HashMap<DescriptionBase<?>, FeatureNodeContainerTree>();
+ protected Map<DescriptionBase<?>, FeatureNodeContainerTree> featureNodeContainerCache = new HashMap<>();
protected int dndOperations = DND.DROP_COPY | DND.DROP_MOVE;
@Override
public ICdmEntitySession getCdmEntitySession() {
if(selectionProvidingPart != null && selectionProvidingPart instanceof ICdmEntitySessionEnabled) {
- return ((ICdmEntitySessionEnabled) selectionProvidingPart).getCdmEntitySession();
+ return ((ICdmEntitySessionEnabled<?>) selectionProvidingPart).getCdmEntitySession();
}
return null;
}
@Override
- public List<? extends CdmBase> getRootEntities() {
+ public List<CdmBase> getRootEntities() {
return Arrays.asList((CdmBase)getViewer().getInput());
}
@Override
((TreeViewer)this.viewer).setExpandedElements(expandedObjects);
}
}
-
-
-
}
\ No newline at end of file
/**
- *
* @author pplitzner
* @since Sep 8, 2017
- *
*/
public class UsesViewPartE4 extends FactualDataPartE4 {
treeViewer.addDropSupport(dndOperations, transfers,
dropListener);
-
-
// Propagate selection from viewer
selectionChangedListener = (event -> selService.setSelection(event.getSelection()));
treeViewer.addSelectionChangedListener(selectionChangedListener);
return Messages.UsesViewPart_VIEWER_NAME;
}
- /** {@inheritDoc} */
@Override
public boolean postOperation(Object objectAffectedByOperation) {
viewer.refresh();
return super.postOperation(objectAffectedByOperation);
}
-
-}
+}
\ No newline at end of file
* @author Ben Stöver
* @date 04.08.2014
*/
-public class AlignmentEditorInput extends CdmEntitySessionInput {
+public class AlignmentEditorInput extends CdmEntitySessionInput<Sequence> {
private final UUID sequenceNodeUuid;
private Sequence sequenceNode;
this.sequenceNode = sequenceNode;
}
- @Override
+ @Override
public List<Sequence> getRootEntities() {
return Arrays.asList(sequenceNode);
}
/**
- *
- */
+* Copyright (C) 2007 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.key.polytomous.e4;
import java.util.List;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
/**
- *
* @author pplitzner
* @since Sep 28, 2017
- *
*/
public class PolytomousKeyViewPartE4 implements
-IConversationEnabled, ICdmEntitySessionEnabled, IPostOperationEnabled,
-ICdmChangeListener {
+ IConversationEnabled, ICdmEntitySessionEnabled<PolytomousKey>, IPostOperationEnabled,
+ ICdmChangeListener {
private class FilterModifyListener implements ModifyListener{
@Override
}
}
-
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"; //$NON-NLS-1$
}
});
-
-
//propagate selection
selectionChangedListener = (event -> selService.setSelection(event.getSelection()));
viewer.addSelectionChangedListener(selectionChangedListener);
if(event.getAction() == Action.Delete && PolytomousKey.class.equals(event.getEntityType())) {
refresh();
}
-
}
@Override
public Map<Object, List<String>> getPropertyPathsMap() {
return null;
}
-
-}
+}
\ No newline at end of file
import eu.etaxonomy.taxeditor.workbench.part.ICollapsableExpandable;
/**
- *
* @author pplitzner
* @since Sep 7, 2017
- *
*/
public class TaxonNavigatorE4 implements
IPostOperationEnabled, IConversationEnabled, Observer,
return propertyPathsMap;
}
- /**
- * {@inheritDoc}
- */
@Override
public void contextAboutToStop(IMemento memento, IProgressMonitor monitor) {
// TODO Auto-generated method stub
}
- /**
- * {@inheritDoc}
- */
@Override
public void contextStop(IMemento memento, IProgressMonitor monitor) {
}
- /**
- * {@inheritDoc}
- */
@Override
public void contextStart(IMemento memento, IProgressMonitor monitor) {
if(viewer!=null && viewer.getControl()!=null && !viewer.getControl().isDisposed()){
}
}
- /**
- * {@inheritDoc}
- */
@Override
public void contextRefresh(IProgressMonitor monitor) {
// viewer.refresh();
}
- /**
- * {@inheritDoc}
- */
@Override
public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
}
import java.util.List;
import java.util.Map;
+import eu.etaxonomy.cdm.model.common.CdmBase;
import eu.etaxonomy.taxeditor.session.ICdmEntitySession;
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
import eu.etaxonomy.taxeditor.store.CdmStore;
* @author cmathew
* @date 5 Feb 2015
*/
-public abstract class CdmEntitySessionInput implements ICdmEntitySessionEnabled {
+public abstract class CdmEntitySessionInput<T extends CdmBase> implements ICdmEntitySessionEnabled<T> {
private ICdmEntitySession cdmEntitySession;
/**\r
* @author l.morris\r
* @date 3 Jan 2012\r
- *\r
*/\r
public abstract class AbstractDefinedTermEditorInput<T extends DefinedTermBase> extends CdmEntitySessionInput {\r
\r
- /**\r
- *\r
- */\r
public AbstractDefinedTermEditorInput() {\r
super(true);\r
}\r
\r
- /**\r
- * @return\r
- */\r
public abstract List<String> getTermClasses();\r
-\r
-\r
-}
+}
\ No newline at end of file
import eu.etaxonomy.taxeditor.store.CdmStore;
import eu.etaxonomy.taxeditor.store.TermStore;
-
-
/**
* @author n.hoffmann
* @date Jan 24, 2012
- *
*/
public class TermEditorInput extends AbstractDefinedTermEditorInput<DefinedTerm> {
public TermEditorInput(TermType termType) {
this.termType = termType;
- vocabularies = new HashSet<TermVocabularyDto>();
+ vocabularies = new HashSet<>();
initialiseVocabularies();
}
public String getName() {
// defaultNameFeatureTree = TermTree.NewInstance(nameFeatures);
}
return defaultNameFeatureTree;
-
}
public static void resetDefaultNameFeatureTree(){
defaultNameFeatureTree = null;
}
- /**
- * @return
- */
public static TermTree<?> getPreferredNameFeatureTree(boolean createNew) {
-
return PreferencesUtil.getPreferredFeatureTreeForNameDescription(createNew);
-
}
public static TermTree<?> getPreferredTaxonFeatureTree(boolean createNew) {
-
return PreferencesUtil.getPreferredFeatureTreeForTaxonDescription(createNew);
-
}
}
*/
public interface ICharacterEditor extends ITermTreeEditor<Character> {
-
}
* @author pplitzner
* @since Nov 22, 2018
*/
-public interface ITermTreeEditor<T extends DefinedTermBase> extends IPostOperationEnabled, IE4SavablePart, ICdmEntitySessionEnabled {
+public interface ITermTreeEditor<T extends DefinedTermBase>
+ extends IPostOperationEnabled, IE4SavablePart, ICdmEntitySessionEnabled {
public TermType getTermType();
public TreeViewer getViewer();
public void refresh();
-
-
-}
+}
\ No newline at end of file
* @date 06.06.2017
*
*/
-public class TermTreeEditor<T extends DefinedTermBase> implements ITermTreeEditor, ISelectionChangedListener,
- IE4ViewerPart, IPartContentHasDetails, IPartContentHasSupplementalData,
- IContextListener, IConversationEnabled, IDirtyMarkable {
+public class TermTreeEditor<T extends DefinedTermBase>
+ implements ITermTreeEditor, ISelectionChangedListener,
+ IE4ViewerPart, IPartContentHasDetails, IPartContentHasSupplementalData,
+ IContextListener, IConversationEnabled, IDirtyMarkable {
public static final List<String> TREE_PROPERTY_PATH = Arrays.asList(new String[] {
"root", //$NON-NLS-1$
*
* @param taxon a {@link eu.etaxonomy.cdm.model.taxon.TaxonBase} object.
*/
- public abstract void setTaxonBase(TaxonBase taxon);
+ public abstract void setTaxonBase(TaxonBase<?> taxon);
- public abstract TaxonBase getTaxonBase();
+ public abstract TaxonBase<?> getTaxonBase();
}
/**
* @author k.luther
* @date 23.03.2016
- *
*/
-public class EditTaxonNodeWizard extends AbstractEditWizard<TaxonNode> implements ICdmEntitySessionEnabled{
+public class EditTaxonNodeWizard
+ extends AbstractEditWizard<TaxonNode>
+ implements ICdmEntitySessionEnabled<TaxonNode>{
private TaxonNodeWizardPage taxonNodePage;
private IWizardPageListener wizardPageListener;
// conversation = CdmStore.createConversation();
// }
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.ui.section.classification.AbstractEditWizard#getEntityName()
- */
@Override
protected String getEntityName() {
return "taxon node";
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.ui.section.classification.AbstractEditWizard#saveEntity()
- */
@Override
protected void saveEntity() {
getConversationHolder().bind();
this.wizardPageListener = wizardPageListener;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.newWizard.AbstractNewEntityWizard#setEntity(java.lang.Object)
- */
@Override
public void setEntity(TaxonNode entity) {
setWindowTitle(String.format("Edit %s", getEntityName()));
super.setEntity(entity);
}
- /**
- * {@inheritDoc}
- */
@Override
public ICdmEntitySession getCdmEntitySession() {
-
return cdmEntitySession;
}
- /**
- * {@inheritDoc}
- */
@Override
public Collection<TaxonNode> getRootEntities() {
return Collections.singleton(this.getEntity());
}
- /**
- * {@inheritDoc}
- */
@Override
public Map<Object, List<String>> getPropertyPathsMap() {
// TODO Auto-generated method stub
cdmEntitySession.dispose();
super.dispose();
}
-
-
-
-
-}
+}
\ No newline at end of file
* 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.name;
import org.eclipse.jface.viewers.ISelectionProvider;
* @author n.hoffmann
* @created 05.06.2009
*/
-public class NameDetailSection extends AbstractCdmDetailSection<INonViralName> implements ITaxonBaseDetailSection{
+public class NameDetailSection
+ extends AbstractCdmDetailSection<INonViralName>
+ implements ITaxonBaseDetailSection{
- private TaxonBase taxonBase;
+ private TaxonBase<?> taxonBase;
/**
* <p>Constructor for NameDetailSection.</p>
super(cdmFormFactory, conversation, parentElement, selectionProvider, style);
}
- /** {@inheritDoc} */
@Override
public void setTaxonBase(TaxonBase entity) {
this.taxonBase = entity;
setEntity(name);
}
- /** {@inheritDoc} */
@Override
public String getHeading() {
return "Scientific Name";
}
- /** {@inheritDoc} */
@Override
protected void setSectionTitle() {
if(!isDisposed()){
}
@Override
- public TaxonBase getTaxonBase() {
+ public TaxonBase<?> getTaxonBase() {
return taxonBase;
}
* 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.selection;
import java.util.Collections;
/**
* @author n.hoffmann
* @created Jun 1, 2010
- * @version 1.0
*/
public class EditFromSelectionWizard extends Wizard implements
- SelectionListener, ICdmEntitySessionEnabled {
+ SelectionListener, ICdmEntitySessionEnabled<CdmBase> {
private ICdmEntitySession cdmEntitySession;
private ICdmEntitySession previousCdmEntitySession;
- private final EntitySelectionElement selectionElement;
+ private final EntitySelectionElement<CdmBase> selectionElement;
private CdmBase rootElement;
public EditFromSelectionWizard(EntitySelectionElement selectionElement) {
this.setWindowTitle(String.format("Edit %s", TextHelper.deproxyClassName(selectionElement.getEntity().getClass())));
}
- /** {@inheritDoc} */
@Override
public void addPages() {
MessagingUtils.warningDialog("Missing interface", this,
"No detail element for current selection");
}
-
}
- /** {@inheritDoc} */
@Override
public boolean performFinish() {
IService<CdmBase> service = CdmStore.getService(rootElement);
return true;
}
- /** {@inheritDoc} */
@Override
public void widgetSelected(SelectionEvent e) {
WizardDialog dialog = new WizardDialog(selectionElement.getShell(),
}
}
- /** {@inheritDoc} */
@Override
public void widgetDefaultSelected(SelectionEvent e) {
}
/**\r
+ * Copyright (C) 2007 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.selection;\r
\r
/**\r
* @author n.hoffmann\r
* @created Nov 17, 2009\r
- * @version 1.0\r
* @param <T>\r
*/\r
public class EntitySelectionElement<T extends CdmBase> extends\r
* 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.view.detail;
import java.util.EventObject;
*
* @author n.hoffmann
* @created Feb 8, 2010
- * @version 1.0
*/
public class CdmSectionPart<T> extends SectionPart implements
IPropertyChangeListener {
formSection = section;
}
- /** {@inheritDoc} */
@Override
public boolean setFormInput(Object input) {
this.rootInput = input;
if ((input instanceof TaxonBase)
&& (formSection instanceof ITaxonBaseDetailSection)) {
((ITaxonBaseDetailSection) formSection)
- .setTaxonBase((TaxonBase) input);
+ .setTaxonBase((TaxonBase<?>) input);
return true;
}
else if (input.getClass().equals(DerivedUnit.class)
// return true;
// }
-
formSection.setEntity((T) input);
return true;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse
- * .jface.util.PropertyChangeEvent)
- */
- /** {@inheritDoc} */
@Override
public void propertyChange(PropertyChangeEvent event) {
if (event != null) {
super.expansionStateChanged(expanded);
PreferencesUtil.setStringValue(StoreUtil.getPrefKey(formSection.getClass(), rootInput.getClass().getCanonicalName()), expanded?EXPANDED:COLLAPSED);
}
-
-}
+}
\ No newline at end of file
public abstract class AbstractCdmEditorPartE4
implements IConversationEnabled, IDirtyMarkable, ISelectionElementEditingPart, IPostOperationEnabled{
- private DelaySelection delaySelection = null;
+ private static final Logger logger = Logger.getLogger(AbstractCdmEditorPartE4.class);
+
+ private DelaySelection delaySelection = null;
/**
* This is the monitor for the DelaySelection runnable.
* If it is <code>true</code> then it is currently delaying a selection.
*/
private boolean isInDelay;
private boolean isEnabled = true;
- private static final Logger logger = Logger.getLogger(AbstractCdmEditorPartE4.class);
/**
* This class invokes internal_selectionChanged() in a separate thread.
import eu.etaxonomy.cdm.model.common.CdmBase;
public class MockSessionOwner<T extends CdmBase>
- implements ICdmEntitySessionEnabled, ICdmChangeListener {
+ implements ICdmEntitySessionEnabled<T>, ICdmChangeListener {
private static final Logger logger = Logger.getLogger(MockSessionOwner.class);
public Set<? extends CdmBase> getEventUpdatedObjects() {
return eventUpdatedObjects;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.cdm.api.application.ICdmChangeListener#onChange(eu.etaxonomy.cdm.api.application.CdmChangeEvent)
- */
+
@Override
public void onChange(CdmChangeEvent event) {
eventUpdatedObjects = event.getChangedObjects();
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled#getPropertyPathsMap()
- */
@Override
public Map<Object, List<String>> getPropertyPathsMap() {
// TODO Auto-generated method stub
return null;
}
-
-}
+}
\ No newline at end of file