Project

General

Profile

« Previous | Next » 

Revision 38018d82

Added by Katja Luther over 3 years ago

fix import of dna data with different provider software version

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/SpecimenImportBase.java
880 880
	     */
881 881
	    protected Taxon linkParentChildNode(Taxon parent, Taxon child, Classification classification, STATE state) {
882 882
	        TaxonNode node =null;
883
	        List<String> propertyPaths = new ArrayList<>();
884
            propertyPaths.add("childNodes");
883 885
	        if (parent != null) {
884
	            parent = (Taxon) getTaxonService().find(parent.getUuid());
885
	            child = (Taxon) getTaxonService().find(child.getUuid());
886

  
887
	            parent = (Taxon) getTaxonService().load(parent.getUuid(), propertyPaths);
888
	            child = (Taxon) getTaxonService().load(child.getUuid(), propertyPaths);
886 889
	            //here we do not have to check if the taxon nodes already exists
887 890
	            //this is done by classification.addParentChild()
888 891
	            //do not add child node if it already exists
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/abcd206/in/Abcd206Import.java
1112 1112
                        // state.getDataHolder().getUnitID());
1113 1113
                        URI lastAccessPoint = state.getActualAccessPoint();
1114 1114
                        state.setActualAccessPoint(dnaSource);
1115
                        String oldPrefix = state.getPrefix();
1116
                        state.setPrefix(unitAssociationWrapper.getPrefix());
1115 1117
                        handleSingleUnit(state, associatedUnits.item(m), false);
1116 1118
                        state.setActualAccessPoint(lastAccessPoint);
1119
                        state.setPrefix(oldPrefix);
1117 1120
                        DerivedUnit associatedUnit = state.getDerivedUnitBase();
1118 1121
                        FieldUnit associatedFieldUnit = null;
1119 1122
                        java.util.Collection<FieldUnit> associatedFieldUnits = state.getCdmRepository()
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/abcd206/in/molecular/AbcdDnaParser.java
75 75
            parseSpecimenUnit((Element)specimenUnitList.item(0), dnaSample);
76 76
        }
77 77
        NodeList unitExtensions = item.getElementsByTagName(prefix+"UnitExtensions");
78
        System.err.println(item.toString());
78 79
        for(int i=0;i<unitExtensions.getLength();i++){
79 80
            if(unitExtensions.item(i) instanceof Element){
80 81
                Element unitExtension = (Element) unitExtensions.item(i);

Also available in: Unified diff