Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedWalid1 committed Jun 4, 2021
1 parent bc8b12a commit f29da9c
Show file tree
Hide file tree
Showing 18 changed files with 221 additions and 30 deletions.
13 changes: 13 additions & 0 deletions .idea/libraries/Maven__aopalliance_aopalliance_1_0.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_10.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_slf4j_slf4j_api_1_7_30.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/libraries/Maven__org_slf4j_slf4j_simple_1_7_30.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion Search_Engine.iml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<orderEntry type="library" name="Maven: org.mongodb:mongodb-driver-sync:3.12.8" level="project" />
<orderEntry type="library" name="Maven: org.mongodb:bson:3.12.8" level="project" />
<orderEntry type="library" name="Maven: org.mongodb:mongodb-driver-core:3.12.8" level="project" />
<orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:3.12.8" level="project" />
<orderEntry type="library" name="Maven: org.jsoup:jsoup:1.13.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.13" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
Expand All @@ -32,5 +32,17 @@
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-core:8.8.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-misc:8.8.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.lucene:lucene-analyzers-common:4.10.4" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-mongodb:1.7.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:4.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:4.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:4.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: aopalliance:aopalliance:1.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:4.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:4.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:4.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.10.0.RELEASE" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:jcl-over-slf4j:1.7.10" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
</component>
</module>
Empty file added Test.txt
Empty file.
25 changes: 24 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
<artifactId>mongodb-driver-sync</artifactId>
<version>3.12.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mongodb/mongo-java-driver -->
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>2.13.3</version>
<version>3.12.8</version>
</dependency>

<dependency>
<!-- jsoup HTML parser library @ https://jsoup.org/ -->
<groupId>org.jsoup</groupId>
Expand Down Expand Up @@ -53,6 +55,27 @@
<artifactId>lucene-analyzers-common</artifactId>
<version>4.10.4</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
<version>1.7.0.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
</dependency>


<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.30</version>
<scope>test</scope>
</dependency>



</dependencies>
Expand Down
48 changes: 24 additions & 24 deletions src/com/company/Crawler/Database.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
import com.mongodb.MongoClient;
import com.mongodb.ParallelScanOptions;
import com.mongodb.ServerAddress;
import org.jsoup.Connection;
import org.jsoup.HttpStatusException;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;


import javax.swing.*;
import java.net.UnknownHostException;
Expand All @@ -33,30 +39,24 @@ public class Database {
//DBCollection htmlDocuments;
//DBCollection time;
public Database() {
try {
this.mongoClient = new MongoClient("localhost", 27017);
//create database
this.crawlerDatabase = mongoClient.getDB("CrawlerDatabase");
//create collections and fields
websites = crawlerDatabase.getCollection("websites");
websites.createIndex("URL");
websites.createIndex("crawled");
websites.createIndex("indexed");
websites.createIndex("rank");
//websites.createIndex("hyberlinks");
websites.createIndex("HTMLDocuments");
websites.createIndex("Time");
disallowedWebsite=crawlerDatabase.getCollection("DisallowedWebsites");
//hyberlinks = crawlerDatabase.getCollection("hyberlinks");
//hyberlinks.createIndex("URL");
//hyberlinks.createIndex("refTo");
//htmlDocuments = crawlerDatabase.getCollection("HTMLDocuments");
//time = crawlerDatabase.getCollection("time");


} catch (UnknownHostException e) {
e.printStackTrace();
}
this.mongoClient = new MongoClient("localhost", 27017);
//create database
this.crawlerDatabase = mongoClient.getDB("CrawlerDatabase");
//create collections and fields
websites = crawlerDatabase.getCollection("websites");
websites.createIndex("URL");
websites.createIndex("crawled");
websites.createIndex("indexed");
websites.createIndex("rank");
//websites.createIndex("hyberlinks");
websites.createIndex("HTMLDocuments");
websites.createIndex("Time");
disallowedWebsite=crawlerDatabase.getCollection("DisallowedWebsites");
//hyberlinks = crawlerDatabase.getCollection("hyberlinks");
//hyberlinks.createIndex("URL");
//hyberlinks.createIndex("refTo");
//htmlDocuments = crawlerDatabase.getCollection("HTMLDocuments");
//time = crawlerDatabase.getCollection("time");


}
Expand Down
Binary file modified target/classes/com/company/Crawler/Database.class
Binary file not shown.

0 comments on commit f29da9c

Please sign in to comment.