diff options
author | s123188 <s123188@S123188.campus.tue.nl> | 2014-05-15 14:17:47 +0200 |
---|---|---|
committer | s123188 <s123188@S123188.campus.tue.nl> | 2014-05-15 14:17:47 +0200 |
commit | 4f4c7cb2635c63a3eaf7941713e79ad6ae39e409 (patch) | |
tree | 3439fb91c513d2c5817a687ce3efb0c4411deee8 /src | |
parent | fbcb596f8aff9a91362f8c16ae3d0d3f426e12b6 (diff) | |
download | Goldfarmer-4f4c7cb2635c63a3eaf7941713e79ad6ae39e409.tar.gz |
added a method to set the pointer of the resultset before the first row
Diffstat (limited to 'src')
-rw-r--r-- | src/main/Analyzor.java | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/main/Analyzor.java b/src/main/Analyzor.java index 8f11186..050d5c3 100644 --- a/src/main/Analyzor.java +++ b/src/main/Analyzor.java @@ -76,12 +76,24 @@ public class Analyzor { }
}
+ //sets the pointer before the first element of the dataset
+ void goToFirstRow(){
+ try{
+ data.beforeFirst();
+ }
+ catch(SQLException ex){
+ System.err.print("something went wrong with the dataset: SQLException");
+ return;
+ }
+ catch(NullPointerException ex){
+ System.err.print("dataset is null, try querying first");
+ return;
+ }
+ }
//analyzes the tweet on their positivity
//this is just a base version
void sentimentAnalysis() {
-
-
-
+ //read the lexicons
try{
readLexicon();
}
@@ -89,6 +101,8 @@ public class Analyzor { System.out.println("could not find the lexicons, please try again");
return;
}
+ //go to the start of te dataset
+ goToFirstRow();
Double value;
String text;
|