Project

General

Profile

« Previous | Next » 

Revision e890a76e

Added by Andreas Müller over 5 years ago

cleanup

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelTaxonRelationImport.java
236 236
	@Override
237 237
	public boolean doPartition(ResultSetPartitioner partitioner, BerlinModelImportState state) {
238 238
		boolean success = true ;
239
		Set<TaxonBase> taxaToSave = new HashSet<TaxonBase>();
239
		Set<TaxonBase> taxaToSave = new HashSet<>();
240 240
		Map<String, TaxonBase> taxonMap = partitioner.getObjectMap(BerlinModelTaxonImport.NAMESPACE);
241
		Map<Integer, Classification> classificationMap = new HashMap<Integer, Classification>();
241
		Map<Integer, Classification> classificationMap = new HashMap<>();
242 242
		Map<String, Reference> refMap = partitioner.getObjectMap(BerlinModelReferenceImport.REFERENCE_NAMESPACE);
243 243

  
244 244
		ResultSet rs = partitioner.getResultSet();
......
465 465
				}
466 466
			}
467 467
		} catch (SQLException e) {
468
			// TODO Auto-generated catch block
469 468
			e.printStackTrace();
470 469
		}
471 470
		commitTransaction(txStatus);
......
483 482
	}
484 483

  
485 484
	@Override
486
	public Map<Object, Map<String, ? extends CdmBase>> getRelatedObjectsForPartition( ResultSet rs, BerlinModelImportState state) {
485
	public Map<Object, Map<String, ? extends CdmBase>> getRelatedObjectsForPartition(ResultSet rs, BerlinModelImportState state) {
487 486
		String nameSpace;
488 487
		Class<?> cdmClass;
489 488
		Set<String> idSet;
490
		Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<Object, Map<String, ? extends CdmBase>>();
489
		Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<>();
491 490

  
492 491
		try{
493
			Set<String> taxonIdSet = new HashSet<String>();
494
			Set<String> referenceIdSet = new HashSet<String>();
495
//			Set<String> classificationIdSet = new HashSet<String>();
492
			Set<String> taxonIdSet = new HashSet<>();
493
			Set<String> referenceIdSet = new HashSet<>();
494
//			Set<String> classificationIdSet = new HashSet<>();
496 495
			while (rs.next()){
497 496
				handleForeignKey(rs, taxonIdSet, "taxon1Id");
498 497
				handleForeignKey(rs, taxonIdSet, "taxon2Id");
......
534 533
		String nameSpace;
535 534
		Class cdmClass;
536 535
		Set<String> idSet;
537
		Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<Object, Map<String, ? extends CdmBase>>();
536
		Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<>();
538 537

  
539 538
		try{
540
			Set<String> taxonIdSet = new HashSet<String>();
541
			Set<String> referenceIdSet = new HashSet<String>();
542
//			Set<String> classificationIdSet = new HashSet<String>();
539
			Set<String> taxonIdSet = new HashSet<>();
540
			Set<String> referenceIdSet = new HashSet<>();
541
//			Set<String> classificationIdSet = new HashSet<>();
543 542
			while (rs.next()){
544 543
				handleForeignKey(rs, taxonIdSet, "RIdentifier");
545 544
//				handleForeignKey(rs, classificationIdSet, "treeRefFk");
546
	}
545
			}
547 546

  
548 547
			//taxon map
549 548
			nameSpace = BerlinModelTaxonImport.NAMESPACE;
app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/validation/BerlinModelTaxonRelationImportValidator.java
354 354
	        }
355 355
	        return success;
356 356
	    }
357

  
358

  
359

  
360 357
}

Also available in: Unified diff