Package uk.ac.starlink.vo

Examples of uk.ac.starlink.vo.RegistryQuery


                String standardId = STANDARD_IDS[i];
                String name = STANDARD_NAMES[i];
                List<Catalog> catalogs = new ArrayList<Catalog>();
                String queryStr = "capability/@standardID = '" + standardId + "'";
                _progressPanel.setText("Query: capability = " + standardId);
                final RegistryQuery query = new RegistryQuery(url.toString(), queryStr);
                RegResource[] resources;
                try {
                    resources = query.getQueryResources();
                } catch (RegistryAccessException e) {
                    e.printStackTrace(); // XXX
                    throw new RuntimeException(e);
                }
                if (_progressPanel.isInterrupted()) {
View Full Code Here


            regURL = new URL(url);
        }
        catch ( MalformedURLException e ) {
            return;
        }
        final RegistryQuery query =
            new RegistryQuery( regURL.toString(), queryStr );

       
       TableProducer producer = new TableProducer() {
            public StarTable getTable() throws TaskException {
                try {
                    return new RegistryStarTable( query );
                }
                catch ( Exception e ) {
                    throw new ExecutionException( "Query failed: "
                                                + e.getMessage(), e );
                }
            }
        };

       

        StarTable table;
        try {
            table = producer.getTable();
        } catch (Exception e) {
            e.printStackTrace();
            return;
        }

        RowSequence rseq;
        try {
            rseq = table.getRowSequence();
            try {
                while (rseq.next()) {
                    Object[] row = rseq.getRow();
//                    System.out.println("XXX Found row: " + row[0]); // XXX
                }
            }
            finally {
                rseq.close();
            }
        } catch (IOException e) {
            e.printStackTrace();
            return;
        }



        RegResource[] resources;
    try {
      resources = query.getQueryResources();
    } catch (RegistryAccessException e) {
      e.printStackTrace();
      return;
    }
        for (RegResource resource : resources) {
View Full Code Here

TOP

Related Classes of uk.ac.starlink.vo.RegistryQuery

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.