private static InvCatalogImpl doOne(InvCatalogFactory fac, String urlString, boolean show) { System.out.println("***read " + urlString); if (show) System.out.println(" original catalog=\n" + IO.readURLcontents(urlString)); try { InvCatalogImpl cat = fac.readXML(new URI(urlString)); StringBuilder buff = new StringBuilder(); boolean isValid = cat.check(buff, false); System.out.println("catalog <" + cat.getName() + "> " + (isValid ? "is" : "is not") + " valid"); System.out.println(" validation output=\n" + buff); // if (show) System.out.println(" parsed catalog=\n" + fac.writeXML(cat)); //System.out.println(" -----\n"+cat.dump()); return cat; } catch (Exception e) { e.printStackTrace(); return null; } }
private static InvCatalogImpl doOne(InvCatalogFactory fac, String urlString, boolean show) { System.out.println("***read " + urlString); if (show) System.out.println(" original catalog=\n" + IO.readURLcontents(urlString)); try { InvCatalogImpl cat = fac.readXML(new URI(urlString)); StringBuilder buff = new StringBuilder(); boolean isValid = cat.check(buff, false); System.out.println("catalog <" + cat.getName() + "> " + (isValid ? "is" : "is not") + " valid"); System.out.println(" validation output=\n" + buff); // if (show) System.out.println(" parsed catalog=\n" + fac.writeXML(cat)); //System.out.println(" -----\n"+cat.dump()); return cat; } catch (Exception e) { e.printStackTrace(); return null; } }
private static InvCatalogImpl doOne(InvCatalogFactory fac, String urlString, boolean show) { System.out.println("***read " + urlString); if (show) System.out.println(" original catalog=\n" + IO.readURLcontents(urlString)); try { InvCatalogImpl cat = fac.readXML(new URI(urlString)); StringBuilder buff = new StringBuilder(); boolean isValid = cat.check(buff, false); System.out.println("catalog <" + cat.getName() + "> " + (isValid ? "is" : "is not") + " valid"); System.out.println(" validation output=\n" + buff); // if (show) System.out.println(" parsed catalog=\n" + fac.writeXML(cat)); //System.out.println(" -----\n"+cat.dump()); return cat; } catch (Exception e) { e.printStackTrace(); return null; } }
public void testDLwriter() throws IOException { String url = "/DLwriter?type=ADN&catalog=/thredds/catalog/testEnhanced/catalog.xml"; System.out.println("Response from "+ TestOnLocalServer.withHttpPath(url)); String result = IO.readURLcontents(TestOnLocalServer.withHttpPath(url)); assert result != null; System.out.println(result); } }
System.out.println( IO.readURLcontents( urlName+".asc?"+CE));