import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
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.molecular.Amplification;
import eu.etaxonomy.cdm.model.molecular.Primer;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
if(clazz.equals(Reference.class)){
return (T) ReferenceSelectionDialog.select(shell, conversation, (Reference) currentSelection);
}
-
+
if(clazz.equals(TaxonNameBase.class)){
return (T) NameSelectionDialog.select(shell, conversation, (TaxonNameBase) currentSelection);
}
if(clazz.equals(Amplification.class)){
return (T) AmplificationSelectionDialog.select(shell, conversation, (Amplification) currentSelection);
}
+ if(clazz.equals(Media.class)){
+ return (T) MediaSelectionDialog.select(shell, conversation, (Media) currentSelection);
+ }
return null;
}
if(entity!=null){
if(getParentElement() instanceof AbstractEntityCollectionSection){
((AbstractEntityCollectionSection)getParentElement()).removeElement(getEntity());
- setEntity(entity);
((AbstractEntityCollectionSection)getParentElement()).addElement(entity);
- ((AbstractEntityCollectionSection)getParentElement()).firePropertyChangeEvent(getParentElement());
}
-
+ firePropertyChangeEvent(this);
}
}
});
protected Control createToolbar() {
ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
- Action addAction = new Action("add", IAction.AS_PUSH_BUTTON){
+ Action addAction = new Action("Add", IAction.AS_PUSH_BUTTON){
@Override
public void run() {
- ELEMENT element = createNewElement();
- if(element != null){
- addElement(element);
- if(! getSection().isExpanded()) {
- getSection().setExpanded(true);
- }
- internalUpdateSection(true);
- }
+ ELEMENT element = createNewElement();
+ if(element != null){
+ addElement(element);
+ if(! getSection().isExpanded()) {
+ getSection().setExpanded(true);
+ }
+ internalUpdateSection(true);
+ }
}
};
addAction.setImageDescriptor(new ImageDescriptor() {
});
addAction.setToolTipText(getTooltipString());
+ Action browseAction = null;
+ if(allowAddExisting()){
+ browseAction = new Action("Browse", IAction.AS_PUSH_BUTTON){
+ @Override
+ public void run() {
+ ELEMENT element = addExisting();
+ if(element != null){
+ addElement(element);
+ if(! getSection().isExpanded()) {
+ getSection().setExpanded(true);
+ }
+ internalUpdateSection(true);
+ }
+ }
+ };
+ browseAction.setImageDescriptor(new ImageDescriptor() {
+
+ @Override
+ public ImageData getImageData() {
+ return ImageResources.getImage(ImageResources.BROWSE_ICON).getImageData();
+ }
+ });
+ browseAction.setToolTipText("Browse");
+ }
+
toolBarManager.add(addAction);
+ if(browseAction!=null){
+ toolBarManager.add(browseAction);
+ }
return toolBarManager.createControl(this);
}
return entityCollectionElement;
}
+
/**
* Get the specific collection of this entity
*
*/
public abstract void addElement(ELEMENT element);
+ /**
+ * Add an existing element to the entities collection.
+ * @return the existing element
+ */
+ public abstract ELEMENT addExisting();
+
+ /**
+ * If <code>true</code> the section will also display
+ * a browse icon to choose from existing elements.
+ * <br>
+ * <b>Note:</b> when returning true you have to make sure
+ * to implement the {@link #addExisting()} method
+ * @return true if existing entities can be added;
+ * false otherwise
+ */
+ public abstract boolean allowAddExisting();
+
/**
* Remove an element from the entities collection
*
return isNomenclaturalTeam;
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Person addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
}
- /**
- * @param formFactory
- * @param conversation
- * @param parentElement
-
- * @param style
- */
public TaxonNodeAgentRelationCollectionSection (CdmFormFactory formFactory, ConversationHolder conversation,
ICdmFormElement parentElement, int style) {
super(formFactory, conversation, parentElement, "Related persons or teams", style);
return false;
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public TaxonNodeAgentRelation addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return 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.
*/
int style) {
super(formFactory, conversation, parentElement, "Described Specimen", style);
}
-
+
/** {@inheritDoc} */
@Override
public Collection<SpecimenOrObservationBase> getCollection(
TaxonDescription entity) {
- //FIXME:This class is not really an entity collection section, and should be moved
+ //FIXME:This class is not really an entity collection section, and should be moved
// to a single entity section, but one with the possibility of launching a wizard
List<SpecimenOrObservationBase> collection = new ArrayList<SpecimenOrObservationBase>();
if(entity.getDescribedSpecimenOrObservation() != null) {
- collection.add(entity.getDescribedSpecimenOrObservation());
- }
+ collection.add(entity.getDescribedSpecimenOrObservation());
+ }
return collection;
}
/** {@inheritDoc} */
@Override
public SpecimenOrObservationBase createNewElement() {
- DerivedUnit selection = DerivedUnitSelectionDialog.select(getShell(), getConversationHolder(), null);
+ DerivedUnit selection = DerivedUnitSelectionDialog.select(getShell(), getConversationHolder(), null);
return selection;
}
/** {@inheritDoc} */
@Override
public void removeElement(SpecimenOrObservationBase element) {
- getEntity().setDescribedSpecimenOrObservation(null);
+ getEntity().setDescribedSpecimenOrObservation(null);
}
/** {@inheritDoc} */
protected String getTooltipString() {
return "Add a described specimen.";
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public SpecimenOrObservationBase addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
}
getEntity().removeMedia(element);
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Media addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
+
}
public void removeElement(DescriptionElementSource element) {
getEntity().removeSource(element);
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DescriptionElementSource addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return 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.
*/
*/
public class DescriptionSourceSection extends
AbstractEntityCollectionSection<DescriptionBase, IdentifiableSource>{
-
+
/**
* <p>Constructor for DescriptionSourceSection.</p>
*
super(cdmFormFactory, conversation, parentElement, "Description Sources", style);
}
-
+
/** {@inheritDoc} */
@Override
/** {@inheritDoc} */
@Override
public IdentifiableSource createNewElement() {
- OriginalSourceType ost = OriginalSourceTypeSelectionDialog.select(getShell(), getConversationHolder());
+ OriginalSourceType ost = OriginalSourceTypeSelectionDialog.select(getShell(), getConversationHolder());
if(ost != null) {
return IdentifiableSource.NewInstance(ost);
} else {
public void removeElement(IdentifiableSource element) {
getEntity().removeSource(element);
}
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IdentifiableSource addExisting() {
+ return null;
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return 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.
*/
* @version 1.0
*/
public class GeoScopeSection extends AbstractEntityCollectionSection<TaxonDescription, NamedArea> {
-
+
/**
* <p>Constructor for GeoScopeSection.</p>
*
ConversationHolder conversation, ICdmFormElement parentElement, int style) {
super(formFactory, conversation, parentElement, "Geo Scope", style);
}
-
+
/** {@inheritDoc} */
@Override
public Collection<NamedArea> getCollection(TaxonDescription entity) {
protected String getTooltipString() {
return "Add a new geo scope.";
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public NamedArea addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
}
protected Collection<DefinedTerm> getEntityCollection(IModifiable entity) {
return entity.getModifiers();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DefinedTerm addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
}
protected Collection<DefinedTerm> getEntityCollection(TaxonDescription entity) {
return entity.getScopes();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DefinedTerm addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return 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.
*/
int style) {
super(formFactory, conversation, parentElement, "State Data", style);
}
-
+
/** {@inheritDoc} */
@Override
public Collection<StateData> getCollection(CategoricalData entity) {
return "Create new state data";
}
-
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public StateData addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return 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.
*/
*/
public class StatisticalMeasurementValueSection extends
AbstractEntityCollectionSection<QuantitativeData, StatisticalMeasurementValue> {
-
+
/**
* <p>Constructor for StatisticalMeasurementValueSection.</p>
*
int style) {
super(formFactory, conversation, parentElement, "Statistical Measurement Value", style);
}
-
+
/** {@inheritDoc} */
@Override
public Collection<StatisticalMeasurementValue> getCollection(
protected String getTooltipString() {
return "Create new statistical value";
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public StatisticalMeasurementValue addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return 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.
*/
/*
* (non-Javadoc)
- *
+ *
* @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#
* getCollection(java.lang.Object)
*/
/*
* (non-Javadoc)
- *
+ *
* @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#
* createNewElement()
*/
// StoreUtil
// .warningDialog("Not implemented yet", getClass(),
// "This functionality needs to be implemented in CDM Library first.");
-
+
GrantedAuthority selection = GrantedAuthoritySelectionDialog.select(getLayoutComposite().getShell(), getConversationHolder(), null);
return selection;
}
/*
* (non-Javadoc)
- *
+ *
* @see
* eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#addElement
* (java.lang.Object)
/*
* (non-Javadoc)
- *
+ *
* @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#
* removeElement(java.lang.Object)
*/
/*
* (non-Javadoc)
- *
+ *
* @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#
* getEmptyString()
*/
/*
* (non-Javadoc)
- *
+ *
* @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#
* getTooltipString()
*/
return "Add a Granted Authority";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public GrantedAuthority addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
+
}
return "Add a memeber to this group";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public User addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
return "Add a scope restriction";
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DefinedTerm addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
return "Add a taxon to the scope of this key";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Taxon addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
*/
public class MediaRepresentationPartSection extends
AbstractEntityCollectionSection<MediaRepresentation, MediaRepresentationPart> {
-
+
/**
* <p>Constructor for MediaRepresentationPartSection.</p>
*
firePropertyChangeEvent(new CdmPropertyChangeEvent(this, null));
super.propertyChange(event);
}
- }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public MediaRepresentationPart addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return 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.
*/
ICdmFormElement parentElement, int style) {
super(cdmFormFactory, conversation, parentElement, "Media Representation", style);
}
-
+
/** {@inheritDoc} */
@Override
public void addElement(MediaRepresentation element) {
getEntity().removeRepresentation(element);
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public MediaRepresentation addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
+
}
/**
- *
+ *
*/
package eu.etaxonomy.taxeditor.ui.section.media;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity;
import eu.etaxonomy.cdm.model.media.Media;
+import eu.etaxonomy.taxeditor.ui.dialog.selection.MediaSelectionDialog;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
getEntity().removeMedia(element);
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Media addExisting() {
+ return MediaSelectionDialog.select(getShell(), getConversationHolder(), null);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return true;
+ }
+
}
public TaxonBase getTaxonBase() {
return taxonBase;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public NameRelationship addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return 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.
*/
}
/** {@inheritDoc} */
- public void setTaxonBase(TaxonBase entity) {
+ @Override
+ public void setTaxonBase(TaxonBase entity) {
this.taxonBase = entity;
NonViralName nonViralName = (NonViralName) HibernateProxyHelper.deproxy(entity.getName());
setEntity(nonViralName);
}
-
+
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#getTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase)
*/
return taxonBase;
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public NomenclaturalStatus addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
+
}
import org.eclipse.swt.widgets.Control;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.name.NonViralName;
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.cdm.model.taxon.TaxonNode;
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.store.CdmStore;
import eu.etaxonomy.taxeditor.ui.dialog.selection.NameSelectionDialog;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
TaxonNameBase taxonName = NameSelectionDialog.select(getShell(), getConversationHolder(), getEntity());
if(taxonName!=null){
if(taxonName.isInstanceOf(NonViralName.class)){
- CdmStore.getService(ITaxonNodeService.class).list(TaxonNode.class, null, null, null, null);
NonViralName nonViralName = HibernateProxyHelper.deproxy(taxonName, NonViralName.class);
taxonBase.setName(nonViralName);
// taxonBase.getTitleCache();
public TaxonBase getTaxonBase() {
return taxonBase;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DescriptionElementBase addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
}
public TaxonBase getTaxonBase() {
return taxonBase;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public TypeDesignationBase addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
}
return "Add a collecting area";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public NamedArea addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
+
}
return "Create new current determination event";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DeterminationEvent addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return 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.
*/
public Collection<DeterminationEvent> getCollection(DerivedUnitFacade entity) {
return entity != null ? entity.getOtherDeterminations() : null;
}
-
+
@Override
public void refresh() {
internalUpdateSection(false);
}
-
+
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#getTooltipString()
return "Add a determination event to the history";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DeterminationEvent addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
+
}
return "Add a geo scope";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public NamedArea addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
return "Add a geo scope";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public NamedArea addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return 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.
*/
/** {@inheritDoc} */
@Override
public IdentifiableSource createNewElement() {
- return IdentifiableSource.NewInstance(OriginalSourceType.PrimaryTaxonomicSource);
+ return IdentifiableSource.NewInstance(OriginalSourceType.PrimaryTaxonomicSource);
}
/* (non-Javadoc)
return "Add source";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IdentifiableSource addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return 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.
*/
*/
/** {@inheritDoc} */
@Override
- public DerivedUnit createNewElement() {
- return DerivedUnit.NewInstance(SpecimenOrObservationType.PreservedSpecimen);
+ public DerivedUnit createNewElement() {
+ return DerivedUnit.NewInstance(SpecimenOrObservationType.PreservedSpecimen);
}
/* (non-Javadoc)
return "Add a duplicate";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DerivedUnit addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
+
}
return "Add a type designation";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public SpecimenTypeDesignation addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
+
}
return "Create new current determination event";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public DeterminationEvent addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
+
}
return "Add source";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IdentifiableSource addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
+
}
return "Add a gel photo";
}
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Media addExisting() {
+ return null;
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
+
}
getEntity().addIdentifier(0, sampleDesignation);
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Identifier addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
+
}
getEntity().addIdentifier(indexOfCurrentSampleDesignation+1, sampleDesignation);
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Identifier addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
+
}
getEntity().setContigFile(element);
/*
* merge to avoid duplicate key exception
- * the exception seems to be caused by the two links to the Media object:
+ * the exception seems to be caused by the two links to the Media object:
* - Sequence->contigFile (used to be not in the cache after saving)
* - MediaRepresentationPart->media
* Invoking merge() solves this problem
protected String getTooltipString() {
return "Add a contig file";
}
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Media addExisting() {
+ return null;
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
}
return "Add a reference";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Reference addExisting() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
+
}
getEntity().setPherogram(element);
/*
* merge to avoid duplicate key exception
- * the exception seems to be caused by the two links to the Media object:
+ * the exception seems to be caused by the two links to the Media object:
* - SingleRead->pherogram (used to be not in the cache after saving)
* - MediaRepresentationPart->media
* Invoking merge() solves this problem
protected String getTooltipString() {
return "Add a read chromatogram";
}
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Media addExisting() {
+ return null;
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ return false;
+ }
}
@Override
public void removeElement(Annotation element) {
getEntity().removeAnnotation(element);
- }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Annotation addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
}
getEntity().removeCredit(element);
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Credit addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
getEntity().removeExtension(element);
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Extension addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
return entity.getMarkers();
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Marker addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
getEntity().removeRights(element);
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Rights addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
getEntity().removeSource(element);
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public IdentifiableSource addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
getEntity().removeIdentifier(element);
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Identifier addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
getEntity().removeIdentifier(element);
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Identifier addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
/**
- *
+ *
*/
package eu.etaxonomy.taxeditor.ui.section.user;
protected String getTooltipString() {
return "Add this user to a group";
}
-
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Group addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
return "Add a measurement unit";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public MeasurementUnit addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
return "Add a modifier vocabulary";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public TermVocabulary<DefinedTerm> addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
return "Add a state vocabulary";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public TermVocabulary<State> addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
return "Add a statistical measure";
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public StatisticalMeasure addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}