package eu.etaxonomy.taxeditor.ui.section.reference;
-import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
import eu.etaxonomy.cdm.model.reference.ReferenceType;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.AuthorHelper;
-import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.IErrorIntolerableElement;
import eu.etaxonomy.taxeditor.ui.element.IExceptionHandler;
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
selection_authorTeam = formFactory
.createSelectionElement(AgentBase.class,
getConversationHolder(), formElement, "Author",
- AuthorHelper.getAuthor(entity.getAuthorTeam()),
+ AuthorHelper.getAuthor(entity.getAuthorship()),
EntitySelectionElement.ALL, style);
ReferenceType referenceType = entity.getType();
switch (referenceType) {
case Generic:
break;
+ case Section:
+ break;
case BookSection:
label = "Book";
break;
// series
text_series = formFactory.createTextWithLabelElement(element, "Series",
- reference.getSeries(), style);
+ reference.getSeriesPart(), style);
// volume
text_volume = formFactory.createTextWithLabelElement(element, "Volume",
reference.getVolume(), style);
text_series = formFactory.createTextWithLabelElement(element, "Series",
- reference.getSeries(), style);
+ reference.getSeriesPart(), style);
}
/**
// series part
text_seriesPart = formFactory.createTextWithLabelElement(element,
- "Series Part", reference.getSeriesPart(), style);
+ "Series", reference.getSeriesPart(), style);
if (referenceType.equals(ReferenceType.Book)) {
// edition
text_uri = formFactory.createUriWithLabelElement(element, "URI",
reference.getUri(), style);
// abstract
- text_referenceAbstract = formFactory.createMultilineTextWithLabel(
+ text_referenceAbstract = formFactory.createMultiLineTextWithLabel(
element, "Reference Abstract", 100, style);
text_referenceAbstract.setText(reference.getReferenceAbstract());
}
}
// selections
else if (eventSource == selection_authorTeam) {
- getEntity().setAuthorTeam(
+ getEntity().setAuthorship(
(TeamOrPersonBase) selection_authorTeam.getSelection());
} else if (eventSource == selection_inReference) {
getEntity().setInReference(selection_inReference.getSelection());
getEntity().setPublisher(text_publisher.getText());
} else if (eventSource == text_referenceAbstract) {
getEntity().setReferenceAbstract(text_referenceAbstract.getText());
- } else if (eventSource == text_series) {
- getEntity().setSeries(text_series.getText());
} else if (eventSource == text_seriesPart) {
getEntity().setSeriesPart(text_seriesPart.getText());
} else if (eventSource == text_title) {
getEntity().setAbbrevTitle(text_abbrevTitle.getText());
toggleableAbbrevCache.setText(text_abbrevTitle.getText());
} else if (eventSource == text_uri) {
- try {
- getEntity().setUri(text_uri.getUri());
- } catch (URISyntaxException e) {
- AbstractUtility.warningDialog("Invalid URI", getClass(),
- e.getLocalizedMessage());
- }
+ getEntity().setUri(text_uri.parseText());
} else if (eventSource == text_volume) {
getEntity().setVolume(text_volume.getText());
}