Project

General

Profile

Revision 05f33e9b

ID05f33e9bfc89f0e57a70de5cb3f788024bee4c32
Parent 7249680a
Child 4df9f28c

Added by Katja Luther almost 3 years ago

ABCD import:set fieldUnit in derivedUnitFace after creation to avoid new creation of fieldUnit

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/abcd206/in/Abcd206Import.java
613 613
            //			for (NamedArea area : otherAreas) {
614 614
            //				getTermService().saveOrUpdate(area);// merge it sooner (foreach area)
615 615
            //			}
616
           save(derivedUnitFacade.getFieldUnit(false), state);
616
//           save(derivedUnitFacade.getFieldUnit(false), state);
617 617
           if (derivedUnitFacade.getFieldUnit(false) != null){
618 618
               state.setFieldUnit(derivedUnitFacade.getFieldUnit(false));
619 619
           }
......
1011 1011

  
1012 1012
        }
1013 1013
        DerivedUnitFacade derivedUnitFacade = DerivedUnitFacade.NewInstance(type);
1014
        derivedUnitFacade.setFieldUnit(state.getFieldUnit(state.getDataHolder().getFieldNumber()));
1014 1015
        derivedUnitFacade.setKindOfUnit(kindOfUnit);
1015 1016
        return derivedUnitFacade;
1016 1017
    }
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/abcd206/in/molecular/AbcdDnaParser.java
49 49
    }
50 50

  
51 51
    public DnaSample parse(Element item, Abcd206ImportState state) {
52
        FieldUnit fieldUnit = FieldUnit.NewInstance();
52
        FieldUnit fieldUnit = state.getFieldUnit(state.getDataHolder().getFieldNumber());
53
        if (fieldUnit == null){
54
            fieldUnit = FieldUnit.NewInstance();
55
        }
53 56
        DnaSample dnaSample = DnaSample.NewInstance();
54 57
        DerivationEvent.NewSimpleInstance(fieldUnit, dnaSample, DerivationEventType.DNA_EXTRACTION());
55 58

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)