Examples of VoTable


Examples of jsky.catalog.vo.VoTable

                ByteArrayDataSource dataSrc = new ByteArrayDataSource(filename, os.toByteArray());
                bos.close();
                StarTable starTable = new FitsPlusTableBuilder().makeStarTable(dataSrc, true,
                        StoragePolicy.getDefaultPolicy());
                dataSrc.close();
                VoTable table = VoTable.createVoTable(starTable, null, 1000000);
                table.setName(name);
                new VoCatalog(table); // Wraps the table in a local catalog for searching
                return table;
            }
        }
View Full Code Here

Examples of jsky.catalog.vo.VoTable

                || "spectrum/fits".equalsIgnoreCase(format)
                || "text/xml".equalsIgnoreCase(contentType)
                || filename.endsWith(".xml")
                || filename.endsWith(".vot")) {
            // VOTable XML file or FITS table
            VoTable table = VoTable.createVoTable(url, null, format);
            table.setCatalog(new VoCatalog(table));
            return makeCatalogComponent(table.getCatalog());
        }

        if ("text/csv".equalsIgnoreCase(format)) {
            // CSV formatted table
            StarTable starTable = new CsvStarTable(new URLDataSource(url));
            VoTable table = VoTable.createVoTable(starTable, null, Integer.MAX_VALUE);
            table.setCatalog(new VoCatalog(table));
            return makeCatalogComponent(table.getCatalog());
        }

        if (filename.toLowerCase().endsWith(".fits") && !"application/xml".equalsIgnoreCase(contentType)) {
            // Local FITS table file
            try {
//              NavigatorFITSTable table = NavigatorFITSTable.getFitsTable(filename);
                VoTable table = VoTable.createVoTable(url, null, format);
                table.setCatalog(new VoCatalog(table));
                return makeCatalogComponent(table.getCatalog());
            } catch (Exception e) {
                // ignore: might be an image file, which is handled below
            }
        }

        if ("file".equals(protocol)
                && (filename.endsWith(".table") || filename.endsWith(".scat") || filename.endsWith(".cat"))) {
            // skycat local catalog file?
            SkycatTable table = new SkycatTable(filename);
            return makeCatalogComponent(table.getCatalog());
        }

        // XXX some servers return text/html even for FITS images
        if (contentType.startsWith("text/")) {
            return super.makeURLComponent(url, contentType, format);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.