Project

General

Profile

« Previous | Next » 

Revision 2720ea2c

Added by Andreas Müller over 3 years ago

cleanup

View differences:

cdmlib-ext/src/main/java/eu/etaxonomy/cdm/ext/scratchpads/ScratchpadsService.java
114 114
							HttpResponse response = UriUtils.getResponse(uri, null);
115 115
							if (UriUtils.isOk(response)) {
116 116

  
117

  
118 117
								logger.debug("There is a dwca " + websiteName);
119 118

  
120 119
								try {
121 120
									inputStream = UriUtils.getInputStream(url.toURI());
122 121

  
123 122
									num++;
124

  
125 123
									if (inputStream != null) {
126

  
127 124
										copyDwcaZip(inputStream, websiteName);
128 125
										//createDwcaZip(inputStream);
129 126
									}
130

  
131 127
								} catch (HttpException e) {
132 128
									// TODO Auto-generated catch block
133 129
									logger.error("Failed to get dwca for " + websiteName + " as there was an error " + e);
134 130
								}
135

  
136 131
							}
137

  
138 132
						}
139 133
					}
140 134
				}
141 135
			}
142

  
143 136
			inputStream.close();
144

  
145

  
146 137
		} catch (URISyntaxException e) {
147 138
			throw new RuntimeException(e);
148 139
		} catch (IOException ie) {
......
212 203
		}
213 204
	}
214 205

  
215
	/**
216
	 * @param args
217
	 */
218 206
	public static void main(String[] args) {
219 207

  
220 208
		ScratchpadsService spService = new ScratchpadsService();
221 209
		spService.harvest();
222 210
		// TODO Auto-generated method stub
223

  
224 211
	}
225

  
226
}
212
}

Also available in: Unified diff