📄 checknotrk.java
字号:
package net.aetherial.gis.our.auto.extend;
import net.aetherial.gis.surface.ItemValue;
import java.io.File;
import net.aetherial.gis.surface.CreateFile;
import net.aetherial.gis.our.FrameOur;
import net.aetherial.gis.our.auto.CutByRS;
import org.w3c.dom.Node;
import net.aetherial.gis.our.auto.Auto;
import net.aetherial.gis.dataType.WptType;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2004</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class CheckNoTrk extends Auto{
private String directory = "";
public CheckNoTrk(FrameOur fo) {
this.setFrameOur(fo);
}
/**
* 先遍历所有文件
* 如果文件中有ID为-2的航点
* 判断航点的属性是不是行政村
* 如果是行政村,则打印
* 否则忽略
* 将打印的字符串输出到指定的路径
*/
public void scanAllFile(){
if (super.input == null) {
System.out.println("super.input == null");
return;
}
for (int i = 0; i < this.input.length; i++) {
this.open(this.input[i]);
this.print(this.input[i].getName() +
"********************************************************");
this.scanThisFile();
this.setMemoryReset();
}
this.createLog(this.directory +ItemValue.getDayTimeNumber() + ".log",this.getlog());
this.msg("文件检查航点完毕!\r\n生成的文件在:" + this.directory + "下.log文件");
}
public void setSavedDirectory(String path){
this.directory = path;
}
private void scanThisFile(){
Node[] wpt = ItemValue.getWaypoint();
//Node aNode = null;
if(wpt == null){
return;
}
for (int i = 0; i < wpt.length; i++) {
if (ItemValue.getWaypointTracksID(wpt[i]).equals("-2")) {
if (ItemValue.getWaypointKP(wpt[i]).equals(WptType.W1XingZhengCun)) {
this.print("第" + (i + 1) + "个航点:" + ItemValue.getWaypointName(wpt[i]) +
"没有关联到航迹!");
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -