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");
// int table2_keyColumn = fcs.whatColumn("table2_key");
List fcsl = new ArrayList(fcs.getColumnCount());
while (fcs.parseRow(fcsl)) {
String featureclass = ((String) fcsl.get(featureClassColumn)).toLowerCase();
String table1 = ((String) fcsl.get(table1Column)).toLowerCase();
if (!ftypeinfo.containsKey(featureclass)) {
ftypeinfo.put(featureclass, null);
String type = null;
if (table1.endsWith(".cft")) {
type = "complex feature";
} else if (table1.endsWith(".pft")) {
type = "point feature";