Project

General

Profile

« Previous | Next » 

Revision 8fb964f0

Added by Andreas Müller over 4 years ago

ref #2826 cleanup

View differences:

cdm-pesi/src/main/java/eu/etaxonomy/cdm/io/pesi/indexFungorum/IndexFungorumGeneraImport.java
78 78

  
79 79
				//Don't use (created bei Marc): DisplayName, NomRefCache
80 80

  
81
				Integer id =( (Number)rs.getObject("RECORD NUMBER")).intValue();
81
				Integer id = rs.getInt("RECORD NUMBER");
82 82

  
83 83
				String preferredName = rs.getString("NAME OF FUNGUS");
84 84
				if (StringUtils.isBlank(preferredName)){
......
96 96
				//author + publication
97 97
				makeAuthorAndPublication(state, rs, name);
98 98
				//source
99
				//makeSource(state, taxon, id, NAMESPACE_GENERA );
100
//				if (id != null){
101
					makeSource(state, taxon, id.intValue(), NAMESPACE_GENERA );
102
//				} else{
103
//					makeSource(state, taxon, null,NAMESPACE_GENERA);
104
//				}
99
				makeSource(state, taxon, id.intValue(), NAMESPACE_GENERA );
100

  
105 101
				getTaxonService().saveOrUpdate(taxon);
106 102
			}
107 103
		} catch (Exception e) {
......
153 149
	}
154 150

  
155 151
	@Override
156
	public Map<Object, Map<String, ? extends CdmBase>> getRelatedObjectsForPartition(ResultSet rs, IndexFungorumImportState state) {
157
		String nameSpace;
158
//		Class<?> cdmClass;
159
//		Set<String> idSet;
160
		Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<>();
152
	public Map<Object, Map<String, ? extends CdmBase>> getRelatedObjectsForPartition(
153
	        ResultSet rs, IndexFungorumImportState state) {
154

  
155
	    Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<>();
161 156

  
162 157
		try{
163
//			Set<String> taxonNameSet = new HashSet<>();
164
			while (rs.next()){
165
//				handleForeignKey(rs, taxonIdSet,"tu_accfinal" );
166
			}
167 158

  
168 159
			//taxon map
169
			nameSpace = NAMESPACE_SUPRAGENERIC_NAMES ;
170
//			cdmClass = Taxon.class;
171
//			idSet = taxonNameSet;
160
		    String nameSpace = NAMESPACE_SUPRAGENERIC_NAMES ;
172 161
			Map<String, TaxonBase<?>> taxonMap = new HashMap<>();
173 162
			@SuppressWarnings("rawtypes")
174 163
            List<TaxonBase> list = getTaxonService().listTaxaByName(Taxon.class, "*", null, null, null, "*", null, 1000000, null, null);
......
183 172
			referenceMap.put(SOURCE_REFERENCE, sourceReference);
184 173
			result.put(NAMESPACE_REFERENCE, referenceMap);
185 174

  
186
		} catch (SQLException e) {
175
		} catch (Exception e) {
187 176
			throw new RuntimeException(e);
188 177
		}
189 178
		return result;

Also available in: Unified diff