Package jsky.catalog

Examples of jsky.catalog.QueryResult


                return null;
            }
        }

        // do the query
        QueryResult result = cat.query(queryArgs);

        // set a reference to this catalog in the resulting table
        if (result instanceof SkycatTable) {
            ((SkycatTable) result).setCatalog(this);
        }
View Full Code Here


     *
     * @param queryArgs An object describing the query arguments (not used here)
     * @return An object describing the result of the query.
     */
    private QueryResult _queryJavaCatalog(QueryArgs queryArgs) throws IOException {
        QueryResult result = null;

        // determine the query region and max rows settings
        SearchCondition[] sc = queryArgs.getConditions();
        _setQueryRegion(queryArgs, sc);
        _setMaxRows(queryArgs, sc);
View Full Code Here

     * and return the world coordinates corresponding the name.
     */
    private WorldCoords _resolveObjectName(String objectName, Catalog cat) throws IOException {
        QueryArgs queryArgs = new BasicQueryArgs(cat);
        queryArgs.setId(objectName);
        QueryResult r = cat.query(queryArgs);
        if (r instanceof TableQueryResult) {
            Coordinates coords = ((TableQueryResult) r).getCoordinates(0);
            if (coords instanceof WorldCoords)
                return (WorldCoords) coords;
        }
View Full Code Here

        }

        try {
            QueryArgs q1 = new BasicQueryArgs(cat);
            q1.setId("GSC0285601186");
            QueryResult r1 = cat.query(q1);
            System.out.println("result: " + r1);

            System.out.println("");
            System.out.println("test query: at center position/radius: ");
            QueryArgs q2 = new BasicQueryArgs(cat);
            q2.setRegion(new CoordinateRadius(new WorldCoords("03:19:44.44", "+41:30:58.21"), 2.));
            QueryResult r2 = cat.query(q2);
            System.out.println("result: " + r2);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

     *
     * @return a map of parameter names to values for the "table.select.rowList" message
     */
    private Map _makeTransmitSelectedRowsMessage(List<Integer> rowList) {
        Navigator navigator = _imageFrame.getNavigator();
        QueryResult queryResult = navigator.getQueryResult();
        if (queryResult instanceof TableQueryResult) {
            TableQueryResult table = (TableQueryResult) queryResult;
            String tableId = table.getId();
            String sampId = TableSendActionManager.getSampId(tableId);
            if (sampId != null) {
View Full Code Here

     * Called when the default button is pressed
     */
    public void actionPerformed(ActionEvent ev) {
        // get the query result and display it
        try {
            QueryResult queryResult = _fieldDesc.getLinkValue(_tableQueryResult, _value, _row);
            _queryResultDisplay.setQueryResult(queryResult);
        } catch (Exception e) {
            DialogUtil.error(e);
        }
    }
View Full Code Here

    private void _addCatalog(Catalog node, Catalog catalog) {
        if (_queryResultDisplay != null) {
            if (catalog.getNumParams() == 0) {
                // if there are no parameters, do the query to get to the actual catalog
                QueryResult queryResult;
                try {
                    queryResult = catalog.query(new BasicQueryArgs(catalog));
                } catch (Exception e) {
                    DialogUtil.error(e);
                    return;
View Full Code Here

    // This method is called after queryResultHandler.getQueryResult(URL)
    // returns (in the event handling thread) to display the contents of the given
    // catalog directory in the tree at the given node.
    private void _displayQueryResult(Catalog node, CatalogDirectory catDir) {
        QueryResult queryResult = catDir;
        if (catDir.getNumCatalogs() == 1) {
            queryResult = catDir.getCatalog(0);
        }

        if (node == null) {
View Full Code Here

                // message to send currently displayed table
                String sampId = getSampId();
                StarTable table = _navigator.getStarTable();
                if (table != null) {
                    String label = sampId;
                    QueryResult queryResult = _navigator.getQueryResult();
                    if (queryResult instanceof Catalog) {
                        label = ((Catalog) queryResult).getTitle();
                    }
                    return sender.createMessage(_navigator, table, label, sampId, _ucdMap);
                }
View Full Code Here

     * Returns the SAMP id for the current table, if known, otherwise a new unique id
     *
     * @return opaque ID string
     */
    private String getSampId() {
        QueryResult queryResult = _navigator.getQueryResult();
        if (queryResult instanceof TableQueryResult) {
            String tableId = ((TableQueryResult) queryResult).getId();
            if (tableId != null) {
                String sampId = _idMap.get(tableId);
                if (sampId != null) {
View Full Code Here

TOP

Related Classes of jsky.catalog.QueryResult

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.