[overlord-commits] Overlord SVN: r680 - in sam/trunk: modules/core/src/main/java/org/jboss/sam and 7 other directories.
overlord-commits at lists.jboss.org
overlord-commits at lists.jboss.org
Mon Jul 27 09:07:56 EDT 2009
Author: heiko.braun at jboss.com
Date: 2009-07-27 09:07:55 -0400 (Mon, 27 Jul 2009)
New Revision: 680
Added:
sam/trunk/modules/core/src/main/java/org/jboss/sam/util/
sam/trunk/modules/core/src/main/java/org/jboss/sam/util/CurrentValueTable.java
sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/CVTOutput.java
sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/SearchInput.java
sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/util/
sam/trunk/modules/examples/twitter/src/main/resources/iran-tweets.drl
Removed:
sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TitterSearch.java
sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TweetLogger.java
sam/trunk/modules/examples/twitter/src/main/resources/log-tweets.drl
Modified:
sam/trunk/SAMM.ipr
sam/trunk/SAMM.iws
sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/Main.java
sam/trunk/modules/examples/twitter/src/main/resources/sam-cfg.xml
sam/trunk/modules/examples/twitter/twitter.iml
sam/trunk/modules/sim/sim.iml
sam/trunk/modules/sim/src/test/resources/simulation/test.drl
sam/trunk/pom.xml
sam/trunk/toplevel.iml
Log:
More work on the twitter example. Update to drools 5.1.0.SNAPSHOT
Modified: sam/trunk/SAMM.ipr
===================================================================
--- sam/trunk/SAMM.ipr 2009-07-24 08:38:45 UTC (rev 679)
+++ sam/trunk/SAMM.ipr 2009-07-27 13:07:55 UTC (rev 680)
@@ -164,7 +164,7 @@
<entry>
<value>
<collection type="java.util.TreeSet">
- <entry type="java.lang.String" value="core" />
+ <entry type="java.lang.String" value="toplevel" />
</collection>
</value>
<key type="java.lang.String" value="sim" />
@@ -172,17 +172,9 @@
<entry>
<value>
<collection type="java.util.TreeSet">
- <entry type="java.lang.String" value="core" />
+ <entry type="java.lang.String" value="toplevel" />
</collection>
</value>
- <key type="java.lang.String" value="toplevel" />
- </entry>
- <entry>
- <value>
- <collection type="java.util.TreeSet">
- <entry type="java.lang.String" value="core" />
- </collection>
- </value>
<key type="java.lang.String" value="twitter" />
</entry>
</map>
Modified: sam/trunk/SAMM.iws
===================================================================
--- sam/trunk/SAMM.iws 2009-07-24 08:38:45 UTC (rev 679)
+++ sam/trunk/SAMM.iws 2009-07-27 13:07:55 UTC (rev 680)
@@ -20,13 +20,23 @@
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/SAMM.iws" afterPath="$PROJECT_DIR$/SAMM.iws" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/examples/twitter/twitter.iml" afterPath="$PROJECT_DIR$/modules/examples/twitter/twitter.iml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/SAMM.ipr" afterPath="$PROJECT_DIR$/SAMM.ipr" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/resources/simulation/test.drl" afterPath="$PROJECT_DIR$/modules/sim/src/test/resources/simulation/test.drl" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TitterSearch.java" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/util/CurrentValueTable.java" afterPath="$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/util/CurrentValueTable.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/CVTOutput.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/util/CurrentValueTable.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/sim.iml" afterPath="$PROJECT_DIR$/modules/sim/sim.iml" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/examples/twitter/src/main/resources/iran-tweets.drl" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/examples/twitter/src/main/resources/log-tweets.drl" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/examples/twitter/src/main/resources/sam-cfg.xml" afterPath="$PROJECT_DIR$/modules/examples/twitter/src/main/resources/sam-cfg.xml" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/util" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/util" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/Main.java" afterPath="$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/Main.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TitterSearch.java" afterPath="$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TitterSearch.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/examples/twitter/pom.xml" afterPath="$PROJECT_DIR$/modules/examples/twitter/pom.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TweetLogger.java" afterPath="$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TweetLogger.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/SearchInput.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/pom.xml" afterPath="$PROJECT_DIR$/pom.xml" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TweetLogger.java" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/CurrentValueTable.java" afterPath="$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/CurrentValueTable.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/toplevel.iml" afterPath="$PROJECT_DIR$/toplevel.iml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/examples/twitter/src/main/resources/log-tweets.drl" afterPath="$PROJECT_DIR$/modules/examples/twitter/src/main/resources/log-tweets.drl" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/BarChart.java" />
</list>
</component>
<component name="ChangeListSynchronizer" />
@@ -98,7 +108,7 @@
</component>
<component name="DebuggerManager">
<line_breakpoints>
- <breakpoint url="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java" line="78" class="org.jboss.sam.internal.drools.StreamOutputAdapter" package="org.jboss.sam.internal.drools">
+ <breakpoint url="file://$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/CVTOutput.java" line="64" class="org.jboss.sam.examples.twitter.CVTOutput" package="org.jboss.sam.examples.twitter">
<option name="ENABLED" value="true" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
<option name="LOG_ENABLED" value="false" />
@@ -111,45 +121,6 @@
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
- <breakpoint url="file://$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TweetLogger.java" line="61" class="org.jboss.sam.examples.twitter.TweetLogger" package="org.jboss.sam.examples.twitter">
- <option name="ENABLED" value="true" />
- <option name="SUSPEND_POLICY" value="SuspendAll" />
- <option name="LOG_ENABLED" value="false" />
- <option name="LOG_EXPRESSION_ENABLED" value="false" />
- <option name="COUNT_FILTER_ENABLED" value="false" />
- <option name="COUNT_FILTER" value="0" />
- <option name="CONDITION_ENABLED" value="false" />
- <option name="CLASS_FILTERS_ENABLED" value="false" />
- <option name="INSTANCE_FILTERS_ENABLED" value="false" />
- <option name="CONDITION" value="" />
- <option name="LOG_MESSAGE" value="" />
- </breakpoint>
- <breakpoint url="file://$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TweetLogger.java" line="76" class="org.jboss.sam.examples.twitter.TweetLogger" package="org.jboss.sam.examples.twitter">
- <option name="ENABLED" value="true" />
- <option name="SUSPEND_POLICY" value="SuspendAll" />
- <option name="LOG_ENABLED" value="false" />
- <option name="LOG_EXPRESSION_ENABLED" value="false" />
- <option name="COUNT_FILTER_ENABLED" value="false" />
- <option name="COUNT_FILTER" value="0" />
- <option name="CONDITION_ENABLED" value="false" />
- <option name="CLASS_FILTERS_ENABLED" value="false" />
- <option name="INSTANCE_FILTERS_ENABLED" value="false" />
- <option name="CONDITION" value="" />
- <option name="LOG_MESSAGE" value="" />
- </breakpoint>
- <breakpoint url="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java" line="51" class="org.jboss.sam.internal.drools.StreamOutputAdapter" package="org.jboss.sam.internal.drools">
- <option name="ENABLED" value="true" />
- <option name="SUSPEND_POLICY" value="SuspendAll" />
- <option name="LOG_ENABLED" value="false" />
- <option name="LOG_EXPRESSION_ENABLED" value="false" />
- <option name="COUNT_FILTER_ENABLED" value="false" />
- <option name="COUNT_FILTER" value="0" />
- <option name="CONDITION_ENABLED" value="false" />
- <option name="CLASS_FILTERS_ENABLED" value="false" />
- <option name="INSTANCE_FILTERS_ENABLED" value="false" />
- <option name="CONDITION" value="" />
- <option name="LOG_MESSAGE" value="" />
- </breakpoint>
</line_breakpoints>
<breakpoint_any>
<breakpoint>
@@ -222,19 +193,10 @@
</component>
<component name="FileEditorManager">
<leaf>
- <file leaf-file-name="StreamOutputAdapter.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java">
+ <file leaf-file-name="Main.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/Main.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="78" column="0" selection-start="2357" selection-end="2357" vertical-scroll-proportion="0.7448166">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="TweetLogger.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TweetLogger.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="76" column="0" selection-start="2150" selection-end="2150" vertical-scroll-proportion="0.48963317">
+ <state line="42" column="62" selection-start="1547" selection-end="1547" vertical-scroll-proportion="0.4416562">
<folding>
<element signature="imports" expanded="true" />
</folding>
@@ -242,28 +204,15 @@
</provider>
</entry>
</file>
- <file leaf-file-name="BarChart.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/BarChart.java">
+ <file leaf-file-name="CurrentValueTable.java" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/util/CurrentValueTable.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="116" column="23" selection-start="4101" selection-end="4101" vertical-scroll-proportion="1.7400318">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="31" column="13" selection-start="1214" selection-end="1214" vertical-scroll-proportion="0.15763547">
+ <folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="TitterSearch.java" pinned="false" current="true" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TitterSearch.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="39" column="27" selection-start="1477" selection-end="1477" vertical-scroll-proportion="0.307815">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- </file>
</leaf>
</component>
<component name="FindManager">
@@ -502,7 +451,45 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ </PATH>
+ <PATH>
<PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="twitter" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/examples/twitter" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/examples/twitter/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/examples/twitter/src/main" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/examples/twitter/src/main/java" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/examples/twitter/src/main/java/org" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
@@ -516,6 +503,10 @@
<option name="myItemId" value="SAMM.ipr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="toplevel" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -523,6 +514,26 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
+ <option name="myItemId" value="toplevel" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
<option name="myItemId" value="core" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
@@ -558,7 +569,85 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test/resources" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test/resources/drools" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test/resources" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
</subPane>
</component>
<component name="ProjectReloadState">
@@ -572,7 +661,7 @@
<showLibraryContents />
<hideEmptyPackages ProjectPane="false" />
<abbreviatePackageNames />
- <showStructure ProjectPane="false" PackagesPane="false" Scope="false" Favorites="false" />
+ <showStructure Scope="false" ProjectPane="false" PackagesPane="false" Favorites="false" />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
@@ -593,6 +682,8 @@
</component>
<component name="RecentsManager">
<key name="MoveClassesOrPackagesDialog.RECENTS_KEY">
+ <recent name="org.jboss.sam.util" />
+ <recent name="org.jboss.sam.examples.twitter" />
<recent name="twitter4j.http" />
<recent name="twitter" />
<recent name="org.jboss.sam.config.internal" />
@@ -609,16 +700,10 @@
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<module name="twitter" />
- <RunnerSettings RunnerId="Debug">
- <option name="DEBUG_PORT" value="57898" />
- <option name="TRANSPORT" value="0" />
- <option name="LOCAL" value="true" />
- </RunnerSettings>
<RunnerSettings RunnerId="Run" />
- <ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method>
- <option name="Make" value="true" />
+ <option name="Make" value="false" />
</method>
</tempConfiguration>
<configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
@@ -631,15 +716,20 @@
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<module name="" />
<method>
- <option name="Make" value="true" />
+ <option name="Make" value="false" />
</method>
</configuration>
- <configuration default="true" type="Remote" factoryName="Remote">
- <option name="USE_SOCKET_TRANSPORT" value="true" />
- <option name="SERVER_MODE" value="false" />
- <option name="SHMEM_ADDRESS" value="javadebug" />
- <option name="HOST" value="localhost" />
- <option name="PORT" value="5005" />
+ <configuration default="true" type="Applet" factoryName="Applet">
+ <module name="" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="HTML_FILE_NAME" />
+ <option name="HTML_USED" value="false" />
+ <option name="WIDTH" value="400" />
+ <option name="HEIGHT" value="300" />
+ <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+ <option name="VM_PARAMETERS" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" />
</configuration>
<configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
<module name="" />
@@ -660,17 +750,12 @@
<option name="Make" value="true" />
</method>
</configuration>
- <configuration default="true" type="Applet" factoryName="Applet">
- <module name="" />
- <option name="MAIN_CLASS_NAME" />
- <option name="HTML_FILE_NAME" />
- <option name="HTML_USED" value="false" />
- <option name="WIDTH" value="400" />
- <option name="HEIGHT" value="300" />
- <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
- <option name="VM_PARAMETERS" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
- <option name="ALTERNATIVE_JRE_PATH" />
+ <configuration default="true" type="Remote" factoryName="Remote">
+ <option name="USE_SOCKET_TRANSPORT" value="true" />
+ <option name="SERVER_MODE" value="false" />
+ <option name="SHMEM_ADDRESS" value="javadebug" />
+ <option name="HOST" value="localhost" />
+ <option name="PORT" value="5005" />
</configuration>
<configuration default="false" name="client" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
@@ -688,6 +773,21 @@
<option name="Make" value="true" />
</method>
</configuration>
+ <configuration default="false" name="run" type="Application" factoryName="Application" enabled="false" merge="false">
+ <option name="MAIN_CLASS_NAME" value="org.jboss.sam.examples.twitter.run" />
+ <option name="VM_PARAMETERS" value="" />
+ <option name="PROGRAM_PARAMETERS" value="" />
+ <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" value="" />
+ <option name="ENABLE_SWING_INSPECTOR" value="false" />
+ <module name="twitter" />
+ <RunnerSettings RunnerId="Run" />
+ <ConfigurationWrapper RunnerId="Run" />
+ <method>
+ <option name="Make" value="false" />
+ </method>
+ </configuration>
<configuration name="<template>" type="WebApp" default="true" selected="false">
<Host>localhost</Host>
<Port>5050</Port>
@@ -768,28 +868,28 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
- <frame x="0" y="22" width="1280" height="774" extended-state="6" />
- <editor active="true" />
+ <frame x="393" y="43" width="1258" height="959" extended-state="0" />
+ <editor active="false" />
<layout>
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32922825" order="3" />
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="14" />
<window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.31600326" order="0" />
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32496306" order="1" />
+ <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3209264" order="0" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32482597" order="1" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2454844" order="1" />
- <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32951945" order="9" />
+ <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32946634" order="9" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="6" />
<window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="6" />
<window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="10" />
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.18719211" order="4" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="11" />
- <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.58197933" order="2" />
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.5812065" order="2" />
<window_info id="Maven" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="12" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24862313" order="2" />
<window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="5" />
- <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3958641" order="4" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39559165" order="4" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="0" />
<window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="13" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
@@ -871,7 +971,7 @@
<component name="com.intellij.ide.util.scopeChooser.ScopeChooserConfigurable" proportions="" version="1">
<option name="myLastEditedConfigurable" />
</component>
- <component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.52098763,0.5" version="1">
+ <component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.52098763" version="1">
<option name="myPlainMode" value="false" />
<option name="myLastEditedConfigurable" value="twitter" />
</component>
@@ -879,114 +979,110 @@
<option name="myLastEditedConfigurable" />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/modules/examples/twitter/src/main/resources/sam-cfg.xml">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/drools/standalone.drl">
<provider selected="true" editor-type-id="text-editor">
- <state line="7" column="58" selection-start="318" selection-end="318" vertical-scroll-proportion="0.3181818">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/examples/twitter/src/main/resources/log-tweets.drl">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/test/resources/samples/aggregation/aggregation-sample.drl">
<provider selected="true" editor-type-id="text-editor">
- <state line="19" column="49" selection-start="398" selection-end="398" vertical-scroll-proportion="0.8636364">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/database/sql-join.drl">
<provider selected="true" editor-type-id="text-editor">
- <state line="75" column="0" selection-start="2751" selection-end="2751" vertical-scroll-proportion="0.3323442">
+ <state line="11" column="23" selection-start="295" selection-end="308" vertical-scroll-proportion="0.2208281">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/database/sql-join.drl">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="10" column="30" selection-start="275" selection-end="275" vertical-scroll-proportion="0.47477746">
+ <state line="48" column="13" selection-start="1949" selection-end="1949" vertical-scroll-proportion="0.16060226">
<folding />
</state>
</provider>
</entry>
- <entry file="jar:///System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/src.jar!/src/java/lang/Integer.java">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/test/resources/simulation/test.drl">
<provider selected="true" editor-type-id="text-editor">
- <state line="34" column="0" selection-start="1105" selection-end="1105" vertical-scroll-proportion="0.3323442">
+ <state line="17" column="0" selection-start="385" selection-end="385" vertical-scroll-proportion="0.33497536">
<folding />
</state>
</provider>
</entry>
- <entry file="jar:///Users/hbraun/.m2/repository/org/mvel/mvel2/2.0.10/mvel2-2.0.10.jar!/org/mvel2/optimizers/impl/refl/ReflectiveAccessorOptimizer.class">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/test/resources/simulation/sam-cfg.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="35" column="0" selection-start="2152" selection-end="2152" vertical-scroll-proportion="0.3323442">
+ <state line="6" column="58" selection-start="315" selection-end="320" vertical-scroll-proportion="0.1182266">
<folding />
</state>
</provider>
</entry>
- <entry file="jar:///Users/hbraun/.m2/repository/org/drools/drools-core/5.0.1/drools-core-5.0.1.jar!/org/drools/base/mvel/MVELConsequence.class">
+ <entry file="jar:///Users/hbraun/.m2/repository/org/drools/drools-core/5.0.1/drools-core-5.0.1.jar!/org/drools/base/accumulators/MVELAccumulatorFunctionExecutor.class">
<provider selected="true" editor-type-id="text-editor">
- <state line="22" column="0" selection-start="1058" selection-end="1058" vertical-scroll-proportion="0.5727003">
+ <state line="46" column="0" selection-start="3176" selection-end="3176" vertical-scroll-proportion="0.6678201">
<folding />
</state>
</provider>
</entry>
- <entry file="jar:///Users/hbraun/.m2/repository/org/drools/drools-core/5.0.1/drools-core-5.0.1.jar!/org/drools/runtime/rule/impl/DefaultConsequenceExceptionHandler.class">
+ <entry file="file://$PROJECT_DIR$/modules/examples/twitter/src/main/resources/iran-tweets.drl">
<provider selected="true" editor-type-id="text-editor">
- <state line="13" column="0" selection-start="631" selection-end="631" vertical-scroll-proportion="0.3137255">
+ <state line="18" column="13" selection-start="319" selection-end="319" vertical-scroll-proportion="0.3546798">
<folding />
</state>
</provider>
</entry>
- <entry file="jar:///Users/hbraun/.m2/repository/org/drools/drools-core/5.0.1/drools-core-5.0.1.jar!/org/drools/common/AbstractWorkingMemory.class">
+ <entry file="file://$PROJECT_DIR$/modules/core/pom.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="144" column="0" selection-start="7826" selection-end="7826" vertical-scroll-proportion="0.18300654">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-0.20075282">
<folding />
</state>
</provider>
</entry>
- <entry file="jar:///System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/src.jar!/src/java/net/URLClassLoader.java">
+ <entry file="file://$PROJECT_DIR$/pom.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="204" column="0" selection-start="7752" selection-end="7752" vertical-scroll-proportion="0.18660288">
+ <state line="14" column="53" selection-start="539" selection-end="539" vertical-scroll-proportion="0.28105396">
<folding />
</state>
</provider>
</entry>
- <entry file="jar:///System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/src.jar!/src/java/lang/ClassLoader.java">
+ <entry file="file://$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/SearchInput.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="979" column="0" selection-start="36286" selection-end="36286" vertical-scroll-proportion="0.3323442">
+ <state line="78" column="26" selection-start="2301" selection-end="2301" vertical-scroll-proportion="0.66871923">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java">
+ <entry file="file://$PROJECT_DIR$/modules/examples/twitter/src/main/resources/sam-cfg.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="78" column="0" selection-start="2357" selection-end="2357" vertical-scroll-proportion="0.7448166">
+ <state line="7" column="57" selection-start="317" selection-end="317" vertical-scroll-proportion="0.13793103">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TweetLogger.java">
+ <entry file="file://$PROJECT_DIR$/modules/examples/twitter/pom.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="76" column="0" selection-start="2150" selection-end="2150" vertical-scroll-proportion="0.48963317">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="27" column="80" selection-start="963" selection-end="963" vertical-scroll-proportion="0.5420326">
+ <folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/BarChart.java">
+ <entry file="file://$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/Main.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="116" column="23" selection-start="4101" selection-end="4101" vertical-scroll-proportion="1.7400318">
+ <state line="42" column="62" selection-start="1547" selection-end="1547" vertical-scroll-proportion="0.4416562">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TitterSearch.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/util/CurrentValueTable.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="39" column="27" selection-start="1477" selection-end="1477" vertical-scroll-proportion="0.307815">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="31" column="13" selection-start="1214" selection-end="1214" vertical-scroll-proportion="0.15763547">
+ <folding />
</state>
</provider>
</entry>
Added: sam/trunk/modules/core/src/main/java/org/jboss/sam/util/CurrentValueTable.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/util/CurrentValueTable.java (rev 0)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/util/CurrentValueTable.java 2009-07-27 13:07:55 UTC (rev 680)
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.sam.util;
+
+import org.jboss.sam.EventMessage;
+
+import java.util.*;
+import java.io.PrintStream;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class CurrentValueTable
+{
+ private List<Map> table = new ArrayList<Map>();
+
+ private String[] columns;
+ private String name;
+ public CurrentValueTable(String name, String[] columns)
+ {
+ this.name = name;
+ this.columns = columns;
+ }
+
+ public void clear()
+ {
+ this.table.clear();
+ }
+
+ public int size()
+ {
+ return table.size();
+ }
+
+ public void update(EventMessage[] events)
+ {
+ synchronized(table)
+ {
+ clear();
+
+ for(EventMessage event : events)
+ {
+ Map<String,Object> row = new HashMap<String, Object>();
+ for(String s : columns)
+ {
+ row.put(s, event.getProperty(s));
+ }
+ table.add(row);
+ }
+ }
+ }
+
+ public List<Map> snapshot()
+ {
+ return Collections.unmodifiableList(table);
+ }
+
+ public void dump(PrintStream out)
+ {
+ synchronized(table)
+ {
+ int i=1;
+ Iterator<Map> iterator = table.iterator();
+ StringBuffer sb = new StringBuffer();
+ sb.append("[").append(name).append("]\n");
+ sb.append("-----------\n");
+ while(iterator.hasNext())
+ {
+ Map row = iterator.next();
+
+ sb.append(i).append("\t\t");
+ for(String s : columns)
+ {
+ sb.append(row.get(s)).append("\t\t\t");
+ }
+
+ sb.append("\n");
+ i++;
+ }
+ sb.append("-----------\n");
+
+ System.out.println(sb.toString());
+ }
+ }
+}
Copied: sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/CVTOutput.java (from rev 679, sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TweetLogger.java)
===================================================================
--- sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/CVTOutput.java (rev 0)
+++ sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/CVTOutput.java 2009-07-27 13:07:55 UTC (rev 680)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.sam.examples.twitter;
+
+import org.jboss.sam.EventMessage;
+import org.jboss.sam.StreamOutput;
+import org.jboss.sam.util.CurrentValueTable;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class CVTOutput implements StreamOutput
+{
+ private boolean started;
+ private String name;
+ private CurrentValueTable cvt;
+
+ public CVTOutput(String name)
+ {
+ this.name = name;
+ this.cvt = new CurrentValueTable(
+ name, new String[] {"id", "fromUser", "createdAt"}
+ );
+ }
+
+ public StreamOutput start()
+ {
+ System.out.println("Started search tweet logger");
+ this.started = true;
+ return this;
+ }
+
+ public StreamOutput stop()
+ {
+ this.started = false;
+ return this;
+ }
+
+ public boolean isStarted()
+ {
+ return this.started;
+ }
+
+ public void write(EventMessage[] events)
+ {
+ cvt.update(events);
+ cvt.dump(System.out);
+ }
+
+ public String getStreamName()
+ {
+ return name;
+ }
+
+ public void setStreamName(String name)
+ {
+ //
+ }
+}
Modified: sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/Main.java
===================================================================
--- sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/Main.java 2009-07-24 08:38:45 UTC (rev 679)
+++ sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/Main.java 2009-07-27 13:07:55 UTC (rev 680)
@@ -28,6 +28,7 @@
import org.jboss.sam.EventProcessor;
import java.io.InputStream;
+import java.util.UUID;
/**
* @author Heiko.Braun <heiko.braun at jboss.com>
@@ -50,7 +51,7 @@
Runtime.getRuntime().addShutdownHook(
new Thread(
new Runnable()
- {
+ {
public void run()
{
app.stop();
@@ -67,18 +68,25 @@
*/
private void bootstrap()
{
- TitterSearch twitterSearch = new TitterSearch("Micheal Jackson");
- TweetLogger logger = new TweetLogger();
+ SearchInput twitterSearchInput = new SearchInput("iran");
+ CVTOutput output1 = new CVTOutput("iran results");
+ CVTOutput output2 = new CVTOutput("us results");
// input and output
- eventProcessor.addInput(twitterSearch);
- eventProcessor.addOutput(logger);
+ eventProcessor.addInput(twitterSearchInput);
+ eventProcessor.addOutput(output1);
+ //eventProcessor.addOutput(output2);
// rules
- InputStream in = IO.loadDRL("log-tweets.drl");
- eventProcessor.registerStatement("log any tweet", in);
+ loadDRL("iran-tweets.drl");
}
+ private void loadDRL(String resource)
+ {
+ InputStream in = IO.loadDRL(resource);
+ eventProcessor.registerStatement(UUID.randomUUID().toString(), in);
+ }
+
public void start()
{
eventProcessor.start();
Copied: sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/SearchInput.java (from rev 679, sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TitterSearch.java)
===================================================================
--- sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/SearchInput.java (rev 0)
+++ sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/SearchInput.java 2009-07-27 13:07:55 UTC (rev 680)
@@ -0,0 +1,166 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.sam.examples.twitter;
+
+import org.jboss.sam.StreamInput;
+import org.jboss.sam.StreamInputCallback;
+import twitter4j.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class SearchInput implements StreamInput
+{
+
+ // pull interval in seconds
+ // (remeber there is a 150 hits per hour limit on twitter search)
+ private int interval = 30;
+
+ private boolean started;
+
+ private Thread watchdog;
+
+ private List<StreamInputCallback> callbacks = new ArrayList<StreamInputCallback>();
+
+ private boolean keepRunning = true;
+
+ private final Twitter twitter;
+
+ public static long lastUpdate = -1;
+
+ private String queryString;
+
+ public SearchInput(final String queryString)
+ {
+ this.twitter = new Twitter();
+ this.queryString = queryString;
+
+ watchdog = new Thread(
+ new Runnable(){
+
+ public void run()
+ {
+ try
+ {
+ System.out.println("Started search watchdog");
+
+ while(keepRunning)
+ {
+
+ Query query = new Query(queryString);
+
+
+ // fetch new only
+ if(lastUpdate >0)
+ query.setSinceId(lastUpdate);
+
+ QueryResult result = new Twitter().search(query);
+
+ System.out.println("Search results: " + result.getTweets().size());
+
+ for(StreamInputCallback callback : callbacks)
+ {
+ try
+ {
+ for(Tweet t : result.getTweets())
+ callback.onEvent(t);
+ }
+ catch (Throwable e)
+ {
+ System.out.println("Failed to notify listener: "+e.getMessage());
+ }
+ }
+
+ // set last update
+ List<Tweet> tweets = result.getTweets();
+ if(!tweets.isEmpty())
+ {
+ Tweet last = tweets.get(0);
+ lastUpdate = last.getId();
+ }
+
+ try
+ {
+ Thread.sleep(interval*1000);
+ }
+ catch (InterruptedException e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+ catch (TwitterException e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+ );
+ }
+
+ public boolean isStarted()
+ {
+ return started;
+ }
+
+ public void registerCallback(StreamInputCallback streamInputCallback)
+ {
+ this.callbacks.add(streamInputCallback);
+ }
+
+ public void clearCallbacks()
+ {
+ this.callbacks.clear();
+ }
+
+ public String getStreamName()
+ {
+ return queryString + " tweets";
+ }
+
+ public void setStreamName(String name)
+ {
+ //
+ }
+
+ public void setInterval(int interval)
+ {
+ this.interval = interval;
+ }
+
+ public StreamInput start()
+ {
+ watchdog.start();
+ this.started = true;
+ return this;
+ }
+
+ public StreamInput stop()
+ {
+ keepRunning = false;
+ this.started = false;
+ return this;
+ }
+}
Deleted: sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TitterSearch.java
===================================================================
--- sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TitterSearch.java 2009-07-24 08:38:45 UTC (rev 679)
+++ sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TitterSearch.java 2009-07-27 13:07:55 UTC (rev 680)
@@ -1,163 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.sam.examples.twitter;
-
-import twitter4j.*;
-import org.jboss.sam.StreamInput;
-import org.jboss.sam.StreamInputCallback;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Date;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class TitterSearch implements StreamInput
-{
-
- // pull interval in seconds
- // (remeber there is a 150 hits per hour limit on twitter search)
- private int interval = 40;
-
- private boolean started;
-
- private Thread watchdog;
-
- private List<StreamInputCallback> callbacks = new ArrayList<StreamInputCallback>();
-
- private boolean keepRunning = true;
-
- private final Twitter twitter;
-
- public static long lastUpdate = -1;
-
- public TitterSearch(final String queryString)
- {
- this.twitter = new Twitter();
-
- watchdog = new Thread(
- new Runnable(){
-
- public void run()
- {
- try
- {
- System.out.println("Started search watchdog");
-
- while(keepRunning)
- {
-
- Query query = new Query(queryString);
-
-
- // fetch new only
- if(TitterSearch.lastUpdate>0)
- query.setSinceId(lastUpdate);
-
- QueryResult result = twitter.search(query);
-
- System.out.println("Search results: " + result.getTweets().size());
-
- for(StreamInputCallback callback : callbacks)
- {
- try
- {
- callback.onEvent(result.getTweets());
- }
- catch (Throwable e)
- {
- System.out.println("Failed to notify listener: "+e.getMessage());
- }
- }
-
- // set last update
- List<Tweet> tweets = result.getTweets();
- if(!tweets.isEmpty())
- {
- Tweet last = tweets.get(0);
- TitterSearch.lastUpdate = last.getId();
- }
-
- try
- {
- Thread.sleep(interval*1000);
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- }
- }
- catch (TwitterException e)
- {
- e.printStackTrace();
- }
- }
- }
- );
- }
-
- public boolean isStarted()
- {
- return started;
- }
-
- public void registerCallback(StreamInputCallback streamInputCallback)
- {
- this.callbacks.add(streamInputCallback);
- }
-
- public void clearCallbacks()
- {
- this.callbacks.clear();
- }
-
- public String getStreamName()
- {
- return "twitter-search";
- }
-
- public void setStreamName(String name)
- {
- //
- }
-
- public void setInterval(int interval)
- {
- this.interval = interval;
- }
-
- public StreamInput start()
- {
- watchdog.start();
- this.started = true;
- return this;
- }
-
- public StreamInput stop()
- {
- keepRunning = false;
- this.started = false;
- return this;
- }
-}
Deleted: sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TweetLogger.java
===================================================================
--- sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TweetLogger.java 2009-07-24 08:38:45 UTC (rev 679)
+++ sam/trunk/modules/examples/twitter/src/main/java/org/jboss/sam/examples/twitter/TweetLogger.java 2009-07-27 13:07:55 UTC (rev 680)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.sam.examples.twitter;
-
-import org.jboss.sam.StreamOutput;
-import org.jboss.sam.EventMessage;
-import twitter4j.Tweet;
-
-import java.util.List;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class TweetLogger implements StreamOutput
-{
- private boolean started;
-
- private BarChart barChart;
-
- public StreamOutput start()
- {
- this.barChart = new BarChart("num results");
- this.barChart.setVisible(true);
-
- System.out.println("Started search tweet logger");
- this.started = true;
- return this;
- }
-
- public StreamOutput stop()
- {
- this.started = false;
- return this;
- }
-
- public boolean isStarted()
- {
- return this.started;
- }
-
- public void write(EventMessage[] args)
- {
- for(EventMessage event : args)
- {
- System.out.println("--");
- Tweet tweet = (Tweet)event.getUnderlying();
-
- StringBuffer sb = new StringBuffer();
- sb.append(tweet.getId()).append("\t");
- sb.append(tweet.getFromUser()).append("\t\t");
- sb.append(tweet.getText()).append("\n");
-
- System.out.println(sb.toString());
-
- }
-
- // update chart
- barChart.updateFrom(args);
-
- }
-
- public String getStreamName()
- {
- return "tweet-logger";
- }
-
- public void setStreamName(String name)
- {
- //
- }
-}
Copied: sam/trunk/modules/examples/twitter/src/main/resources/iran-tweets.drl (from rev 679, sam/trunk/modules/examples/twitter/src/main/resources/log-tweets.drl)
===================================================================
--- sam/trunk/modules/examples/twitter/src/main/resources/iran-tweets.drl (rev 0)
+++ sam/trunk/modules/examples/twitter/src/main/resources/iran-tweets.drl 2009-07-27 13:07:55 UTC (rev 680)
@@ -0,0 +1,26 @@
+package org.jboss.sam.examples.twitter;
+
+import twitter4j.*;
+import java.util.*;
+
+global org.jboss.sam.internal.drools.SAMAdapter SAM;
+
+# default dialect for the semantic code will be MVEL
+dialect "mvel"
+
+# flag as event
+declare Tweet
+ @role( event )
+ @expires( 5s )
+end
+
+rule "all iran tweets"
+when
+ $tweets: List() from accumulate(
+ $t : Tweet(id>0) over window:time(15s) from entry-point "iran tweets",
+ accumulateList( $t )
+ )
+then
+ System.out.println("RHS => Size "+$tweets.size() + " @ "+new java.util.Date());
+ //SAM.getListener("iran results").update($tweets);
+end
Deleted: sam/trunk/modules/examples/twitter/src/main/resources/log-tweets.drl
===================================================================
--- sam/trunk/modules/examples/twitter/src/main/resources/log-tweets.drl 2009-07-24 08:38:45 UTC (rev 679)
+++ sam/trunk/modules/examples/twitter/src/main/resources/log-tweets.drl 2009-07-27 13:07:55 UTC (rev 680)
@@ -1,21 +0,0 @@
-package org.jboss.sam.examples.twitter;
-
-import twitter4j.*;
-import java.util.*;
-
-global org.jboss.sam.internal.drools.SAMAdapter SAM;
-
-# default dialect for the semantic code will be MVEL
-dialect "mvel"
-
-# flag as event
-declare Tweet
- @role( event )
-end
-
-rule "log tweets"
-when
- $tweets: ArrayList() from entry-point "twitter-search"
-then
- SAM.getListener("tweet-logger").update($tweets);
-end
Modified: sam/trunk/modules/examples/twitter/src/main/resources/sam-cfg.xml
===================================================================
--- sam/trunk/modules/examples/twitter/src/main/resources/sam-cfg.xml 2009-07-24 08:38:45 UTC (rev 679)
+++ sam/trunk/modules/examples/twitter/src/main/resources/sam-cfg.xml 2009-07-27 13:07:55 UTC (rev 680)
@@ -5,7 +5,7 @@
xmlns:ns2="http://org.jboss.sam/08/2008/">
<runtime-configuration>
- <property name="drools.runtimelog.enable" value="false"/>
+ <property name="drools.runtimelog.enable" value="true"/>
</runtime-configuration>
<statements/>
Modified: sam/trunk/modules/examples/twitter/twitter.iml
===================================================================
--- sam/trunk/modules/examples/twitter/twitter.iml 2009-07-24 08:38:45 UTC (rev 679)
+++ sam/trunk/modules/examples/twitter/twitter.iml 2009-07-27 13:07:55 UTC (rev 680)
@@ -4,7 +4,7 @@
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/target/classes" />
<exclude-output />
- <output-test url="file://$MODULE_DIR$/target/test-classestwitter" />
+ <output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
@@ -12,6 +12,7 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="core" />
+ <orderEntry type="module" module-name="toplevel" />
<orderEntry type="module-library">
<library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
<CLASSES>
Modified: sam/trunk/modules/sim/sim.iml
===================================================================
--- sam/trunk/modules/sim/sim.iml 2009-07-24 08:38:45 UTC (rev 679)
+++ sam/trunk/modules/sim/sim.iml 2009-07-27 13:07:55 UTC (rev 680)
@@ -10,7 +10,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="core" />
+ <orderEntry type="module" module-name="toplevel" />
<orderEntry type="module-library">
<library name="M2 Dep: junit:junit:jar:3.8.2:compile">
<CLASSES>
Modified: sam/trunk/modules/sim/src/test/resources/simulation/test.drl
===================================================================
--- sam/trunk/modules/sim/src/test/resources/simulation/test.drl 2009-07-24 08:38:45 UTC (rev 679)
+++ sam/trunk/modules/sim/src/test/resources/simulation/test.drl 2009-07-27 13:07:55 UTC (rev 680)
@@ -6,7 +6,7 @@
# flag as event
declare SensorEventMessage
- @role( event )
+ @role( event )
end
rule "Pick all sensor event messages"
Modified: sam/trunk/pom.xml
===================================================================
--- sam/trunk/pom.xml 2009-07-24 08:38:45 UTC (rev 679)
+++ sam/trunk/pom.xml 2009-07-27 13:07:55 UTC (rev 680)
@@ -22,7 +22,7 @@
<surefire.jdwp.args>-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005</surefire.jdwp.args>
<dbcp.version>1.2.2</dbcp.version>
- <drools.version>5.0.1</drools.version>
+ <drools.version>5.1.0.SNAPSHOT</drools.version>
<junit.version>3.8.2</junit.version>
<commons-logging.version>1.1</commons-logging.version>
Modified: sam/trunk/toplevel.iml
===================================================================
--- sam/trunk/toplevel.iml 2009-07-24 08:38:45 UTC (rev 679)
+++ sam/trunk/toplevel.iml 2009-07-27 13:07:55 UTC (rev 680)
@@ -15,7 +15,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module" module-name="core" />
<orderEntry type="module-library" exported="">
<library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
<CLASSES>
@@ -182,7 +181,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: net.homeip.yusuke:twitter4j:jar:2.0.8:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../.m2/repository/net/homeip/yusuke/twitter4j/2.0.8/twitter4j-2.0.8.jar!/" />
@@ -193,7 +192,7 @@
</SOURCES>
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: rome:rome:jar:0.9:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../.m2/repository/rome/rome/0.9/rome-0.9.jar!/" />
@@ -202,7 +201,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.slf4j:nlog4j:jar:1.2.25:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../.m2/repository/org/slf4j/nlog4j/1.2.25/nlog4j-1.2.25.jar!/" />
@@ -211,7 +210,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: openchart:openchart:jar:1.4.2:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../.m2/repository/openchart/openchart/1.4.2/openchart-1.4.2.jar!/" />
More information about the overlord-commits
mailing list