Project

General

Profile

« Previous | Next » 

Revision 712e980f

Added by Andreas Müller over 4 years ago

cleanup

View differences:

cdm-pesi/src/main/java/eu/etaxonomy/cdm/app/pesi/FauEu2CdmActivator.java
38 38

  
39 39
// ***************** ALL ************************************************//
40 40

  
41
//    UUID uuidTaxonNodeFilter = UUID.fromString("0e8bc793-f434-47c4-ba82-650c3bbd83bf");
42
    UUID uuidTaxonNodeFilter = UUID.fromString("7ee4983b-78a3-44c5-9af2-beb0494b5fc8");
41
//    >50 records
42
    UUID uuidTaxonNodeFilter = UUID.fromString("0e8bc793-f434-47c4-ba82-650c3bbd83bf");
43
    //>17000 records
44
//    UUID uuidTaxonNodeFilter = UUID.fromString("7ee4983b-78a3-44c5-9af2-beb0494b5fc8");
43 45

  
44 46

  
45 47
    private void doImport(ICdmDataSource source, ICdmDataSource destination, DbSchemaValidation hbm2dll){
......
55 57

  
56 58
        config.setCheck(check);
57 59
//        config.setRecordsPerTransaction(partitionSize);
58
//        config.setSourceRefUuid(PesiTransformer.uuidSourceRefErms);
59 60

  
60 61
        // invoke import
61 62
        CdmDefaultImport<FauEu2CdmImportConfigurator> myImport = new CdmDefaultImport<>();
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/fauEu2Cdm/FauEu2CdmImport.java
317 317

  
318 318
    private <T extends LanguageStringBase> T  handlePersisted(LanguageStringBase lsBase) throws IllegalAccessException, InvocationTargetException, NoSuchFieldException, SecurityException, IllegalArgumentException, NoSuchMethodException {
319 319
        T result = handlePersisted((AnnotatableEntity)lsBase);
320
        if (result ==null){
321
            return null;
322
        }
323 320
        result.setLanguage(detache(lsBase.getLanguage()));
324 321
        return result;
325 322
    }
326 323

  
327
    /**
328
     * @param classification
329
     * @return
330
     * @throws InvocationTargetException
331
     * @throws IllegalAccessException
332
     * @throws IllegalArgumentException
333
     * @throws SecurityException
334
     * @throws NoSuchFieldException
335
     * @throws NoSuchMethodException
336
     */
337 324
    private <T extends IdentifiableEntity> T  handlePersisted(IdentifiableEntity identifiableEntity) throws IllegalAccessException, InvocationTargetException, NoSuchFieldException, SecurityException, IllegalArgumentException, NoSuchMethodException {
338 325
        T result = handlePersisted((SourcedEntityBase)identifiableEntity);
339 326
        if (result ==null){
......
348 335

  
349 336
    private <T extends TeamOrPersonBase> T  handlePersisted(TeamOrPersonBase teamOrPerson) throws IllegalAccessException, InvocationTargetException, NoSuchFieldException, SecurityException, IllegalArgumentException, NoSuchMethodException {
350 337
        T result = handlePersisted((AgentBase)teamOrPerson);
351
        if (result ==null){
352
            return null;
353
        }
354 338
        return result;
355 339
    }
356 340

  
......
362 346

  
363 347
    private <T extends TaxonBase> T  handlePersisted(TaxonBase taxonBase) throws IllegalAccessException, InvocationTargetException, NoSuchFieldException, SecurityException, IllegalArgumentException, NoSuchMethodException {
364 348
        T result = handlePersisted((IdentifiableEntity)taxonBase);
365
        if (result ==null){
366
            return null;
367
        }
368 349
        result.setName(detache(taxonBase.getName()));
369 350
        result.setSec(detache(taxonBase.getSec()));
370
//        handleCollection(result, IdentifiableEntity.class, "credits", Credit.class);
371
//        handleCollection(result, IdentifiableEntity.class, "extensions", Extension.class);
372
//        handleCollection(result, IdentifiableEntity.class, "identifiers", Identifier.class);
373
//        handleCollection(result, IdentifiableEntity.class, "rights", Rights.class);
374 351
        return result;
375 352
    }
376 353

  
cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/faunaEuropaea/FaunaEuropaeaAuthorImport.java
32 32
/**
33 33
 * @author a.babadshanjan
34 34
 * @since 12.05.2009
35
 * @version 1.0
36 35
 */
37 36
@Component
38 37
public class FaunaEuropaeaAuthorImport extends FaunaEuropaeaImportBase {
39 38

  
40
    /**
41
     *
42
     */
43 39
    private static final long serialVersionUID = 1L;
44 40

  
45 41
    private static final Logger logger = Logger.getLogger(FaunaEuropaeaAuthorImport.class);
......
55 51
	protected static String test = "(, \\s(?!([A-Z].|\\s|$))|,$)" ;
56 52
	//protected static String test = "((,\\s("+capitalWord+")+)|(,($|,?!(\\s))))";
57 53

  
58

  
59
	/* (non-Javadoc)
60
	 * @see eu.etaxonomy.cdm.io.common.CdmIoBase#doCheck(eu.etaxonomy.cdm.io.common.IImportConfigurator)
61
	 */
62 54
	@Override
63 55
	protected boolean doCheck(FaunaEuropaeaImportState state){
64 56
		boolean result = true;
......
67 59
		return result;
68 60
	}
69 61

  
70
	/* (non-Javadoc)
71
	 * @see eu.etaxonomy.cdm.io.common.CdmIoBase#doInvoke(eu.etaxonomy.cdm.io.common.IImportConfigurator, eu.etaxonomy.cdm.api.application.CdmApplicationController, java.util.Map)
72
	 */
73 62
	@Override
74 63
	protected void doInvoke(FaunaEuropaeaImportState state){
75 64
		/*
......
166 155
		}
167 156
	}
168 157

  
169
	/* (non-Javadoc)
170
	 * @see eu.etaxonomy.cdm.io.common.CdmIoBase#isIgnore(eu.etaxonomy.cdm.io.common.IImportConfigurator)
171
	 */
172 158
	@Override
173 159
    protected boolean isIgnore(FaunaEuropaeaImportState state){
174 160
		return ! state.getConfig().isDoAuthors();

Also available in: Unified diff