Package com.bbn.openmap.layer.vpf

Examples of com.bbn.openmap.layer.vpf.LibrarySelectionTable


            findex = pathInfo.length();
        }
        String libname = pathInfo.substring(1, findex);

        try {
            LibrarySelectionTable lst = getLST(libname);
            if (lst == null) {
                out.println("VPF Database not configured: " + libname);
                return;
            }
            String dbname = lst.getDatabaseName();
            out.println("<HTML>\n<HEAD><TITLE>Describe VPF Database " + dbname
                    + "</TITLE></HEAD>\n<BODY>\n<H1>VPF Database " + dbname
                    + "</H1>\n");
            ListElement dble = new ListBodyElement();
            WrapElement dblist = new WrapElement("ul", dble);
            dble.addElement("Database Description: "
                    + lst.getDatabaseDescription());
            dble.addElement("Database Description Table: "
                    + buildURL(request, response, libname, "dht"));
            String[] libraries = lst.getLibraryNames();
            StringBuffer libnames = new StringBuffer("Database Libraries: ");
            for (int i = 0; i < libraries.length; i++) {
                libnames.append("<A HREF=\"#").append(libraries[i]);
                libnames.append("\">").append(libraries[i]);
                libnames.append("</A>").append(" ");
            }
            libnames.append("(from ");
            libnames.append(buildURL(request, response, libname, "lat"));
            libnames.append(")");

            dble.addElement(libnames.toString());
            dblist.generate(out);
            for (int i = 0; i < libraries.length; i++) {
                //String prefix = libraries[i] + ":";
                printLibrary(request,
                        response,
                        libname,
                        lst.getCAT(libraries[i]));
            }
            out.println("</body></html>");
        } catch (FormatException fe) {
            throw new ServletException("FormatException: ", fe);
        }
View Full Code Here


        }
        list.generate(out);
    }

    public LibrarySelectionTable getLST(String libname) throws FormatException {
        LibrarySelectionTable lst = contextInfo.getLST(libname);
        if (lst == null) {
            String lib_home = contextInfo.getPath(libname);
            if (lib_home == null) {
                return null;
            }
//            File flib_home = new File(lib_home);

            lst = new LibrarySelectionTable(lib_home);
            contextInfo.putLST(libname, lst);
        }
        return lst;
    }
View Full Code Here

    /** the context object used for config info */
    protected ContextInfo contextInfo;

    public LibrarySelectionTable getLST(String libname) throws FormatException {
        LibrarySelectionTable lst = contextInfo.getLST(libname);
        if (lst == null) {
            String lib_home = contextInfo.getPath(libname);
            if (lib_home == null) {
                return null;
            }

            lst = new LibrarySelectionTable(lib_home);
            contextInfo.putLST(libname, lst);
        }
        return lst;
    }
View Full Code Here

TOP

Related Classes of com.bbn.openmap.layer.vpf.LibrarySelectionTable

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.