-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed connection uris from java files.
- Loading branch information
1 parent
fffb322
commit 8df36ce
Showing
7 changed files
with
19,778 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
connection.txt |
9,980 changes: 9,979 additions & 1 deletion
9,980
RegistryParser/files/registryFiles/registry_example_test.xml
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
|
||
import java.io.BufferedWriter; | ||
import java.io.FileWriter; | ||
import java.io.BufferedReader; | ||
import java.io.FileReader; | ||
import java.io.IOException; | ||
import java.io.PrintWriter; | ||
import java.util.ArrayList; | ||
|
@@ -65,7 +67,8 @@ public class RegistryParser extends DefaultHandler { | |
public RegistryParser() throws IOException { | ||
gson = new Gson(); | ||
out = new PrintWriter(new BufferedWriter(new FileWriter("files/other/Errors.txt"))); | ||
dbURI = new MongoClientURI("mongodb://admin:[email protected]:33629/data_controllers"); | ||
String uri = new BufferedReader(new FileReader("files/other/connection.txt")).readLine(); | ||
dbURI = new MongoClientURI(uri); | ||
client = new MongoClient(dbURI); | ||
// client = new MongoClient("localhost",27017); | ||
// database = client.getDB("dataControllers"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package controllers; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.FileReader; | ||
import java.net.UnknownHostException; | ||
|
||
import com.mongodb.DB; | ||
|
@@ -11,8 +13,8 @@ public class Util { | |
|
||
public static DB connectToDB(){ | ||
try{ | ||
MongoClientURI dbURI = new MongoClientURI( | ||
"mongodb://admin:[email protected]:33629/data_controllers"); | ||
String uri = new BufferedReader(new FileReader("public/connection.txt")).readLine(); | ||
MongoClientURI dbURI = new MongoClientURI(uri); | ||
client = new MongoClient(dbURI); | ||
DB database = client.getDB(dbURI.getDatabase()); | ||
return database; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
connection.txt |