83848586878889909192
try { // uris = parse(readOutput(get(url))); response = request(url); uris = parse(response); } catch (JSONException e) { throw new OutputException(e+response); } LOG.debug(String.format("-- %s found.", uris.size())); return uris; }
101102103104105106107108109110
hd.endElement("","","Annotation"); hd.endDocument(); xml = out.toString("utf-8"); } catch (Exception e) { throw new OutputException("Error creating XML output.", e); } return xml; }
182183184185186187188189190191
hd.endElement("", "", "Annotation"); hd.endDocument(); xml = out.toString("utf-8"); } catch (Exception e) { throw new OutputException("Error creating XML output.", e); } return xml; }
219220221222223224225226227
hd.endElement("","","Annotation"); hd.endDocument(); xmlDoc = out.toString("utf-8"); } catch (Exception e) { throw new OutputException("Error creating XML output.",e); } return xmlDoc; }
230231232233234235236237238
protected String xml2json(String xmlDoc) throws OutputException { String json = ""; try { json = xmlSerializer.read(xmlDoc).toString(2); } catch (Exception e) { throw new OutputException("Error converting XML to JSON.", e); } return json; }