Project

General

Profile

Revision 113008ea

ID113008ea97ea8c0df390cb820d32b0e2e6418867
Parent 4cc1a141
Child e0f2ff33

Added by Andreas Müller almost 3 years ago

cleanup

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/specimen/gbif/in/GbifImport.java
290 290
    }
291 291

  
292 292

  
293
@Override
294
protected void handleSingleUnit(SpecimenImportStateBase<SpecimenImportConfiguratorBase, SpecimenImportStateBase> state,
295
        Object itemObject){
296
    GbifResponse item;
297
    if (itemObject instanceof GbifResponse){
298
        item = (GbifResponse) itemObject;
299
    } else{
300
        logger.error("For Gbif Import the item has to be of type GbifResponse.");
301
        return;
302
    }
303
    if (logger.isDebugEnabled()) {
304
        logger.info("handleSingleUnit "+state.getRef());
305
    }
306

  
307
        ICdmRepository cdmAppController = state.getConfig().getCdmAppController();
308
        if(cdmAppController==null){
309
            cdmAppController = this;
293
    @Override
294
    protected void handleSingleUnit(SpecimenImportStateBase<SpecimenImportConfiguratorBase, SpecimenImportStateBase> state,
295
            Object itemObject){
296
        GbifResponse item;
297
        if (itemObject instanceof GbifResponse){
298
            item = (GbifResponse) itemObject;
299
        } else{
300
            logger.error("For Gbif Import the item has to be of type GbifResponse.");
301
            return;
310 302
        }
311
        //check if unit already exists
312
        DerivedUnitFacade derivedUnitFacade;
313
        derivedUnitFacade = item.getDerivedUnitFacade();
314
        state.setDerivedUnitBase(derivedUnitFacade.innerDerivedUnit());
315
        TaxonName bestMatchingName =  findBestMatchingNames(item, state);
316
        if (bestMatchingName == null){
317
            bestMatchingName = item.getScientificName();
303
        if (logger.isDebugEnabled()) {
304
            logger.info("handleSingleUnit "+state.getRef());
318 305
        }
319
        if (bestMatchingName != null){
320
            Taxon taxon = getOrCreateTaxonForName(bestMatchingName, state);
321
            if (state.getConfig().isAddIndividualsAssociationsSuchAsSpecimenAndObservations()) {
322
                //do not add IndividualsAssociation to non-preferred taxa
323
                if(logger.isDebugEnabled()){
324
                    logger.info("isDoCreateIndividualsAssociations");
325
                }
326
                for (DeterminationEvent determinationEvent:derivedUnitFacade.getDeterminations()){
327
                    makeIndividualsAssociation(state, taxon, determinationEvent);
328
                }
329 306

  
330
                save(state.getDerivedUnitBase(), state);
307
            ICdmRepository cdmAppController = state.getConfig().getCdmAppController();
308
            if(cdmAppController==null){
309
                cdmAppController = this;
310
            }
311
            //check if unit already exists
312
            DerivedUnitFacade derivedUnitFacade;
313
            derivedUnitFacade = item.getDerivedUnitFacade();
314
            state.setDerivedUnitBase(derivedUnitFacade.innerDerivedUnit());
315
            TaxonName bestMatchingName =  findBestMatchingNames(item, state);
316
            if (bestMatchingName == null){
317
                bestMatchingName = item.getScientificName();
318
            }
319
            if (bestMatchingName != null){
320
                Taxon taxon = getOrCreateTaxonForName(bestMatchingName, state);
321
                if (state.getConfig().isAddIndividualsAssociationsSuchAsSpecimenAndObservations()) {
322
                    //do not add IndividualsAssociation to non-preferred taxa
323
                    if(logger.isDebugEnabled()){
324
                        logger.info("isDoCreateIndividualsAssociations");
325
                    }
326
                    for (DeterminationEvent determinationEvent:derivedUnitFacade.getDeterminations()){
327
                        makeIndividualsAssociation(state, taxon, determinationEvent);
328
                    }
329

  
330
                    save(state.getDerivedUnitBase(), state);
331
                }
331 332
            }
332
        }
333 333

  
334 334

  
335 335

  
336
        // handle collection data
337
        handleCollectionData(state, derivedUnitFacade);
338
        save(item.getDerivedUnitFacade().baseUnit(), state);
339
        save(item.getDerivedUnitFacade().getFieldUnit(false), state);
340
        importAssociatedUnits(state, item, derivedUnitFacade);
341
        /*
342
        if(state.getConfig().isIgnoreImportOfExistingSpecimens()){
343
            String[] tripleId = item.getTripleID();
344
            SpecimenOrObservationBase<?> existingSpecimen = findExistingSpecimen(tripleId[0], state);
345
            DerivedUnitFacade derivedUnitFacade;
346
            if(existingSpecimen!=null && existingSpecimen.isInstanceOf(DerivedUnit.class)){
347
                DerivedUnit derivedUnit = HibernateProxyHelper.deproxy(existingSpecimen, DerivedUnit.class);
348
                state.setDerivedUnitBase(derivedUnit);
349
                derivedUnitFacade = item.getDerivedUnitFacade();
350
                List<NonViralName> names = findExistingNames(item.getScientificName().getNameCache(), state);
351
                if (!names.isEmpty()){
352
                    findBestMatchingName(names, item);
336
            // handle collection data
337
            handleCollectionData(state, derivedUnitFacade);
338
            save(item.getDerivedUnitFacade().baseUnit(), state);
339
            save(item.getDerivedUnitFacade().getFieldUnit(false), state);
340
            importAssociatedUnits(state, item, derivedUnitFacade);
341
            /*
342
            if(state.getConfig().isIgnoreImportOfExistingSpecimens()){
343
                String[] tripleId = item.getTripleID();
344
                SpecimenOrObservationBase<?> existingSpecimen = findExistingSpecimen(tripleId[0], state);
345
                DerivedUnitFacade derivedUnitFacade;
346
                if(existingSpecimen!=null && existingSpecimen.isInstanceOf(DerivedUnit.class)){
347
                    DerivedUnit derivedUnit = HibernateProxyHelper.deproxy(existingSpecimen, DerivedUnit.class);
348
                    state.setDerivedUnitBase(derivedUnit);
349
                    derivedUnitFacade = item.getDerivedUnitFacade();
350
                    List<NonViralName> names = findExistingNames(item.getScientificName().getNameCache(), state);
351
                    if (!names.isEmpty()){
352
                        findBestMatchingName(names, item);
353
                    }
354
                    save(item.getDerivedUnitFacade().baseUnit(), state);
355
                    importAssociatedUnits(state, item, derivedUnitFacade);
356
                    state.getReport().addAlreadyExistingSpecimen(SpecimenImportUtility.getUnitID(derivedUnit, state.getConfig()), derivedUnit);
357
                    return;
353 358
                }
354
                save(item.getDerivedUnitFacade().baseUnit(), state);
355
                importAssociatedUnits(state, item, derivedUnitFacade);
356
                state.getReport().addAlreadyExistingSpecimen(SpecimenImportUtility.getUnitID(derivedUnit, state.getConfig()), derivedUnit);
357
                return;
358 359
            }
359
        }
360 360

  
361
        //import new specimen
362

  
363
        // import DNA unit
364
        //TODO!!!!
365
        if(state.getDataHolder().getKindOfUnit()!=null && state.getDataHolder().getKindOfUnit().equalsIgnoreCase("dna")){
366
            GbifDnaParser dnaParser = new GbifDnaParser(state.getPrefix(), state.getReport(), state.getCdmRepository());
367
            DnaSample dnaSample = dnaParser.parse(item, state);
368
            save(dnaSample, state);
369
            //set dna as derived unit to avoid creating an extra specimen for this dna sample (instead just the field unit will be created)
370
            state.setDerivedUnitBase(dnaSample);
371
            derivedUnitFacade = DerivedUnitFacade.NewInstance(state.getDerivedUnitBase());
372
        }
373
        else{
374
            // create facade
375
            derivedUnitFacade = getFacade(state);
376
            state.setDerivedUnitBase(derivedUnitFacade.innerDerivedUnit());
377
     //   }
378

  
379
        /**
380
         * GATHERING EVENT
381

  
382
        // gathering event
383
        UnitsGatheringEvent<GbifImportConfigurator> unitsGatheringEvent =
384
               /* new UnitsGatheringEvent<GbifImportConfigurator>(cdmAppController.getTermService(),
385
                state.getDataHolder().locality, null, state.getDataHolder().decimalLongitude,
386
                state.getDataHolder().decimalLatitude, state.getDataHolder().getGatheringElevationText(),
387
                state.getDataHolder().getGatheringElevationMin(), state.getDataHolder().getGatheringElevationMax(),
388
                state.getDataHolder().getGatheringElevationUnit(), state.getDataHolder().getGatheringDateText(),
389
                state.getDataHolder().getGatheringNotes(), state.getTransformer().getReferenceSystemByKey(
390
                        state.getDataHolder().getGatheringSpatialDatum()), state.getDataHolder().gatheringAgentList,
391
                state.getDataHolder().gatheringTeamList, state.getConfig());
392

  
393
        // country
394
        UnitsGatheringArea unitsGatheringArea = new UnitsGatheringArea();
395
        //  unitsGatheringArea.setConfig(state.getConfig(),getOccurrenceService(), getTermService());
396
        unitsGatheringArea.setParams(state.getDataHolder().countryCode, state.getDataHolder().country, state.getConfig(), cdmAppController.getTermService(), cdmAppController.getOccurrenceService());
397

  
398
        DefinedTermBase<?> areaCountry =  unitsGatheringArea.getCountry();
399

  
400
        // other areas
401
        unitsGatheringArea = new UnitsGatheringArea();
402
        //            unitsGatheringArea.setConfig(state.getConfig(),getOccurrenceService(),getTermService());
403
        unitsGatheringArea.setAreas(state.getDataHolder().getNamedAreaList(),state.getConfig(), cdmAppController.getTermService(), cdmAppController.getVocabularyService());
404
        ArrayList<DefinedTermBase> nas = unitsGatheringArea.getAreas();
405
        for (DefinedTermBase namedArea : nas) {
406
            unitsGatheringEvent.addArea(namedArea);
407
        }
361
            //import new specimen
362

  
363
            // import DNA unit
364
            //TODO!!!!
365
            if(state.getDataHolder().getKindOfUnit()!=null && state.getDataHolder().getKindOfUnit().equalsIgnoreCase("dna")){
366
                GbifDnaParser dnaParser = new GbifDnaParser(state.getPrefix(), state.getReport(), state.getCdmRepository());
367
                DnaSample dnaSample = dnaParser.parse(item, state);
368
                save(dnaSample, state);
369
                //set dna as derived unit to avoid creating an extra specimen for this dna sample (instead just the field unit will be created)
370
                state.setDerivedUnitBase(dnaSample);
371
                derivedUnitFacade = DerivedUnitFacade.NewInstance(state.getDerivedUnitBase());
372
            }
373
            else{
374
                // create facade
375
                derivedUnitFacade = getFacade(state);
376
                state.setDerivedUnitBase(derivedUnitFacade.innerDerivedUnit());
377
         //   }
378

  
379
            /**
380
             * GATHERING EVENT
381

  
382
            // gathering event
383
            UnitsGatheringEvent<GbifImportConfigurator> unitsGatheringEvent =
384
                   /* new UnitsGatheringEvent<GbifImportConfigurator>(cdmAppController.getTermService(),
385
                    state.getDataHolder().locality, null, state.getDataHolder().decimalLongitude,
386
                    state.getDataHolder().decimalLatitude, state.getDataHolder().getGatheringElevationText(),
387
                    state.getDataHolder().getGatheringElevationMin(), state.getDataHolder().getGatheringElevationMax(),
388
                    state.getDataHolder().getGatheringElevationUnit(), state.getDataHolder().getGatheringDateText(),
389
                    state.getDataHolder().getGatheringNotes(), state.getTransformer().getReferenceSystemByKey(
390
                            state.getDataHolder().getGatheringSpatialDatum()), state.getDataHolder().gatheringAgentList,
391
                    state.getDataHolder().gatheringTeamList, state.getConfig());
392

  
393
            // country
394
            UnitsGatheringArea unitsGatheringArea = new UnitsGatheringArea();
395
            //  unitsGatheringArea.setConfig(state.getConfig(),getOccurrenceService(), getTermService());
396
            unitsGatheringArea.setParams(state.getDataHolder().countryCode, state.getDataHolder().country, state.getConfig(), cdmAppController.getTermService(), cdmAppController.getOccurrenceService());
397

  
398
            DefinedTermBase<?> areaCountry =  unitsGatheringArea.getCountry();
399

  
400
            // other areas
401
            unitsGatheringArea = new UnitsGatheringArea();
402
            //            unitsGatheringArea.setConfig(state.getConfig(),getOccurrenceService(),getTermService());
403
            unitsGatheringArea.setAreas(state.getDataHolder().getNamedAreaList(),state.getConfig(), cdmAppController.getTermService(), cdmAppController.getVocabularyService());
404
            ArrayList<DefinedTermBase> nas = unitsGatheringArea.getAreas();
405
            for (DefinedTermBase namedArea : nas) {
406
                unitsGatheringEvent.addArea(namedArea);
407
            }
408 408

  
409
        // copy gathering event to facade
410
        GatheringEvent gatheringEvent = unitsGatheringEvent.getGatheringEvent();
411
        derivedUnitFacade.setLocality(gatheringEvent.getLocality());
412
        derivedUnitFacade.setExactLocation(gatheringEvent.getExactLocation());
413
        derivedUnitFacade.setCollector(gatheringEvent.getCollector());
414
        derivedUnitFacade.setCountry((NamedArea)areaCountry);
415
        derivedUnitFacade.setAbsoluteElevationText(gatheringEvent.getAbsoluteElevationText());
416
        derivedUnitFacade.setAbsoluteElevation(gatheringEvent.getAbsoluteElevation());
417
        derivedUnitFacade.setAbsoluteElevationMax(gatheringEvent.getAbsoluteElevationMax());
418
        derivedUnitFacade.setGatheringPeriod(gatheringEvent.getTimeperiod());
419

  
420
        for(DefinedTermBase<?> area:unitsGatheringArea.getAreas()){
421
            derivedUnitFacade.addCollectingArea((NamedArea) area);
422
        }
423
        //            derivedUnitFacade.addCollectingAreas(unitsGatheringArea.getAreas());
424
        // TODO exsiccatum
425

  
426
        // add fieldNumber
427
        derivedUnitFacade.setFieldNumber(NB(state.getDataHolder().getFieldNumber()));
428

  
429
        // add unitNotes
430
        derivedUnitFacade.addAnnotation(Annotation.NewDefaultLanguageInstance(NB(state.getDataHolder().getUnitNotes())));
431

  
432
        // //add Multimedia URLs
433
        if (state.getDataHolder().getMultimediaObjects().size() != -1) {
434
            for (String multimediaObject : state.getDataHolder().getMultimediaObjects()) {
435
                Media media;
436
                try {
437
                    media = getImageMedia(multimediaObject, READ_MEDIA_DATA);
438
                    derivedUnitFacade.addDerivedUnitMedia(media);
439
                    if(state.getConfig().isAddMediaAsMediaSpecimen()){
440
                        //add media also as specimen scan
441
                        MediaSpecimen mediaSpecimen = MediaSpecimen.NewInstance(SpecimenOrObservationType.Media);
442
                        mediaSpecimen.setMediaSpecimen(media);
443
                        DefinedTermBase specimenScanTerm = getTermService().load(SPECIMEN_SCAN_TERM);
444
                        if(specimenScanTerm instanceof DefinedTerm){
445
                            mediaSpecimen.setKindOfUnit((DefinedTerm) specimenScanTerm);
409
            // copy gathering event to facade
410
            GatheringEvent gatheringEvent = unitsGatheringEvent.getGatheringEvent();
411
            derivedUnitFacade.setLocality(gatheringEvent.getLocality());
412
            derivedUnitFacade.setExactLocation(gatheringEvent.getExactLocation());
413
            derivedUnitFacade.setCollector(gatheringEvent.getCollector());
414
            derivedUnitFacade.setCountry((NamedArea)areaCountry);
415
            derivedUnitFacade.setAbsoluteElevationText(gatheringEvent.getAbsoluteElevationText());
416
            derivedUnitFacade.setAbsoluteElevation(gatheringEvent.getAbsoluteElevation());
417
            derivedUnitFacade.setAbsoluteElevationMax(gatheringEvent.getAbsoluteElevationMax());
418
            derivedUnitFacade.setGatheringPeriod(gatheringEvent.getTimeperiod());
419

  
420
            for(DefinedTermBase<?> area:unitsGatheringArea.getAreas()){
421
                derivedUnitFacade.addCollectingArea((NamedArea) area);
422
            }
423
            //            derivedUnitFacade.addCollectingAreas(unitsGatheringArea.getAreas());
424
            // TODO exsiccatum
425

  
426
            // add fieldNumber
427
            derivedUnitFacade.setFieldNumber(NB(state.getDataHolder().getFieldNumber()));
428

  
429
            // add unitNotes
430
            derivedUnitFacade.addAnnotation(Annotation.NewDefaultLanguageInstance(NB(state.getDataHolder().getUnitNotes())));
431

  
432
            // //add Multimedia URLs
433
            if (state.getDataHolder().getMultimediaObjects().size() != -1) {
434
                for (String multimediaObject : state.getDataHolder().getMultimediaObjects()) {
435
                    Media media;
436
                    try {
437
                        media = getImageMedia(multimediaObject, READ_MEDIA_DATA);
438
                        derivedUnitFacade.addDerivedUnitMedia(media);
439
                        if(state.getConfig().isAddMediaAsMediaSpecimen()){
440
                            //add media also as specimen scan
441
                            MediaSpecimen mediaSpecimen = MediaSpecimen.NewInstance(SpecimenOrObservationType.Media);
442
                            mediaSpecimen.setMediaSpecimen(media);
443
                            DefinedTermBase specimenScanTerm = getTermService().load(SPECIMEN_SCAN_TERM);
444
                            if(specimenScanTerm instanceof DefinedTerm){
445
                                mediaSpecimen.setKindOfUnit((DefinedTerm) specimenScanTerm);
446
                            }
447
                            DerivationEvent derivationEvent = DerivationEvent.NewInstance(DerivationEventType.PREPARATION());
448
                            derivationEvent.addDerivative(mediaSpecimen);
449
                            derivedUnitFacade.innerDerivedUnit().addDerivationEvent(derivationEvent);
446 450
                        }
447
                        DerivationEvent derivationEvent = DerivationEvent.NewInstance(DerivationEventType.PREPARATION());
448
                        derivationEvent.addDerivative(mediaSpecimen);
449
                        derivedUnitFacade.innerDerivedUnit().addDerivationEvent(derivationEvent);
451

  
452
                    } catch (MalformedURLException e) {
453
                        // TODO Auto-generated catch block
454
                        e.printStackTrace();
450 455
                    }
451 456

  
452
                } catch (MalformedURLException e) {
453
                    // TODO Auto-generated catch block
454
                    e.printStackTrace();
455 457
                }
456

  
457 458
            }
458
        }
459 459

  
460
        //          /*
461
        //           * merge AND STORE DATA
462
        //
463
        //          getTermService().saveOrUpdate(areaCountry);// TODO save area sooner
464
        //
465
        //          for (NamedArea area : otherAreas) {
466
        //              getTermService().saveOrUpdate(area);// merge it sooner (foreach area)
467
        //          }
460
            //          /*
461
            //           * merge AND STORE DATA
462
            //
463
            //          getTermService().saveOrUpdate(areaCountry);// TODO save area sooner
464
            //
465
            //          for (NamedArea area : otherAreas) {
466
            //              getTermService().saveOrUpdate(area);// merge it sooner (foreach area)
467
            //          }
468 468

  
469
        save(unitsGatheringEvent.getLocality(), state);
469
            save(unitsGatheringEvent.getLocality(), state);
470 470

  
471
        // handle collection data
472
        setCollectionData(state, derivedUnitFacade);
471
            // handle collection data
472
            setCollectionData(state, derivedUnitFacade);
473 473

  
474
        //Reference stuff
475
       // SpecimenUserInteraction sui = state.getConfig().getSpecimenUserInteraction();
476
        Map<String,OriginalSourceBase<?>> sourceMap = new HashMap<String, OriginalSourceBase<?>>();
474
            //Reference stuff
475
           // SpecimenUserInteraction sui = state.getConfig().getSpecimenUserInteraction();
476
            Map<String,OriginalSourceBase<?>> sourceMap = new HashMap<String, OriginalSourceBase<?>>();
477 477

  
478
        state.getDataHolder().docSources = new ArrayList<String>();
479
        for (String[] fullReference : state.getDataHolder().referenceList) {
480
            String strReference=fullReference[0];
481
            String citationDetail = fullReference[1];
482
            String citationURL = fullReference[2];
478
            state.getDataHolder().docSources = new ArrayList<String>();
479
            for (String[] fullReference : state.getDataHolder().referenceList) {
480
                String strReference=fullReference[0];
481
                String citationDetail = fullReference[1];
482
                String citationURL = fullReference[2];
483 483

  
484
            if (!citationURL.isEmpty()) {
485
                citationDetail+=", "+citationURL;
486
            }
484
                if (!citationURL.isEmpty()) {
485
                    citationDetail+=", "+citationURL;
486
                }
487 487

  
488
            Reference reference;
489
            if(strReference.equals(state.getRef().getTitleCache())){
490
                reference = state.getRef();
491
            }
492
            else{
493
                reference = ReferenceFactory.newGeneric();
494
                reference.setTitle(strReference);
495
            }
488
                Reference reference;
489
                if(strReference.equals(state.getRef().getTitleCache())){
490
                    reference = state.getRef();
491
                }
492
                else{
493
                    reference = ReferenceFactory.newGeneric();
494
                    reference.setTitle(strReference);
495
                }
496 496

  
497
            IdentifiableSource sour = getIdentifiableSource(reference,citationDetail);
497
                IdentifiableSource sour = getIdentifiableSource(reference,citationDetail);
498 498

  
499
            try{
500
                if (sour.getCitation() != null){
501
                    if(StringUtils.isNotBlank(sour.getCitationMicroReference())) {
502
                        state.getDataHolder().docSources.add(sour.getCitation().getTitleCache()+ "---"+sour.getCitationMicroReference());
503
                    } else {
504
                        state.getDataHolder().docSources.add(sour.getCitation().getTitleCache());
499
                try{
500
                    if (sour.getCitation() != null){
501
                        if(StringUtils.isNotBlank(sour.getCitationMicroReference())) {
502
                            state.getDataHolder().docSources.add(sour.getCitation().getTitleCache()+ "---"+sour.getCitationMicroReference());
503
                        } else {
504
                            state.getDataHolder().docSources.add(sour.getCitation().getTitleCache());
505
                        }
505 506
                    }
507
                }catch(Exception e){
508
                    logger.warn("oups");
506 509
                }
507
            }catch(Exception e){
508
                logger.warn("oups");
510
                reference.addSource(sour);
511
                save(reference, state);
509 512
            }
510
            reference.addSource(sour);
511
            save(reference, state);
512
        }
513
        List<IdentifiableSource> issTmp = new ArrayList<IdentifiableSource>();//getCommonService().list(IdentifiableSource.class, null, null, null, null);
514
        List<DescriptionElementSource> issTmp2 = new ArrayList<DescriptionElementSource>();//getCommonService().list(DescriptionElementSource.class, null, null, null, null);
513
            List<IdentifiableSource> issTmp = new ArrayList<IdentifiableSource>();//getCommonService().list(IdentifiableSource.class, null, null, null, null);
514
            List<DescriptionElementSource> issTmp2 = new ArrayList<DescriptionElementSource>();//getCommonService().list(DescriptionElementSource.class, null, null, null, null);
515 515

  
516
        Set<OriginalSourceBase> osbSet = new HashSet<OriginalSourceBase>();
517
        if(issTmp2!=null) {
518
            osbSet.addAll(issTmp2);
519
        }
520
        if(issTmp!=null) {
521
            osbSet.addAll(issTmp);
522
        }
523

  
524
        addToSourceMap(sourceMap, osbSet);
525

  
526
        if( state.getConfig().isInteractWithUser()){
527
            List<OriginalSourceBase<?>>sources=null;
528
            if(!state.isDerivedUnitSourcesSet()){
529
                sources= sui.askForSource(sourceMap, "the unit itself","",getReferenceService(), state.getDataHolder().docSources);
530
                state.setDerivedUnitSources(sources);
531
                state.setDerivedUnitSourcesSet(true);
516
            Set<OriginalSourceBase> osbSet = new HashSet<OriginalSourceBase>();
517
            if(issTmp2!=null) {
518
                osbSet.addAll(issTmp2);
532 519
            }
533
            else{
534
                sources=state.getDerivedUnitSources();
520
            if(issTmp!=null) {
521
                osbSet.addAll(issTmp);
535 522
            }
536
//          System.out.println("nb sources: "+sources.size());
537
//          System.out.println("derivedunitfacade : "+derivedUnitFacade.getTitleCache());
538
            for (OriginalSourceBase<?> sour:sources){
539
                if(sour.isInstanceOf(IdentifiableSource.class)){
540
                    if(sourceNotLinkedToElement(derivedUnitFacade,sour)) {
541
//                      System.out.println("add source to derivedunitfacade1 "+derivedUnitFacade.getTitleCache());
542
                        derivedUnitFacade.addSource((IdentifiableSource)sour.clone());
543
                    }
544
                }else{
545
                    if(sourceNotLinkedToElement(derivedUnitFacade,sour)) {
546
//                      System.out.println("add source to derivedunitfacade2 "+derivedUnitFacade.getTitleCache());
547
                        derivedUnitFacade.addSource(OriginalSourceType.Import,sour.getCitation(),sour.getCitationMicroReference(), ioName);
548
                    }
523

  
524
            addToSourceMap(sourceMap, osbSet);
525

  
526
            if( state.getConfig().isInteractWithUser()){
527
                List<OriginalSourceBase<?>>sources=null;
528
                if(!state.isDerivedUnitSourcesSet()){
529
                    sources= sui.askForSource(sourceMap, "the unit itself","",getReferenceService(), state.getDataHolder().docSources);
530
                    state.setDerivedUnitSources(sources);
531
                    state.setDerivedUnitSourcesSet(true);
549 532
                }
550
            }
551
        }else{
552
            for (OriginalSourceBase<?> sr : sourceMap.values()){
553
                if(sr.isInstanceOf(IdentifiableSource.class)){
554
                    if(sourceNotLinkedToElement(derivedUnitFacade,sr)) {
555
//                      System.out.println("add source to derivedunitfacade3 "+derivedUnitFacade.getTitleCache());
556
                        derivedUnitFacade.addSource((IdentifiableSource)sr.clone());
533
                else{
534
                    sources=state.getDerivedUnitSources();
535
                }
536
    //          System.out.println("nb sources: "+sources.size());
537
    //          System.out.println("derivedunitfacade : "+derivedUnitFacade.getTitleCache());
538
                for (OriginalSourceBase<?> sour:sources){
539
                    if(sour.isInstanceOf(IdentifiableSource.class)){
540
                        if(sourceNotLinkedToElement(derivedUnitFacade,sour)) {
541
    //                      System.out.println("add source to derivedunitfacade1 "+derivedUnitFacade.getTitleCache());
542
                            derivedUnitFacade.addSource((IdentifiableSource)sour.clone());
543
                        }
544
                    }else{
545
                        if(sourceNotLinkedToElement(derivedUnitFacade,sour)) {
546
    //                      System.out.println("add source to derivedunitfacade2 "+derivedUnitFacade.getTitleCache());
547
                            derivedUnitFacade.addSource(OriginalSourceType.Import,sour.getCitation(),sour.getCitationMicroReference(), ioName);
548
                        }
557 549
                    }
558
                }else{
559
                    if(sourceNotLinkedToElement(derivedUnitFacade,sr)) {
560
//                      System.out.println("add source to derivedunitfacade4 "+derivedUnitFacade.getTitleCache());
561
                        derivedUnitFacade.addSource(OriginalSourceType.Import,sr.getCitation(),sr.getCitationMicroReference(), ioName);
550
                }
551
            }else{
552
                for (OriginalSourceBase<?> sr : sourceMap.values()){
553
                    if(sr.isInstanceOf(IdentifiableSource.class)){
554
                        if(sourceNotLinkedToElement(derivedUnitFacade,sr)) {
555
    //                      System.out.println("add source to derivedunitfacade3 "+derivedUnitFacade.getTitleCache());
556
                            derivedUnitFacade.addSource((IdentifiableSource)sr.clone());
557
                        }
558
                    }else{
559
                        if(sourceNotLinkedToElement(derivedUnitFacade,sr)) {
560
    //                      System.out.println("add source to derivedunitfacade4 "+derivedUnitFacade.getTitleCache());
561
                            derivedUnitFacade.addSource(OriginalSourceType.Import,sr.getCitation(),sr.getCitationMicroReference(), ioName);
562
                        }
562 563
                    }
563 564
                }
564 565
            }
565
        }
566 566

  
567
        save(item, state);
567
            save(item, state);
568 568

  
569
        if(DEBUG) {
570
            logger.info("saved ABCD specimen ...");
571
        }
569
            if(DEBUG) {
570
                logger.info("saved ABCD specimen ...");
571
            }
572 572

  
573
        // handle identifications
574
        handleIdentifications(state, derivedUnitFacade);
573
            // handle identifications
574
            handleIdentifications(state, derivedUnitFacade);
575 575

  
576
        //associatedUnits
577
        importAssociatedUnits(state, item, derivedUnitFacade);
576
            //associatedUnits
577
            importAssociatedUnits(state, item, derivedUnitFacade);
578 578

  
579 579

  
580 580

  
581
    } catch (Exception e) {
582
        String message = "Error when reading record!";
583
        logger.warn(message);
584
        state.getReport().addException(message, e);
585
        e.printStackTrace();
586
        state.setUnsuccessfull();
581
        } catch (Exception e) {
582
            String message = "Error when reading record!";
583
            logger.warn(message);
584
            state.getReport().addException(message, e);
585
            e.printStackTrace();
586
            state.setUnsuccessfull();
587
        }
588
    */
589
        return;
587 590
    }
588
*/
589
    return;
590
}
591

  
592

  
593
/**
594
 * @param state
595
 * @param derivedUnitFacade
596
 */
597
private void handleCollectionData(
598
        SpecimenImportStateBase<SpecimenImportConfiguratorBase, SpecimenImportStateBase> state,
599
        DerivedUnitFacade derivedUnitFacade) {
600
   eu.etaxonomy.cdm.model.occurrence.Collection collection = derivedUnitFacade.getCollection();
601
   if (collection != null) {
602
       Institution institution = getInstitution(collection.getInstitute().getCode(), state);
603

  
604
       collection = getCollection(institution, collection.getCode(), state);
605
   }
606

  
607
}
608 591

  
609 592

  
593
    /**
594
     * @param state
595
     * @param derivedUnitFacade
596
     */
597
    private void handleCollectionData(
598
            SpecimenImportStateBase<SpecimenImportConfiguratorBase, SpecimenImportStateBase> state,
599
            DerivedUnitFacade derivedUnitFacade) {
600
       eu.etaxonomy.cdm.model.occurrence.Collection collection = derivedUnitFacade.getCollection();
601
       if (collection != null) {
602
           Institution institution = getInstitution(collection.getInstitute().getCode(), state);
610 603

  
604
           collection = getCollection(institution, collection.getCode(), state);
605
       }
611 606

  
607
    }
612 608

  
613 609

  
614
/**
615
 * @param state
616
 * @param derivedUnitFacade
617
 */
618
private void handleDeterminations(
619
        SpecimenImportStateBase<SpecimenImportConfiguratorBase, SpecimenImportStateBase> state,
620
        DerivedUnitFacade derivedUnitFacade) {
621
    SpecimenImportConfiguratorBase config = state.getConfig();
610
    /**
611
     * @param state
612
     * @param derivedUnitFacade
613
     */
614
    private void handleDeterminations(
615
            SpecimenImportStateBase<SpecimenImportConfiguratorBase, SpecimenImportStateBase> state,
616
            DerivedUnitFacade derivedUnitFacade) {
617
        SpecimenImportConfiguratorBase config = state.getConfig();
622 618

  
623 619

  
624
    String scientificName = "";
625
    boolean preferredFlag = false;
620
        String scientificName = "";
621
        boolean preferredFlag = false;
626 622

  
627
    if (state.getDataHolder().getNomenclatureCode() == ""){
628
        state.getDataHolder().setNomenclatureCode(config.getNomenclaturalCode().toString());
629
    }
630
    Set<DeterminationEvent> determinations =  derivedUnitFacade.getDeterminations();
631
    Iterator<DeterminationEvent> determinationIterator = determinations.iterator();
632
    DeterminationEvent event;
633
    Taxon taxon;
634
    TaxonName name ;
635
    while (determinationIterator.hasNext()) {
636
        event = determinationIterator.next();
637
        taxon = (Taxon)event.getTaxon();
638
        if (taxon == null){
639
            name = event.getTaxonName();
640
            if (!name.getTaxa().isEmpty()){
641
                taxon = (Taxon)name.getTaxa().iterator().next();
642
            }
623
        if (state.getDataHolder().getNomenclatureCode() == ""){
624
            state.getDataHolder().setNomenclatureCode(config.getNomenclaturalCode().toString());
643 625
        }
644
        if (taxon != null){
645
            addTaxonNode(taxon, state,preferredFlag);
646
            linkDeterminationEvent(state, taxon, preferredFlag, derivedUnitFacade, null, null);
626
        Set<DeterminationEvent> determinations =  derivedUnitFacade.getDeterminations();
627
        Iterator<DeterminationEvent> determinationIterator = determinations.iterator();
628
        DeterminationEvent event;
629
        Taxon taxon;
630
        TaxonName name ;
631
        while (determinationIterator.hasNext()) {
632
            event = determinationIterator.next();
633
            taxon = (Taxon)event.getTaxon();
634
            if (taxon == null){
635
                name = event.getTaxonName();
636
                if (!name.getTaxa().isEmpty()){
637
                    taxon = name.getTaxa().iterator().next();
638
                }
639
            }
640
            if (taxon != null){
641
                addTaxonNode(taxon, state,preferredFlag);
642
                linkDeterminationEvent(state, taxon, preferredFlag, derivedUnitFacade, null, null);
643
            }
647 644
        }
648
    }
649 645

  
650
}
646
    }
651 647

  
652
/**
653
 * @param names
654
 * @param item
655
 */
656
private TaxonName findBestMatchingNames(GbifResponse item, SpecimenImportStateBase state) {
657
   //TODO
658
    if (item.getScientificName() != null){
659

  
660
       List<TaxonName> names = findExistingNames(item.getScientificName().getNameCache(), state);
661
       if (!names.isEmpty()){
662
           TaxonName result = names.get(0);
663
           Set<DeterminationEvent> detEvents = item.getDerivedUnitFacade().baseUnit().getDeterminations();
664
           for (DeterminationEvent event:detEvents){
665
               if(event.getTaxonName().getNameCache().equals(result.getNameCache()) ){
666
                  event.setTaxonName(result);
667
               } else{
668
                   names = findExistingNames(event.getTaxonName().getNameCache(), state);
669
                   if (!names.isEmpty()){
670
                       event.setTaxonName(names.get(0));
648
    /**
649
     * @param names
650
     * @param item
651
     */
652
    private TaxonName findBestMatchingNames(GbifResponse item, SpecimenImportStateBase state) {
653
       //TODO
654
        if (item.getScientificName() != null){
655

  
656
           List<TaxonName> names = findExistingNames(item.getScientificName().getNameCache(), state);
657
           if (!names.isEmpty()){
658
               TaxonName result = names.get(0);
659
               Set<DeterminationEvent> detEvents = item.getDerivedUnitFacade().baseUnit().getDeterminations();
660
               for (DeterminationEvent event:detEvents){
661
                   if(event.getTaxonName().getNameCache().equals(result.getNameCache()) ){
662
                      event.setTaxonName(result);
663
                   } else{
664
                       names = findExistingNames(event.getTaxonName().getNameCache(), state);
665
                       if (!names.isEmpty()){
666
                           event.setTaxonName(names.get(0));
667
                       }
671 668
                   }
672 669
               }
670
               return result;
673 671
           }
674
           return result;
675
       }
676
    }
677
   return null;
678

  
679
}
680

  
681

  
682

  
683
/**
684
 * @param titleCache
685
 * @param state
686
 * @return
687
 */
688
private List<TaxonName> findExistingNames(String nameCache, SpecimenImportStateBase state) {
689
    return getNameService().findNamesByNameCache(nameCache, MatchMode.LIKE, null);
690
}
691

  
692

  
693

  
672
        }
673
       return null;
694 674

  
675
    }
695 676

  
696 677

  
697
/* (non-Javadoc)
698
 * @see eu.etaxonomy.cdm.io.common.CdmIoBase#isIgnore(eu.etaxonomy.cdm.io.common.IoStateBase)
699
 */
700
@Override
701
protected boolean isIgnore(SpecimenImportStateBase<SpecimenImportConfiguratorBase, SpecimenImportStateBase> state) {
702 678

  
703
    return false;
704
}
679
    /**
680
     * @param titleCache
681
     * @param state
682
     * @return
683
     */
684
    private List<TaxonName> findExistingNames(String nameCache, SpecimenImportStateBase state) {
685
        return getNameService().findNamesByNameCache(nameCache, MatchMode.LIKE, null);
686
    }
705 687

  
706 688

  
707 689

  
690
    @Override
691
    protected boolean isIgnore(SpecimenImportStateBase<SpecimenImportConfiguratorBase, SpecimenImportStateBase> state) {
692
        return false;
693
    }
708 694

  
709 695

  
710 696

  
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/occurrence/SpecimenOrObservationBase.java
182 182
    private Integer individualCount;
183 183

  
184 184
    /**
185
     * The preferred stable identifer (URI) as discussed in
185
     * The preferred stable identifier (URI) as discussed in
186 186
     * {@link  http://dev.e-taxonomy.eu/trac/ticket/5606}
187 187
     */
188 188
    @XmlElement(name = "PreferredStableUri")
cdmlib-model/src/test/java/eu/etaxonomy/cdm/model/occurrence/SpecimenTest.java
41 41
import eu.etaxonomy.cdm.model.common.MarkerType;
42 42
import eu.etaxonomy.cdm.model.common.OriginalSourceBase;
43 43
import eu.etaxonomy.cdm.model.description.SpecimenDescription;
44
import eu.etaxonomy.cdm.model.media.Media;
45 44
import eu.etaxonomy.cdm.model.media.Rights;
46 45
import eu.etaxonomy.cdm.model.molecular.DnaSample;
47 46
import eu.etaxonomy.cdm.model.name.Rank;
......
70 69
	public void testNewInstance() {
71 70
		DerivedUnit specimen = DerivedUnit.NewPreservedSpecimenInstance();
72 71
		assertNotNull(specimen);
73
		assertTrue(specimen instanceof DerivedUnit);
74 72
		assertTrue(specimen.getRecordBasis().equals(SpecimenOrObservationType.PreservedSpecimen));
75 73
	}
76 74

  
......
234 232
			// TODO Auto-generated catch block
235 233
			e.printStackTrace();
236 234
		}
237
		DerivedUnit nextVersion = DerivedUnit.NewPreservedSpecimenInstance();
238
		DerivedUnit previousVersion = DerivedUnit.NewPreservedSpecimenInstance();
235
//		DerivedUnit nextVersion = DerivedUnit.NewPreservedSpecimenInstance();
236
//		DerivedUnit previousVersion = DerivedUnit.NewPreservedSpecimenInstance();
239 237
		PreservationMethod preservation = PreservationMethod.NewInstance();
240 238
		boolean protectedTitleCache = true;
241 239
		DefinedTerm sex = DefinedTerm.SEX_FEMALE();
......
255 253
		extension.setValue("extension");
256 254
		Marker marker = Marker.NewInstance(MarkerType.COMPLETE(), false);
257 255
		Rights right = Rights.NewInstance("right", Language.DEFAULT());
258
		Media media = Media.NewInstance();
256
//		Media media = Media.NewInstance();
259 257
		IdentifiableSource source = IdentifiableSource.NewDataImportInstance("12", "idNamespace");
260 258

  
261 259
		specimen.setAccessionNumber(accessionNumber);
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/dto/dwc/SimpleDarwinRecord.java
1 1
//
2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
3
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4
// Any modifications to this file will be lost upon recompilation of the source schema. 
5
// Generated on: 2010.09.06 at 10:10:43 AM MESZ 
2
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
3
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
4
// Any modifications to this file will be lost upon recompilation of the source schema.
5
// Generated on: 2010.09.06 at 10:10:43 AM MESZ
6 6
//
7 7

  
8 8

  
......
20 20

  
21 21
/**
22 22
 * <p>Java class for anonymous complex type.
23
 * 
23
 *
24 24
 * <p>The following schema fragment specifies the expected content contained within this class.
25
 * 
25
 *
26 26
 * <pre>
27 27
 * &lt;complexType>
28 28
 *   &lt;complexContent>
......
189 189
 *   &lt;/complexContent>
190 190
 * &lt;/complexType>
191 191
 * </pre>
192
 * 
193
 * 
192
 *
193
 *
194 194
 */
195 195
@XmlAccessorType(XmlAccessType.FIELD)
196 196
@XmlType(name = "", propOrder = {
......
522 522

  
523 523
    /**
524 524
     * Gets the value of the type property.
525
     * 
525
     *
526 526
     * @return
527 527
     *     possible object is
528 528
     *     {@link String }
529
     *     
529
     *
530 530
     */
531 531
    public String getType() {
532 532
        return type;
......
534 534

  
535 535
    /**
536 536
     * Sets the value of the type property.
537
     * 
537
     *
538 538
     * @param value
539 539
     *     allowed object is
540 540
     *     {@link String }
541
     *     
541
     *
542 542
     */
543 543
    public void setType(String value) {
544 544
        this.type = value;
......
546 546

  
547 547
    /**
548 548
     * Gets the value of the modified property.
549
     * 
549
     *
550 550
     * @return
551 551
     *     possible object is
552 552
     *     {@link XMLGregorianCalendar }
553
     *     
553
     *
554 554
     */
555 555
    public XMLGregorianCalendar getModified() {
556 556
        return modified;
......
558 558

  
559 559
    /**
560 560
     * Sets the value of the modified property.
561
     * 
561
     *
562 562
     * @param value
563 563
     *     allowed object is
564 564
     *     {@link XMLGregorianCalendar }
565
     *     
565
     *
566 566
     */
567 567
    public void setModified(XMLGregorianCalendar value) {
568 568
        this.modified = value;
......
570 570

  
571 571
    /**
572 572
     * Gets the value of the language property.
573
     * 
573
     *
574 574
     * @return
575 575
     *     possible object is
576 576
     *     {@link String }
577
     *     
577
     *
578 578
     */
579 579
    public String getLanguage() {
580 580
        return language;
......
582 582

  
583 583
    /**
584 584
     * Sets the value of the language property.
585
     * 
585
     *
586 586
     * @param value
587 587
     *     allowed object is
588 588
     *     {@link String }
589
     *     
589
     *
590 590
     */
591 591
    public void setLanguage(String value) {
592 592
        this.language = value;
......
594 594

  
595 595
    /**
596 596
     * Gets the value of the rights property.
597
     * 
597
     *
598 598
     * @return
599 599
     *     possible object is
600 600
     *     {@link String }
601
     *     
601
     *
602 602
     */
603 603
    public String getRights() {
604 604
        return rights;
......
606 606

  
607 607
    /**
608 608
     * Sets the value of the rights property.
609
     * 
609
     *
610 610
     * @param value
611 611
     *     allowed object is
612 612
     *     {@link String }
613
     *     
613
     *
614 614
     */
615 615
    public void setRights(String value) {
616 616
        this.rights = value;
......
618 618

  
619 619
    /**
620 620
     * Gets the value of the rightsHolder property.
621
     * 
621
     *
622 622
     * @return
623 623
     *     possible object is
624 624
     *     {@link String }
625
     *     
625
     *
626 626
     */
627 627
    public String getRightsHolder() {
628 628
        return rightsHolder;
......
630 630

  
631 631
    /**
632 632
     * Sets the value of the rightsHolder property.
633
     * 
633
     *
634 634
     * @param value
635 635
     *     allowed object is
636 636
     *     {@link String }
637
     *     
637
     *
638 638
     */
639 639
    public void setRightsHolder(String value) {
640 640
        this.rightsHolder = value;
......
642 642

  
643 643
    /**
644 644
     * Gets the value of the accessRights property.
645
     * 
645
     *
646 646
     * @return
647 647
     *     possible object is
648 648
     *     {@link String }
649
     *     
649
     *
650 650
     */
651 651
    public String getAccessRights() {
652 652
        return accessRights;
......
654 654

  
655 655
    /**
656 656
     * Sets the value of the accessRights property.
657
     * 
657
     *
658 658
     * @param value
659 659
     *     allowed object is
660 660
     *     {@link String }
661
     *     
661
     *
662 662
     */
663 663
    public void setAccessRights(String value) {
664 664
        this.accessRights = value;
......
666 666

  
667 667
    /**
668 668
     * Gets the value of the bibliographicCitation property.
669
     * 
669
     *
670 670
     * @return
671 671
     *     possible object is
672 672
     *     {@link String }
673
     *     
673
     *
674 674
     */
675 675
    public String getBibliographicCitation() {
676 676
        return bibliographicCitation;
......
678 678

  
679 679
    /**
680 680
     * Sets the value of the bibliographicCitation property.
681
     * 
681
     *
682 682
     * @param value
683 683
     *     allowed object is
684 684
     *     {@link String }
685
     *     
685
     *
686 686
     */
687 687
    public void setBibliographicCitation(String value) {
688 688
        this.bibliographicCitation = value;
......
690 690

  
691 691
    /**
692 692
     * Gets the value of the institutionID property.
693
     * 
693
     *
694 694
     * @return
695 695
     *     possible object is
696 696
     *     {@link String }
697
     *     
697
     *
698 698
     */
699 699
    public String getInstitutionID() {
700 700
        return institutionID;
......
702 702

  
703 703
    /**
704 704
     * Sets the value of the institutionID property.
705
     * 
705
     *
706 706
     * @param value
707 707
     *     allowed object is
708 708
     *     {@link String }
709
     *     
709
     *
710 710
     */
711 711
    public void setInstitutionID(String value) {
712 712
        this.institutionID = value;
......
714 714

  
715 715
    /**
716 716
     * Gets the value of the collectionID property.
717
     * 
717
     *
718 718
     * @return
719 719
     *     possible object is
720 720
     *     {@link String }
721
     *     
721
     *
722 722
     */
723 723
    public String getCollectionID() {
724 724
        return collectionID;
......
726 726

  
727 727
    /**
728 728
     * Sets the value of the collectionID property.
729
     * 
729
     *
730 730
     * @param value
731 731
     *     allowed object is
732 732
     *     {@link String }
733
     *     
733
     *
734 734
     */
735 735
    public void setCollectionID(String value) {
736 736
        this.collectionID = value;
......
738 738

  
739 739
    /**
740 740
     * Gets the value of the datasetID property.
741
     * 
741
     *
742 742
     * @return
743 743
     *     possible object is
744 744
     *     {@link String }
745
     *     
745
     *
746 746
     */
747 747
    public String getDatasetID() {
748 748
        return datasetID;
......
750 750

  
751 751
    /**
752 752
     * Sets the value of the datasetID property.
753
     * 
753
     *
754 754
     * @param value
755 755
     *     allowed object is
756 756
     *     {@link String }
757
     *     
757
     *
758 758
     */
759 759
    public void setDatasetID(String value) {
760 760
        this.datasetID = value;
......
762 762

  
763 763
    /**
764 764
     * Gets the value of the institutionCode property.
765
     * 
765
     *
766 766
     * @return
767 767
     *     possible object is
768 768
     *     {@link String }
769
     *     
769
     *
770 770
     */
771 771
    public String getInstitutionCode() {
772 772
        return institutionCode;
......
774 774

  
775 775
    /**
776 776
     * Sets the value of the institutionCode property.
777
     * 
777
     *
778 778
     * @param value
779 779
     *     allowed object is
780 780
     *     {@link String }
781
     *     
781
     *
782 782
     */
783 783
    public void setInstitutionCode(String value) {
784 784
        this.institutionCode = value;
......
786 786

  
787 787
    /**
788 788
     * Gets the value of the collectionCode property.
789
     * 
789
     *
790 790
     * @return
791 791
     *     possible object is
792 792
     *     {@link String }
793
     *     
793
     *
794 794
     */
795 795
    public String getCollectionCode() {
796 796
        return collectionCode;
......
798 798

  
799 799
    /**
800 800
     * Sets the value of the collectionCode property.
801
     * 
801
     *
802 802
     * @param value
803 803
     *     allowed object is
804 804
     *     {@link String }
805
     *     
805
     *
806 806
     */
807 807
    public void setCollectionCode(String value) {
808 808
        this.collectionCode = value;
......
810 810

  
811 811
    /**
812 812
     * Gets the value of the datasetName property.
813
     * 
813
     *
814 814
     * @return
815 815
     *     possible object is
816 816
     *     {@link String }
817
     *     
817
     *
818 818
     */
819 819
    public String getDatasetName() {
820 820
        return datasetName;
......
822 822

  
823 823
    /**
824 824
     * Sets the value of the datasetName property.
825
     * 
825
     *
826 826
     * @param value
827 827
     *     allowed object is
828 828
     *     {@link String }
829
     *     
829
     *
830 830
     */
831 831
    public void setDatasetName(String value) {
832 832
        this.datasetName = value;
......
834 834

  
835 835
    /**
836 836
     * Gets the value of the ownerInstitutionCode property.
837
     * 
837
     *
838 838
     * @return
839 839
     *     possible object is
840 840
     *     {@link String }
841
     *     
841
     *
842 842
     */
843 843
    public String getOwnerInstitutionCode() {
844 844
        return ownerInstitutionCode;
......
846 846

  
847 847
    /**
848 848
     * Sets the value of the ownerInstitutionCode property.
849
     * 
849
     *
850 850
     * @param value
851 851
     *     allowed object is
852 852
     *     {@link String }
853
     *     
853
     *
854 854
     */
855 855
    public void setOwnerInstitutionCode(String value) {
856 856
        this.ownerInstitutionCode = value;
......
858 858

  
859 859
    /**
860 860
     * Gets the value of the basisOfRecord property.
861
     * 
861
     *
862 862
     * @return
863 863
     *     possible object is
864 864
     *     {@link String }
865
     *     
865
     *
866 866
     */
867 867
    public String getBasisOfRecord() {
868 868
        return basisOfRecord;
......
870 870

  
871 871
    /**
872 872
     * Sets the value of the basisOfRecord property.
873
     * 
873
     *
874 874
     * @param value
875 875
     *     allowed object is
876 876
     *     {@link String }
877
     *     
877
     *
878 878
     */
879 879
    public void setBasisOfRecord(String value) {
880 880
        this.basisOfRecord = value;
......
882 882

  
883 883
    /**
884 884
     * Gets the value of the informationWithheld property.
885
     * 
885
     *
886 886
     * @return
887 887
     *     possible object is
888 888
     *     {@link String }
889
     *     
889
     *
890 890
     */
891 891
    public String getInformationWithheld() {
892 892
        return informationWithheld;
......
894 894

  
895 895
    /**
896 896
     * Sets the value of the informationWithheld property.
897
     * 
897
     *
898 898
     * @param value
899 899
     *     allowed object is
900 900
     *     {@link String }
901
     *     
901
     *
902 902
     */
903 903
    public void setInformationWithheld(String value) {
904 904
        this.informationWithheld = value;
......
906 906

  
907 907
    /**
908 908
     * Gets the value of the dataGeneralizations property.
909
     * 
909
     *
910 910
     * @return
911 911
     *     possible object is
912 912
     *     {@link String }
913
     *     
913
     *
914 914
     */
915 915
    public String getDataGeneralizations() {
916 916
        return dataGeneralizations;
......
918 918

  
919 919
    /**
920 920
     * Sets the value of the dataGeneralizations property.
921
     * 
921
     *
922 922
     * @param value
923 923
     *     allowed object is
924 924
     *     {@link String }
925
     *     
925
     *
926 926
     */
927 927
    public void setDataGeneralizations(String value) {
928 928
        this.dataGeneralizations = value;
......
930 930

  
931 931
    /**
932 932
     * Gets the value of the dynamicProperties property.
933
     * 
933
     *
934 934
     * @return
935 935
     *     possible object is
936 936
     *     {@link String }
937
     *     
937
     *
938 938
     */
939 939
    public String getDynamicProperties() {
940 940
        return dynamicProperties;
......
942 942

  
943 943
    /**
944 944
     * Sets the value of the dynamicProperties property.
945
     * 
945
     *
946 946
     * @param value
947 947
     *     allowed object is
948 948
     *     {@link String }
949
     *     
949
     *
950 950
     */
951 951
    public void setDynamicProperties(String value) {
952 952
        this.dynamicProperties = value;
......
954 954

  
955 955
    /**
956 956
     * Gets the value of the occurrenceID property.
957
     * 
957
     *
958 958
     * @return
959 959
     *     possible object is
960 960
     *     {@link String }
961
     *     
961
     *
962 962
     */
963 963
    public String getOccurrenceID() {
964 964
        return occurrenceID;
......
966 966

  
967 967
    /**
968 968
     * Sets the value of the occurrenceID property.
969
     * 
969
     *
970 970
     * @param value
971 971
     *     allowed object is
972 972
     *     {@link String }
973
     *     
973
     *
974 974
     */
975 975
    public void setOccurrenceID(String value) {
976 976
        this.occurrenceID = value;
......
978 978

  
979 979
    /**
980 980
     * Gets the value of the catalogNumber property.
981
     * 
981
     *
982 982
     * @return
983 983
     *     possible object is
984 984
     *     {@link String }
985
     *     
985
     *
986 986
     */
987 987
    public String getCatalogNumber() {
988 988
        return catalogNumber;
......
990 990

  
991 991
    /**
992 992
     * Sets the value of the catalogNumber property.
993
     * 
993
     *
994 994
     * @param value
995 995
     *     allowed object is
996 996
     *     {@link String }
997
     *     
997
     *
998 998
     */
999 999
    public void setCatalogNumber(String value) {
1000 1000
        this.catalogNumber = value;
......
1002 1002

  
1003 1003
    /**
1004 1004
     * Gets the value of the occurrenceDetails property.
1005
     * 
1005
     *
1006 1006
     * @return
1007 1007
     *     possible object is
1008 1008
     *     {@link String }
1009
     *     
1009
     *
1010 1010
     */
1011 1011
    public String getOccurrenceDetails() {
1012 1012
        return occurrenceDetails;
......
1014 1014

  
1015 1015
    /**
1016 1016
     * Sets the value of the occurrenceDetails property.
1017
     * 
1017
     *
1018 1018
     * @param value
1019 1019
     *     allowed object is
1020 1020
     *     {@link String }
1021
     *     
1021
     *
1022 1022
     */
1023 1023
    public void setOccurrenceDetails(String value) {
1024 1024
        this.occurrenceDetails = value;
......
1026 1026

  
1027 1027
    /**
1028 1028
     * Gets the value of the occurrenceRemarks property.
1029
     * 
1029
     *
1030 1030
     * @return
1031 1031
     *     possible object is
1032 1032
     *     {@link String }
1033
     *     
1033
     *
1034 1034
     */
1035 1035
    public String getOccurrenceRemarks() {
1036 1036
        return occurrenceRemarks;
......
1038 1038

  
1039 1039
    /**
1040 1040
     * Sets the value of the occurrenceRemarks property.
1041
     * 
1041
     *
1042 1042
     * @param value
1043 1043
     *     allowed object is
1044 1044
     *     {@link String }
1045
     *     
1045
     *
1046 1046
     */
1047 1047
    public void setOccurrenceRemarks(String value) {
1048 1048
        this.occurrenceRemarks = value;
......
1050 1050

  
1051 1051
    /**
1052 1052
     * Gets the value of the recordNumber property.
1053
     * 
1053
     *
1054 1054
     * @return
1055 1055
     *     possible object is
1056 1056
     *     {@link String }
1057
     *     
1057
     *
1058 1058
     */
1059 1059
    public String getRecordNumber() {
1060 1060
        return recordNumber;
......
1062 1062

  
1063 1063
    /**
1064 1064
     * Sets the value of the recordNumber property.
1065
     * 
1065
     *
1066 1066
     * @param value
1067 1067
     *     allowed object is
1068 1068
     *     {@link String }
1069
     *     
1069
     *
1070 1070
     */
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)