Package org.astrogrid.samp

Examples of org.astrogrid.samp.Message


                // Must be a table we sent, so use the samp table id we sent it with
                tableId = sampId;
            }
            URL url = navigator.getOrigURL();
            String urlStr = url != null ? url.toString() : null;
            Message msg = new Message("table.select.rowList");
            if (tableId != null) {
                msg.addParam("table-id", tableId);
            }
            if (urlStr != null) {
                msg.addParam("url", urlStr);
            }
            if (urlStr != null || tableId != null) {
                // convert Integer list to String list
                List<String> strRowList = new ArrayList<String>(rowList.size());
                for(Integer i : rowList) {
                    strRowList.add(i.toString());
                }
                msg.addParam("row-list", strRowList);
                msg.check();
                return msg;
            }
        }
        return null;
    }
View Full Code Here


                                        String sampId, Map ucdMap) throws IOException {
            String name = "t" + sampId + _extension;
            URL turl = JSkyServer.getInstance().addResource(name, createResource(table));
            navigator.registerTable(turl, sampId);
            if (_mtype.startsWith("spectrum")) {
                return new Message(_mtype)
                        .addParam("url", turl.toString())
                        .addParam("id", sampId)
                        .addParam("meta", ucdMap);
            } else {
                return new Message(_mtype)
                        .addParam("url", turl.toString())
                        .addParam("table-id", sampId)
                        .addParam("name", label);
            }
        }
View Full Code Here

         */
        protected Message createMessage(CatalogNavigator navigator, URL url,
                                        String sampId, Map ucdMap) throws IOException {
            navigator.registerTable(url, sampId);
            if (_mtype.startsWith("spectrum")) {
                return new Message(_mtype)
                        .addParam("url", url.toString())
                        .addParam("id", sampId)
                        .addParam("meta", ucdMap);
            } else {
                return new Message(_mtype)
                        .addParam("url", url.toString())
                        .addParam("table-id", sampId)
                        .addParam("name", sampId);
            }
        }
View Full Code Here

         * @param url URL of the image to send
         * @param sampId image ID, unique to relevant parts of image state
         * @return send message
         */
        public Message createMessage(URL url, String sampId) {
            return new Message(getMtype())
                    .addParam("url", url.toString())
                    .addParam("image-id", sampId);
        }
View Full Code Here

TOP

Related Classes of org.astrogrid.samp.Message

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.