📄 notcompleletly.java
字号:
package net.aetherial.gis.our.auto.check.Integritywpt;
import org.w3c.dom.Node;
import net.aetherial.gis.surface.ItemValue;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2004</p>
*
* <p>Company: </p>
*
* @author 王爱国
* @version 1.0
*/
public class NotCompleletly {
Node[] allwpt = null;
private String noCompN = "";
private String numericN = "";
private int numericCount = 0;
private int noCompCount = 0;
public NotCompleletly() {
}
public void checkAll(){
allwpt = ItemValue.getWaypoint();
if (allwpt != null) {
for (int i = 0; i < allwpt.length; i++) {
if (this.isNumeric(ItemValue.getWaypointName(allwpt[i]))) {
numericN = numericN + "<" + ItemValue.getWaypointName(allwpt[i]) + ">["+(i+1)+"]";
numericCount++;
}
if (this.isNoComp(allwpt[i])) {
noCompN = noCompN + "<" + ItemValue.getWaypointName(allwpt[i]) + ">["+(i+1)+"]";
noCompCount++;
}
}
if (!(numericN.equals(""))) {
this.numericN = "\"\",\"\",\"\",\"\",文件<" + ItemValue.fileName + ">里有" + this.numericCount + "个属于数字信息的航点.航点名称为:" + numericN +"\r\n";
}
if (!(noCompN.equals(""))) {
this.noCompN = "\"\",\"\",\"\",\"\",文件<" + ItemValue.fileName + ">里有" + this.noCompCount + "个信息不完整的航点.航点名称为:" + noCompN +"\r\n";
}
}
}
/**
* 是否是数字名称
*
* 如果是,返回true
*/
private boolean isNumeric(String wptname){
String name = wptname.trim();
char[] num = {'0','1','2','3','4','5','6','7','8','9'};
char[] ch = name.toCharArray();
boolean temp = false,temp2 = false;
for(int i =0;i<ch.length;i++){
for(int j=0;j<num.length;j++){
if(ch[i]==num[j]){
temp = true;
temp2 = true;
break;
}
}
if(temp!=true){
temp2 = false;
break;
}else{
temp = false;
}
}
if(temp2== true){
return true;
}else{
return false;
}
}
/**
* 是否是没有填写完毕,比如关键点和道路变化属性
*/
private boolean isNoComp(Node wpt){
String kp = (ItemValue.getWaypointKP(wpt)).trim();
String rs = (ItemValue.getWaypointRS(wpt)).trim();
String RWa = (ItemValue.getWaypointRWa(wpt)).trim();
String RWb = (ItemValue.getWaypointRWb(wpt)).trim();
if ((kp.equals(""))&&(rs.equals(""))&&(RWa.equals(""))&&(RWb.equals(""))) {
return true;
}else{
return false;
}
}
public String getN(){
return this.noCompN + this.numericN ;
}
public void reset(){
this.noCompN ="";
this.numericN ="";
this.noCompCount = 0;
this.numericCount = 0;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -