Project

General

Profile

Revision 631f622d

ID631f622d95ea5b0648a96a2a8bb5283c64c646fb
Parent 451fef0f
Child c7794cca

Added by Katja Luther about 3 years ago

smaller changes in specimen import

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/abcd206/in/Abcd206Import.java
216 216
                        state.setClassification(Classification.NewInstance(name, state.getRef(), Language.DEFAULT()));
217 217
                        //we do not need a default classification when creating an empty new one
218 218
                        state.setDefaultClassification(state.getClassification());
219
                        save(state.getDefaultClassification(), state);
219
                        save(state.getDefaultClassification(false), state);
220 220
                    }
221 221
                    save(state.getClassification(), state);
222 222
                }
......
248 248

  
249 249
                commitTransaction(state.getTx());
250 250
                state.setTx(startTransaction());
251
               // state.setDefaultClassification(getClassificationService().load(state.getDefaultClassification().getUuid()));
251
                if (state.getDefaultClassification(false) != null){ state.setDefaultClassification(getClassificationService().load(state.getDefaultClassification(false).getUuid()));}
252
                if (state.getClassification() != null){  state.setClassification(getClassificationService().load(state.getClassification().getUuid()));}
252 253
                state.setAssociationRefs(new ArrayList<OriginalSourceBase<?>>());
253 254
                state.setDescriptionRefs(new ArrayList<OriginalSourceBase<?>>());
254 255
                state.setDerivedUnitSources(new ArrayList<OriginalSourceBase<?>>());
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/gbif/in/GbifImportState.java
138 138

  
139 139

  
140 140
    @Override
141
    public Classification getDefaultClassification() {
141
    public Classification getDefaultClassification(boolean createIfNotExist) {
142 142
        return defaultClassification;
143 143
    }
144 144

  
......
184 184
    }
185 185

  
186 186

  
187
    @Override
187 188
    public List<OriginalSourceBase<?>> getAssociationRefs() {
188 189
        return associationRefs;
189 190
    }
190 191

  
191 192

  
193
    @Override
192 194
    public void setAssociationRefs(List<OriginalSourceBase<?>> associationRefs) {
193 195
        this.associationRefs = associationRefs;
194 196
    }
195 197

  
196 198

  
199
    @Override
197 200
    public boolean isAssociationSourcesSet() {
198 201
        return associationSourcesSet;
199 202
    }
200 203

  
201 204

  
205
    @Override
202 206
    public void setAssociationSourcesSet(boolean associationSourcesSet) {
203 207
        this.associationSourcesSet = associationSourcesSet;
204 208
    }
205 209

  
206 210

  
211
    @Override
207 212
    public List<OriginalSourceBase<?>> getDescriptionRefs() {
208 213
        return descriptionRefs;
209 214
    }
210 215

  
211 216

  
217
    @Override
212 218
    public void setDescriptionRefs(List<OriginalSourceBase<?>> descriptionRefs) {
213 219
        this.descriptionRefs = descriptionRefs;
214 220
    }
215 221

  
216 222

  
223
    @Override
217 224
    public boolean isDescriptionSourcesSet() {
218 225
        return descriptionSourcesSet;
219 226
    }
220 227

  
221 228

  
229
    @Override
222 230
    public void setDescriptionSourcesSet(boolean descriptionSourcesSet) {
223 231
        this.descriptionSourcesSet = descriptionSourcesSet;
224 232
    }
225 233

  
226 234

  
235
    @Override
227 236
    public List<OriginalSourceBase<?>> getDerivedUnitSources() {
228 237
        return derivedUnitSources;
229 238
    }
230 239

  
231 240

  
241
    @Override
232 242
    public void setDerivedUnitSources(List<OriginalSourceBase<?>> derivedUnitSources) {
233 243
        this.derivedUnitSources = derivedUnitSources;
234 244
    }
235 245

  
236 246

  
247
    @Override
237 248
    public boolean isDerivedUnitSourcesSet() {
238 249
        return derivedUnitSourcesSet;
239 250
    }
240 251

  
241 252

  
253
    @Override
242 254
    public void setDerivedUnitSourcesSet(boolean derivedUnitSourcesSet) {
243 255
        this.derivedUnitSourcesSet = derivedUnitSourcesSet;
244 256
    }
245 257

  
246 258

  
259
    @Override
247 260
    public boolean isDescriptionGroupSet() {
248 261
        return descriptionGroupSet;
249 262
    }
250 263

  
251 264

  
265
    @Override
252 266
    public void setDescriptionGroupSet(boolean descriptionGroupSet) {
253 267
        this.descriptionGroupSet = descriptionGroupSet;
254 268
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)