}
save(state.getDerivedUnitBase(), state);
- if ((config.isAddIndividualsAssociationsSuchAsSpecimenAndObservations() || config.isAddIndividualsAssociationsForFieldUnits())
- && preferredFlag) {
+ if (config.isAddIndividualsAssociationsSuchAsSpecimenAndObservations() && preferredFlag) {
//do not add IndividualsAssociation to non-preferred taxa
if (logger.isDebugEnabled()){
logger.debug("isDoCreateIndividualsAssociations");
state.setDescriptionGroup(taxonDescription);
IndividualsAssociation indAssociation = IndividualsAssociation.NewInstance();
- Feature feature;
- if(state.getConfig().isAddIndividualsAssociationsForFieldUnits()){
- feature = makeFeature(state.getFieldUnit(state.getDataHolder().getFieldNumber()));
- indAssociation.setAssociatedSpecimenOrObservation(state.getFieldUnit(state.getDataHolder().getFieldNumber()));
- }
- else{
- feature = makeFeature(state.getDerivedUnitBase());
- indAssociation.setAssociatedSpecimenOrObservation(state.getDerivedUnitBase());
- }
+ Feature feature = makeFeature(state.getDerivedUnitBase());
+ indAssociation.setAssociatedSpecimenOrObservation(state.getDerivedUnitBase());
indAssociation.setFeature(feature);
//
// if (((Abcd206ImportConfigurator) state.getConfig()).isInteractWithUser()){
if (type.isFeatureObservation()){
return Feature.OBSERVATION();
- }else if (type.isFeatureSpecimen() || type.isFieldUnit()){
+ }else if (type.isFeatureSpecimen()){
return Feature.SPECIMEN();
}else if (type == SpecimenOrObservationType.DerivedUnit){
return Feature.OBSERVATION();
private String taxonReference = null;
private boolean addIndividualsAssociationsSuchAsSpecimenAndObservations = true;
- private boolean addIndividualsAssociationsForFieldUnits = false;
private boolean reuseExistingDescriptiveGroups = false;
this.addIndividualsAssociationsSuchAsSpecimenAndObservations = addIndividualsAssociationsSuchAsSpecimenAndObservations;
}
- public boolean isAddIndividualsAssociationsForFieldUnits() {
- return addIndividualsAssociationsForFieldUnits;
- }
-
- public void setAddIndividualsAssociationsForFieldUnits(boolean addIndividualsAssociationsForFieldUnits) {
- this.addIndividualsAssociationsForFieldUnits = addIndividualsAssociationsForFieldUnits;
- }
-
public boolean isReuseExistingDescriptiveGroups() {
return reuseExistingDescriptiveGroups;
}
result.append(":");\r
result.append(this.isAddIndividualsAssociationsSuchAsSpecimenAndObservations());\r
result.append(";");\r
- result.append("addIndividualsAssociationsForFieldUnits");\r
- result.append(":");\r
- result.append(this.isAddIndividualsAssociationsForFieldUnits());\r
- result.append(";");\r
result.append("reuseExistingTaxaWhenPossible");\r
result.append(":");\r
result.append(this.isReuseExistingTaxaWhenPossible());\r
}
if (bestMatchingName != null){
Taxon taxon = getOrCreateTaxonForName(bestMatchingName, state);
- if (state.getConfig().isAddIndividualsAssociationsSuchAsSpecimenAndObservations()
- || state.getConfig().isAddIndividualsAssociationsForFieldUnits()) {
+ if (state.getConfig().isAddIndividualsAssociationsSuchAsSpecimenAndObservations()) {
//do not add IndividualsAssociation to non-preferred taxa
if(logger.isDebugEnabled()){
logger.info("isDoCreateIndividualsAssociations");