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

📄 xiangzhenxzc.java

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

import java.util.Vector;
import net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.txt.Jzcjbqk;
import net.aetherial.gis.table.WuWei;
import net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.excel.ReadAdder;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class XiangzhenXZC {
  private String xiangzhenName = "";
//  private WuWei ww = null;
  private Vector xzc = new Vector();
  private Vector pos = new Vector();
  public XiangzhenXZC() {
  }

  public void setXiangzhenName(String xiangzhenName){
    this.xiangzhenName = xiangzhenName;
  }

  public String getXiangzhenName(){
    return this.xiangzhenName;
  }
  public void addXZC(String xzcName,int pos){
    this.xzc.addElement(xzcName);
    this.pos.addElement(pos+"");
  }

  public void removeXZC(String xzcName){
    if (this.xzc != null) {
      for (int i = 0; i < this.xzc.size(); i++) {
        if (this.xzc.elementAt(i).equals(xzcName)) {
          this.xzc.removeElementAt(i);
          this.pos.removeElementAt(i);
        }
      }
    }
  }

//  public void setReadAdder(ReadAdder adder){
//    this.adder = adder;
//  }
//
//  public void setWWArray(WuWei ww){
//    this.ww = ww;
//  }
  public Jzcjbqk[] getNewJzcjbqk(ReadAdder adder,WuWei ww){
    Jzcjbqk[] temp = new Jzcjbqk[this.xzc.size()];
    int id = 0;
    for (int i = 0; i < temp.length; i++) {
      id = Integer.parseInt(pos.elementAt(i).toString());
      temp[i] = new Jzcjbqk();
      temp[i].set0_2ColumnName(this.xzc.elementAt(i).toString());
      temp[i].set3_4ColumnXiangzhenName(this.xiangzhenName);
      temp[i].set1_9ColumnDixing(getdixing(ww.wdixing[id]));
      temp[i].set3_1ColumnZRCNum(ww.wzirancun[id]);
      temp[i].setExcelReadMethod(null,adder);
      temp[i].set1_1ColumnRenkou(ww.wuwei_renkou[id]);
      if (getdixing(ww.wdixing[id]).equals("3")) {
        temp[i].set1_8ColumnHaveMatou("1");
        temp[i].set1_7ColumnMatouDis("0.0");
        temp[i].set1_6ColumnHaveRoad("1");
      }
      temp[i].set1_3ColumnSuitRoad("1");
      temp[i].set1_5ColumnLongitude("118.88888888");
      temp[i].set1_4ColumnLatitude("31.88888888");
    }
    return temp;
  }

  private String getdixing(String dixing){
    if ((dixing.indexOf("平原") != -1)||(dixing.indexOf("微丘") != -1)||(dixing.indexOf("丘陵") != -1)) {
      return 1+"";
    }
    else if ((dixing.indexOf("山岭") != -1)||(dixing.indexOf("重丘") != -1)) {
      return 2+"";
    }
    else if(dixing.indexOf("岛屿") != -1){
      return 3+"";
    }else{
       return 1+"";
    }
  }

  public String[] getChildren(){
    String[] temp = new String[this.xzc.size()];
    for (int i = 0; i < temp.length; i++) {
      temp[i] = (String)this.xzc.elementAt(i);
    }
    return temp;
  }
  public String toString(){
    String n = "";
    n = n + this.xiangzhenName + " in class XiangzhenXZC \r\n";
    if (this.xzc.size() != 0) {
      for (int i = 0; i < this.xzc.size(); i++) {
        n = n + "\t" + this.xzc.elementAt(i) + "\r\n";
      }
    }

    return n;
  }

}

⌨️ 快捷键说明

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