First
This commit is contained in:
2020-11-15 19:27:57 +01:00
commit 0ed2eb142f
64 changed files with 2995 additions and 0 deletions
@@ -0,0 +1,2 @@
#Thu Oct 01 23:39:25 CEST 2020
gradle.version=4.10.3
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
+18
View File
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
<option name="useAutoImport" value="true" />
<option name="useQualifiedModuleNames" value="true" />
</GradleProjectSettings>
</option>
</component>
</project>
+7
View File
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Crawler_WebOfScience.iml" filepath="$PROJECT_DIR$/.idea/Crawler_WebOfScience.iml" />
</modules>
</component>
</project>
+124
View File
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>
+578
View File
@@ -0,0 +1,578 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="f49aa9a4-b93e-440e-9285-d29e2bf545e4" name="Default Changelist" comment="" />
<ignored path="$PROJECT_DIR$/out/" />
<ignored path="$PROJECT_DIR$/.gradle/" />
<ignored path="$PROJECT_DIR$/build/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CoverageViewManager">
<option name="myElementSize" value="294" />
</component>
<component name="DefaultGradleProjectSettings">
<option name="testRunner" value="GRADLE" />
<option name="delegatedBuild" value="true" />
<option name="isMigrated" value="true" />
</component>
<component name="ExternalProjectsData">
<projectState path="$PROJECT_DIR$">
<ProjectState />
</projectState>
</component>
<component name="ExternalProjectsManager">
<system id="GRADLE">
<state>
<task path="$PROJECT_DIR$">
<activation />
</task>
<projects_view>
<tree_state>
<expand>
<path>
<item name="" type="6a2764b6:ExternalProjectsStructure$RootNode" />
<item name="Crawler" type="f1a62948:ProjectNode" />
</path>
</expand>
<select />
</tree_state>
</projects_view>
</state>
</system>
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="399">
<caret line="34" column="32" lean-forward="true" selection-start-line="34" selection-start-column="32" selection-end-line="34" selection-end-column="32" />
<folding>
<element signature="e#878#879#0" expanded="true" />
<element signature="e#917#918#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/PatentImporter.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3995">
<caret line="241" column="9" selection-start-line="241" selection-start-column="9" selection-end-line="241" selection-end-column="9" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#7928#7929#0" expanded="true" />
<element signature="e#7972#7973#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/build.gradle">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="391">
<caret line="23" column="61" selection-start-line="23" selection-start-column="61" selection-end-line="23" selection-end-column="61" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/UnzipUtility.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="153">
<caret line="15" selection-start-line="15" selection-end-line="15" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/PatentCrawler.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1156">
<caret line="79" column="22" selection-start-line="79" selection-start-column="22" selection-end-line="79" selection-end-column="22" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/java/Settings.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="357">
<caret line="21" column="17" selection-start-line="21" selection-start-column="17" selection-end-line="21" selection-end-column="17" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Enum" />
<option value="Class" />
</list>
</option>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>focusinput</find>
<find>Box</find>
<find>textBox</find>
</findStrings>
<replaceStrings>
<replace />
</replaceStrings>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/src/main/java/Genre.java" />
<option value="$PROJECT_DIR$/src/main/java/Book.java" />
<option value="$PROJECT_DIR$/src/main/java/Websites.java" />
<option value="$PROJECT_DIR$/src/main/java/Website.java" />
<option value="$PROJECT_DIR$/src/main/java/Test.java" />
<option value="$PROJECT_DIR$/src/test/java/Test.java" />
<option value="$PROJECT_DIR$/src/test/java/GettingStarted.java" />
<option value="$PROJECT_DIR$/src/main/java/Context.java" />
<option value="$PROJECT_DIR$/src/main/java/DBSupport.java" />
<option value="$PROJECT_DIR$/src/main/java/SeleniumCrawlerAuthor.java" />
<option value="$PROJECT_DIR$/src/main/java/Crawler.java" />
<option value="$PROJECT_DIR$/src/main/java/DBSupportDocument.java" />
<option value="$PROJECT_DIR$/src/main/java/SeleniumCrawler.java" />
<option value="$PROJECT_DIR$/src/main/java/DBSupportAuthor.java" />
<option value="$PROJECT_DIR$/src/main/java/LettersToSearch.java" />
<option value="$PROJECT_DIR$/src/main/java/DBPage2.java" />
<option value="$PROJECT_DIR$/src/main/java/SearchMode.java" />
<option value="$PROJECT_DIR$/src/main/java/WoSCrawler.java" />
<option value="$PROJECT_DIR$/src/main/java/DBPage.java" />
<option value="$PROJECT_DIR$/src/main/java/ScopusCrawler.java" />
<option value="$PROJECT_DIR$/src/main/java/Importer.java" />
<option value="$PROJECT_DIR$/src/main/java/UnzipUtility.java" />
<option value="$PROJECT_DIR$/src/main/java/WOSImporter.java" />
<option value="$PROJECT_DIR$/build.gradle" />
<option value="$PROJECT_DIR$/src/main/java/Settings.java" />
<option value="$PROJECT_DIR$/src/main/java/PatentCrawler.java" />
<option value="$PROJECT_DIR$/src/main/java/PatentImporter.java" />
<option value="$PROJECT_DIR$/src/main/java/Main.java" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="7">
<option name="x" value="-118" />
<option name="y" value="-20" />
<option name="width" value="1936" />
<option name="height" value="1073" />
</component>
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane" />
<pane id="PackagesPane" />
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="project.structure.last.edited" value="Modules" />
<property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.0" />
<property name="settings.editor.selected.configurable" value="vcs.Git" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="Application.Main">
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="Main" />
<module name="Crawler.main" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="GettingStarted.testGoogleSearch" type="GradleRunConfiguration" factoryName="Gradle" temporary="true">
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="--tests &quot;GettingStarted.testGoogleSearch&quot;" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value=":cleanTest" />
<option value=":test" />
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<GradleScriptDebugEnabled>false</GradleScriptDebugEnabled>
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Application.Main" />
<item itemvalue="Gradle.GettingStarted.testGoogleSearch" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="f49aa9a4-b93e-440e-9285-d29e2bf545e4" name="Default Changelist" comment="" />
<created>1601588348958</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1601588348958</updated>
</task>
<servers />
</component>
<component name="TestHistory">
<history-entry file="GettingStarted_testGoogleSearch - 2020.10.05 at 12h 08m 58s.xml">
<configuration name="GettingStarted.testGoogleSearch" configurationId="GradleRunConfiguration" />
</history-entry>
<history-entry file="GettingStarted_testGoogleSearch - 2020.10.05 at 12h 09m 41s.xml">
<configuration name="GettingStarted.testGoogleSearch" configurationId="GradleRunConfiguration" />
</history-entry>
<history-entry file="GettingStarted_testGoogleSearch - 2020.10.05 at 12h 10m 27s.xml">
<configuration name="GettingStarted.testGoogleSearch" configurationId="GradleRunConfiguration" />
</history-entry>
<history-entry file="GettingStarted_testGoogleSearch - 2020.10.05 at 12h 10m 44s.xml">
<configuration name="GettingStarted.testGoogleSearch" configurationId="GradleRunConfiguration" />
</history-entry>
<history-entry file="GettingStarted_testGoogleSearch - 2020.10.05 at 12h 11m 06s.xml">
<configuration name="GettingStarted.testGoogleSearch" configurationId="GradleRunConfiguration" />
</history-entry>
<history-entry file="GettingStarted_testGoogleSearch - 2020.10.05 at 12h 21m 05s.xml">
<configuration name="GettingStarted.testGoogleSearch" configurationId="GradleRunConfiguration" />
</history-entry>
<history-entry file="GettingStarted_testGoogleSearch - 2020.10.05 at 12h 22m 05s.xml">
<configuration name="GettingStarted.testGoogleSearch" configurationId="GradleRunConfiguration" />
</history-entry>
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="7" />
<layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.3336887" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Image Layers" order="2" />
<window_info id="Designer" order="3" />
<window_info id="Capture Tool" order="4" />
<window_info id="UI Designer" order="5" />
<window_info id="Favorites" order="6" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" weight="0.32936078" />
<window_info anchor="bottom" id="Run" order="2" weight="0.3336945" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.3997833" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Terminal" order="7" />
<window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
<window_info anchor="bottom" id="Version Control" order="9" />
<window_info anchor="bottom" id="Build" order="10" weight="0.32936078" />
<window_info anchor="bottom" id="Messages" order="11" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="right" id="Palette" order="3" />
<window_info anchor="right" id="Maven" order="4" />
<window_info anchor="right" id="Gradle" order="5" weight="0.32995737" />
<window_info anchor="right" id="Theme Preview" order="6" />
<window_info anchor="right" id="Capture Analysis" order="7" />
<window_info anchor="right" id="Palette&#9;" order="8" />
<window_info anchor="right" id="Coverage" order="9" side_tool="true" weight="0.32995737" />
</layout>
<layout-to-restore>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2835821" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Image Layers" order="2" />
<window_info id="Designer" order="3" />
<window_info id="Capture Tool" order="4" />
<window_info id="UI Designer" order="5" />
<window_info id="Favorites" order="6" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" weight="0.32936078" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.3997833" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Terminal" order="7" />
<window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
<window_info anchor="bottom" id="Version Control" order="9" />
<window_info anchor="bottom" id="Build" order="10" weight="0.32936078" />
<window_info anchor="bottom" id="Messages" order="11" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="right" id="Palette" order="3" />
<window_info anchor="right" id="Maven" order="4" />
<window_info anchor="right" id="Gradle" order="5" weight="0.32995737" />
<window_info anchor="right" id="Theme Preview" order="6" />
<window_info anchor="right" id="Capture Analysis" order="7" />
<window_info anchor="right" id="Palette&#9;" order="8" />
<window_info anchor="right" id="Coverage" order="9" side_tool="true" weight="0.32995737" />
</layout-to-restore>
</component>
<component name="XDebuggerManager">
<watches-manager>
<configuration name="Remote">
<watch expression="br" />
</configuration>
</watches-manager>
</component>
<component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/Crawler_WebOfScience$Main.ic" NAME="Main Coverage Results" MODIFIED="1604951149783" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
</component>
<component name="editorHistoryManager">
<entry file="jar://C:/Program Files/Java/jdk1.8.0_152/src.zip!/java/lang/String.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
<caret line="1966" column="18" selection-start-line="1966" selection-start-column="18" selection-end-line="1966" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/Genre.java" />
<entry file="file://$PROJECT_DIR$/src/main/java/Book.java" />
<entry file="file://$PROJECT_DIR$/src/main/java/Websites.java" />
<entry file="file://$PROJECT_DIR$/src/main/java/Website.java" />
<entry file="file://$PROJECT_DIR$/src/main/java/Test.java" />
<entry file="file://$PROJECT_DIR$/src/test/java/Test.java" />
<entry file="file://$PROJECT_DIR$/src/test/java/GettingStarted.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="323">
<caret line="19" column="1" lean-forward="true" selection-start-line="19" selection-start-column="1" selection-end-line="19" selection-end-column="1" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/Context.java" />
<entry file="file://$PROJECT_DIR$/src/main/java/DBSupportDocument.java" />
<entry file="file://$PROJECT_DIR$/src/main/java/Crawler.java" />
<entry file="file://$PROJECT_DIR$/src/main/java/LettersToSearch.java" />
<entry file="jar://C:/Program Files/Java/jdk1.8.0_152/src.zip!/java/lang/Integer.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="537">
<caret line="579" column="48" selection-start-line="579" selection-start-column="48" selection-end-line="579" selection-end-column="48" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/SearchMode.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="4" column="20" selection-start-line="4" selection-start-column="20" selection-end-line="4" selection-end-column="20" />
</state>
</provider>
</entry>
<entry file="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.mongodb/mongo-java-driver/3.11.0-beta4/3b709e3afbf58e5f83c9193ee452571cf31530bd/mongo-java-driver-3.11.0-beta4-sources.jar!/com/mongodb/operation/BaseWriteOperation.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="380">
<caret line="190" selection-start-line="190" selection-end-line="190" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/DBPage.java" />
<entry file="file://$PROJECT_DIR$/src/main/java/DBPage2.java" />
<entry file="file://$PROJECT_DIR$/src/main/java/WoSCrawler.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="716">
<caret line="200" column="64" lean-forward="true" selection-start-line="200" selection-start-column="64" selection-end-line="200" selection-end-column="64" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/ScopusCrawler.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="181">
<caret line="38" column="57" selection-start-line="38" selection-start-column="57" selection-end-line="38" selection-end-column="57" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1004#1020#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/WOSImporter.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="646">
<caret line="127" column="34" lean-forward="true" selection-start-line="127" selection-start-column="34" selection-end-line="127" selection-end-column="43" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="399">
<caret line="34" column="32" lean-forward="true" selection-start-line="34" selection-start-column="32" selection-end-line="34" selection-end-column="32" />
<folding>
<element signature="e#878#879#0" expanded="true" />
<element signature="e#917#918#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/PatentImporter.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3995">
<caret line="241" column="9" selection-start-line="241" selection-start-column="9" selection-end-line="241" selection-end-column="9" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#7928#7929#0" expanded="true" />
<element signature="e#7972#7973#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/build.gradle">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="391">
<caret line="23" column="61" selection-start-line="23" selection-start-column="61" selection-end-line="23" selection-end-column="61" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/UnzipUtility.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="153">
<caret line="15" selection-start-line="15" selection-end-line="15" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/PatentCrawler.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1156">
<caret line="79" column="22" selection-start-line="79" selection-start-column="22" selection-end-line="79" selection-end-column="22" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/Settings.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="357">
<caret line="21" column="17" selection-start-line="21" selection-start-column="17" selection-end-line="21" selection-end-column="17" />
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ArtifactsStructureConfigurable.UI">
<settings>
<artifact-editor />
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="FacetStructureConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="GlobalLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="JdkListConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ModuleStructureConfigurable.UI">
<settings>
<last-edited>test|Crawler</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
<option value="0.6" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>
+25
View File
@@ -0,0 +1,25 @@
plugins {
id 'java'
}
group 'ScribbleHubCrawler'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
compile 'org.jsoup:jsoup:1.13.1'
compile 'com.google.code.gson:gson:2.7'
compile 'org.apache.httpcomponents:httpclient:4.5.12'
compile group: 'org.seleniumhq.selenium', name: 'selenium-java',
version: '3.141.59'
compile 'org.mongodb:mongo-java-driver:2.12.3'
compile group: 'org.mongodb', name: 'mongo-java-driver', version: '3.11.0-beta4'
compile group: 'org.apache.poi', name: 'poi', version: '3.9'
compile group: 'org.jdom', name: 'jdom', version: '2.0.0'
}
@@ -0,0 +1,111 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
<title>Test results - Class GettingStarted</title>
<link href="../css/base-style.css" rel="stylesheet" type="text/css"/>
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
<script src="../js/report.js" type="text/javascript"></script>
</head>
<body>
<div id="content">
<h1>Class GettingStarted</h1>
<div class="breadcrumbs">
<a href="../index.html">all</a> &gt;
<a href="../packages/default-package.html">default-package</a> &gt; GettingStarted</div>
<div id="summary">
<table>
<tr>
<td>
<div class="summaryGroup">
<table>
<tr>
<td>
<div class="infoBox" id="tests">
<div class="counter">1</div>
<p>tests</p>
</div>
</td>
<td>
<div class="infoBox" id="failures">
<div class="counter">0</div>
<p>failures</p>
</div>
</td>
<td>
<div class="infoBox" id="ignored">
<div class="counter">0</div>
<p>ignored</p>
</div>
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">16.678s</div>
<p>duration</p>
</div>
</td>
</tr>
</table>
</div>
</td>
<td>
<div class="infoBox success" id="successRate">
<div class="percent">100%</div>
<p>successful</p>
</div>
</td>
</tr>
</table>
</div>
<div id="tabs">
<ul class="tabLinks">
<li>
<a href="#tab0">Tests</a>
</li>
<li>
<a href="#tab1">Standard error</a>
</li>
</ul>
<div id="tab0" class="tab">
<h2>Tests</h2>
<table>
<thead>
<tr>
<th>Test</th>
<th>Duration</th>
<th>Result</th>
</tr>
</thead>
<tr>
<td class="success">testGoogleSearch</td>
<td class="success">16.678s</td>
<td class="success">passed</td>
</tr>
</table>
</div>
<div id="tab1" class="tab">
<h2>Standard error</h2>
<span class="code">
<pre>Starting ChromeDriver 85.0.4183.87 (cd6713ebf92fa1cacc0f1a598df280093af0c5d7-refs/branch-heads/4183@{#1689}) on port 5994
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Okt 05, 2020 12:21:52 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFORMATION: Detected dialect: W3C
</pre>
</span>
</div>
</div>
<div id="footer">
<p>
<div>
<label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 4.10.3</a> at 05.10.2020 12:22:05</p>
</div>
</div>
</body>
</html>
@@ -0,0 +1,179 @@
body {
margin: 0;
padding: 0;
font-family: sans-serif;
font-size: 12pt;
}
body, a, a:visited {
color: #303030;
}
#content {
padding-left: 50px;
padding-right: 50px;
padding-top: 30px;
padding-bottom: 30px;
}
#content h1 {
font-size: 160%;
margin-bottom: 10px;
}
#footer {
margin-top: 100px;
font-size: 80%;
white-space: nowrap;
}
#footer, #footer a {
color: #a0a0a0;
}
#line-wrapping-toggle {
vertical-align: middle;
}
#label-for-line-wrapping-toggle {
vertical-align: middle;
}
ul {
margin-left: 0;
}
h1, h2, h3 {
white-space: nowrap;
}
h2 {
font-size: 120%;
}
ul.tabLinks {
padding-left: 0;
padding-top: 10px;
padding-bottom: 10px;
overflow: auto;
min-width: 800px;
width: auto !important;
width: 800px;
}
ul.tabLinks li {
float: left;
height: 100%;
list-style: none;
padding-left: 10px;
padding-right: 10px;
padding-top: 5px;
padding-bottom: 5px;
margin-bottom: 0;
-moz-border-radius: 7px;
border-radius: 7px;
margin-right: 25px;
border: solid 1px #d4d4d4;
background-color: #f0f0f0;
}
ul.tabLinks li:hover {
background-color: #fafafa;
}
ul.tabLinks li.selected {
background-color: #c5f0f5;
border-color: #c5f0f5;
}
ul.tabLinks a {
font-size: 120%;
display: block;
outline: none;
text-decoration: none;
margin: 0;
padding: 0;
}
ul.tabLinks li h2 {
margin: 0;
padding: 0;
}
div.tab {
}
div.selected {
display: block;
}
div.deselected {
display: none;
}
div.tab table {
min-width: 350px;
width: auto !important;
width: 350px;
border-collapse: collapse;
}
div.tab th, div.tab table {
border-bottom: solid #d0d0d0 1px;
}
div.tab th {
text-align: left;
white-space: nowrap;
padding-left: 6em;
}
div.tab th:first-child {
padding-left: 0;
}
div.tab td {
white-space: nowrap;
padding-left: 6em;
padding-top: 5px;
padding-bottom: 5px;
}
div.tab td:first-child {
padding-left: 0;
}
div.tab td.numeric, div.tab th.numeric {
text-align: right;
}
span.code {
display: inline-block;
margin-top: 0em;
margin-bottom: 1em;
}
span.code pre {
font-size: 11pt;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 10px;
padding-right: 10px;
margin: 0;
background-color: #f7f7f7;
border: solid 1px #d0d0d0;
min-width: 700px;
width: auto !important;
width: 700px;
}
span.wrapped pre {
word-wrap: break-word;
white-space: pre-wrap;
word-break: break-all;
}
label.hidden {
display: none;
}
@@ -0,0 +1,84 @@
#summary {
margin-top: 30px;
margin-bottom: 40px;
}
#summary table {
border-collapse: collapse;
}
#summary td {
vertical-align: top;
}
.breadcrumbs, .breadcrumbs a {
color: #606060;
}
.infoBox {
width: 110px;
padding-top: 15px;
padding-bottom: 15px;
text-align: center;
}
.infoBox p {
margin: 0;
}
.counter, .percent {
font-size: 120%;
font-weight: bold;
margin-bottom: 8px;
}
#duration {
width: 125px;
}
#successRate, .summaryGroup {
border: solid 2px #d0d0d0;
-moz-border-radius: 10px;
border-radius: 10px;
}
#successRate {
width: 140px;
margin-left: 35px;
}
#successRate .percent {
font-size: 180%;
}
.success, .success a {
color: #008000;
}
div.success, #successRate.success {
background-color: #bbd9bb;
border-color: #008000;
}
.failures, .failures a {
color: #b60808;
}
.skipped, .skipped a {
color: #c09853;
}
div.failures, #successRate.failures {
background-color: #ecdada;
border-color: #b60808;
}
ul.linkList {
padding-left: 0;
}
ul.linkList li {
list-style: none;
margin-bottom: 5px;
}
@@ -0,0 +1,132 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
<title>Test results - Test Summary</title>
<link href="css/base-style.css" rel="stylesheet" type="text/css"/>
<link href="css/style.css" rel="stylesheet" type="text/css"/>
<script src="js/report.js" type="text/javascript"></script>
</head>
<body>
<div id="content">
<h1>Test Summary</h1>
<div id="summary">
<table>
<tr>
<td>
<div class="summaryGroup">
<table>
<tr>
<td>
<div class="infoBox" id="tests">
<div class="counter">1</div>
<p>tests</p>
</div>
</td>
<td>
<div class="infoBox" id="failures">
<div class="counter">0</div>
<p>failures</p>
</div>
</td>
<td>
<div class="infoBox" id="ignored">
<div class="counter">0</div>
<p>ignored</p>
</div>
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">16.678s</div>
<p>duration</p>
</div>
</td>
</tr>
</table>
</div>
</td>
<td>
<div class="infoBox success" id="successRate">
<div class="percent">100%</div>
<p>successful</p>
</div>
</td>
</tr>
</table>
</div>
<div id="tabs">
<ul class="tabLinks">
<li>
<a href="#tab0">Packages</a>
</li>
<li>
<a href="#tab1">Classes</a>
</li>
</ul>
<div id="tab0" class="tab">
<h2>Packages</h2>
<table>
<thead>
<tr>
<th>Package</th>
<th>Tests</th>
<th>Failures</th>
<th>Ignored</th>
<th>Duration</th>
<th>Success rate</th>
</tr>
</thead>
<tbody>
<tr>
<td class="success">
<a href="packages/default-package.html">default-package</a>
</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>16.678s</td>
<td class="success">100%</td>
</tr>
</tbody>
</table>
</div>
<div id="tab1" class="tab">
<h2>Classes</h2>
<table>
<thead>
<tr>
<th>Class</th>
<th>Tests</th>
<th>Failures</th>
<th>Ignored</th>
<th>Duration</th>
<th>Success rate</th>
</tr>
</thead>
<tbody>
<tr>
<td class="success"/>
<a href="classes/GettingStarted.html">GettingStarted</a>
<td>1</td>
<td>0</td>
<td>0</td>
<td>16.678s</td>
<td class="success">100%</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="footer">
<p>
<div>
<label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 4.10.3</a> at 05.10.2020 12:22:05</p>
</div>
</div>
</body>
</html>
@@ -0,0 +1,194 @@
(function (window, document) {
"use strict";
var tabs = {};
function changeElementClass(element, classValue) {
if (element.getAttribute("className")) {
element.setAttribute("className", classValue);
} else {
element.setAttribute("class", classValue);
}
}
function getClassAttribute(element) {
if (element.getAttribute("className")) {
return element.getAttribute("className");
} else {
return element.getAttribute("class");
}
}
function addClass(element, classValue) {
changeElementClass(element, getClassAttribute(element) + " " + classValue);
}
function removeClass(element, classValue) {
changeElementClass(element, getClassAttribute(element).replace(classValue, ""));
}
function initTabs() {
var container = document.getElementById("tabs");
tabs.tabs = findTabs(container);
tabs.titles = findTitles(tabs.tabs);
tabs.headers = findHeaders(container);
tabs.select = select;
tabs.deselectAll = deselectAll;
tabs.select(0);
return true;
}
function getCheckBox() {
return document.getElementById("line-wrapping-toggle");
}
function getLabelForCheckBox() {
return document.getElementById("label-for-line-wrapping-toggle");
}
function findCodeBlocks() {
var spans = document.getElementById("tabs").getElementsByTagName("span");
var codeBlocks = [];
for (var i = 0; i < spans.length; ++i) {
if (spans[i].className.indexOf("code") >= 0) {
codeBlocks.push(spans[i]);
}
}
return codeBlocks;
}
function forAllCodeBlocks(operation) {
var codeBlocks = findCodeBlocks();
for (var i = 0; i < codeBlocks.length; ++i) {
operation(codeBlocks[i], "wrapped");
}
}
function toggleLineWrapping() {
var checkBox = getCheckBox();
if (checkBox.checked) {
forAllCodeBlocks(addClass);
} else {
forAllCodeBlocks(removeClass);
}
}
function initControls() {
if (findCodeBlocks().length > 0) {
var checkBox = getCheckBox();
var label = getLabelForCheckBox();
checkBox.onclick = toggleLineWrapping;
checkBox.checked = false;
removeClass(label, "hidden");
}
}
function switchTab() {
var id = this.id.substr(1);
for (var i = 0; i < tabs.tabs.length; i++) {
if (tabs.tabs[i].id === id) {
tabs.select(i);
break;
}
}
return false;
}
function select(i) {
this.deselectAll();
changeElementClass(this.tabs[i], "tab selected");
changeElementClass(this.headers[i], "selected");
while (this.headers[i].firstChild) {
this.headers[i].removeChild(this.headers[i].firstChild);
}
var h2 = document.createElement("H2");
h2.appendChild(document.createTextNode(this.titles[i]));
this.headers[i].appendChild(h2);
}
function deselectAll() {
for (var i = 0; i < this.tabs.length; i++) {
changeElementClass(this.tabs[i], "tab deselected");
changeElementClass(this.headers[i], "deselected");
while (this.headers[i].firstChild) {
this.headers[i].removeChild(this.headers[i].firstChild);
}
var a = document.createElement("A");
a.setAttribute("id", "ltab" + i);
a.setAttribute("href", "#tab" + i);
a.onclick = switchTab;
a.appendChild(document.createTextNode(this.titles[i]));
this.headers[i].appendChild(a);
}
}
function findTabs(container) {
return findChildElements(container, "DIV", "tab");
}
function findHeaders(container) {
var owner = findChildElements(container, "UL", "tabLinks");
return findChildElements(owner[0], "LI", null);
}
function findTitles(tabs) {
var titles = [];
for (var i = 0; i < tabs.length; i++) {
var tab = tabs[i];
var header = findChildElements(tab, "H2", null)[0];
header.parentNode.removeChild(header);
if (header.innerText) {
titles.push(header.innerText);
} else {
titles.push(header.textContent);
}
}
return titles;
}
function findChildElements(container, name, targetClass) {
var elements = [];
var children = container.childNodes;
for (var i = 0; i < children.length; i++) {
var child = children.item(i);
if (child.nodeType === 1 && child.nodeName === name) {
if (targetClass && child.className.indexOf(targetClass) < 0) {
continue;
}
elements.push(child);
}
}
return elements;
}
// Entry point.
window.onload = function() {
initTabs();
initControls();
};
} (window, window.document));
@@ -0,0 +1,103 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
<title>Test results - Default package</title>
<link href="../css/base-style.css" rel="stylesheet" type="text/css"/>
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
<script src="../js/report.js" type="text/javascript"></script>
</head>
<body>
<div id="content">
<h1>Default package</h1>
<div class="breadcrumbs">
<a href="../index.html">all</a> &gt; default-package</div>
<div id="summary">
<table>
<tr>
<td>
<div class="summaryGroup">
<table>
<tr>
<td>
<div class="infoBox" id="tests">
<div class="counter">1</div>
<p>tests</p>
</div>
</td>
<td>
<div class="infoBox" id="failures">
<div class="counter">0</div>
<p>failures</p>
</div>
</td>
<td>
<div class="infoBox" id="ignored">
<div class="counter">0</div>
<p>ignored</p>
</div>
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">16.678s</div>
<p>duration</p>
</div>
</td>
</tr>
</table>
</div>
</td>
<td>
<div class="infoBox success" id="successRate">
<div class="percent">100%</div>
<p>successful</p>
</div>
</td>
</tr>
</table>
</div>
<div id="tabs">
<ul class="tabLinks">
<li>
<a href="#tab0">Classes</a>
</li>
</ul>
<div id="tab0" class="tab">
<h2>Classes</h2>
<table>
<thread>
<tr>
<th>Class</th>
<th>Tests</th>
<th>Failures</th>
<th>Ignored</th>
<th>Duration</th>
<th>Success rate</th>
</tr>
</thread>
<tr>
<td class="success">
<a href="../classes/GettingStarted.html">GettingStarted</a>
</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>16.678s</td>
<td class="success">100%</td>
</tr>
</table>
</div>
</div>
<div id="footer">
<p>
<div>
<label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 4.10.3</a> at 05.10.2020 12:22:05</p>
</div>
</div>
</body>
</html>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="GettingStarted" tests="1" skipped="0" failures="0" errors="0" timestamp="2020-10-05T10:21:49" hostname="DESKTOP-JUA5V6V" time="16.678">
<properties/>
<testcase name="testGoogleSearch" classname="GettingStarted" time="16.678"/>
<system-out><![CDATA[]]></system-out>
<system-err><![CDATA[Starting ChromeDriver 85.0.4183.87 (cd6713ebf92fa1cacc0f1a598df280093af0c5d7-refs/branch-heads/4183@{#1689}) on port 5994
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Okt 05, 2020 12:21:52 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFORMATION: Detected dialect: W3C
]]></system-err>
</testsuite>
+22
View File
@@ -0,0 +1,22 @@
[1008/151531.216:ERROR:prune_crash_reports.cc(36)] PruneCrashReportDatabase: Failed to get pending reports
[1015/121231.899:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1022/123937.966:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1022/133657.736:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1022/135739.793:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1022/142433.678:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1026/165001.479:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1027/115126.904:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1027/115930.406:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1027/122004.360:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1027/135030.888:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1028/115933.935:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1028/122630.194:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1029/121928.226:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1030/112740.268:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1030/135026.667:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1101/120551.853:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1109/141722.352:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1114/110850.141:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1114/131348.528:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
[1114/131348.528:ERROR:prune_crash_reports.cc(36)] PruneCrashReportDatabase: Failed to get pending reports
[1115/133646.951:ERROR:directory_reader_win.cc(43)] FindFirstFile: Das System kann den angegebenen Pfad nicht finden. (0x3)
Binary file not shown.
@@ -0,0 +1,6 @@
#Thu Oct 01 23:40:21 CEST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
+172
View File
@@ -0,0 +1,172 @@
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
+84
View File
@@ -0,0 +1,84 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
+2
View File
@@ -0,0 +1,2 @@
rootProject.name = 'Crawler'
@@ -0,0 +1,56 @@
import java.io.IOException;
public class Main {
public static void main(String[] args) {
/*try {
PatentImporter importer = new PatentImporter();
importer.importYear(1999);
} catch (IOException e) {
e.printStackTrace();
}*/
startUSPTOImport();
//startWOSCrawler();
//startImportToMongoDB();
}
private static void startWOSCrawler()
{
Thread thread = new Thread(new Runnable() {
@Override
public void run() {
try {
WoSCrawler crawler = new WoSCrawler("'Computer Science'", SearchMode.RESEARCHAREA, 50000);
} catch (Exception e) {
e.printStackTrace();
}
}
});
thread.start();
}
private static void startUSPTOImport()
{
new PatentCrawler(1990);
}
private static void startImportToMongoDB()
{
try
{
WOSImporter importer = new WOSImporter();
importer.doImport();
}
catch (Exception e )
{
e.printStackTrace();
}
}
}
@@ -0,0 +1,97 @@
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import java.io.File;
import java.io.IOException;
import java.util.*;
import java.util.zip.ZipFile;
public class PatentCrawler {
private WebDriver driver;
int currentYear;
PatentImporter importer;
public PatentCrawler(int year)
{
if(year<1976)
{
return;
}
importer = new PatentImporter();
currentYear=year;
setUpDownloadFolder();
driver.navigate().to("https://bulkdata.uspto.gov/data/patent/grant/redbook/fulltext/"+ String.valueOf(year)+ "/");
int todaysYear = Calendar.getInstance().get(Calendar.YEAR);
while (currentYear<=todaysYear)
{
dowloadYear();
if(Settings.AUTOMATEDIMPORT.getContent().equals("YES"))
{
importer.moveToYearFoleder(currentYear);
try {
importer.importYear(currentYear);
} catch (IOException e) {
e.printStackTrace();
}
}
else
{
importer.moveToYearFoleder(currentYear);
}
goToNextYear();
}
}
private void setUpDownloadFolder()
{
System.setProperty("webdriver.chrome.driver", Settings.PATHTOCROMEDRIVER.getContent());
String downloadFilepath = Settings.PATHTODOWNLOADPATENTS.getContent();
Map<String, Object> preferences = new Hashtable<String, Object>();
preferences.put("profile.default_content_settings.popups", 0);
preferences.put("download.prompt_for_download", "false");
preferences.put("download.default_directory", downloadFilepath);
// disable flash and the PDF viewer
preferences.put("plugins.plugins_disabled", new String[]{
"Adobe Flash Player", "Chrome PDF Viewer"});
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("prefs", preferences);
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
driver = new ChromeDriver(capabilities);
}
private synchronized void dowloadYear()
{
List<WebElement> elementList = driver.findElements(By.cssSelector("a[href*=zip]"));
for(WebElement e : elementList)
{
e.click();
try {
wait(30000);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
}
}
private void goToNextYear()
{
currentYear++;
System.out.println(currentYear);
driver.navigate().to("https://bulkdata.uspto.gov/data/patent/grant/redbook/fulltext/"+ String.valueOf(currentYear)+ "/");
}
}
@@ -0,0 +1,265 @@
import com.mongodb.*;
import java.io.*;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import java.util.zip.ZipInputStream;
public class PatentImporter {
String path;
DBCollection collection;
private MongoClient mongo;
private DB mongoDB;
public PatentImporter()
{
path = Settings.PATHTODOWNLOADPATENTS.getContent();
mongo = new MongoClient(new MongoClientURI(Settings.MONGOURL.getContent()));
mongoDB = mongo.getDB(Settings.DBPATENT.getContent());
if(mongoDB.getCollectionNames().contains(Settings.COLLECTIONPATENT.getContent()))
{
collection = mongoDB.getCollection(Settings.COLLECTIONPATENT.getContent());
}
else
{
collection = mongoDB.getCollection(Settings.COLLECTIONPATENT.getContent());
//collection.createIndex(new BasicDBObject("DOI",1),"DOI",true);
}
}
public void importYear(int year) throws IOException {
unzip(year);
saveTXTToDB(year);
}
private void saveTXTToDB(int year)
{
File directory = new File(Settings.PATHTODOWNLOADPATENTS.getContent() + "\\" + year);
File[] files = directory.listFiles();
for(int i = 0;i<files.length;i++)
{
String name = files[i].getName();
if(name.contains("zip"))
{
continue;
}
if(name.contains("txt"))
{
saveOlderTTX(files[i]);
}
if(name.contains("xml"))
{
saveNewerXML(files[i]);
}
}
}
private void saveNewerXML(File file)
{
//boolean prevLineAdress=false;
boolean documentId = false;
boolean citedByExaminer = false;
BasicDBObject patent = null;
try (BufferedReader br = new BufferedReader(new FileReader(file))) {
String line;
while ((line = br.readLine()) != null) {
//Neues Patent
if(line.contains("<us-patent-grant"))
{
if(patent!=null)
{
collection.insert(patent);
}
patent = new BasicDBObject();
}
//Titel
if(line.contains("<claim-text>"))
{
int start = line.indexOf('>')+1;
int end = line.indexOf("</");
String title = null;
if(end == -1)
{
title = line.substring(start);
}
else
{
title = line.substring(start,end);
}
String titleAlreadyExisting="";
if(patent.getString("Text")==null)
{
}
else
{
titleAlreadyExisting = patent.getString("Text");
}
patent.append("Text",titleAlreadyExisting + " " +title);
}
if(line.contains("<category>cited by examiner</category>"))
{
citedByExaminer = true;
}
//Classifiaction
if(line.contains("<classification-cpc-text>"))
{
if(citedByExaminer == true)
{
citedByExaminer = false;
continue;
}
String classification = line.substring(line.indexOf('>')+1,line.indexOf("</"));
String classificationAlreadyExisting="";
if(patent.getString("Classification")==null)
{
}
else
{
classificationAlreadyExisting = patent.getString("Classification");
}
patent.append("Classification",classificationAlreadyExisting +" ; "+ classification);
}
if(line.contains("<document-id>"))
{
documentId = true;
}
if(line.contains("</documentId>"))
{
documentId = false;
}
//Application Filing Year
if(line.contains("<date>") && documentId == true)
{
String year = line.substring(6,10);
if(patent.getString("Year")!=null)
{
continue;
}
patent.put("Year",year);
}
//Country
if(line.contains("<country>") && documentId == true)
{
String country = line.substring(9,line.lastIndexOf("</"));
if(patent.getString("Country")!=null)
{
continue;
}
patent.put("Country",country);
}
}
collection.insert(patent);
} catch (IOException e) {
e.printStackTrace();
}
if(Settings.DELETEFILEAFTEIMPORT.getContent().equals("YES"))
{
file.delete();
}
}
private void saveOlderTTX(File file)
{
BasicDBObject patent = null;
try (BufferedReader br = new BufferedReader(new FileReader(file))) {
String line;
while ((line = br.readLine()) != null) {
//Neues Patent
if(line.contains("PATN"))
{
if(patent!=null)
{
collection.insert(patent);
}
patent = new BasicDBObject();
}
//Titel
if(line.contains("TTL"))
{
String title = line.substring(5);
patent.put("Text",title);
}
//City
if(line.contains("CTY"))
{
String city = line.substring(5);
patent.put("City",city);
}
//Country
if(line.contains("CNT"))
{
String city = line.substring(5);
patent.put("Country",city);
}
//City
if(line.contains("ICL"))
{
String classification = line.substring(5);
patent.put("Classification",classification);
}
//Application Filing Year
if(line.contains("APD"))
{
String year = line.substring(5,9);
patent.put("Year",year);
}
}
collection.insert(patent);
} catch (IOException e) {
e.printStackTrace();
}
if(Settings.DELETEFILEAFTEIMPORT.getContent().equals("YES"))
{
file.delete();
}
}
public void moveToYearFoleder(int year)
{
File file = new File(Settings.PATHTODOWNLOADPATENTS.getContent());
File [] allFiles = file.listFiles();
new File(Settings.PATHTODOWNLOADPATENTS.getContent()+"\\"+year).mkdir();
for(int i = 0;i<allFiles.length;i++)
{
if(allFiles[i].getName().contains("zip"))
{
allFiles[i].renameTo(new File(Settings.PATHTODOWNLOADPATENTS.getContent() + "\\" + year + "\\" + allFiles[i].getName()));
}
}
}
private void unzip(int year)
{
UnzipUtility.unzipYear(year);
}
}
@@ -0,0 +1,136 @@
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
public class ScopusCrawler {
private WebDriver driver;
private String currentSearch;
public ScopusCrawler(String search, SearchMode mode) throws InterruptedException {
currentSearch = search;
login();
switch (mode) {
case KEYWORD:
searchByKeyword();
break;
}
}
private void setUpDownloadFolder()
{
System.setProperty("webdriver.chrome.driver", Settings.PATHTOCROMEDRIVER.getContent());
String downloadFilepath = Settings.PATHTOWOSFILES.getContent();
Map<String, Object> preferences = new Hashtable<String, Object>();
preferences.put("profile.default_content_settings.popups", 0);
preferences.put("download.prompt_for_download", "false");
preferences.put("download.default_directory", downloadFilepath);
// disable flash and the PDF viewer
preferences.put("plugins.plugins_disabled", new String[]{
"Adobe Flash Player", "Chrome PDF Viewer"});
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("prefs", preferences);
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
driver = new ChromeDriver(capabilities);
}
private synchronized void searchByKeyword() throws InterruptedException {
driver.findElement(By.cssSelector("span[class*=ico-navigate-down")).click();
wait(500);
driver.findElement(By.id("ui-id-9")).click();
wait(5000);
WebElement element = driver.findElement(By.id("searchterm1"));
element.clear();
element.sendKeys(currentSearch);
element.submit();
startMain();
}
private void startMain() throws InterruptedException {
//setToMaxPerPage();
//wait(10000);
sortBy();
driver.findElement(By.id("showAllPageBubble")).click();
wait(500);
driver.findElement(By.cssSelector("label[title*=all]")).click();
wait(500);
driver.findElement(By.id("export_results")).click();
setUpExport();
}
private void setUpExport() throws InterruptedException {
wait(500);
List<WebElement> elements = driver.findElements(By.id("abstractInformationCheckboxes"));
elements.get(0).click();
driver.findElements(By.cssSelector("li[class*=radio-inline]")).get(3).click();
driver.findElement(By.id("exportTrigger")).click();
if (driver.findElement(By.id("exportTypeAndFormat")) != null) {
WebElement element = driver.findElement(By.id("exportTypeAndFormat"));
Actions builder = new Actions(driver);
builder.moveToElement(element, 10, 10).click().build().perform();
}
}
private void sortBy() {
}
private void setToMaxPerPage() throws InterruptedException {
driver.findElement(By.id("resultsPerPage-button")).click();
wait(500);
driver.findElement(By.id("ui-id-4")).click();
}
public void tearDown() {
if (driver != null) {
driver.close();
}
driver.quit();
}
public synchronized void login() throws InterruptedException {
driver.navigate().to("https://www.scopus.com/search/form.uri?display=basic");
wait(5000);
driver.findElement(By.cssSelector("a[class*=btn-third]")).click();
}
}
@@ -0,0 +1,21 @@
public enum SearchMode {
KEYWORD(1),
RESEARCHAREA(2),
;
private int content;
SearchMode(int content) {
this.content = content;
}
public int getContent() {
return content;
}
}
@@ -0,0 +1,43 @@
public enum Settings {
MONGOURL("mongodb://localhost:27017/?readPreference=primary&appname=MongoDB%20Compass&ssl=false"),
PATHTOCROMEDRIVER("C:\\Users\\teddy\\Desktop\\Crawler_WebOfScience\\src\\test\\resources\\chromedriver.exe"),
//WOS
USERNAME("teddybond1@gmail.com"),
PASSWORD("K7.QW&34"),
DBDOCUMENT("Document"),
COLLECTIONDOCUMENT("Document"),
PATHTOWOSFILES("C:\\Users\\teddy\\Desktop\\files"),
//USPD
PATHTODOWNLOADPATENTS("C:\\Users\\teddy\\Desktop\\files2"),
//NO or YES
//Automatically imports dowloaded Files
AUTOMATEDIMPORT("YES"),
//Deletes ZipFile after import
DELETEZIPAFTERIMPORT("NO"),
//Deletes TxtFile after import
DELETEFILEAFTEIMPORT("YES"),
DBPATENT("Patent"),
COLLECTIONPATENT("Patent"),
;
private String content;
Settings(String content) {
this.content = content;
}
public String getContent() {
return content;
}
}
@@ -0,0 +1,65 @@
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public class UnzipUtility {
private static final int BUFFER_SIZE = 4096;
public static void unzipYear(int year)
{
File folder = new File(Settings.PATHTODOWNLOADPATENTS.getContent()+"\\"+year);
File[] files = folder.listFiles();
for(int i = 0;i<files.length;i++)
{
try {
unzip(files[i].getPath(),folder.getPath());
if(Settings.DELETEZIPAFTERIMPORT.getContent().equals("YES"))
{
files[i].delete();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
public static void unzip(String zipFilePath, String destDirectory) throws IOException {
File destDir = new File(destDirectory);
if (!destDir.exists()) {
destDir.mkdir();
}
ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath));
ZipEntry entry = zipIn.getNextEntry();
// iterates over entries in the zip file
while (entry != null) {
String filePath = destDirectory + File.separator + entry.getName();
if (!entry.isDirectory()) {
// if the entry is a file, extracts it
extractFile(zipIn, filePath);
} else {
// if the entry is a directory, make the directory
File dir = new File(filePath);
dir.mkdirs();
}
zipIn.closeEntry();
entry = zipIn.getNextEntry();
}
zipIn.close();
}
private static void extractFile(ZipInputStream zipIn, String filePath) throws IOException {
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));
byte[] bytesIn = new byte[BUFFER_SIZE];
int read = 0;
while ((read = zipIn.read(bytesIn)) != -1) {
bos.write(bytesIn, 0, read);
}
bos.close();
}
}
@@ -0,0 +1,176 @@
import com.mongodb.*;
import com.mongodb.client.model.IndexOptions;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.ss.format.CellFormatType;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
public class WOSImporter {
String path;
DBCollection collection;
private MongoClient mongo;
private DB mongoDB;
public WOSImporter()
{
path = Settings.PATHTOWOSFILES.getContent();
mongo = new MongoClient(new MongoClientURI(Settings.MONGOURL.getContent()));
mongoDB = mongo.getDB(Settings.DBDOCUMENT.getContent());
if(mongoDB.getCollectionNames().contains(Settings.COLLECTIONDOCUMENT.getContent()))
{
collection = mongoDB.getCollection(Settings.COLLECTIONDOCUMENT.getContent());
}
else
{
collection = mongoDB.getCollection(Settings.COLLECTIONDOCUMENT.getContent());
collection.createIndex(new BasicDBObject("DOI",1),"DOI",true);
}
}
public void doImport() throws IOException {
File directory = new File(Settings.PATHTOWOSFILES.getContent());
String[] array = directory.list();
int duplicates = 0;
for(int i = 0;i<array.length;i++)
{
File file = new File(Settings.PATHTOWOSFILES.getContent()+"\\"+array[i]);
POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(file));
HSSFWorkbook wb = new HSSFWorkbook(fs);
HSSFSheet sheet = wb.getSheetAt(0);
HSSFRow row;
int rows = sheet.getPhysicalNumberOfRows();
for(int r = 1; r < rows; r++) {
row = sheet.getRow(r);
if(row != null) {
BasicDBObject document = new BasicDBObject();
String author = row.getCell(5).getStringCellValue();
document.put("Author",author);
String title = row.getCell(8).getStringCellValue();
document.put("Title",title);
String sourceTitle = row.getCell(9).getStringCellValue();
document.put("SourceTitle",sourceTitle);
String documentType = row.getCell(13).getStringCellValue();
document.put("DocumentType",documentType);
if(row.getCell(19).getCellType()==0)
{
String authorKeywords = String.valueOf(row.getCell(19).getNumericCellValue());
document.put("AuthorKeyword",authorKeywords);
}
else
{
String authorKeywords = row.getCell(19).getStringCellValue();
document.put("AuthorKeyword",authorKeywords);
}
String keywords = row.getCell(20).getStringCellValue();
document.put("Keywords",keywords);
String abstrac = row.getCell(21).getStringCellValue();
document.put("Abstract",abstrac);
if(row.getCell(27).getCellType()==0)
{
String fundingOrg = String.valueOf(row.getCell(27).getNumericCellValue());
document.put("FundingOrg",fundingOrg);
}
else
{
String fundingOrg = row.getCell(27).getStringCellValue();
document.put("FundingOrg",fundingOrg);
}
if(row.getCell(28).getCellType()==0)
{
String fundingText = String.valueOf(row.getCell(28).getNumericCellValue());
document.put("FundingText",fundingText);
}
else
{
String fundingText = row.getCell(28).getStringCellValue();
document.put("FundingText",fundingText);
}
double citedReferenceCount = row.getCell(30).getNumericCellValue();
document.put("CitedReferenceCount",citedReferenceCount);
double citedTimes = row.getCell(31).getNumericCellValue();
document.put("CitedTimes",citedTimes);
double OneHundredEightyUsageCount = row.getCell(32).getNumericCellValue();
document.put("OneHundredEightyUsageCount",OneHundredEightyUsageCount);
double since2013UsageCount = row.getCell(33).getNumericCellValue();
document.put("Since2013UsageCount",since2013UsageCount);
String publisher = row.getCell(35).getStringCellValue();
document.put("Publisher",publisher);
String publisherCity = row.getCell(36).getStringCellValue();
document.put("PublisherCity",publisherCity);
String publicationDate = row.getCell(43).getStringCellValue();
document.put("PublicationDate",publicationDate);
double publicationYear = 0;
int type = row.getCell(44).getCellType();
if( type == 0) //Wenn vorhanden
{
publicationYear = row.getCell(44).getNumericCellValue();
document.put("PublicationYear",publicationYear);
}
//String volume = row.getCell(44).getStringCellValue();
double numberOfPages = row.getCell(57).getNumericCellValue();
document.put("NumberOfPages",numberOfPages);
String wosCategories = row.getCell(58).getStringCellValue();
document.put("WosCategories",wosCategories);
String researchAreas = row.getCell(59).getStringCellValue();
document.put("ResearchAreas",researchAreas);
String doi = row.getCell(54).getStringCellValue();
document.put("DOI",doi);
if(collection.findOne(new BasicDBObject("DOI",doi))==null)
{
collection.insert(document);
}
else
{
duplicates++;
System.out.println("Duplikat: " +title+ ";;;"+ author + ";;;" + doi + ";;;" + String.valueOf(duplicates));
}
}
}
}
}
}
@@ -0,0 +1,243 @@
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import java.util.List;
public class WoSCrawler {
private WebDriver driver;
private String searchPage;
private String currentSearch;
private int start;
public WoSCrawler(String search, SearchMode mode, int start) throws InterruptedException {
currentSearch = search;
this.start = start;
System.setProperty("webdriver.chrome.driver", Settings.PATHTOCROMEDRIVER.getContent());
driver = new ChromeDriver();
login();
//prepareSearchPage();
switch (mode) {
case KEYWORD:
searchByTopic();
break;
case RESEARCHAREA:
searchComplex("SU=" + currentSearch);
break;
}
startMain();
}
private synchronized void searchByTopic() throws InterruptedException {
WebElement searchBox = driver.findElement(By.id("value(input1)"));
searchBox.sendKeys(currentSearch);
searchBox.submit();
wait(5000);
}
private synchronized void searchComplex(String search) throws InterruptedException {
driver.findElement(By.cssSelector("a[title*=Advanced]")).click();
wait(1000);
WebElement box = driver.findElement(By.cssSelector("textarea[class*=Adv_formBoxesSearch]"));
box.sendKeys(search);
wait(500);
driver.findElement(By.id("search-button")).click();
wait(1000);
driver.findElement(By.id("hitCount")).click();
wait(5000);
}
private synchronized void startMain() throws InterruptedException {
int lastPage = Integer.parseInt(driver.findElement(By.id("pageCount.top")).getText().replace(",", ""));
goToPage(lastPage);
List<WebElement> list = driver.findElements(By.cssSelector("div[class=search-results-number-align"));
int maxCount = Integer.parseInt(list.get(list.size() - 1).getText().replace(",", "").replace(".", ""));
driver.findElement(By.cssSelector("span[class*=onload-secondary-button")).click();
wait(1000);
driver.findElement(By.id("numberOfRecordsRange")).click();
int min = start;
int max = start + 49999;
if (maxCount < max) {
max = maxCount;
setToMarkedList(min, max);
driver.findElement(By.cssSelector("button[class=onload-primary-button]")).click();
wait(30000);
goAndPrepareMarked(max);
} else {
setToMarkedList(min, max);
driver.findElement(By.cssSelector("button[class=onload-primary-button]")).click();
wait(30000);
goAndPrepareMarked(max);
goToSeachPage();
min = max;
max = maxCount;
setToMarkedList(min, max);
driver.findElement(By.cssSelector("button[class=onload-primary-button]")).click();
wait(30000);
goAndPrepareMarked(max);
}
}
private void setToMarkedList(int min, int max) throws InterruptedException {
WebElement from = driver.findElement(By.id("markFrom"));
WebElement to = driver.findElement(By.id("markTo"));
from.clear();
to.clear();
from.sendKeys(String.valueOf(min));
wait(500);
to.sendKeys(String.valueOf(max));
}
private void goAndPrepareMarked(int maxNumber) throws InterruptedException {
driver.findElement(By.cssSelector("a[title*=Marked")).click();
wait(1000);
driver.findElement(By.id("value(select_All)")).click();
wait(590);
driver.findElement(By.id("ISSN_fields")).click();
wait(540);
driver.findElement(By.id("ACCESSION_NUM_fields")).click();
wait(513);
driver.findElement(By.id("ADDRS_fields")).click();
wait(513);
driver.findElement(By.id("IDS_fields")).click();
wait(513);
driver.findElement(By.id("PMID_fields")).click();
wait(513);
driver.findElement(By.id("OPEN_ACCESS_fields")).click();
wait(513);
driver.findElement(By.id("SABBR_fields")).click();
wait(513);
driver.findElement(By.id("AUTHORSIDENTIFIERS_fields")).click();
wait(513);
driver.findElement(By.id("CONFERENCE_SPONSORS_fields")).click();
wait(513);
int min = 1;
int max = 0;
if (maxNumber < 499) {
export(1, maxNumber);
clearMarkedList();
return;
}
while (max + 499 < maxNumber) {
wait(10000);
export(min, max + 499);
min = min + 499;
max = max + 499;
}
export(min, maxNumber);
clearMarkedList();
}
private void clearMarkedList() throws InterruptedException {
driver.findElement(By.cssSelector("button[class*=snowplow-wos-markedlist-clear-click")).click();
wait(500);
driver.switchTo().alert().accept();
}
private void goToSeachPage() {
driver.findElement(By.cssSelector("a[title*=Results]")).click();
}
private void export(int start, int end) throws InterruptedException {
WebElement from = driver.findElement(By.id("markFrom"));
from.clear();
WebElement to = driver.findElement(By.id("markTo"));
to.clear();
from.sendKeys(String.valueOf(start));
wait(512);
to.sendKeys(String.valueOf(end));
driver.findElement(By.id("record_select_type_range")).click();
wait(1056);
if (driver.findElements(By.id("exportTypeName")).size() != 0) {
driver.findElement(By.id("exportTypeName")).click();
wait(1056);
driver.findElement(By.cssSelector("a[name*=Excel")).click();
} else {
driver.findElement(By.cssSelector("button[title*=Excel]")).click();
}
wait(981);
driver.findElement(By.cssSelector("button[name=saveToExcel")).click();
wait((int) (60000 + Math.random() * 10000)); //Erhöhen
}
public void tearDown() {
if (driver != null) {
driver.close();
}
driver.quit();
}
public synchronized void login() throws InterruptedException {
driver.navigate().to("https://apps.webofknowledge.com/UA_GeneralSearch_input.do?product=UA&SID=C6dqdgBgdQXkwQwYd3J&search_mode=GeneralSearch");
if (!driver.getTitle().equals("Web of Science - Please Sign In to Access Web of Science")) {
searchPage = driver.getCurrentUrl();
return;
}
WebElement box = driver.findElement(By.name("username"));
box.sendKeys(Settings.USERNAME.getContent());
box = driver.findElement(By.name("password"));
box.sendKeys(Settings.PASSWORD.getContent());
List<WebElement> list = driver.findElements(By.cssSelector("a[class=no-focus-style]"));
wait(1000);
list.get(0).click();
if (driver.getTitle() == "Web of Science - SIGN IN") ;
{
box = driver.findElement(By.linkText("continue and establish a new session"));
box.click();
}
wait(1000);
searchPage = driver.getCurrentUrl();
}
private void setAllDatabases() throws InterruptedException {
List<WebElement> buttons = driver.findElements(By.cssSelector("span[class=select2-selection__arrow]"));
buttons.get(0).click();
WebElement button = driver.findElement(By.cssSelector("li[class=select2-results__option]"));
button.click();
wait(1000);
}
private void goToPage(int page) {
WebElement currentPage = driver.findElement(By.name("page"));
currentPage.clear();
currentPage.sendKeys(Integer.toString(page));
currentPage.submit();
}
}
@@ -0,0 +1,20 @@
import org.openqa.selenium.*;
import org.openqa.selenium.chrome.*;
import org.junit.Test;
public class GettingStarted {
@Test
public void testGoogleSearch() throws InterruptedException {
// Optional. If not specified, WebDriver searches the PATH for chromedriver.
System.setProperty("webdriver.chrome.driver", "C:\\Users\\teddy\\Desktop\\Crawler_WebOfScience\\src\\test\\resources\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("http://www.google.com/");
Thread.sleep(5000); // Let the user actually see something!
WebElement searchBox = driver.findElement(By.name("q"));
searchBox.sendKeys("ChromeDriver");
searchBox.submit();
Thread.sleep(5000); // Let the user actually see something!
driver.quit();
}
}