Project

General

Profile

« Previous | Next » 

Revision e9494e29

Added by Andreas Müller over 1 year ago

cleanup

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/app/berlinModelImport/EuroMedActivator.java
196 196
	static String authorTeamFilter =  " authorTeamId IN (SELECT drvTab.authorTeamId FROM (SELECT authorTeamId FROM v_cdm_exp_authorTeamsAll) as drvTab) ";
197 197
	static String authorFilter = " authorId IN (SELECT drvTab.authorId FROM (SELECT authorId FROM v_cdm_exp_authorsAll) as drvTab) ";
198 198

  
199

  
200

  
201 199
// **************** ALL *********************
202 200

  
203

  
204 201
	public void importEm2CDM (Source source, ICdmDataSource destination, DbSchemaValidation hbm2dll){
205 202
		System.out.println("Start import from BerlinModel("+ berlinModelSource.getDatabase() + ") to " + cdmDestination.getDatabase() + " ...");
206 203
		//make BerlinModel Source
app-import/src/main/java/eu/etaxonomy/cdm/app/berlinModelImport/MTMooseActivator.java
79 79
	static final boolean doNameStatus = true;
80 80
	static final boolean doTypes = true;
81 81
	static final boolean doNameFacts = false;   //no name facts exist
82
	static final boolean doMarker = false;
82 83

  
83 84
	//taxa
84 85
	static final boolean doTaxa = true;
......
106 107
//	static final boolean doTaxa = false;
107 108
//	static final boolean doRelTaxa = false;
108 109
//	static final boolean doFacts = false;
109
//    static final boolean doNamedAreas = false;
110
//  static final boolean doNamedAreas = false;
110 111
//	static final boolean doOccurences = false;
111
//    static final boolean doOccurenceSources = false;
112
//    static final boolean doCommonNames = false;
112
//  static final boolean doOccurenceSources = false;
113
//  static final boolean doCommonNames = false;
114
//  static final boolean doMarker = false;
113 115

  
114 116

  
115 117
	public void invoke(String[] args){
......
142 144
		config.setDoOccurrence(doOccurences);
143 145
		config.setDoOccurrenceSources(doOccurenceSources);
144 146
		config.setDoCommonNames(doCommonNames);
147
		config.setDoMarker(doMarker);
145 148
		config.setSourceRefUuid(sourceRefUuid);
146 149

  
147 150
		//filter
......
156 159
		config.setCheck(check);
157 160

  
158 161
		// invoke import
159
		CdmDefaultImport<BerlinModelImportConfigurator> bmImport = new CdmDefaultImport<BerlinModelImportConfigurator>();
162
		CdmDefaultImport<BerlinModelImportConfigurator> bmImport = new CdmDefaultImport<>();
160 163
		bmImport.invoke(config);
161 164

  
162 165
//		if (doFacts && (config.getCheck().equals(CHECK.CHECK_AND_IMPORT)  || config.getCheck().equals(CHECK.IMPORT_WITHOUT_CHECK) )   ){
app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelImportConfigurator.java
452 452
		return this.relTaxaIdQuery ;
453 453
	}
454 454

  
455

  
456
	/**
457
	 * @return the nameIdTable
458
	 */
459 455
	public String getNameIdTable() {
460 456
		return nameIdTable;
461 457
	}
462
	/**
463
	 * @param nameIdTable the nameIdTable to set
464
	 */
465 458
	public void setNameIdTable(String nameIdTable) {
466 459
		this.nameIdTable = nameIdTable;
467 460
	}
468 461

  
469

  
470 462
	public String getReferenceIdTable() {
471 463
	    return referenceIdTable;
472 464
	}
app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelTaxonNameRelationImport.java
92 92
			    result += "       nameFk2 IN (SELECT NameId FROM %s) ";
93 93
			    result = String.format(result, nameIdTable, nameIdTable );
94 94
			}
95

  
96 95
		}else{
97 96
			//
98 97
		}
app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelTaxonRelationImport.java
217 217
			strQuery = strQuery + " UNION " + strFlatQuery;
218 218
		}
219 219

  
220

  
221

  
222 220
		if (state.getConfig().getClassificationQuery() != null){
223 221
			strQuery = state.getConfig().getClassificationQuery();
224 222
		}
......
591 589
		rs = state.getConfig().getSource().getResultSet(sql);
592 590
		try {
593 591
			while (rs.next()){
594
				Integer treeRefFk = rs.getInt("secRefFk");
592
				Integer classificationRefFk = rs.getInt("secRefFk");
595 593
				String taxonId = rs.getString("RIdentifier");
596
				Classification classification = getClassificationTree(state, classificationMap, treeRefFk);
594
				Classification classification = getClassificationTree(state, classificationMap, classificationRefFk);
597 595
				TaxonBase<?> taxon = taxonMap.get(taxonId);
598 596
				if (taxon == null){
599 597
					String message = "TaxonBase for taxon id (%s) not found in taxonMap";

Also available in: Unified diff