diff --git a/.idea/modules.xml b/.idea/modules.xml
index 249f063..45db89d 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -5,7 +5,6 @@
-
diff --git a/build/classes/org/wso2/uima/collectionProccesingEngine/analysisEngines/LocationIdentifier.class b/build/classes/org/wso2/uima/collectionProccesingEngine/analysisEngines/LocationIdentifier.class
new file mode 100644
index 0000000..ec1e82c
Binary files /dev/null and b/build/classes/org/wso2/uima/collectionProccesingEngine/analysisEngines/LocationIdentifier.class differ
diff --git a/build/classes/org/wso2/uima/collectionProccesingEngine/analysisEngines/TrafficLevelAnalyser.class b/build/classes/org/wso2/uima/collectionProccesingEngine/analysisEngines/TrafficLevelAnalyser.class
new file mode 100644
index 0000000..80588b1
Binary files /dev/null and b/build/classes/org/wso2/uima/collectionProccesingEngine/analysisEngines/TrafficLevelAnalyser.class differ
diff --git a/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/AnnotationPrinter.class b/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/AnnotationPrinter.class
new file mode 100644
index 0000000..22b812f
Binary files /dev/null and b/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/AnnotationPrinter.class differ
diff --git a/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/ConsolePrinterCasConsumer.class b/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/ConsolePrinterCasConsumer.class
new file mode 100644
index 0000000..8cb89bc
Binary files /dev/null and b/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/ConsolePrinterCasConsumer.class differ
diff --git a/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/DataBridgeCasConsumer.class b/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/DataBridgeCasConsumer.class
new file mode 100644
index 0000000..34f37c1
Binary files /dev/null and b/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/DataBridgeCasConsumer.class differ
diff --git a/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/HttpCasConsumer.class b/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/HttpCasConsumer.class
new file mode 100644
index 0000000..3b20267
Binary files /dev/null and b/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/HttpCasConsumer.class differ
diff --git a/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/SoapCasConsumer.class b/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/SoapCasConsumer.class
new file mode 100644
index 0000000..8850db8
Binary files /dev/null and b/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/SoapCasConsumer.class differ
diff --git a/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/CasConsumerUtil.class b/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/CasConsumerUtil.class
new file mode 100644
index 0000000..43cadb3
Binary files /dev/null and b/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/CasConsumerUtil.class differ
diff --git a/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/DefaultTrustManager.class b/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/DefaultTrustManager.class
new file mode 100644
index 0000000..78cbadf
Binary files /dev/null and b/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/DefaultTrustManager.class differ
diff --git a/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/KeyStoreUtil.class b/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/KeyStoreUtil.class
new file mode 100644
index 0000000..26e1ea9
Binary files /dev/null and b/build/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/KeyStoreUtil.class differ
diff --git a/build/classes/org/wso2/uima/collectionProccesingEngine/reader/TwitterActiveMQReader.class b/build/classes/org/wso2/uima/collectionProccesingEngine/reader/TwitterActiveMQReader.class
new file mode 100644
index 0000000..956bae2
Binary files /dev/null and b/build/classes/org/wso2/uima/collectionProccesingEngine/reader/TwitterActiveMQReader.class differ
diff --git a/build/classes/org/wso2/uima/main/CEPWithActiveMQ.class b/build/classes/org/wso2/uima/main/CEPWithActiveMQ.class
new file mode 100644
index 0000000..d767aff
Binary files /dev/null and b/build/classes/org/wso2/uima/main/CEPWithActiveMQ.class differ
diff --git a/build/classes/org/wso2/uima/main/StatusCallBackCPE.class b/build/classes/org/wso2/uima/main/StatusCallBackCPE.class
new file mode 100644
index 0000000..327af8b
Binary files /dev/null and b/build/classes/org/wso2/uima/main/StatusCallBackCPE.class differ
diff --git a/build/classes/org/wso2/uima/types/HashTag.class b/build/classes/org/wso2/uima/types/HashTag.class
new file mode 100644
index 0000000..58d5f18
Binary files /dev/null and b/build/classes/org/wso2/uima/types/HashTag.class differ
diff --git a/build/classes/org/wso2/uima/types/HashTag_Type$1.class b/build/classes/org/wso2/uima/types/HashTag_Type$1.class
new file mode 100644
index 0000000..dd23bba
Binary files /dev/null and b/build/classes/org/wso2/uima/types/HashTag_Type$1.class differ
diff --git a/build/classes/org/wso2/uima/types/HashTag_Type.class b/build/classes/org/wso2/uima/types/HashTag_Type.class
new file mode 100644
index 0000000..582e659
Binary files /dev/null and b/build/classes/org/wso2/uima/types/HashTag_Type.class differ
diff --git a/build/classes/org/wso2/uima/types/LocationIdentification.class b/build/classes/org/wso2/uima/types/LocationIdentification.class
new file mode 100644
index 0000000..1bff2ec
Binary files /dev/null and b/build/classes/org/wso2/uima/types/LocationIdentification.class differ
diff --git a/build/classes/org/wso2/uima/types/LocationIdentification_Type$1.class b/build/classes/org/wso2/uima/types/LocationIdentification_Type$1.class
new file mode 100644
index 0000000..ae4e6c2
Binary files /dev/null and b/build/classes/org/wso2/uima/types/LocationIdentification_Type$1.class differ
diff --git a/build/classes/org/wso2/uima/types/LocationIdentification_Type.class b/build/classes/org/wso2/uima/types/LocationIdentification_Type.class
new file mode 100644
index 0000000..b77b940
Binary files /dev/null and b/build/classes/org/wso2/uima/types/LocationIdentification_Type.class differ
diff --git a/build/classes/org/wso2/uima/types/TimeStamp.class b/build/classes/org/wso2/uima/types/TimeStamp.class
new file mode 100644
index 0000000..371cc8a
Binary files /dev/null and b/build/classes/org/wso2/uima/types/TimeStamp.class differ
diff --git a/build/classes/org/wso2/uima/types/TimeStamp_Type$1.class b/build/classes/org/wso2/uima/types/TimeStamp_Type$1.class
new file mode 100644
index 0000000..06c2a9b
Binary files /dev/null and b/build/classes/org/wso2/uima/types/TimeStamp_Type$1.class differ
diff --git a/build/classes/org/wso2/uima/types/TimeStamp_Type.class b/build/classes/org/wso2/uima/types/TimeStamp_Type.class
new file mode 100644
index 0000000..5427625
Binary files /dev/null and b/build/classes/org/wso2/uima/types/TimeStamp_Type.class differ
diff --git a/build/classes/org/wso2/uima/types/TrafficLevelIdentifier.class b/build/classes/org/wso2/uima/types/TrafficLevelIdentifier.class
new file mode 100644
index 0000000..cea9b9e
Binary files /dev/null and b/build/classes/org/wso2/uima/types/TrafficLevelIdentifier.class differ
diff --git a/build/classes/org/wso2/uima/types/TrafficLevelIdentifier_Type$1.class b/build/classes/org/wso2/uima/types/TrafficLevelIdentifier_Type$1.class
new file mode 100644
index 0000000..d47e549
Binary files /dev/null and b/build/classes/org/wso2/uima/types/TrafficLevelIdentifier_Type$1.class differ
diff --git a/build/classes/org/wso2/uima/types/TrafficLevelIdentifier_Type.class b/build/classes/org/wso2/uima/types/TrafficLevelIdentifier_Type.class
new file mode 100644
index 0000000..10e2fa1
Binary files /dev/null and b/build/classes/org/wso2/uima/types/TrafficLevelIdentifier_Type.class differ
diff --git a/lib/slf4j-1.5.10.wso2v1.jar b/lib/slf4j-1.5.10.wso2v1.jar
deleted file mode 100644
index 344bab7..0000000
Binary files a/lib/slf4j-1.5.10.wso2v1.jar and /dev/null differ
diff --git a/pathing.jar b/pathing.jar
index 69696a1..4e8bbb0 100644
Binary files a/pathing.jar and b/pathing.jar differ
diff --git a/src/main/java/org/wso2/uima/collectionProccesingEngine/analysisEngines/LocationIdentifier.java b/src/main/java/org/wso2/uima/collectionProccesingEngine/analysisEngines/LocationIdentifier.java
index 497451e..b72e7b3 100644
--- a/src/main/java/org/wso2/uima/collectionProccesingEngine/analysisEngines/LocationIdentifier.java
+++ b/src/main/java/org/wso2/uima/collectionProccesingEngine/analysisEngines/LocationIdentifier.java
@@ -78,6 +78,7 @@ public void initialize(UimaContext ctx)
IOUtils.closeQuietly(nameFinderStream);
IOUtils.closeQuietly(tokenizerStream);
IOUtils.closeQuietly(sentenceStream);
+ logger.info(LocationIdentifier.class.getSimpleName()+" Analysis Engine initialized successfully");
}
}
@@ -97,15 +98,15 @@ public void process(JCas jcas) throws AnalysisEngineProcessException {
tokens[i] = tokSpans[i].getCoveredText(sentence).toString();
}
- logger.info("Tweet Text: " + jcas.getDocumentText());
- Span locationSpans[] = locationFinder.find(tokens);
- LocationIdentification annotation = new LocationIdentification(jcas);
- for (Span location : locationSpans) {
- annotation.setBegin(start + tokSpans[location.getStart()].getStart());
- annotation.setEnd(start + tokSpans[location.getEnd() - 1].getEnd());
- annotation.addToIndexes(jcas);
- logger.info("Location Detected : " + annotation.getCoveredText());
- }
+ logger.debug("Tweet Text: "+jcas.getDocumentText());
+ Span locationSpans[] = locationFinder.find(tokens);
+ LocationIdentification annotation = new LocationIdentification(jcas);
+ for (Span location: locationSpans) {
+ annotation.setBegin(start + tokSpans[location.getStart()].getStart());
+ annotation.setEnd(start + tokSpans[location.getEnd() - 1].getEnd());
+ annotation.addToIndexes(jcas);
+ logger.info("Location Detected : "+annotation.getCoveredText());
+ }
if (locationSpans.length == 0) {
diff --git a/src/main/java/org/wso2/uima/collectionProccesingEngine/analysisEngines/TrafficLevelAnalyser.java b/src/main/java/org/wso2/uima/collectionProccesingEngine/analysisEngines/TrafficLevelAnalyser.java
index f6f1b00..1e822c2 100644
--- a/src/main/java/org/wso2/uima/collectionProccesingEngine/analysisEngines/TrafficLevelAnalyser.java
+++ b/src/main/java/org/wso2/uima/collectionProccesingEngine/analysisEngines/TrafficLevelAnalyser.java
@@ -76,6 +76,7 @@ public void initialize(UimaContext ctx)
throw new ResourceInitializationException(e);
} finally {
IOUtils.closeQuietly(docStream);
+ logger.info(TrafficLevelAnalyser.class.getSimpleName()+" Analysis Engine initialized successfully");
}
}
diff --git a/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/ConsolePrinterCasConsumer.java b/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/ConsolePrinterCasConsumer.java
index 3b76c9e..054ad4f 100644
--- a/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/ConsolePrinterCasConsumer.java
+++ b/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/ConsolePrinterCasConsumer.java
@@ -20,39 +20,24 @@
package org.wso2.uima.collectionProccesingEngine.consumers;
-import org.apache.log4j.Logger;
import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.CASException;
import org.apache.uima.collection.CasConsumer_ImplBase;
-import org.apache.uima.jcas.JCas;
import org.apache.uima.resource.ResourceProcessException;
-import org.wso2.uima.types.LocationIdentification;
+import org.wso2.uima.collectionProccesingEngine.consumers.util.CasConsumerUtil;
+public class ConsolePrinterCasConsumer extends CasConsumer_ImplBase{
-import java.util.Iterator;
+ @Override
+ public void processCas(CAS cas) throws ResourceProcessException {
-public class ConsolePrinterCasConsumer extends CasConsumer_ImplBase {
+ String locationString = CasConsumerUtil.getLocationString(cas);
+ String trafficLevel = CasConsumerUtil.getTrafficLevel(cas);
- private static Logger logger = Logger.getLogger(ConsolePrinterCasConsumer.class);
+ if(locationString.isEmpty()){
+ return;
+ }
- // TODO remove this class
- @Override
- public void processCas(CAS cas) throws ResourceProcessException {
- JCas jcas = null;
-
- try {
- jcas = cas.getJCas();
- } catch (CASException e) {
- logger.error("Unable to get the JCas from the cas when trying to process Cas", e);
- }
-
- Iterator iterator = jcas.getAnnotationIndex(
- LocationIdentification.type).iterator();
- System.out.println("\nTweet : " + jcas.getDocumentText());
- while (iterator.hasNext()) {
- LocationIdentification tag = (LocationIdentification) iterator
- .next();
- System.out.println("\nAnnotation : " + tag.getCoveredText());
- }
-
- }
+ System.out.println("Annotated Location : " + locationString);
+ System.out.println("Annotated Traffic : " + trafficLevel);
+
+ }
}
\ No newline at end of file
diff --git a/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/DataBridgeCasConsumer.java b/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/DataBridgeCasConsumer.java
index c4d007c..35fa9fb 100644
--- a/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/DataBridgeCasConsumer.java
+++ b/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/DataBridgeCasConsumer.java
@@ -31,7 +31,7 @@
import org.wso2.carbon.databridge.commons.StreamDefinition;
import org.wso2.carbon.databridge.commons.exception.*;
import org.wso2.uima.collectionProccesingEngine.consumers.util.KeyStoreUtil;
-import org.wso2.uima.collectionProccesingEngine.consumers.util.TweetScanner;
+import org.wso2.uima.collectionProccesingEngine.consumers.util.CasConsumerUtil;
import java.net.MalformedURLException;
import java.sql.Timestamp;
@@ -42,24 +42,30 @@
*/
public class DataBridgeCasConsumer extends CasConsumer_ImplBase {
- private static final String STREAM_NAME = "org.wso2.uima.TwitterExtractedInputFeed";
- private static final String VERSION = "1.0.0";
+
private static final String PARAM_SERVER_URL = "serverURL";
private static final String PARAM_USERNAME = "username";
private static final String PARAM_PASSWORD = "password";
- private static String streamID = null;
- private static DataPublisher dataPublisher;
+ private static final String PARAM_STREAM_NAME = "streamName";
+ private static final String PARAM_STREAM_VERSION = "streamVersion";
+
+
+ private String streamID = null;
+ private DataPublisher dataPublisher;
private static Logger logger = Logger.getLogger(DataBridgeCasConsumer.class);
+
private String url;
private String username;
private String password;
+ private String streamName;
+ private String streamVersion;
@Override
public void processCas(CAS cas) throws ResourceProcessException {
- String tweetText = TweetScanner.getTweetText(cas);
- String locationString = TweetScanner.getLocationString(cas);
- String trafficLevel = TweetScanner.getTrafficLevel(cas);
+ String tweetText = CasConsumerUtil.getTweetText(cas);
+ String locationString = CasConsumerUtil.getLocationString(cas);
+ String trafficLevel = CasConsumerUtil.getTrafficLevel(cas);
if (locationString.isEmpty()) {
return;
@@ -77,7 +83,7 @@ public void processCas(CAS cas) throws ResourceProcessException {
tweetText
);
} catch (AgentException e) {
- logger.error("Unable to publish events due to errors in the data bridge", e);
+ logger.error("Unable to publish events to the data bridge to "+url, e);
}
}
}
@@ -88,53 +94,53 @@ public void initialize() throws ResourceInitializationException {
url = (String) getConfigParameterValue(PARAM_SERVER_URL);
username = (String) getConfigParameterValue(PARAM_USERNAME);
password = (String) getConfigParameterValue(PARAM_PASSWORD);
+ streamName = (String)getConfigParameterValue(PARAM_STREAM_NAME);
+ streamVersion = (String)getConfigParameterValue(PARAM_STREAM_VERSION);
+
try {
dataPublisher = new DataPublisher(url, username, password);
logger.debug("Data Publisher Created");
} catch (MalformedURLException e) {
- logger.error("Unable to create the data publisher ", e);
+ logger.error("Unable to create the data publisher to url: "+url, e);
} catch (AgentException e) {
- logger.error("Unable to create the data publisher ", e);
+ logger.error("Unable to create the data publisher to url: "+url, e);
} catch (AuthenticationException e) {
- logger.error("Unable to create the data publisher ", e);
+ logger.error("Unable to create the data publisher using username: "+username+" password: "+password+" to "+url, e);
} catch (TransportException e) {
- logger.error("Unable to create the data publisher ", e);
+ logger.error("Unable to create the data publisher to url: "+url, e);
}
+
try {
- streamID = dataPublisher.findStream(STREAM_NAME, VERSION);
- logger.info("Stream Definition Already Exists");
- } catch (NoStreamDefinitionExistException | AgentException | StreamDefinitionException e) {
- try {
- StreamDefinition streamDef = new StreamDefinition(VERSION);
+ StreamDefinition streamDef = new StreamDefinition(streamVersion);
streamDef.setNickName("TwitterCEP");
streamDef.setDescription("Extracted Data Feed from Tweets");
streamDef.addTag("UIMA");
streamDef.addTag("CEP");
+
streamID = dataPublisher.defineStream("{" +
- " 'name':'" + STREAM_NAME + "'," +
- " 'version':'" + VERSION + "'," +
- " 'nickName': 'TwitterCEP'," +
- " 'description': 'Some Desc'," +
+ " 'name':'" + streamName + "'," +
+ " 'version':'" + streamVersion + "'," +
+ " 'nickName': 'twitter Input Stream'," +
+ " 'description': 'Input stream to recieve the extracted details from the twitter feed into the CEP'," +
" 'tags':['UIMA', 'CEP']," +
" 'metaData':[" +
- " {'name':'timeStamp','type':'STRING'}" +
+ " {'name':'Timestamp','type':'STRING'}" +
" ]," +
" 'payloadData':[" +
- " {'name':'Location','type':'STRING'}," +
- " {'name':'TrafficLevel','type':'STRING'}," +
- " {'name':'TweetText','type':'STRING'}" +
+ " {'name':'Traffic_Location','type':'STRING'}," +
+ " {'name':'Traffic_Level','type':'STRING'}," +
+ " {'name':'Twitter_Text','type':'STRING'}" +
" ]" +
"}");
+
logger.debug("Stream ID : " + streamID);
logger.debug("Stream was not found and defined successfully");
- } catch (AgentException | MalformedStreamDefinitionException
+ } catch (AgentException | MalformedStreamDefinitionException
| StreamDefinitionException
| DifferentStreamDefinitionAlreadyDefinedException e1) {
logger.debug("Stream Definition Failed");
- }
}
-
}
/***
diff --git a/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/HttpCasConsumer.java b/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/HttpCasConsumer.java
index 3999548..e3a4b72 100644
--- a/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/HttpCasConsumer.java
+++ b/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/HttpCasConsumer.java
@@ -31,7 +31,7 @@
import org.apache.uima.resource.ResourceInitializationException;
import org.apache.uima.resource.ResourceProcessException;
import org.wso2.uima.collectionProccesingEngine.consumers.util.KeyStoreUtil;
-import org.wso2.uima.collectionProccesingEngine.consumers.util.TweetScanner;
+import org.wso2.uima.collectionProccesingEngine.consumers.util.CasConsumerUtil;
import java.sql.Timestamp;
import java.util.Date;
@@ -70,9 +70,9 @@ public void initialize() throws ResourceInitializationException {
@Override
public void processCas(CAS cas) throws ResourceProcessException {
- String tweetText = TweetScanner.getTweetText(cas);
- String locationString = TweetScanner.getLocationString(cas);
- String trafficLevel = TweetScanner.getTrafficLevel(cas);
+ String tweetText = CasConsumerUtil.getTweetText(cas);
+ String locationString = CasConsumerUtil.getLocationString(cas);
+ String trafficLevel = CasConsumerUtil.getTrafficLevel(cas);
if (locationString.isEmpty()) {
return;
@@ -83,7 +83,7 @@ public void processCas(CAS cas) throws ResourceProcessException {
if (!locationString.equals(""))
publish(tweetText, locationString, trafficLevel);
- //TODO write a Util class
+
}
/**
diff --git a/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/SoapCasConsumer.java b/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/SoapCasConsumer.java
index 89456d5..3673ba1 100644
--- a/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/SoapCasConsumer.java
+++ b/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/SoapCasConsumer.java
@@ -26,7 +26,7 @@
import org.apache.uima.resource.ResourceInitializationException;
import org.apache.uima.resource.ResourceProcessException;
import org.wso2.uima.collectionProccesingEngine.consumers.util.KeyStoreUtil;
-import org.wso2.uima.collectionProccesingEngine.consumers.util.TweetScanner;
+import org.wso2.uima.collectionProccesingEngine.consumers.util.CasConsumerUtil;
import javax.xml.soap.*;
import java.sql.Timestamp;
@@ -47,16 +47,16 @@ public class SoapCasConsumer extends CasConsumer_ImplBase {
public void processCas(CAS cas) throws ResourceProcessException {
//properties
- String tweetText = TweetScanner.getTweetText(cas);
- String locationString = TweetScanner.getLocationString(cas);
- String trafficLevel = TweetScanner.getTrafficLevel(cas);
+ String tweetText = CasConsumerUtil.getTweetText(cas);
+ String locationString = CasConsumerUtil.getLocationString(cas);
+ String trafficLevel = CasConsumerUtil.getTrafficLevel(cas);
if (locationString.isEmpty()) {
return;
}
- Logger.getLogger(SoapCasConsumer.class).info("Annotated Location : " + locationString.trim());
- Logger.getLogger(SoapCasConsumer.class).info("Annotated Traffic Level : " + trafficLevel);
+ Logger.getLogger(SoapCasConsumer.class).debug("Annotated Location : " + locationString.trim());
+ Logger.getLogger(SoapCasConsumer.class).debug("Annotated Traffic Level : " + trafficLevel);
//creating soap message
Date date = new Date();
@@ -91,6 +91,8 @@ public void processCas(CAS cas) throws ResourceProcessException {
// System.out.println(soapMessage.getSOAPBody().toString());
this.publish(soapMessage);
+ logger.info("Event Published Successfully to "+ soapEndPoint+"\n");
+
} catch (Exception e) {
logger.error("Error occurs when creating the SOAP message", e);
diff --git a/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/util/TweetScanner.java b/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/util/CasConsumerUtil.java
similarity index 96%
rename from src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/util/TweetScanner.java
rename to src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/util/CasConsumerUtil.java
index 36758e6..2540966 100644
--- a/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/util/TweetScanner.java
+++ b/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/util/CasConsumerUtil.java
@@ -28,14 +28,14 @@
import org.wso2.uima.types.TrafficLevelIdentifier;
import java.util.Iterator;
-
/**
* Scan the CAS object given and return the locations, trafficLevel and tweetText indicated within the cas.
*/
-public class TweetScanner {
- private TweetScanner() {
- //Avoids the class from creating its instances.
+public class CasConsumerUtil {
+
+ private CasConsumerUtil(){
+ //no instances.
}
/**
diff --git a/src/main/java/org/wso2/uima/collectionProccesingEngine/reader/TwitterActiveMQReader.java b/src/main/java/org/wso2/uima/collectionProccesingEngine/reader/TwitterActiveMQReader.java
index 73cad38..3210367 100644
--- a/src/main/java/org/wso2/uima/collectionProccesingEngine/reader/TwitterActiveMQReader.java
+++ b/src/main/java/org/wso2/uima/collectionProccesingEngine/reader/TwitterActiveMQReader.java
@@ -78,14 +78,15 @@ public void initialize() throws ResourceInitializationException {
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Topic topic = session.createTopic(topicName);
-
- logger.info("Consumer Created Successfully");
- consumer = session.createDurableSubscriber(topic, clientID);
+ logger.debug("Consumer Created Successfully");
+ consumer = session.createDurableSubscriber(topic,clientID);
} catch (JMSException e) {
- logger.error("Error Initializing the Subscriber for ActiveMQReader", e);
-
+ logger.error("Error Initializing the Subscriber for ActiveMQReader",e);
+ throw new RuntimeException("Unable to initialize the CAS Reader");
}
+
+ logger.info("ActiveMQ Cas Reader Initialized Successfully");
}
diff --git a/target/classes/org/wso2/uima/collectionProccesingEngine/analysisEngines/LocationIdentifier.class b/target/classes/org/wso2/uima/collectionProccesingEngine/analysisEngines/LocationIdentifier.class
new file mode 100644
index 0000000..a17a11c
Binary files /dev/null and b/target/classes/org/wso2/uima/collectionProccesingEngine/analysisEngines/LocationIdentifier.class differ
diff --git a/target/classes/org/wso2/uima/collectionProccesingEngine/analysisEngines/TrafficLevelAnalyser.class b/target/classes/org/wso2/uima/collectionProccesingEngine/analysisEngines/TrafficLevelAnalyser.class
new file mode 100644
index 0000000..20500a3
Binary files /dev/null and b/target/classes/org/wso2/uima/collectionProccesingEngine/analysisEngines/TrafficLevelAnalyser.class differ
diff --git a/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/AnnotationPrinter.class b/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/AnnotationPrinter.class
new file mode 100644
index 0000000..5f0920d
Binary files /dev/null and b/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/AnnotationPrinter.class differ
diff --git a/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/ConsolePrinterCasConsumer.class b/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/ConsolePrinterCasConsumer.class
new file mode 100644
index 0000000..b34fbb3
Binary files /dev/null and b/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/ConsolePrinterCasConsumer.class differ
diff --git a/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/DataBridgeCasConsumer.class b/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/DataBridgeCasConsumer.class
new file mode 100644
index 0000000..478c536
Binary files /dev/null and b/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/DataBridgeCasConsumer.class differ
diff --git a/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/HttpCasConsumer.class b/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/HttpCasConsumer.class
new file mode 100644
index 0000000..639ecdd
Binary files /dev/null and b/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/HttpCasConsumer.class differ
diff --git a/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/SoapCasConsumer.class b/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/SoapCasConsumer.class
new file mode 100644
index 0000000..377785a
Binary files /dev/null and b/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/SoapCasConsumer.class differ
diff --git a/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/DefaultTrustManager.class b/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/DefaultTrustManager.class
new file mode 100644
index 0000000..1dfb5bb
Binary files /dev/null and b/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/DefaultTrustManager.class differ
diff --git a/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/KeyStoreUtil.class b/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/KeyStoreUtil.class
new file mode 100644
index 0000000..9d3e85b
Binary files /dev/null and b/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/KeyStoreUtil.class differ
diff --git a/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/TweetScanner.class b/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/TweetScanner.class
new file mode 100644
index 0000000..fb5db36
Binary files /dev/null and b/target/classes/org/wso2/uima/collectionProccesingEngine/consumers/util/TweetScanner.class differ
diff --git a/target/classes/org/wso2/uima/collectionProccesingEngine/reader/TwitterActiveMQReader.class b/target/classes/org/wso2/uima/collectionProccesingEngine/reader/TwitterActiveMQReader.class
new file mode 100644
index 0000000..031379a
Binary files /dev/null and b/target/classes/org/wso2/uima/collectionProccesingEngine/reader/TwitterActiveMQReader.class differ
diff --git a/target/classes/org/wso2/uima/main/CEPWithActiveMQ.class b/target/classes/org/wso2/uima/main/CEPWithActiveMQ.class
new file mode 100644
index 0000000..394e733
Binary files /dev/null and b/target/classes/org/wso2/uima/main/CEPWithActiveMQ.class differ
diff --git a/target/classes/org/wso2/uima/main/StatusCallBackCPE.class b/target/classes/org/wso2/uima/main/StatusCallBackCPE.class
new file mode 100644
index 0000000..d76255c
Binary files /dev/null and b/target/classes/org/wso2/uima/main/StatusCallBackCPE.class differ
diff --git a/target/classes/org/wso2/uima/types/HashTag.class b/target/classes/org/wso2/uima/types/HashTag.class
new file mode 100644
index 0000000..f63ee8b
Binary files /dev/null and b/target/classes/org/wso2/uima/types/HashTag.class differ
diff --git a/target/classes/org/wso2/uima/types/HashTag_Type$1.class b/target/classes/org/wso2/uima/types/HashTag_Type$1.class
new file mode 100644
index 0000000..4aab5d2
Binary files /dev/null and b/target/classes/org/wso2/uima/types/HashTag_Type$1.class differ
diff --git a/target/classes/org/wso2/uima/types/HashTag_Type.class b/target/classes/org/wso2/uima/types/HashTag_Type.class
new file mode 100644
index 0000000..99c42b8
Binary files /dev/null and b/target/classes/org/wso2/uima/types/HashTag_Type.class differ
diff --git a/target/classes/org/wso2/uima/types/LocationIdentification.class b/target/classes/org/wso2/uima/types/LocationIdentification.class
new file mode 100644
index 0000000..3bac8e9
Binary files /dev/null and b/target/classes/org/wso2/uima/types/LocationIdentification.class differ
diff --git a/target/classes/org/wso2/uima/types/LocationIdentification_Type$1.class b/target/classes/org/wso2/uima/types/LocationIdentification_Type$1.class
new file mode 100644
index 0000000..508f125
Binary files /dev/null and b/target/classes/org/wso2/uima/types/LocationIdentification_Type$1.class differ
diff --git a/target/classes/org/wso2/uima/types/LocationIdentification_Type.class b/target/classes/org/wso2/uima/types/LocationIdentification_Type.class
new file mode 100644
index 0000000..c149e66
Binary files /dev/null and b/target/classes/org/wso2/uima/types/LocationIdentification_Type.class differ
diff --git a/target/classes/org/wso2/uima/types/TimeStamp.class b/target/classes/org/wso2/uima/types/TimeStamp.class
new file mode 100644
index 0000000..05f7919
Binary files /dev/null and b/target/classes/org/wso2/uima/types/TimeStamp.class differ
diff --git a/target/classes/org/wso2/uima/types/TimeStamp_Type$1.class b/target/classes/org/wso2/uima/types/TimeStamp_Type$1.class
new file mode 100644
index 0000000..2e6cd4c
Binary files /dev/null and b/target/classes/org/wso2/uima/types/TimeStamp_Type$1.class differ
diff --git a/target/classes/org/wso2/uima/types/TimeStamp_Type.class b/target/classes/org/wso2/uima/types/TimeStamp_Type.class
new file mode 100644
index 0000000..c11ece4
Binary files /dev/null and b/target/classes/org/wso2/uima/types/TimeStamp_Type.class differ
diff --git a/target/classes/org/wso2/uima/types/TrafficLevelIdentifier.class b/target/classes/org/wso2/uima/types/TrafficLevelIdentifier.class
new file mode 100644
index 0000000..b773ff0
Binary files /dev/null and b/target/classes/org/wso2/uima/types/TrafficLevelIdentifier.class differ
diff --git a/target/classes/org/wso2/uima/types/TrafficLevelIdentifier_Type$1.class b/target/classes/org/wso2/uima/types/TrafficLevelIdentifier_Type$1.class
new file mode 100644
index 0000000..ada5923
Binary files /dev/null and b/target/classes/org/wso2/uima/types/TrafficLevelIdentifier_Type$1.class differ
diff --git a/target/classes/org/wso2/uima/types/TrafficLevelIdentifier_Type.class b/target/classes/org/wso2/uima/types/TrafficLevelIdentifier_Type.class
new file mode 100644
index 0000000..e96cb51
Binary files /dev/null and b/target/classes/org/wso2/uima/types/TrafficLevelIdentifier_Type.class differ
diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties
new file mode 100644
index 0000000..f8d6a0c
--- /dev/null
+++ b/target/maven-archiver/pom.properties
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Tue Jan 27 16:00:19 IST 2015
+version=1.0
+groupId=org.wso2.cep.uima
+artifactId=org.wso2.cpe.uima.twitter-cpe
diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
new file mode 100644
index 0000000..36449c8
--- /dev/null
+++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
@@ -0,0 +1,25 @@
+org/wso2/uima/types/LocationIdentification.class
+org/wso2/uima/collectionProccesingEngine/consumers/util/KeyStoreUtil.class
+org/wso2/uima/types/TrafficLevelIdentifier_Type$1.class
+org/wso2/uima/types/HashTag_Type$1.class
+org/wso2/uima/collectionProccesingEngine/consumers/HttpCasConsumer.class
+org/wso2/uima/collectionProccesingEngine/reader/TwitterActiveMQReader.class
+org/wso2/uima/types/LocationIdentification_Type.class
+org/wso2/uima/collectionProccesingEngine/consumers/util/DefaultTrustManager.class
+org/wso2/uima/types/HashTag_Type.class
+org/wso2/uima/types/TimeStamp_Type$1.class
+org/wso2/uima/types/TrafficLevelIdentifier.class
+org/wso2/uima/types/TimeStamp.class
+org/wso2/uima/types/TimeStamp_Type.class
+org/wso2/uima/types/LocationIdentification_Type$1.class
+org/wso2/uima/types/TrafficLevelIdentifier_Type.class
+org/wso2/uima/collectionProccesingEngine/consumers/SoapCasConsumer.class
+org/wso2/uima/main/CEPWithActiveMQ.class
+org/wso2/uima/collectionProccesingEngine/analysisEngines/LocationIdentifier.class
+org/wso2/uima/collectionProccesingEngine/consumers/ConsolePrinterCasConsumer.class
+org/wso2/uima/collectionProccesingEngine/consumers/util/CasConsumerUtil.class
+org/wso2/uima/main/StatusCallBackCPE.class
+org/wso2/uima/collectionProccesingEngine/analysisEngines/TrafficLevelAnalyser.class
+org/wso2/uima/types/HashTag.class
+org/wso2/uima/collectionProccesingEngine/consumers/DataBridgeCasConsumer.class
+org/wso2/uima/collectionProccesingEngine/consumers/AnnotationPrinter.class
diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
new file mode 100644
index 0000000..37a558f
--- /dev/null
+++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
@@ -0,0 +1,19 @@
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/collectionProccesingEngine/analysisEngines/LocationIdentifier.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/util/KeyStoreUtil.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/collectionProccesingEngine/analysisEngines/TrafficLevelAnalyser.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/types/LocationIdentification_Type.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/types/TimeStamp.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/DataBridgeCasConsumer.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/types/TrafficLevelIdentifier_Type.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/main/CEPwithActiveMQ.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/types/TimeStamp_Type.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/types/TrafficLevelIdentifier.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/types/HashTag.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/types/HashTag_Type.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/HttpCasConsumer.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/collectionProccesingEngine/reader/TwitterActiveMQReader.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/types/LocationIdentification.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/AnnotationPrinter.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/SoapCasConsumer.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/ConsolePrinterCasConsumer.java
+/home/supun/IdeaProjects/TwitterCPE/src/main/java/org/wso2/uima/collectionProccesingEngine/consumers/util/DefaultTrustManager.java
diff --git a/target/org.wso2.cpe.uima.twitter-cpe-1.0.jar b/target/org.wso2.cpe.uima.twitter-cpe-1.0.jar
new file mode 100644
index 0000000..0d7ce27
Binary files /dev/null and b/target/org.wso2.cpe.uima.twitter-cpe-1.0.jar differ