-/**
- *
- */
package eu.etaxonomy.taxeditor.ui.section.supplemental;
import java.util.Collection;
+import java.util.Comparator;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.model.common.AnnotatableEntity;
import eu.etaxonomy.cdm.model.common.Marker;
-import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.section.DefaultCdmBaseComparator;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AbstractUnboundEntityCollectionSection;
/**
* <p>MarkerSection class.</p>
* @author nho
* @version $Id: $
*/
-public class MarkerSection extends AbstractEntityCollectionSection<AnnotatableEntity, Marker> {
+public class MarkerSection extends AbstractUnboundEntityCollectionSection<AnnotatableEntity, Marker> {
/**
* <p>Constructor for MarkerSection.</p>
/** {@inheritDoc} */
@Override
public Marker createNewElement() {
- return Marker.NewInstance();
- }
-
- /** {@inheritDoc} */
- @Override
- public Collection<Marker> getCollection(AnnotatableEntity entity) {
- return entity.getMarkers();
+ Marker marker = Marker.NewInstance();
+ marker.setFlag(true);
+ return marker;
}
/** {@inheritDoc} */
getEntity().removeMarker(element);
}
+ @Override
+ protected Collection<Marker> getEntityCollection(AnnotatableEntity entity) {
+ return entity.getMarkers();
+ }
+
+ @Override
+ public Comparator<Marker> getComparator() {
+ return new DefaultCdmBaseComparator<>();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Marker addExisting() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean allowAddExisting() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}