public static String printCoverageProperties(String prefix,CoverageAttributeTable cat,String covname){
  String layername=prefix + "_" + covname;
  List<Object> text_features=new ArrayList<Object>();
  List<Object> edge_features=new ArrayList<Object>();
  List<Object> area_features=new ArrayList<Object>();
  List<Object> point_features=new ArrayList<Object>();
  CoverageTable ct=cat.getCoverageTable(covname);
  String path=ct.getDataPath();
  String fcaPath=path + "/fca";
  File fca=new File(fcaPath);
  if (!fca.exists()) {
    fcaPath=path + "/fca.";
    fca=new File(fcaPath);
  }
  if (!fca.canRead()) {
    println();
    return null;
  }
  try {
    DcwRecordFile fcadesc=new DcwRecordFile(fcaPath);
    int fclass=fcadesc.whatColumn("fclass");
    int type=fcadesc.whatColumn("type");
    List<Object> v=new ArrayList<Object>();
    while (fcadesc.parseRow(v)) {
      String name=(String)v.get(fclass);
      String t=(String)v.get(type);
      if (t.equals("T")) {
        text_features.add(name);
      }
 else       if (t.equals("L")) {
        edge_features.add(name);
      }
 else       if (t.equals("A")) {
        area_features.add(name);
      }
 else       if (t.equals("P")) {
        point_features.add(name);
      }
    }
  }
 catch (  FormatException fe) {
  }
  if (!(text_features.isEmpty() && edge_features.isEmpty() && area_features.isEmpty()&& point_features.isEmpty())) {
    println("### VPF " + cat.getCoverageDescription(covname) + " Layer");
    println(layername + ".class=com.bbn.openmap.layer.vpf.VPFLayer");
    println(layername + ".prettyName=" + "VPF "+ cat.getCoverageDescription(covname)+ " "+ prefix);
    println(layername + ".vpfPath=" + rootpath);
    println(layername + ".coverageType=" + covname);
    println(layername + ".featureTypes=" + "area edge text point");
    printFeatures("text",text_features,layername);
    printFeatures("edge",edge_features,layername);
    printFeatures("area",area_features,layername);
    printFeatures("point",point_features,layername);
    println();
  }
 else {
    return null;
  }
  return layername;
}

public static String printCoverageProperties ( String prefix , CoverageAttributeTable cat , String covname ) { String layername = prefix + "_" + covname ; List < Object > text_features = new ArrayList < Object > ( ) ; List < Object > edge_features = new ArrayList < Object > ( ) ; List < Object > area_features = new ArrayList < Object > ( ) ; List < Object > point_features = new ArrayList < Object > ( ) ; CoverageTable ct = cat . getCoverageTable ( covname ) ; String path = ct . getDataPath ( ) ; String fcaPath = path + "/fca" ; File fca = new File ( fcaPath ) ; if ( ! fca . exists ( ) ) { fcaPath = path + "/fca." ; fca = new File ( fcaPath ) ; } if ( ! fca . canRead ( ) ) { println ( ) ; return null ; } try { DcwRecordFile fcadesc = new DcwRecordFile ( fcaPath ) ; int fclass = fcadesc . whatColumn ( "fclass" ) ; int type = fcadesc . whatColumn ( "type" ) ; List < Object > v = new ArrayList < Object > ( ) ; while ( fcadesc . parseRow ( v ) ) { String name = ( String ) v . get ( fclass ) ; String t = ( String ) v . get ( type ) ; if ( t . equals ( "T" ) ) { text_features . add ( name ) ; } else if ( t . equals ( "L" ) ) { edge_features . add ( name ) ; } else if ( t . equals ( "A" ) ) { area_features . add ( name ) ; } else if ( t . equals ( "P" ) ) { point_features . add ( name ) ; } } } catch ( FormatException fe ) { } if ( ! ( text_features . isEmpty ( ) && edge_features . isEmpty ( ) && area_features . isEmpty ( ) && point_features . isEmpty ( ) ) ) { println ( "### VPF " + cat . getCoverageDescription ( covname ) + " Layer" ) ; println ( layername + ".class=com.bbn.openmap.layer.vpf.VPFLayer" ) ; println ( layername + ".prettyName=" + "VPF " + cat . getCoverageDescription ( covname ) + " " + prefix ) ; println ( layername + ".vpfPath=" + rootpath ) ; println ( layername + ".coverageType=" + covname ) ; println ( layername + ".featureTypes=" + "area edge text point" ) ; printFeatures ( "text" , text_features , layername ) ; printFeatures ( "edge" , edge_features , layername ) ; printFeatures ( "area" , area_features , layername ) ; printFeatures ( "point" , point_features , layername ) ; println ( ) ; } else { return null ; } return layername ; }
prints a vpf coverage
