Package com.bbn.openmap.layer.vpf

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


        list.addElement("Topology Level: "
                + cat.getCoverageTopologyLevel(covname));
        String fcsURL = buildURL(request, response, pathPrefix, "fcs?"
                + Data.RowSelectParam + "=" + Data.RowSelectAll, "fcs");
        list.addElement("Feature Class Schema: " + fcsURL);
        CoverageTable ct = cat.getCoverageTable(covname);
        // CoverageTable opens alot of files, go through and close
        // them
        for (Iterator i = ct.getFeatureClasses().values().iterator(); i.hasNext();) {
            FeatureClassInfo fci = (FeatureClassInfo) i.next();
            fci.close();
        }

        Map ftypeinfo = new TreeMap(ct.getFeatureTypeInfo());
        if (ftypeinfo.size() == 0) {
            list.addElement("No Feature Types in FCA");
        } else {
            HtmlListElement flist = new HtmlListElement("Feature Types (from "
                    + buildURL(request, response, pathPrefix, "fca") + ")");
            list.addElement(flist);
            for (Iterator i = ftypeinfo.values().iterator(); i.hasNext();) {
                CoverageTable.FeatureClassRec fcr = (CoverageTable.FeatureClassRec) i.next();
                String name = fcr.feature_class.toLowerCase();
//                char t = fcr.type;
                String desc = fcr.description;
                String tstring = "[unknown] ";
                String suffix = "";
                switch (fcr.type) {
                case CoverageTable.TEXT_FEATURETYPE:
                    tstring = "[text feature] ";
                    suffix = ".tft";
                    break;
                case CoverageTable.EDGE_FEATURETYPE:
                    tstring = "[edge feature] ";
                    suffix = ".lft";
                    break;
                case CoverageTable.AREA_FEATURETYPE:
                    tstring = "[area feature] ";
                    suffix = ".aft";
                    break;
                case CoverageTable.UPOINT_FEATURETYPE:
                    FeatureClassInfo fci = ct.getFeatureClassInfo(name);
                    char type = (fci != null) ? fci.getFeatureType()
                            : CoverageTable.SKIP_FEATURETYPE;
                    if (type == CoverageTable.EPOINT_FEATURETYPE) {
                        tstring = "[entity point feature] ";
                    } else if (type == CoverageTable.CPOINT_FEATURETYPE) {
                        tstring = "[connected point feature] ";
                    } else {
                        tstring = "[missing point feature] ";
                    }
                    suffix = ".pft";
                    break;
                case CoverageTable.COMPLEX_FEATURETYPE:
                    tstring = "[complex feature] ";
                    suffix = ".cft";
                    break;
                default:
                    tstring = "[unknown] ";
                    suffix = "";
                }
                String url = buildURL(request, response, pathPrefix, name
                        + suffix, name);
                flist.addElement(url + ": " + tstring + desc);
            }
        }
        try {
            HtmlListElement flist = new HtmlListElement("Feature Types (from "
                    + fcsURL + ")");
            boolean generateflist = false;
            DcwRecordFile fcs = new DcwRecordFile(ct.getDataPath()
                    + File.separator + "fcs" + (ct.appendDot ? "." : ""));
            int featureClassColumn = fcs.whatColumn("feature_class");
            int table1Column = fcs.whatColumn("table1");
//            int table1_keyColumn = fcs.whatColumn("table1_key");
//            int table2Column = fcs.whatColumn("table2");
View Full Code Here

TOP

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

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.