Project

General

Profile

« Previous | Next » 

Revision 56d1546c

Added by Andreas Müller almost 10 years ago

updates on RefDetail and RelName import from BM

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelImportConfigurator.java
104 104
	private String authorTeamFilter = null;
105 105
	private String authorFilter = null;
106 106
	private String factFilter = null;
107
	private String refDetailFilter = null;
107 108
	private String commonNameFilter = null;
108 109
	private String occurrenceFilter = null;
109 110
	private String occurrenceSourceFilter = null;
......
483 484
	public String getFactFilter() {
484 485
		return factFilter;
485 486
	}
487
	
488
	public void setRefDetailFilter(String refDetailFilter) {
489
		this.refDetailFilter = refDetailFilter;
490
	}
491
	public String getRefDetailFilter() {
492
		return refDetailFilter;
493
	}
486 494

  
487 495

  
488 496

  
app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelRefDetailImport.java
59 59
		String strQuery = " SELECT RefDetail.RefDetailId " +
60 60
        	" FROM RefDetail " +
61 61
        	" WHERE (RefDetail.PreliminaryFlag = 1)";
62
			if (StringUtils.isNotBlank(state.getConfig().getRefDetailFilter())){
63
				strQuery += " AND " + state.getConfig().getRefDetailFilter();
64
			}
65
		
62 66
		return strQuery;
63 67
	}
64 68

  
app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelTaxonNameRelationImport.java
75 75
	}
76 76

  
77 77
	
78

  
79 78
	@Override
80 79
	protected String getIdQuery(BerlinModelImportState state) {
81 80
		if (StringUtils.isNotBlank(state.getConfig().getNameIdTable())){
......
89 88
		}
90 89
	}
91 90
	
92
	
93
	/* (non-Javadoc)
94
	 * @see eu.etaxonomy.cdm.io.berlinModel.in.BerlinModelImportBase#getRecordQuery(eu.etaxonomy.cdm.io.berlinModel.in.BerlinModelImportConfigurator)
95
	 */
91

  
96 92
	@Override
97 93
	protected String getRecordQuery(BerlinModelImportConfigurator config) {
98 94
			String strQuery = 
......
105 101
		return strQuery;
106 102
	}
107 103

  
108
	/* (non-Javadoc)
109
	 * @see eu.etaxonomy.cdm.io.berlinModel.in.IPartitionedIO#doPartition(eu.etaxonomy.cdm.io.berlinModel.in.ResultSetPartitioner, eu.etaxonomy.cdm.io.berlinModel.in.BerlinModelImportState)
110
	 */
104
	@Override
111 105
	public boolean doPartition(ResultSetPartitioner partitioner, BerlinModelImportState state) {
112 106
		boolean success = true ;
113 107
		BerlinModelImportConfigurator config = state.getConfig();
......
167 161
				}else{
168 162
					//TODO
169 163
					if (nameFrom == null){
170
						 logger.warn("from TaxonName " + name1Id + "  for RelName (" + relNameId + " , type: " + relQualifierFk  + " , toName: " + name2Id+ ") does not exist in store. ToName is: " + (nameTo == null ? "" : nameTo.getTitleCache()));
164
						if ( ! (config.isUseEmAreaVocabulary() && relNameId == 28159 )) {
165
							logger.warn("from TaxonName " + name1Id + "  for RelName (" + relNameId + " , type: " + relQualifierFk  + " , toName: " + name2Id+ ") does not exist in store. ToName is: " + (nameTo == null ? "" : nameTo.getTitleCache()));
166
						}
171 167
					}
172 168
					if (nameTo == null){
173 169
						logger.warn("to TaxonName " + name2Id + " for RelName (" + relNameId + " , type: " + relQualifierFk  + " , fromName: " + name1Id + ") does not exist in store. FromName is: "  + (nameFrom == null ? "" : nameFrom.getTitleCache()));

Also available in: Unified diff