Project

General

Profile

« Previous | Next » 

Revision e7c688e7

Added by Andreas Müller almost 4 years ago

cleanup

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/app/cyprus/CyprusImagesActivator.java
86 86

  
87 87
    private ImportDeduplicationHelper<SimpleExcelTaxonImportState<?>> deduplicationHelper;
88 88

  
89

  
90
	private void doImport(ICdmDataSource cdmDestination){
89
    private void doImport(ICdmDataSource cdmDestination){
91 90

  
92 91
		CdmApplicationController app = CdmIoApplicationController.NewInstance(cdmDestination, DbSchemaValidation.VALIDATE);
93 92
		TransactionStatus tx = app.startTransaction();
......
132 131
		app.commitTransaction(tx);
133 132
	}
134 133

  
135
    /**
136
     * @param app
137
     * @param taxon
138
     * @param fileName
139
     */
140 134
    private void handleTaxon(CdmApplicationController app, Taxon taxon, String fileName) {
141 135
        Set<String> urlStr = getAllExistingUrls(taxon);
142 136
        String fullName = urlPath + fileName;
......
181 175
        }
182 176
    }
183 177

  
184
    /**
185
     * @param media
186
     */
187 178
    private void makeMetaData(Media media, String fileName, boolean updateOnly) {
188 179

  
189 180
        File file = new File(path + fileName);
......
230 221
            e1.printStackTrace();
231 222
        }
232 223

  
233

  
234 224
        AgentBase<?> artistAgent = null;
235 225
        Rights right = null;
236 226
        DateTime createdDate = null;
......
295 285
        }
296 286
    }
297 287

  
298
    /**
299
     * @param artist
300
     * @return
301
     */
302 288
    private Person makePerson(String artist, String fileName) {
303 289
        artist = artist.trim();
304 290
        String regEx = "((?:[A-Z]\\. ?)+)([A-Z][a-z\\-\u00E4\u00F6\u00FC]+)";
......
345 331

  
346 332
    /**
347 333
     * Creates
348
     * @param uriString
349
     * @param readDataFromUrl
350 334
     * @see #READ_MEDIA_DATA
351 335
     * @return
352 336
     * @throws MalformedURLException
......
501 485
        return result;
502 486
    }
503 487

  
504
    /**
505
     * @param taxonNameStr
506
     * @return
507
     */
508 488
    private String adaptName(String taxonNameStr) {
509 489
//        if (taxonNameStr.equals("Hypericum cerastoides")){
510 490
//            taxonNameStr = "Hypericum cerastioides";
......
549 529
            tx.setRollbackOnly();
550 530
        }
551 531
        app.commitTransaction(tx);
552

  
553 532
	}
554 533

  
555
	/**
556
     * @param media
557
	 * @return
558
     */
559 534
    private String getUrlStringForMedia(Media media) {
560 535
        String result = null;
561 536
        for (MediaRepresentation rep : media.getRepresentations()){
......
573 548
        return result;
574 549
    }
575 550

  
576
    /**
577
	 * @param args
578
	 */
579 551
	public static void main(String[] args) {
580 552
		CyprusImagesActivator me = new CyprusImagesActivator();
581 553
		if (update_notCreate){
......
586 558
//		me.test();
587 559
		System.exit(0);
588 560
	}
589

  
590 561
}
app-import/src/test/java/eu/etaxonomy/cdm/io/redlist/bfnXml/BfnXmlImportConfiguratorTest.java
29 29
/**
30 30
 * @author a.mueller
31 31
 * @since 29.01.2009
32
 * @version 1.0
33 32
 */
34 33
//public class BfnXmlImportConfiguratorTest extends CdmTransactionalIntegrationTest {
35 34
//	Logger logger = Logger.getLogger(getClass());

Also available in: Unified diff