Changeset 2098
- Timestamp:
- 08/15/12 13:39:03 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SRUServer/trunk/src/main/java/eu/clarin/sru/server/SRUServer.java
r1990 r2098 243 243 244 244 try { 245 out.writeStartElement(SRU_NS, "terms"); 245 boolean wroteTerms = false; 246 /* 247 * a scan result without a list of terms is a valid response; 248 * make sure, to produce the correct output and omit in that case 249 * the <terms> ... 250 */ 246 251 while (result.nextTerm()) { 252 if (!wroteTerms) { 253 out.writeStartElement(SRU_NS, "terms"); 254 } 247 255 out.writeStartElement(SRU_NS, "term"); 248 256 … … 291 299 out.writeEndElement(); // "term" element 292 300 } // while 293 out.writeEndElement(); // "terms" element 301 if (wroteTerms) { 302 out.writeEndElement(); // "terms" element 303 } 294 304 } catch (NoSuchElementException e) { 295 305 throw new SRUException(SRUConstants.SRU_GENERAL_SYSTEM_ERROR,
Note: See TracChangeset
for help on using the changeset viewer.