package copy;
import tool.*;
import tool.*;
import java.io.*;
public class pro {
int s,datanumber;
String[] data=new String[50000];
String[] word=new String[50];
public static void main(String[] args) {
pro te=new pro();
}
pro(){
word[ 1 ]=" 農林水産業 ";
word[ 2 ]=" 鉱業 ";
word[ 3 ]=" 食料品 ";
word[ 4 ]=" 繊維 ";
word[ 5 ]=" パルプ・紙 ";
word[ 6 ]=" 化学 ";
word[ 7 ]=" 石油・石炭製品 ";
word[ 8 ]=" 窯業・土石製品 ";
word[ 9 ]=" 一次金属 ";
word[ 10 ]=" 金属製品 ";
word[ 11 ]=" 一般機械 ";
word[ 12 ]=" 電気機械 ";
word[ 13 ]=" 輸送用機械 ";
word[ 14 ]=" 精密機械 ";
word[ 15 ]=" その他の製造業 ";
word[ 16 ]=" 建設業 ";
word[ 17 ]=" 電気・ガス・水道業 ";
word[ 18 ]=" 卸売・小売業 ";
word[ 19 ]=" 金融・保険業 ";
word[ 20 ]=" 不動産業 ";
word[ 21 ]=" 運輸・通信業 ";
word[ 22 ]=" サービス業(民間、非営利) ";
word[ 23 ]=" サービス業(政府) ";
int tr=3;
for(tr=1;tr<24;tr++){
readx("co.txt");
String str="if(n==0)point[m] = rows[i][20]/1";
String str1="if(n=="+tr+")point[m] = rows[i][20]/1";
for(s=1;s<datanumber+1;s++){
if(data[s].indexOf(str)>-1)data[s]=str1;
}
String file="data/a"+tr+".js";
writexml(file);
readx("memo.html");
str="<script src=\"sample.js\"></script>";
String str2="<script src=\"a"+tr+".js\"></script>";
for(s=1;s<datanumber+1;s++){
if(data[s].indexOf(str)>-1)data[s]=str2;
}
String str3="<title>"+word[tr]+"就業人口"+"</title>";
for(s=1;s<datanumber+1;s++){
if(data[s].indexOf("<title")>-1)data[s]=str3;
}
file="data/b"+tr+".html";
writexml(file);
}
}
void writexml(String file){
int s,sx;
try{
PrintWriter pw = new PrintWriter (new BufferedWriter(new FileWriter(file)));
for(s=1;s<datanumber+1;s++){
pw.println(data[s]);
}
System.out.println("ファイルに書きこみました。");
pw.close();
} catch(IOException ep){ System.out.println("入出力エラーです。"); }
}
void readx(String file){
String str;
BufferedReader br;
int s;
s=0;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8"));
while((str = br.readLine()) != null) {
s=s+1;
data[s]=str;
}
br.close();
} catch (IOException e) {System.out.println(e);}
datanumber=s;
}
}
最終更新:2016年08月29日 16:36