提交 2f554b07 编写于 作者: 222100117oyq's avatar 222100117oyq

完成了除文档编写和附加功能外的数据测试等所有内容

上级 edd9a767
......@@ -3,13 +3,13 @@
<output-path>$PROJECT_DIR$</output-path>
<root id="archive" name="DWASearch.jar">
<element id="module-output" name="DWASearch" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/net/sf/json-lib/json-lib/2.4/json-lib-2.4-jdk15.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/com/alibaba/fastjson/1.2.54/fastjson-1.2.54.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/net/sf/json-lib/json-lib/2.4/json-lib-2.4-jdk15.jar" path-in-jar="/" />
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/commons-lang/commons-lang/2.5/commons-lang-2.5.jar" path-in-jar="/" />
</root>
</artifact>
......
players
result women 1m springboard
result women 1m springboard
player
Players
resultwomen 1m springboard
result women 10m springboard
result sss
result detail
result women 1m springboard details
result men 10m synchronised
players
\ No newline at end of file
Full Name:HART Alexander
Gender:Male
Country:Austria
Error
-----
Full Name:LOTFI Dariush
Gender:Male
Country:Austria
Error
-----
Full Name:SCHALLER Nikolaj
Gender:Male
Country:Austria
Error
-----
Full Name:ABRAMOWICZ Tazman
Gender:Male
Country:Canada
N/A
-----
Full Name:BELANGER Eloise
Gender:Female
Country:Canada
-----
Full Name:DICK Elaena
Gender:Female
Country:Canada
N/A
-----
Full Name:ERLAM Margo
Gender:Female
Country:Canada
N/A
-----
Full Name:FUNG Katelyn
Gender:Female
Country:Canada
-----
Full Name:JASMIN Amelie-Laura
Gender:Female
Country:Canada
-----
Full Name:TESSIER Benjamin
Gender:Male
Country:Canada
-----
Full Name:WILSON Aimee
Gender:Female
Country:Canada
-----
Full Name:JELINKOVA Tereza
Gender:Female
Country:Czechia
-----
Full Name:SANTIAGO Dominique
Gender:Female
Country:Czechia
-----
Full Name:ABADIA Adrian
Gender:Male
Country:Spain
-----
Full Name:ANTOLINO Valeria
Gender:Female
Country:Spain
-----
Full Name:CAMACHO DEL HOYO Carlos
Gender:Male
Country:Spain
-----
Full Name:CARVAJAL Ana
Gender:Female
Country:Spain
-----
Full Name:GARCIA BOISSIER Nicolas
Gender:Male
Country:Spain
-----
Full Name:LINAN Max
Gender:Male
Country:Spain
-----
Full Name:PAPWORTH BURREL Maria
Gender:Female
Country:Spain
-----
Full Name:RODRIGUEZ LEDESMA Jorge
Gender:Male
Country:Spain
-----
Full Name:VELAZQUEZ Rocio
Gender:Female
Country:Spain
-----
Full Name:BENT-ASHMEIL Desharne
Gender:Female
Country:Great Britain
-----
Full Name:BOND Maisie
Gender:Female
Country:Great Britain
-----
Full Name:DIXON Matthew
Gender:Male
Country:Great Britain
-----
Full Name:HEATLY James
Gender:Male
Country:Great Britain
-----
Full Name:HOULDEN Jordan Christopher
Gender:Male
Country:Great Britain
-----
Full Name:LEE Robbie
Gender:Male
Country:Great Britain
-----
Full Name:MCCABE Euan
Gender:Male
Country:Great Britain
-----
Full Name:ROLLINSON Amy
Gender:Female
Country:Great Britain
-----
Full Name:ONIKASHVILI Tornike
Gender:Male
Country:Georgia
-----
Full Name:SAKANDELIDZE Irakli
Gender:Male
Country:Georgia
-----
Full Name:SHANIDZE Mariam
Gender:Female
Country:Georgia
-----
Full Name:SHARIA Tekle
Gender:Female
Country:Georgia
-----
Full Name:TSULUKIDZE Giorgi
Gender:Male
Country:Georgia
-----
Full Name:AVILA SANCHEZ Luis Carlo
Gender:Male
Country:Germany
-----
Full Name:BARTHEL Timo
Gender:Male
Country:Germany
-----
Full Name:COORDES Carolina
Gender:Female
Country:Germany
-----
Full Name:EIKERMANN GREGORCHUK Jaden Shiloh
Gender:Male
Country:Germany
-----
Full Name:HENTSCHEL Lena
Gender:Female
Country:Germany
-----
Full Name:LUBE Alexander
Gender:Male
Country:Germany
-----
Full Name:MULLER Jette
Gender:Female
Country:Germany
-----
Full Name:OETTINGHAUS Saskia
Gender:Female
Country:Germany
-----
Full Name:PFEIF Pauline Alexandra
Gender:Female
Country:Germany
-----
Full Name:PRENZYNA Espen
Gender:Male
Country:Germany
-----
Full Name:ROSLER Ole Johannes
Gender:Male
Country:Germany
-----
Full Name:ROTHER Jana Lisa
Gender:Female
Country:Germany
-----
Full Name:RUDIGER Lars
Gender:Male
Country:Germany
-----
Full Name:WALDSTEINER Tom Laszlo
Gender:Male
Country:Germany
-----
Full Name:WASSEN Elena
Gender:Female
Country:Germany
-----
Full Name:WASSEN Christina
Gender:Female
Country:Germany
-----
Full Name:WESEMANN Moritz
Gender:Male
Country:Germany
-----
Full Name:TSIRIKOS Athanasios
Gender:Male
Country:Greece
-----
Full Name:BAEK Sunjin
Gender:Female
Country:Republic of Korea
-----
Full Name:CHOI Gangin
Gender:Male
Country:Republic of Korea
-----
Full Name:HAN Jiwoo
Gender:Female
Country:Republic of Korea
-----
Full Name:KANG Jiho
Gender:Male
Country:Republic of Korea
-----
Full Name:KIM Gyeongbin
Gender:Male
Country:Republic of Korea
-----
Full Name:LEE Yejoo
Gender:Female
Country:Republic of Korea
-----
Full Name:LEE Wonseop
Gender:Male
Country:Republic of Korea
-----
Full Name:OH Sooyeon
Gender:Female
Country:Republic of Korea
-----
Full Name:JANSEN Inge
Gender:Female
Country:Netherlands
-----
Full Name:PRAASTERINK Else
Gender:Female
Country:Netherlands
-----
Full Name:VAN DUIJN Celine
Gender:Female
Country:Netherlands
-----
Full Name:BLAZOWSKA Aleksandra
Gender:Female
Country:Poland
-----
Full Name:JACHIM Filip
Gender:Male
Country:Poland
-----
Full Name:LESIAK Kacper
Gender:Male
Country:Poland
-----
Full Name:LUKASZEWICZ Robert
Gender:Male
Country:Poland
-----
Full Name:RZESZUTEK Andrzej
Gender:Male
Country:Poland
-----
Full Name:SKRZEK Kaja
Gender:Female
Country:Poland
-----
Full Name:MUSCALU Nicoleta-Angelica
Gender:Female
Country:Romania
-----
Full Name:COQUOZ Madeline
Gender:Female
Country:Switzerland
-----
Full Name:DUTOIT Guillaume
Gender:Male
Country:Switzerland
-----
Full Name:SUCKOW Jonathan
Gender:Male
Country:Switzerland
-----
Full Name:LUNDIN Amanda
Gender:Female
Country:Sweden
-----
Full Name:AVANESOV Danylo
Gender:Male
Country:Ukraine
-----
Full Name:AZAROV Kyrylo
Gender:Male
Country:Ukraine
-----
Full Name:CHYZHOVSKYI Bohdan
Gender:Male
Country:Ukraine
-----
Full Name:HRYTSENKO Mark
Gender:Male
Country:Ukraine
-----
Full Name:KESAR Viktoriya
Gender:Female
Country:Ukraine
-----
Full Name:KONOVALOV Danylo
Gender:Male
Country:Ukraine
-----
Full Name:NAUMENKO Yevhen
Gender:Male
Country:Ukraine
-----
Full Name:OLIFERCHYK Stanislav
Gender:Male
Country:Ukraine
-----
Full Name:PYSMENSKA Anna
Gender:Female
Country:Ukraine
-----
Full Name:KACHANOV Vyacheslav
Gender:Male
Country:Uzbekistan
-----
Full Name:MYALIN Igor
Gender:Male
Country:Uzbekistan
-----
Full Name:MULLER Jette
Rank:1
Score:51.60 + 52.00 + 51.75 + 46.80 + 46.80 = 248.95
-----
Full Name:ROLLINSON Amy
Rank:2
Score:46.00 + 42.90 + 50.70 + 54.00 + 46.80 = 240.40
-----
Full Name:SKRZEK Kaja
Rank:3
Score:50.40 + 46.80 + 48.30 + 45.60 + 48.75 = 239.85
-----
Full Name:BENT-ASHMEIL Desharne
Rank:4
Score:46.80 + 50.70 + 48.30 + 43.20 + 45.50 = 234.50
-----
Full Name:JASMIN Amelie-Laura
Rank:5
Score:50.40 + 45.50 + 43.70 + 46.80 + 43.75 = 230.15
-----
Full Name:BLAZOWSKA Aleksandra
Rank:6
Score:43.20 + 44.85 + 45.60 + 53.30 + 41.80 = 228.75
-----
Full Name:WILSON Aimee
Rank:7
Score:50.40 + 44.85 + 38.40 + 44.20 + 50.70 = 228.55
-----
Full Name:OH Sooyeon
Rank:8
Score:45.60 + 36.80 + 46.80 + 46.80 + 46.80 = 222.80
-----
Full Name:LEE Yejoo
Rank:9
Score:43.20 + 41.40 + 43.20 + 41.60 + 39.60 = 209.00
-----
Full Name:JELINKOVA Tereza
Rank:10
Score:46.80 + 42.90 + 41.40 + 26.40 + 38.50 = 196.00
-----
Full Name:SHARIA Tekle
Rank:11
Score:38.40 + 41.60 + 30.00 + 30.45 + 34.10 = 174.55
-----
Full Name:SANTIAGO Dominique
Rank:12
Score:42.00 + 18.20 + 35.70 + 34.50 + 32.55 = 162.95
-----
Full Name:MULLER Jette
Rank:1
Score:51.60 + 52.00 + 51.75 + 46.80 + 46.80 = 248.95
-----
Full Name:ROLLINSON Amy
Rank:2
Score:46.00 + 42.90 + 50.70 + 54.00 + 46.80 = 240.40
-----
Full Name:SKRZEK Kaja
Rank:3
Score:50.40 + 46.80 + 48.30 + 45.60 + 48.75 = 239.85
-----
Full Name:BENT-ASHMEIL Desharne
Rank:4
Score:46.80 + 50.70 + 48.30 + 43.20 + 45.50 = 234.50
-----
Full Name:JASMIN Amelie-Laura
Rank:5
Score:50.40 + 45.50 + 43.70 + 46.80 + 43.75 = 230.15
-----
Full Name:BLAZOWSKA Aleksandra
Rank:6
Score:43.20 + 44.85 + 45.60 + 53.30 + 41.80 = 228.75
-----
Full Name:WILSON Aimee
Rank:7
Score:50.40 + 44.85 + 38.40 + 44.20 + 50.70 = 228.55
-----
Full Name:OH Sooyeon
Rank:8
Score:45.60 + 36.80 + 46.80 + 46.80 + 46.80 = 222.80
-----
Full Name:LEE Yejoo
Rank:9
Score:43.20 + 41.40 + 43.20 + 41.60 + 39.60 = 209.00
-----
Full Name:JELINKOVA Tereza
Rank:10
Score:46.80 + 42.90 + 41.40 + 26.40 + 38.50 = 196.00
-----
Full Name:SHARIA Tekle
Rank:11
Score:38.40 + 41.60 + 30.00 + 30.45 + 34.10 = 174.55
-----
Full Name:SANTIAGO Dominique
Rank:12
Score:42.00 + 18.20 + 35.70 + 34.50 + 32.55 = 162.95
N/A
-----
Full Name:HART Alexander
Gender:Male
......
......@@ -11,7 +11,7 @@ import java.nio.charset.StandardCharsets;
public class DWASearch {
public static void main(String[] args) {
public static void main(String[] args) throws IOException {
if (args.length < 2) {
System.out.println("Usage: java -jar DWASearch.jar input.txt output.txt");
return;
......@@ -19,14 +19,11 @@ public class DWASearch {
String inputFile = args[0];
String outputFile = args[1];
try (BufferedReader br = new BufferedReader(new FileReader(inputFile));
BufferedWriter bw = new BufferedWriter(new FileWriter(outputFile))) {
String line;
//from here
while ((line = br.readLine()) != null) {
// Process the input data here
// For example, write the input data to the output file
BufferedReader br = new BufferedReader(new FileReader(inputFile));
BufferedWriter bw = new BufferedWriter(new FileWriter(outputFile));
String line;
while ((line = br.readLine()) != null) {
try {
String[] word = line.split(" ");
//from here
......@@ -45,38 +42,17 @@ public class DWASearch {
getResultSimple(jsonFile,bw);
}
}
}
} catch (IOException e) {
e.printStackTrace();
}
else{//指令无法识别时
bw.write("Error\n-----\n");
}
// String outputFile = "output.txt";
//
// try (BufferedWriter bw = new BufferedWriter(new FileWriter(outputFile))) {
// String line = "result women 1m springboard";
// String[] word = line.split(" ");
// //from here
//
// if(word[0].equals("players")&&word.length==1)
// {//功能一
// String jsonFile = "src/data/athletes.json";
// getAthletes(jsonFile,bw);
// }else if(word[0].equals("result")){
// if(word[word.length-1].equals("detail")){
// //附加功能
//
//
// }else{
// //功能二
// String[] word1 = line.split(" ",2);//提取文件名
// String jsonFile = "src/data/" +word1[1]+ ".json";
// getResultSimple(jsonFile,bw);
// }
// }
//
// } catch (IOException e) {
// e.printStackTrace();
// }
} catch (IOException e) {//文件路径找不到
bw.write("N/A\n-----\n");
e.printStackTrace();
}
}
br.close();
bw.close();
}
//功能一
......@@ -121,4 +97,6 @@ public class DWASearch {
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册