package client; import net.ivoa.www.xml.ADQL.v0_7_4.*; import fr.u_strasbg.vizier.xml.VOTable_1_1_xsd.*; import net.ivoa.SkyNode.*; import org.us_vo.www.*; public class KGiant { public static void main(String [] args) throws Exception { String[] ucds = {"_v", "_r"}; /*String[] ucds = {"phot_mag_v","phot_phg_v","phot_jhn_v","phot_hst_f555w", "phot_gunn_v", "phot_mag_r","phot_phg_r","phot_jhn_r", "phot_gunn_r" }; */ Resource[] res = queryRegistry(); getTables(res,ucds); } public static Resource[] queryRegistry() throws Exception { RegistryLocator rl = new RegistryLocator(); RegistrySoap reg = rl.getRegistrySoap(); ArrayOfResource res = reg.queryResource("servicetype like '%skynode%' and contains(coveragespectral,'opt or opt1 or opt2 or opt3 or optical')"); Resource[] ra = res.getResource(); return ra; } public static void getTables(Resource[] ra, String[] ucds) throws Exception { for (int i = 0; i < ra.length ; i++) { processNode(ra[i].getServiceURL(),ucds); } } public static void processNode(String endpoint, String[] ucds) throws Exception { java.net.URL url = new java.net.URL(endpoint); SkyNodeLocator snLoc = new SkyNodeLocator(); SkyNodeSoap soap = snLoc.getSkyNodeSoap(url); ArrayOfMetaTable tNames = soap.tables(); MetaTable [] tb = tNames.getMetaTable(); boolean foundUcd = false; boolean foundSpecType = false; for(int i=0;i 0) { for (int s =0; s < ucds.length; s++) { if (u.toLowerCase().endsWith(ucds[s])) { foundUcd=true; // System.out.println(t+"-> "+c+" has UCD{ "+u+" }"); } if (u.toLowerCase().startsWith("spec_type_mk")) { foundSpecType=true; System.out.println(t+"-> "+c+" has UCD{ "+u+" }"); } } } } } if ( foundUcd && foundSpecType) System.out.println(endpoint+" HAS Spect_Type and R or V " ) ; } }