Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs2-19wi
lab01
Commits
cc14dda3
Commit
cc14dda3
authored
6 years ago
by
Adam Blank
Browse files
Options
Download
Email Patches
Plain Diff
Edits Wikipedia API to not output files
parent
051088f8
master
No related merge requests found
Pipeline
#2637
canceled with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.idea/workspace.xml
+81
-80
.idea/workspace.xml
src/edu/caltech/cs2/lab01/libraries/Wikipedia.java
+4
-6
src/edu/caltech/cs2/lab01/libraries/Wikipedia.java
with
85 additions
and
86 deletions
+85
-86
.idea/workspace.xml
View file @
cc14dda3
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"9d8f49d5-a7a8-40cd-89b4-170587b4708e"
name=
"Default Changelist"
comment=
""
>
<list
default=
"true"
id=
"9d8f49d5-a7a8-40cd-89b4-170587b4708e"
name=
"Default Changelist"
comment=
"(fixed tests for new WikipediaPage interface) + completed version of reference solution"
>
<change
afterPath=
"$PROJECT_DIR$/.gitlab-ci.yml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/.idea/checkstyle-idea.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/src/edu/caltech/cs2/lab01/libraries/Wikipedia.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/edu/caltech/cs2/lab01/libraries/Wikipedia.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/.idea/libraries/org_hamcrest_hamcrest_all_1_3.xml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/.idea/libraries/org_junit_jupiter_junit_jupiter_params_5_4_0.xml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/.idea/misc.xml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/.idea/modules.xml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/.idea/uiDesigner.xml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/lab01-wikipedia.iml"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/src/edu/caltech/cs2/lab01/Main.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/src/edu/caltech/cs2/lab01/WikipediaPage.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/src/edu/caltech/cs2/lab01/libraries/Wikipedia.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/tests/data/links_for_pizza_farm.txt"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/tests/data/links_for_rsa.txt"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/tests/data/sandycove_island.txt"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/tests/data/satellite_galaxies_of_the_milky_way_main_output.txt"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/tests/data/selagama_colony.txt"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/tests/edu/caltech/cs2/helpers/CaptureSystemOutput.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/tests/edu/caltech/cs2/helpers/FileSource.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/tests/edu/caltech/cs2/helpers/FileSourceProvider.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/tests/edu/caltech/cs2/helpers/Reflection.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/tests/edu/caltech/cs2/lab01/WikipediaMainTests.java"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/tests/edu/caltech/cs2/lab01/WikipediaPageTests.java"
afterDir=
"false"
/>
</list>
</list>
<ignored
path=
"$PROJECT_DIR$/out/"
/>
<ignored
path=
"$PROJECT_DIR$/out/"
/>
<ignored
path=
"$PROJECT_DIR$/.gradle/"
/>
<ignored
path=
"$PROJECT_DIR$/.gradle/"
/>
...
@@ -66,12 +45,13 @@
...
@@ -66,12 +45,13 @@
<session
id=
"666900165"
>
<session
id=
"666900165"
>
<usages-collector
id=
"statistics.lifecycle.project"
>
<usages-collector
id=
"statistics.lifecycle.project"
>
<counts>
<counts>
<entry
key=
"project.closed"
value=
"4"
/>
<entry
key=
"project.closed"
value=
"5"
/>
<entry
key=
"project.open.time.1"
value=
"1"
/>
<entry
key=
"project.open.time.2"
value=
"3"
/>
<entry
key=
"project.open.time.2"
value=
"3"
/>
<entry
key=
"project.open.time.20"
value=
"1"
/>
<entry
key=
"project.open.time.20"
value=
"1"
/>
<entry
key=
"project.open.time.21"
value=
"1"
/>
<entry
key=
"project.open.time.21"
value=
"1"
/>
<entry
key=
"project.open.time.25"
value=
"1"
/>
<entry
key=
"project.open.time.25"
value=
"1"
/>
<entry
key=
"project.opened"
value=
"
6
"
/>
<entry
key=
"project.opened"
value=
"
7
"
/>
</counts>
</counts>
</usages-collector>
</usages-collector>
<usages-collector
id=
"statistics.file.extensions.open"
>
<usages-collector
id=
"statistics.file.extensions.open"
>
...
@@ -80,7 +60,7 @@
...
@@ -80,7 +60,7 @@
<entry
key=
"canis major dwarf galaxy"
value=
"1"
/>
<entry
key=
"canis major dwarf galaxy"
value=
"1"
/>
<entry
key=
"class"
value=
"4"
/>
<entry
key=
"class"
value=
"4"
/>
<entry
key=
"iml"
value=
"4"
/>
<entry
key=
"iml"
value=
"4"
/>
<entry
key=
"java"
value=
"
47
"
/>
<entry
key=
"java"
value=
"
50
"
/>
<entry
key=
"kim 2"
value=
"1"
/>
<entry
key=
"kim 2"
value=
"1"
/>
<entry
key=
"leo v (dwarf galaxy)"
value=
"1"
/>
<entry
key=
"leo v (dwarf galaxy)"
value=
"1"
/>
<entry
key=
"parsec"
value=
"1"
/>
<entry
key=
"parsec"
value=
"1"
/>
...
@@ -93,7 +73,7 @@
...
@@ -93,7 +73,7 @@
<counts>
<counts>
<entry
key=
"CLASS"
value=
"4"
/>
<entry
key=
"CLASS"
value=
"4"
/>
<entry
key=
"IDEA_MODULE"
value=
"4"
/>
<entry
key=
"IDEA_MODULE"
value=
"4"
/>
<entry
key=
"JAVA"
value=
"
47
"
/>
<entry
key=
"JAVA"
value=
"
50
"
/>
<entry
key=
"PLAIN_TEXT"
value=
"22"
/>
<entry
key=
"PLAIN_TEXT"
value=
"22"
/>
<entry
key=
"XML"
value=
"3"
/>
<entry
key=
"XML"
value=
"3"
/>
<entry
key=
"YAML"
value=
"4"
/>
<entry
key=
"YAML"
value=
"4"
/>
...
@@ -102,7 +82,7 @@
...
@@ -102,7 +82,7 @@
<usages-collector
id=
"statistics.file.extensions.edit"
>
<usages-collector
id=
"statistics.file.extensions.edit"
>
<counts>
<counts>
<entry
key=
"dummy"
value=
"45"
/>
<entry
key=
"dummy"
value=
"45"
/>
<entry
key=
"java"
value=
"22
885
"
/>
<entry
key=
"java"
value=
"22
948
"
/>
<entry
key=
"txt"
value=
"344"
/>
<entry
key=
"txt"
value=
"344"
/>
<entry
key=
"xml"
value=
"3"
/>
<entry
key=
"xml"
value=
"3"
/>
<entry
key=
"yml"
value=
"150"
/>
<entry
key=
"yml"
value=
"150"
/>
...
@@ -110,7 +90,7 @@
...
@@ -110,7 +90,7 @@
</usages-collector>
</usages-collector>
<usages-collector
id=
"statistics.file.types.edit"
>
<usages-collector
id=
"statistics.file.types.edit"
>
<counts>
<counts>
<entry
key=
"JAVA"
value=
"22
885
"
/>
<entry
key=
"JAVA"
value=
"22
948
"
/>
<entry
key=
"PLAIN_TEXT"
value=
"389"
/>
<entry
key=
"PLAIN_TEXT"
value=
"389"
/>
<entry
key=
"XML"
value=
"3"
/>
<entry
key=
"XML"
value=
"3"
/>
<entry
key=
"YAML"
value=
"150"
/>
<entry
key=
"YAML"
value=
"150"
/>
...
@@ -120,7 +100,7 @@
...
@@ -120,7 +100,7 @@
</component>
</component>
<component
name=
"FileEditorManager"
>
<component
name=
"FileEditorManager"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/src/edu/caltech/cs2/lab01/WikipediaPage.java"
>
<entry
file=
"file://$PROJECT_DIR$/src/edu/caltech/cs2/lab01/WikipediaPage.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"75"
>
<state
relative-caret-position=
"75"
>
...
@@ -129,10 +109,40 @@
...
@@ -129,10 +109,40 @@
</provider>
</provider>
</entry>
</entry>
</file>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/tests/edu/caltech/cs2/lab01/WikipediaMainTests.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"165"
>
<caret
line=
"16"
column=
"58"
selection-start-line=
"16"
selection-start-column=
"24"
selection-end-line=
"16"
selection-end-column=
"59"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/tests/edu/caltech/cs2/lab01/WikipediaPageTests.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"446"
>
<caret
line=
"147"
column=
"13"
selection-start-line=
"147"
selection-start-column=
"13"
selection-end-line=
"147"
selection-end-column=
"13"
/>
<folding>
<element
signature=
"imports"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/src/edu/caltech/cs2/lab01/libraries/Wikipedia.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"225"
>
<caret
line=
"20"
column=
"42"
selection-start-line=
"20"
selection-start-column=
"42"
selection-end-line=
"20"
selection-end-column=
"42"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/src/edu/caltech/cs2/lab01/Main.java"
>
<entry
file=
"file://$PROJECT_DIR$/src/edu/caltech/cs2/lab01/Main.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"30
2
"
>
<state
relative-caret-position=
"
6
30"
>
<caret
line=
"42"
column=
"39"
selection-start-line=
"42"
selection-start-column=
"39"
selection-end-line=
"42"
selection-end-column=
"39"
/>
<caret
line=
"42"
column=
"39"
selection-start-line=
"42"
selection-start-column=
"39"
selection-end-line=
"42"
selection-end-column=
"39"
/>
</state>
</state>
</provider>
</provider>
...
@@ -205,7 +215,6 @@
...
@@ -205,7 +215,6 @@
<option
value=
"$PROJECT_DIR$/tests/data/satellite_galaxies_of_the_milky_way_main_output.txt"
/>
<option
value=
"$PROJECT_DIR$/tests/data/satellite_galaxies_of_the_milky_way_main_output.txt"
/>
<option
value=
"$PROJECT_DIR$/src/edu/caltech/cs2/lab01/libraries/X.java"
/>
<option
value=
"$PROJECT_DIR$/src/edu/caltech/cs2/lab01/libraries/X.java"
/>
<option
value=
"$PROJECT_DIR$/tests/edu/caltech/cs2/libraries/Wikipedia.java"
/>
<option
value=
"$PROJECT_DIR$/tests/edu/caltech/cs2/libraries/Wikipedia.java"
/>
<option
value=
"$PROJECT_DIR$/src/edu/caltech/cs2/lab01/libraries/Wikipedia.java"
/>
<option
value=
"$PROJECT_DIR$/tests/edu/caltech/cs2/lab01/libraries/WikipediaX.java"
/>
<option
value=
"$PROJECT_DIR$/tests/edu/caltech/cs2/lab01/libraries/WikipediaX.java"
/>
<option
value=
"$PROJECT_DIR$/tests/edu/caltech/cs2/lab01/libraries/Wikipedia.java"
/>
<option
value=
"$PROJECT_DIR$/tests/edu/caltech/cs2/lab01/libraries/Wikipedia.java"
/>
<option
value=
"$PROJECT_DIR$/.gitlab-ci.yml"
/>
<option
value=
"$PROJECT_DIR$/.gitlab-ci.yml"
/>
...
@@ -213,6 +222,7 @@
...
@@ -213,6 +222,7 @@
<option
value=
"$PROJECT_DIR$/tests/edu/caltech/cs2/lab01/WikipediaPageTests.java"
/>
<option
value=
"$PROJECT_DIR$/tests/edu/caltech/cs2/lab01/WikipediaPageTests.java"
/>
<option
value=
"$PROJECT_DIR$/src/edu/caltech/cs2/lab01/Main.java"
/>
<option
value=
"$PROJECT_DIR$/src/edu/caltech/cs2/lab01/Main.java"
/>
<option
value=
"$PROJECT_DIR$/src/edu/caltech/cs2/lab01/WikipediaPage.java"
/>
<option
value=
"$PROJECT_DIR$/src/edu/caltech/cs2/lab01/WikipediaPage.java"
/>
<option
value=
"$PROJECT_DIR$/src/edu/caltech/cs2/lab01/libraries/Wikipedia.java"
/>
</list>
</list>
</option>
</option>
</component>
</component>
...
@@ -229,8 +239,8 @@
...
@@ -229,8 +239,8 @@
</treeState>
</treeState>
</component>
</component>
<component
name=
"ProjectFrameBounds"
>
<component
name=
"ProjectFrameBounds"
>
<option
name=
"x"
value=
"
24
"
/>
<option
name=
"x"
value=
"
38
"
/>
<option
name=
"y"
value=
"
4
5"
/>
<option
name=
"y"
value=
"
3
5"
/>
<option
name=
"width"
value=
"1402"
/>
<option
name=
"width"
value=
"1402"
/>
<option
name=
"height"
value=
"834"
/>
<option
name=
"height"
value=
"834"
/>
</component>
</component>
...
@@ -254,9 +264,9 @@
...
@@ -254,9 +264,9 @@
<foldersAlwaysOnTop
value=
"true"
/>
<foldersAlwaysOnTop
value=
"true"
/>
</navigator>
</navigator>
<panes>
<panes>
<pane
id=
"PackagesPane"
/>
<pane
id=
"Course"
/>
<pane
id=
"Course"
/>
<pane
id=
"Scope"
/>
<pane
id=
"Scope"
/>
<pane
id=
"PackagesPane"
/>
<pane
id=
"ProjectPane"
>
<pane
id=
"ProjectPane"
>
<subPane>
<subPane>
<expand>
<expand>
...
@@ -281,10 +291,11 @@
...
@@ -281,10 +291,11 @@
<property
name=
"SearchEverywhereHistoryKey"
value=
"	FILE	file:///Users/blank/IdeaProjects/lab01-wikipedia/src/edu/caltech/cs2/lab01/Main.java"
/>
<property
name=
"SearchEverywhereHistoryKey"
value=
"	FILE	file:///Users/blank/IdeaProjects/lab01-wikipedia/src/edu/caltech/cs2/lab01/Main.java"
/>
<property
name=
"WebServerToolWindowFactoryState"
value=
"false"
/>
<property
name=
"WebServerToolWindowFactoryState"
value=
"false"
/>
<property
name=
"aspect.path.notification.shown"
value=
"true"
/>
<property
name=
"aspect.path.notification.shown"
value=
"true"
/>
<property
name=
"com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp"
value=
"154
2991327608
"
/>
<property
name=
"com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp"
value=
"154
3097464279
"
/>
<property
name=
"com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary"
value=
"JUnit5"
/>
<property
name=
"com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary"
value=
"JUnit5"
/>
<property
name=
"com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit5"
value=
""
/>
<property
name=
"com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit5"
value=
""
/>
<property
name=
"last_directory_selection"
value=
"$PROJECT_DIR$/src/edu/caltech/cs2/lab01"
/>
<property
name=
"last_directory_selection"
value=
"$PROJECT_DIR$/src/edu/caltech/cs2/lab01"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$"
/>
<property
name=
"nodejs_interpreter_path.stuck_in_default_project"
value=
"undefined stuck path"
/>
<property
name=
"nodejs_interpreter_path.stuck_in_default_project"
value=
"undefined stuck path"
/>
<property
name=
"nodejs_npm_path_reset_for_default_project"
value=
"true"
/>
<property
name=
"nodejs_npm_path_reset_for_default_project"
value=
"true"
/>
<property
name=
"project.structure.last.edited"
value=
"Libraries"
/>
<property
name=
"project.structure.last.edited"
value=
"Libraries"
/>
...
@@ -406,7 +417,8 @@
...
@@ -406,7 +417,8 @@
<workItem
from=
"1542741923179"
duration=
"10818000"
/>
<workItem
from=
"1542741923179"
duration=
"10818000"
/>
<workItem
from=
"1542832198825"
duration=
"391000"
/>
<workItem
from=
"1542832198825"
duration=
"391000"
/>
<workItem
from=
"1542889792275"
duration=
"2422000"
/>
<workItem
from=
"1542889792275"
duration=
"2422000"
/>
<workItem
from=
"1542991053586"
duration=
"259000"
/>
<workItem
from=
"1542991053586"
duration=
"342000"
/>
<workItem
from=
"1543030246351"
duration=
"3489000"
/>
</task>
</task>
<task
id=
"LOCAL-00001"
summary=
"Updates implementation and adds tests for most of the functionality"
>
<task
id=
"LOCAL-00001"
summary=
"Updates implementation and adds tests for most of the functionality"
>
<created>
1542555427665
</created>
<created>
1542555427665
</created>
...
@@ -521,7 +533,7 @@
...
@@ -521,7 +533,7 @@
</history-entry>
</history-entry>
</component>
</component>
<component
name=
"TimeTrackingManager"
>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"5
0720
000"
/>
<option
name=
"totallyTimeSpent"
value=
"5
4292
000"
/>
</component>
</component>
<component
name=
"TodoView"
>
<component
name=
"TodoView"
>
<todo-panel
id=
"selected-file"
>
<todo-panel
id=
"selected-file"
>
...
@@ -533,10 +545,10 @@
...
@@ -533,10 +545,10 @@
</todo-panel>
</todo-panel>
</component>
</component>
<component
name=
"ToolWindowManager"
>
<component
name=
"ToolWindowManager"
>
<frame
x=
"
24
"
y=
"
4
5"
width=
"1402"
height=
"834"
extended-state=
"0"
/>
<frame
x=
"
38
"
y=
"
3
5"
width=
"1402"
height=
"834"
extended-state=
"0"
/>
<editor
active=
"true"
/>
<editor
active=
"true"
/>
<layout>
<layout>
<window_info
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.2
6838234
"
/>
<window_info
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"0"
visible=
"true"
weight=
"0.2
720588
"
/>
<window_info
id=
"Structure"
order=
"1"
side_tool=
"true"
weight=
"0.25"
/>
<window_info
id=
"Structure"
order=
"1"
side_tool=
"true"
weight=
"0.25"
/>
<window_info
id=
"Image Layers"
order=
"2"
/>
<window_info
id=
"Image Layers"
order=
"2"
/>
<window_info
id=
"Designer"
order=
"3"
/>
<window_info
id=
"Designer"
order=
"3"
/>
...
@@ -736,13 +748,7 @@
...
@@ -736,13 +748,7 @@
<entry
file=
"file://$PROJECT_DIR$/.idea/modules.xml"
>
<entry
file=
"file://$PROJECT_DIR$/.idea/modules.xml"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/.idea/checkstyle-idea.xml"
>
<entry
file=
"file://$PROJECT_DIR$/.idea/checkstyle-idea.xml"
/>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"225"
>
<caret
line=
"15"
column=
"9"
selection-start-line=
"15"
selection-start-column=
"9"
selection-end-line=
"15"
selection-end-column=
"9"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tests/data/satellite_galaxies_of_the_milky_way_main_output.txt"
>
<entry
file=
"file://$PROJECT_DIR$/tests/data/satellite_galaxies_of_the_milky_way_main_output.txt"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"735"
>
<state
relative-caret-position=
"735"
>
...
@@ -755,69 +761,64 @@
...
@@ -755,69 +761,64 @@
<entry
file=
"file://$PROJECT_DIR$/tests/wikipedia/canis major dwarf galaxy"
/>
<entry
file=
"file://$PROJECT_DIR$/tests/wikipedia/canis major dwarf galaxy"
/>
<entry
file=
"file://$PROJECT_DIR$/tests/wikipedia/leo v (dwarf galaxy)"
/>
<entry
file=
"file://$PROJECT_DIR$/tests/wikipedia/leo v (dwarf galaxy)"
/>
<entry
file=
"file://$PROJECT_DIR$/tests/wikipedia/kim 2"
/>
<entry
file=
"file://$PROJECT_DIR$/tests/wikipedia/kim 2"
/>
<entry
file=
"file://$PROJECT_DIR$/tests/wikipedia/parsec"
>
<entry
file=
"file://$PROJECT_DIR$/tests/wikipedia/parsec"
/>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
<entry
file=
"file://$PROJECT_DIR$/tests/edu/caltech/cs2/lab01/libraries/Wikipedia.java"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tests/edu/caltech/cs2/helpers/CaptureSystemOutput.java"
>
<entry
file=
"file://$PROJECT_DIR$/tests/edu/caltech/cs2/lab01/libraries/Wikipedia.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"166"
>
<caret
line=
"12"
column=
"46"
selection-start-line=
"12"
selection-start-column=
"46"
selection-end-line=
"12"
selection-end-column=
"46"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/edu/caltech/cs2/lab01/libraries/Wikipedia.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
91
"
>
<state
relative-caret-position=
"1
5
"
>
<caret
line=
"
26
"
column=
"
30"
lean-forward=
"true
"
selection-start-line=
"
26
"
selection-start-column=
"
30
"
selection-end-line=
"
26
"
selection-end-column=
"
30
"
/>
<caret
line=
"
1
"
column=
"
27
"
selection-start-line=
"
1
"
selection-start-column=
"
27
"
selection-end-line=
"
1
"
selection-end-column=
"
27
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
tests/edu/caltech/cs2/helpers/CaptureSystemOutput.java
"
>
<entry
file=
"file://$PROJECT_DIR$/
.gitlab-ci.yml
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"15"
>
<state
relative-caret-position=
"1
0
5"
>
<caret
line=
"
1
"
column=
"
27
"
selection-start-line=
"
1
"
selection-start-column=
"
27
"
selection-end-line=
"
1
"
selection-end-column=
"
27
"
/>
<caret
line=
"
7
"
column=
"
34
"
selection-start-line=
"
7
"
selection-start-column=
"
34
"
selection-end-line=
"
7
"
selection-end-column=
"
34
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
tests/edu/caltech/cs2/
lab01
/W
ikipedia
MainTests.java
"
>
<entry
file=
"file://$PROJECT_DIR$/lab01
-w
ikipedia
.iml
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
6
5"
>
<state
relative-caret-position=
"1
9
5"
>
<caret
line=
"1
6
"
column=
"
5
8"
selection-start-line=
"1
6
"
selection-start-column=
"2
4
"
selection-end-line=
"1
6
"
selection-end-column=
"
59
"
/>
<caret
line=
"1
3
"
column=
"8"
selection-start-line=
"1
3
"
selection-start-column=
"2"
selection-end-line=
"1
3
"
selection-end-column=
"
8
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
tests
/edu/caltech/cs2/lab01/WikipediaPage
Tests
.java"
>
<entry
file=
"file://$PROJECT_DIR$/
src
/edu/caltech/cs2/lab01/WikipediaPage.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
150
"
>
<state
relative-caret-position=
"
75
"
>
<caret
line=
"
138
"
column=
"
10
"
selection-start-line=
"
138
"
selection-start-column=
"
10
"
selection-end-line=
"
138
"
selection-end-column=
"
10
"
/>
<caret
line=
"
5
"
column=
"
22
"
selection-start-line=
"
5
"
selection-start-column=
"
22
"
selection-end-line=
"
5
"
selection-end-column=
"
22
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/edu/caltech/cs2/lab01/Main.java"
>
<entry
file=
"file://$PROJECT_DIR$/src/edu/caltech/cs2/lab01/Main.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"30
2
"
>
<state
relative-caret-position=
"
6
30"
>
<caret
line=
"42"
column=
"39"
selection-start-line=
"42"
selection-start-column=
"39"
selection-end-line=
"42"
selection-end-column=
"39"
/>
<caret
line=
"42"
column=
"39"
selection-start-line=
"42"
selection-start-column=
"39"
selection-end-line=
"42"
selection-end-column=
"39"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
.gitlab-ci.yml
"
>
<entry
file=
"file://$PROJECT_DIR$/
tests/edu/caltech/cs2/lab01/WikipediaMainTests.java
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
0
5"
>
<state
relative-caret-position=
"1
6
5"
>
<caret
line=
"
7
"
column=
"
34
"
selection-start-line=
"
7
"
selection-start-column=
"
3
4"
selection-end-line=
"
7
"
selection-end-column=
"
34
"
/>
<caret
line=
"
16
"
column=
"
58
"
selection-start-line=
"
16
"
selection-start-column=
"
2
4"
selection-end-line=
"
16
"
selection-end-column=
"
59
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/lab01
-w
ikipedia
.iml
"
>
<entry
file=
"file://$PROJECT_DIR$/
tests/edu/caltech/cs2/
lab01
/W
ikipedia
PageTests.java
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"195"
>
<state
relative-caret-position=
"446"
>
<caret
line=
"13"
column=
"8"
selection-start-line=
"13"
selection-start-column=
"2"
selection-end-line=
"13"
selection-end-column=
"8"
/>
<caret
line=
"147"
column=
"13"
selection-start-line=
"147"
selection-start-column=
"13"
selection-end-line=
"147"
selection-end-column=
"13"
/>
<folding>
<element
signature=
"imports"
expanded=
"true"
/>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/src/edu/caltech/cs2/lab01/Wikipedia
Page
.java"
>
<entry
file=
"file://$PROJECT_DIR$/src/edu/caltech/cs2/lab01/
libraries/
Wikipedia.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
7
5"
>
<state
relative-caret-position=
"
22
5"
>
<caret
line=
"
5
"
column=
"
2
2"
selection-start-line=
"
5
"
selection-start-column=
"
2
2"
selection-end-line=
"
5
"
selection-end-column=
"
2
2"
/>
<caret
line=
"
20
"
column=
"
4
2"
selection-start-line=
"
20
"
selection-start-column=
"
4
2"
selection-end-line=
"
20
"
selection-end-column=
"
4
2"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
...
...
This diff is collapsed.
Click to expand it.
src/edu/caltech/cs2/lab01/libraries/Wikipedia.java
View file @
cc14dda3
package
edu.caltech.cs2.lab01.libraries
;
package
edu.caltech.cs2.lab01.libraries
;
import
java.io.*
;
import
java.io.BufferedReader
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.net.URL
;
import
java.net.URL
;
import
java.net.URLConnection
;
import
java.net.URLConnection
;
import
java.nio.charset.StandardCharsets
;
import
java.nio.charset.StandardCharsets
;
...
@@ -23,11 +25,7 @@ public class Wikipedia {
...
@@ -23,11 +25,7 @@ public class Wikipedia {
if
(
pageStart
==
-
1
||
pageEnd
==
-
1
)
{
if
(
pageStart
==
-
1
||
pageEnd
==
-
1
)
{
return
null
;
return
null
;
}
}
PrintStream
out
=
new
PrintStream
(
new
File
(
"tests/wikipedia/"
+
title
.
toLowerCase
().
replaceAll
(
" "
,
"_"
).
replaceAll
(
"\\P{InBasic_Latin}"
,
""
)));
return
decode
(
xmlPage
.
substring
(
pageStart
+
1
,
pageEnd
));
String
result
=
decode
(
xmlPage
.
substring
(
pageStart
+
1
,
pageEnd
));
out
.
print
(
result
);
out
.
close
();
return
result
;
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
return
null
;
return
null
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help