Project

General

Profile

« Previous | Next » 

Revision 379eb203

Added by Andreas Müller over 3 years ago

cleanup

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/dwca/in/GbifReferenceCsv2CdmConverter.java
49 49
/**
50 50
 * @author a.mueller
51 51
 * @since 22.11.2011
52
 *
53 52
 */
54 53
public class GbifReferenceCsv2CdmConverter extends PartitionableConverterBase<DwcaDataImportConfiguratorBase, DwcaDataImportStateBase<DwcaDataImportConfiguratorBase>>
55 54
						implements IPartitionableConverter<StreamItem, IReader<CdmBase>, String>{
......
58 57

  
59 58
	private static final String CORE_ID = "coreId";
60 59

  
61
	/**
62
	 * @param state
63
	 */
64 60
	public GbifReferenceCsv2CdmConverter(DwcaDataImportStateBase state) {
65 61
		super(state);
66 62
	}
......
112 108
		//type
113 109
		handleType(reference, strType, taxon, resultList, item);
114 110

  
115

  
116 111
		return new ListReader<>(resultList);
117 112
	}
118 113

  
119

  
120 114
	private void handleType(Reference reference, String strType, TaxonBase<?> taxon,
121 115
	        List<MappedCdmBase<? extends CdmBase>> resultList, StreamItem item) {
122 116
		// TODO handleType not yet implemented
......
166 160
							//TODO not yet handled by CDM
167 161
						}
168 162
					}
169

  
170 163
				}
171 164
			}
172 165
			if (config.isHandleAllRefsAsCitation()){
......
183 176
    					resultList.add(new MappedCdmBase<CdmBase>(desc));
184 177
					}
185 178
				}
186

  
187 179
			}
188

  
189 180
		}
190

  
191

  
192 181
	}
193 182

  
194 183
	private void createCitation(TaxonDescription desc, Reference ref, TaxonName nameUsedInSource) {
......
219 208
			logger.debug("Reference is not an URI");
220 209
		}
221 210
		//TODO further identifier types
222

  
223 211
	}
224 212

  
225 213
	private Reference handleInRef(String strSource) {
......
231 219
		}
232 220
	}
233 221

  
234

  
235 222
	private VerbatimTimePeriod handleDate(String strDate) {
236 223
	    VerbatimTimePeriod tp = TimePeriodParser.parseStringVerbatim(strDate);
237 224
		return tp;
......
248 235
		return id;
249 236
	}
250 237

  
251

  
252 238
//********************** PARTITIONABLE **************************************/
253 239

  
254 240
	@Override
......
262 248
		}
263 249
	}
264 250

  
265

  
266 251
	@Override
267 252
	public Set<String> requiredSourceNamespaces() {
268
		Set<String> result = new HashSet<String>();
253
		Set<String> result = new HashSet<>();
269 254
 		result.add(TermUri.DWC_TAXON.toString());
270 255
 		return result;
271 256
	}
......
276 261
	public String toString(){
277 262
		return this.getClass().getName();
278 263
	}
279

  
280

  
281 264
}

Also available in: Unified diff