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

📄 scanbeforecut.java

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

import net.aetherial.gis.output.toLd.OpenDirectory;
import java.io.File;
import net.aetherial.gis.surface.CreateFile;
import net.aetherial.gis.surface.ItemValue;
import net.aetherial.gis.our.FrameOur;
import org.w3c.dom.Node;
/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class ScanBeforeCut {
  protected String inputpath;
  protected String outputPath;
  protected String n = "";
  public ScanBeforeCut() {
  }

  protected File[] getFile(){
    OpenDirectory od = new OpenDirectory();
    return od.getOpenFile(this.inputpath);
  }


  protected String getSplashPath(String path) {
    if (path.endsWith("\\")) {
      return path;
    }
    else if (path.endsWith("/")) {
      return path;
    }
    else {
      return path + "\\";
    }
  }

  public void run(){
    FrameOur fo = new FrameOur();
    ItemValue.setShowDialogMessage(false);
    File[] all = this.getFile();
    for (int i = 0; all != null && i < all.length; i++) {
      fo.openFile(all[i]);
      this.getHaveLuduanRoad(all[i]);
      fo.reset();
    }
  }

  protected void getHaveLuduanRoad(File thisFile){
    Node[] trks = ItemValue.getTracks();
    for (int i = 0; trks != null &&  i < trks.length; i++) {
      if (!(ItemValue.getTracks_ld_original_number(trks[i]).equals(""))) {
        this.n = this.n + thisFile.getAbsolutePath() + ":[" + ItemValue.getTracks_ld_original_number(trks[i]) + "]\r\n";
      }
    }
  }

  public void save(){
    File outputFile = new File(getSplashPath(this.outputPath) + "已经有路段编号的文件.txt");
    outputFile.getParentFile().mkdirs();
    CreateFile cf = new CreateFile(outputFile);
    cf.memoryToFile(this.n);
  }

  public static void main(String[] args) {
    ScanBeforeCut scanbeforecut = new ScanBeforeCut();
    scanbeforecut.setInputpath(args[0]);
    scanbeforecut.setOutputPath(args[1]);
    scanbeforecut.run();
    scanbeforecut.save();
  }

  public void setInputpath(String inputpath) {
    this.inputpath = inputpath;
  }

  public void setOutputPath(String outputPath) {
    this.outputPath = outputPath;
  }
}

⌨️ 快捷键说明

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