⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jianzhicun.java

📁 基于Java的地图数据管理软件。使用MySQL数据库管理系统。
💻 JAVA
字号:
package net.aetherial.gis.jiaotongbu.output.type;

import org.w3c.dom.Node;
import net.aetherial.gis.surface.ItemValue;
import net.aetherial.gis.jiaotongbu.output.publicuse.Item;
import net.aetherial.gis.jiaotongbu.output.number.NameNumber;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class Jianzhicun
    extends WptToJTB {
  private String renkou = "", zirancun = "", dixing = "";
  private String minzheng = "";
  private String bianma = "";

  public Jianzhicun(Node wpt) {
    super(wpt);
  }
  /**
   * 将该类实例化为:Jianzhicun(null)
   */
  public void setMinzhenCUN(String xiangzhen, String cunName){
    this.xiangzhen = xiangzhen;
    this.name = cunName;
    this.minzheng = "未测量";
  }
  public void setRK_ZRC_DX(String renkou,String zirancun,String dixing){
    this.renkou = renkou;
    this.zirancun = zirancun;
    this.dixing = dixing;
  }
  public static final String getHead() {
    return "编号,所在乡镇,建制村名称,所在路线名称,经度,纬度,高程,与民政局数据相符,建制村人口,所辖自然村数量,所属地形,建制村编码,岛屿是否建有陆岛交通码头,码头与陆地距离(公里),岛内是否建有公路 ,是否适宜通公路,不适宜原因,备注\r\n";
  }

  public void setBianma(){
    Item.scanToGetXian();
    NameNumber[] xiang = null,cun = null;
    if (Item.xian != null) {
      xiang = Item.xian.getChildren();
      for (int i = 0; i < xiang.length; i++) {
        if (this.xiangzhen.indexOf(xiang[i].getFirstName())!= -1) {
          cun = xiang[i].getChildren();
          if (cun != null) {
            for (int j = 0; j < cun.length; j++) {
              if (this.name.indexOf(cun[j].getFirstName()) != -1) {
                this.bianma = cun[j].getNumber();
              }
            }
          }
        }

      }
    }

  }
  private String[] getJianzhicun(Node node) {
    return ItemValue.getWaypointXZC(node);
  }

  public void setValue() {
    if (this.wpt != null) {
      super.setValue();
      String[] jzc = this.getJianzhicun(this.wpt);
      if (jzc != null) {
        try {
          this.renkou = jzc[7].replaceAll("null", "");
          this.zirancun = jzc[3].replaceAll("null", "");
          this.dixing = jzc[4].replaceAll("null", "");
        }
        catch (Exception ex) {
        }
      }
    }
  }

  /**
   * 这一项,是将"表1"列赋值
   */
  public void setMinzheng(String result) {
    this.minzheng = result;
  }

  public String getValue() {
    return super.getValue() + ",\"" + this.minzheng + "\",\"" + this.renkou +
        "\"" + ",\"" + this.zirancun + "\"" + ",\"" + this.dixing + "\",\"" +this.bianma + "\"";
  }


  public String toString(){
    return this.xiangzhen + " -- " + this.name;
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -