import java.util.Collection;
-import org.apache.log4j.Logger;
-
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.model.description.Scope;
+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.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection;
/**
* @created Mar 18, 2010
* @version 1.0
*/
-public class ScopeSection extends AbstractEntityCollectionSection<TaxonDescription, Scope> {
-
-
- private static final Logger logger = Logger.getLogger(ScopeSection.class);
+public class ScopeSection extends AbstractEntityCollectionSection<TaxonDescription, DefinedTerm> {
/**
* <p>Constructor for ScopeSection.</p>
*
- * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
+ * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
- * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param style a int.
*/
public ScopeSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) {
/** {@inheritDoc} */
@Override
- public void addElement(Scope element) {
+ public void addElement(DefinedTerm element) {
getEntity().addScope(element);
}
/** {@inheritDoc} */
@Override
- public Scope createNewElement() {
- return Scope.NewInstance();
+ public DefinedTerm createNewElement() {
+ return DefinedTerm.NewInstance(TermType.Scope,"","Untitled","");
}
/** {@inheritDoc} */
@Override
- public Collection<Scope> getCollection(TaxonDescription entity) {
+ public Collection<DefinedTerm> getCollection(TaxonDescription entity) {
return entity.getScopes();
}
/** {@inheritDoc} */
@Override
- public void removeElement(Scope element) {
+ public void removeElement(DefinedTerm element) {
getEntity().removeScope(element);
}
}