[Tynstep-svn] r18 - in trunk/step-web-app: . src/main/java/com/tyndalehouse/step/web/client/presenter src/main/java/com/tyndalehouse/step/web/client/timeline/data src/main/java/com/tyndalehouse/step/web/client/view src/main/java/com/tyndalehouse/step/web/public/timelinewidget src/main/java/com/tyndalehouse/step/web/server/db src/main/java/com/tyndalehouse/step/web/server/db/reference src/main/java/com/tyndalehouse/step/web/server/guice src/main/java/com/tyndalehouse/step/web/server/handler src/main/java/com/tyndalehouse/step/web/shared src/main/java/com/tyndalehouse/step/web/shared/beans src/main/java/com/tyndalehouse/step/web/shared/command src/main/java/com/tyndalehouse/step/web/shared/result war war/StepDB war/StepDB/log war/StepDB/seg0
ChrisBurrell at crosswire.org
ChrisBurrell at crosswire.org
Tue Nov 10 15:46:54 MST 2009
Author: ChrisBurrell
Date: 2009-11-10 15:46:53 -0700 (Tue, 10 Nov 2009)
New Revision: 18
Added:
trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/public/timelinewidget/timeline-helper.js
trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/reference/
trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/reference/ImportanceEnum.java
trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/guice/CustomDispatchServiceServlet.java
trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetEventsForDateRangeHandler.java
trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/beans/
trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/beans/TimelineEventBean.java
trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/command/GetEventsForDateRangeCommand.java
trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/result/GetEventsForDateRangeResult.java
trunk/step-web-app/war/StepDB/log/log9.dat
trunk/step-web-app/war/StepDB/seg0/c30d0.dat
trunk/step-web-app/war/StepDB/seg0/c30e0.dat
trunk/step-web-app/war/StepDB/seg0/c30f1.dat
trunk/step-web-app/war/StepDB/seg0/c3100.dat
trunk/step-web-app/war/StepDB/seg0/c3111.dat
trunk/step-web-app/war/StepDB/seg0/c3120.dat
trunk/step-web-app/war/StepDB/seg0/c3131.dat
trunk/step-web-app/war/StepDB/seg0/c3140.dat
trunk/step-web-app/war/StepDB/seg0/c3151.dat
trunk/step-web-app/war/StepDB/seg0/c3160.dat
trunk/step-web-app/war/StepDB/seg0/c3170.dat
trunk/step-web-app/war/StepDB/seg0/c3181.dat
Removed:
trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/DatasetHandler.java
trunk/step-web-app/war/StepDB/log/log1.dat
trunk/step-web-app/war/StepDB/seg0/d400.dat
Modified:
trunk/step-web-app/.classpath
trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/presenter/TimelinePresenter.java
trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/CommandLoadDataset.java
trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/view/TimelineView.java
trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/DbProvider.java
trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/guice/DispatchServletModule.java
trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/guice/ServerModule.java
trunk/step-web-app/war/Step.html
trunk/step-web-app/war/StepDB/db.lck
trunk/step-web-app/war/StepDB/log/log.ctrl
trunk/step-web-app/war/StepDB/log/logmirror.ctrl
trunk/step-web-app/war/StepDB/seg0/c101.dat
trunk/step-web-app/war/StepDB/seg0/c111.dat
trunk/step-web-app/war/StepDB/seg0/c121.dat
trunk/step-web-app/war/StepDB/seg0/c130.dat
trunk/step-web-app/war/StepDB/seg0/c141.dat
trunk/step-web-app/war/StepDB/seg0/c150.dat
trunk/step-web-app/war/StepDB/seg0/c161.dat
trunk/step-web-app/war/StepDB/seg0/c171.dat
trunk/step-web-app/war/StepDB/seg0/c180.dat
trunk/step-web-app/war/StepDB/seg0/c191.dat
trunk/step-web-app/war/StepDB/seg0/c1a1.dat
trunk/step-web-app/war/StepDB/seg0/c1b1.dat
trunk/step-web-app/war/StepDB/seg0/c20.dat
trunk/step-web-app/war/StepDB/seg0/c230.dat
trunk/step-web-app/war/StepDB/seg0/c31.dat
trunk/step-web-app/war/StepDB/seg0/c41.dat
trunk/step-web-app/war/StepDB/seg0/c51.dat
trunk/step-web-app/war/StepDB/seg0/c60.dat
trunk/step-web-app/war/StepDB/seg0/c71.dat
trunk/step-web-app/war/StepDB/seg0/c81.dat
trunk/step-web-app/war/StepDB/seg0/c90.dat
trunk/step-web-app/war/StepDB/seg0/ca1.dat
trunk/step-web-app/war/StepDB/seg0/cb1.dat
trunk/step-web-app/war/StepDB/seg0/cc0.dat
trunk/step-web-app/war/StepDB/seg0/cd1.dat
trunk/step-web-app/war/StepDB/seg0/ce1.dat
trunk/step-web-app/war/StepDB/seg0/cf0.dat
Log:
tied the database to the timeline widget
Modified: trunk/step-web-app/.classpath
===================================================================
--- trunk/step-web-app/.classpath 2009-11-03 22:43:39 UTC (rev 17)
+++ trunk/step-web-app/.classpath 2009-11-10 22:46:53 UTC (rev 18)
@@ -16,5 +16,7 @@
<classpathentry kind="lib" path="war/WEB-INF/lib/jsword-1.6.jar" sourcepath="D:/STEP/jsword"/>
<classpathentry kind="lib" path="war/WEB-INF/lib/jsword-common-1.6.jar" sourcepath="D:/STEP/common"/>
<classpathentry kind="lib" path="war/WEB-INF/lib/commons-lang-2.4.jar"/>
+ <classpathentry kind="lib" path="war/WEB-INF/lib/derby.jar" sourcepath="D:/STEP/db-derby-10.5.3.0-src/db-derby-10.5.3.0-src/java"/>
+ <classpathentry kind="lib" path="war/WEB-INF/lib/gwtext.jar"/>
<classpathentry kind="output" path="war/WEB-INF/classes"/>
</classpath>
Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/presenter/TimelinePresenter.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/presenter/TimelinePresenter.java 2009-11-03 22:43:39 UTC (rev 17)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/presenter/TimelinePresenter.java 2009-11-10 22:46:53 UTC (rev 18)
@@ -1,20 +1,31 @@
package com.tyndalehouse.step.web.client.presenter;
+import net.customware.gwt.dispatch.client.DispatchAsync;
+import net.customware.gwt.presenter.client.DisplayCallback;
import net.customware.gwt.presenter.client.EventBus;
import net.customware.gwt.presenter.client.place.Place;
import net.customware.gwt.presenter.client.place.PlaceRequest;
import net.customware.gwt.presenter.client.widget.WidgetDisplay;
import net.customware.gwt.presenter.client.widget.WidgetPresenter;
+import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.user.client.DeferredCommand;
import com.google.inject.Inject;
+import com.tyndalehouse.step.web.client.timeline.data.CommandLoadDataset;
import com.tyndalehouse.step.web.client.widgets.timeline.TimeLineWidget;
+import com.tyndalehouse.step.web.client.widgets.timeline.TimelineXMLHandler;
+import com.tyndalehouse.step.web.shared.command.GetEventsForDateRangeCommand;
+import com.tyndalehouse.step.web.shared.result.GetEventsForDateRangeResult;
-public class TimelinePresenter extends WidgetPresenter<TimelinePresenter.Display>{
+public class TimelinePresenter extends WidgetPresenter<TimelinePresenter.Display> implements TimelineXMLHandler {
+ private final DispatchAsync dispatcher;
@Inject
- public TimelinePresenter(Display display, EventBus eventBus) {
+ public TimelinePresenter(Display display, EventBus eventBus, DispatchAsync dispatcher) {
super(display, eventBus);
+ this.dispatcher = dispatcher;
+
bind();
}
@@ -31,9 +42,18 @@
@Override
protected void onBind() {
+ //initialise widget:
+// popupBusy.show();
+
+ // ---------------------------------------------------------------
+ // Got to get ref to widget
+ // ---------------------------------------------------------------
+ //Needs to be deferred and apparently the timeline widget isn't initialised yet...
+ //TODO: investigate post bind event?
+ CommandLoadDataset command = new CommandLoadDataset(this, getDisplay().getTimelineWidget(), "step/doc.xml");
+ DeferredCommand.addCommand(command);
-// display.getTimelineWidget().load("stonehenge.xml", this);
-
+
// eventBus.addHandler(NewArticleSelectedEvent.TYPE, new NewArticleSelectedEventHandler() {
// @Override
@@ -84,9 +104,64 @@
}
-// @Override
-// public void onCompletion(JavaScriptObject xml, String url) {
-// display.getTimelineWidget().getEventSource().load(xml, url);
-// }
+ @Override
+ public void onCompletion(JavaScriptObject xml, String url) {
+ //TODO: this needs to change...
+ String xmlText = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <data> <event start=\"4000 BC\" end=\"3200 BC\" isDuration=\"true\" title=\"Winterbourne Stoke Long Barrow\" icon=\"../image/green-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://www.english-heritage.org.uk/stonehengeinteractivemap/sites/winterbourne_stoke/02.html\" title=\"English Heritage\"> English Heritage <img id=\"link\" src=\"site/image/yellow-circle.png\" border=\"0\"></img></a> </event> <event start=\"3000 BC\" end=\"2500 BC\" isDuration=\"true\" title=\"Winterbourne Stoke Round Barrows\" icon=\"../image/green-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://www.english-heritage.org.uk/stonehengeinteractivemap/sites/winterbourne_stoke/02.html\" title=\"English Heritage\"> English Heritage <img id=\"link\" src=\"site/image/yellow-circle.png\" border=\"0\"></img></a> </event> <event start=\"3000 BC\" end=\"2500 BC\" isDuration=\"true\" title=\"King Barrows\" icon=\"../image/green-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://www.english-heritage.org.uk/stonehengeinteractivemap/sites/king_barrow_ridge/01.html\" title=\"English Heritage\"> English Heritage <img id=\"link\" src=\"site/image/yellow-circle.png\" border=\"0\"></img></a> </event> <event start=\"2500 BC\" end=\"1600 BC\" isDuration=\"true\" title=\"Normanton Down Barrows\" icon=\"../image/green-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://www.english-heritage.org.uk/stonehengeinteractivemap/sites/normanton/01.html\" title=\"English Heritage\"> English Heritage <img id=\"link\" src=\"site/image/yellow-circle.png\" border=\"0\"></img></a> </event> <event start=\"3100 BC\" title=\"The Cursus\" icon=\"../image/green-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://www.english-heritage.org.uk/stonehengeinteractivemap/sites/cursus/01.html\" title=\"English Heritage\"> English Heritage <img id=\"link\" src=\"site/image/yellow-circle.png\" border=\"0\"></img></a> <a href=\"http://en.wikipedia.org/wiki/Cursus\" title=\"Wikipedia article\"> <img id=\"link\" src=\"site/image/Wiki_letter_w.png\" border=\"0\"></img></a> Cursus was a name given by early British archaeologists such as William Stukeley to the large parallel lengths of banks with external ditches which they thought were early Roman athletics tracks, hence the Latin name 'Cursus', meaning 'Circus'. Cursus monuments are now understood to be Neolithic structures and may have been of ceremonial function. </event> <event start=\"3100 BC\" end=\"2400 BC\" isDuration=\"true\" title=\"Durrington Walls\" icon=\"../image/green-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://www.english-heritage.org.uk/stonehengeinteractivemap/sites/durrington_walls/01.html\" title=\"English Heritage\"> English Heritage <img id=\"link\" src=\"site/image/yellow-circle.png\" border=\"0\"></img></a> </event> <event start=\"2600 BC\" end=\"1700 BC\" isDuration=\"true\" title=\"The Avenue\" icon=\"../image/green-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://www.english-heritage.org.uk/stonehengeinteractivemap/sites/avenue/01.html\" title=\"English Heritage\"> English Heritage <img id=\"link\" src=\"site/image/yellow-circle.png\" border=\"0\"></img></a> </event> <event start=\"2300 BC\" end=\"2000 BC\" isDuration=\"true\" title=\"Woodhenge\" icon=\"../image/green-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://en.wikipedia.org/wiki/Woodhenge\" title=\"Wikipedia article\"> <img id=\"link\" src=\"site/image/Wiki_letter_w.png\" border=\"0\"></img></a> Woodhenge is a Neolithic Class I henge and timber circle monument located to the North of Amesbury in Wiltshire, England, and it is closer to Amesbury than is Stonehenge. </event> <event start=\"1100 BC\" end=\"500 BC\" isDuration=\"true\" title=\"Vespasian's Camp\" icon=\"../image/green-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://www.english-heritage.org.uk/stonehengeinteractivemap/sites/vespasians_camp/01.html\" title=\"English Heritage\"> English Heritage <img id=\"link\" src=\"site/image/yellow-circle.png\" border=\"0\"></img></a> </event> <event start=\"2900 BC\" end=\"2700 BC\" title=\"Phase 1 - Earthwork Enclosure\" icon=\"../image/blue-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> </event> <event start=\"2900 BC\" end=\"2400 BC\" title=\"Phase 2 - Wooden Structures\" icon=\"../image/blue-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> </event> <event start=\"2600 BC\" end=\"1600 BC\" title=\"Phase 3 - Stone Circle \" icon=\"../image/blue-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> </event> <event start=\"3100 BC\" title=\"Stonehenge 1\" icon=\"../image/red-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://en.wikipedia.org/wiki/Stonehenge#Stonehenge_1\" title=\"Wikipedia article\"> <img id=\"link\" src=\"site/image/Wiki_letter_w.png\" border=\"0\"></img></a> The first monument consisted of a circular bank and ditch enclosure. </event> <event start=\"3000 BC\" title=\"Stonehenge 2\" icon=\"../image/red-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://en.wikipedia.org/wiki/Stonehenge#Stonehenge_2\" title=\"Wikipedia article\"> <img id=\"link\" src=\"site/image/Wiki_letter_w.png\" border=\"0\"></img></a> Evidence of the second phase is no longer visible. It appears from the number of postholes dating to this period that some form of timber structure was built within the enclosure during the early 3rd millennium BC. </event> <event start=\"2600 BC\" title=\"Stonehenge 3 I\" icon=\"../image/red-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://en.wikipedia.org/wiki/Stonehenge#Stonehenge_3_I\" title=\"Wikipedia article\"> <img id=\"link\" src=\"site/image/Wiki_letter_w.png\" border=\"0\"></img></a> Archaeological excavation has indicated that around 2600 BC, timber was abandoned in favour of stone and two concentric crescents of holes (called the Q and R Holes) were dug in the centre of the site. </event> <event start=\"2440 BC\" end=\"2100 BC\" title=\"Stonehenge 3 II\" icon=\"../image/red-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://en.wikipedia.org/wiki/Stonehenge#Stonehenge_3_II\" title=\"Wikipedia article\"> <img id=\"link\" src=\"site/image/Wiki_letter_w.png\" border=\"0\"></img></a> The next major phase of activity at the tail end of the 3rd millennium BC saw 30 enormous sarsen stones brought from a quarry around 24 miles (40 km) north to the site on the Marlborough Downs. </event> <event start=\"2100 BC\" title=\"Stonehenge 3 III\" icon=\"../image/red-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://en.wikipedia.org/wiki/Stonehenge#Stonehenge_3_III\" title=\"Wikipedia article\"> <img id=\"link\" src=\"site/image/Wiki_letter_w.png\" border=\"0\"></img></a> Later in the Bronze Age, the bluestones appear to have been re-erected for the first time, although the precise details of this period are still unclear. </event> <event start=\"2280 BC\" end=\"1930 BC\" title=\"Stonehenge 3 IV\" icon=\"../image/red-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://en.wikipedia.org/wiki/Stonehenge#Stonehenge_3_IV\" title=\"Wikipedia article\"> <img id=\"link\" src=\"site/image/Wiki_letter_w.png\" border=\"0\"></img></a> This phase saw further rearrangement of the bluestones as they were placed in a circle between the two settings of sarsens and in an oval in the very centre. Some archaeologists argue that some of the bluestones in this period were part of a second group brought from Wales. </event> <event start=\"2270 BC\" end=\"1930 BC\" title=\"Stonehenge 3 V\" icon=\"../image/red-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://en.wikipedia.org/wiki/Stonehenge#Stonehenge_3_V\" title=\"Wikipedia article\"> <img id=\"link\" src=\"site/image/Wiki_letter_w.png\" border=\"0\"></img></a> Soon afterwards, the north eastern section of the Phase 3 IV Bluestone circle was removed, creating a horseshoe-shaped setting termed the Bluestone Horseshoe. </event> <event start=\"1930 BC\" end=\"1600 BC\" title=\"Stonehenge 3 VI\" icon=\"../image/red-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> <a href=\"http://en.wikipedia.org/wiki/Stonehenge#Stonehenge_3_VI\" title=\"Wikipedia article\"> <img id=\"link\" src=\"site/image/Wiki_letter_w.png\" border=\"0\"></img></a> Two further rings of pits were dug outside the outermost sarsen circle. </event> </data>";
+
+ // Load eventsource with returned xml
+ getDisplay().getTimelineWidget().getEventSource().loadXMLText(xmlText);
+
+ // We need to send a resize message to 'fix' the display window size.
+ //TODO: fix the display window size?
+
+ //TimeLineTest.getMainPanel().onWindowResized(Window.getClientWidth(), Window.getClientHeight());
+
+ }
+ @Override
+ public void onScroll(String minDate, String maxDate) {
+ Log.info("WOW! I was called! Amazing!" + minDate + " " + maxDate);
+
+
+ //TODO: ensure they are longs
+ long min = Long.parseLong(minDate);
+ long max = Long.parseLong(maxDate);
+
+ //TODO: ensure that it doesn't get called for every millisecond change!
+ //add some state to the timeline...
+
+ dispatcher.execute(new GetEventsForDateRangeCommand(min, max), new DisplayCallback<GetEventsForDateRangeResult>(display) {
+
+ @Override
+ protected void handleFailure(Throwable e) {
+ // TODO Auto-generated method stub
+ Log.error("An error occurred while tyring to get events for the timeline", e);
+ }
+
+ @Override
+ protected void handleSuccess(GetEventsForDateRangeResult resultingEvents) {
+
+ Log.info("XML is: " + resultingEvents.getXml());
+
+ getDisplay().getTimelineWidget().getEventSource().loadXMLText(resultingEvents.getXml());
+
+ }
+ });
+
+
+ //TODO: we probably want to fire an event here just in case...
+
+
+ //pass these down to the server layer...
+
+
+ //so the process will be
+ //1. determine whether the timeline has changed significantly
+
+ //2. get the new data from the database if required
+
+ //3. ensure that the data gets pushed back to the page, perhaps without duplicates!
+
+ }
}
Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/CommandLoadDataset.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/CommandLoadDataset.java 2009-11-03 22:43:39 UTC (rev 17)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/CommandLoadDataset.java 2009-11-10 22:46:53 UTC (rev 18)
@@ -4,7 +4,7 @@
import com.tyndalehouse.step.web.client.widgets.timeline.TimeLineWidget;
import com.tyndalehouse.step.web.client.widgets.timeline.TimelineXMLHandler;
-
+//TODO: probably can get rid of this class I think...
public class CommandLoadDataset implements Command
{
private TimelineXMLHandler handler = null;
@@ -20,7 +20,7 @@
public void execute()
{
- timeline.load(dataSet, handler);
+ //timeline.load(dataSet, handler);
timeline.getTimeLine().addOnScrollEvent(0, handler);
}
Deleted: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/DatasetHandler.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/DatasetHandler.java 2009-11-03 22:43:39 UTC (rev 17)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/timeline/data/DatasetHandler.java 2009-11-10 22:46:53 UTC (rev 18)
@@ -1,170 +0,0 @@
-package com.tyndalehouse.step.web.client.timeline.data;
-
-import java.util.Date;
-
-import com.allen_sauer.gwt.log.client.Log;
-import com.google.gwt.core.client.JavaScriptObject;
-import com.google.gwt.user.client.DeferredCommand;
-import com.tyndalehouse.step.web.client.widgets.timeline.TimeLineWidget;
-import com.tyndalehouse.step.web.client.widgets.timeline.TimelineXMLHandler;
-
-
-/**
- * This class handles requesting and processing the data.
- *
- * @author ajr
- *
- */
-public class DatasetHandler implements TimelineXMLHandler
-{
- // Instance
- private static DatasetHandler instance = null;
-
- private TimeLineWidget widget;
-
- // 'Busy' popup display
-// private BusyPopup popupBusy = null;
-
-
- /**
- * DatasetHandler
- *
- */
- public DatasetHandler()
- {
- // Popup
- // popupBusy = new BusyPopup();
- }
-
- /**
- * Singleton instance function
- *
- * @return instance of Handler
- */
- public static DatasetHandler getInstance()
- {
- if (instance == null)
- {
- instance = new DatasetHandler();
- }
-
- return instance;
- }
-
- /**
- * initialise
- *
- * <p>This function is called from the main app EntryPoint as it relies on
- * graphical elements being instantiated prior to it's execution.</p>
- * @param context
- */
- public void initialise(TimeLineWidget widget, String dataSet)
- {
-
- this.widget = widget;
-
- // ---------------------------------------------------------------
- // Do async fetch
- // ---------------------------------------------------------------
- loadDataset(dataSet);
- }
-
- /**
- * onCompletion
- *
- * @param responseText
- * @param url
- */
- public void onCompletion(JavaScriptObject xml, String url)
- {
- // ---------------------------------------------------------------
- // Hide busy popup
- // ---------------------------------------------------------------
-// popupBusy.hide();
-
- // ---------------------------------------------------------------
- // Process xml
- // ---------------------------------------------------------------
- processSimileData(xml, url);
- }
-
- public void onScroll(String minDate, String maxDate) {
- Log.info("WOW! I was called! Amazing!" + minDate + " " + maxDate);
-
- //so the process will be
- //1. determine whether the timeline has changed significantly
-
- //2. get the new data from the database if required
-
- //3. ensure that the data gets pushed back to the page, perhaps without duplicates!
-
-
- }
-
-
- /**
- * Load xml data into eventsource for timeline
- *
- * @param urlText
- */
- private void processTextData(String text)
- {
- // Load eventsource with returned xml
- widget.getEventSource().loadXMLText(text);
-
- // We need to send a resize message to 'fix' the display window size.
-// TimeLine.getMainPanel().onWindowResized(Window.getClientWidth(), Window.getClientHeight());
- }
-
- /**
- * Load xml data into eventsource for timeline
- *
- * @param urlText
- */
- private void processSimileData(JavaScriptObject xml, String url)
- {
- // Load eventsource with returned xml
- widget.getEventSource().load(xml, url);
-
- // We need to send a resize message to 'fix' the display window size.
- //TODO: fix the display window size?
-
- //TimeLineTest.getMainPanel().onWindowResized(Window.getClientWidth(), Window.getClientHeight());
- }
-
-
- /**
- * Load dataset function
- *
- * @param url
- */
- public void loadDataset(String url)
- {
- // ---------------------------------------------------------------
- // This is an example of how to load text directly into timeline
- // event source
- // ---------------------------------------------------------------
-// String text = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <data> <event start=\"4000 BC\" end=\"3200 BC\" isDuration=\"true\" title=\"Winterbourne Stoke Long Barrow\" icon=\"../image/green-circle.png\" image=\"../image/Timeline_Logo_Thumb.png\"> </event> </data>";
-// processTextData(text);
-
- // ---------------------------------------------------------------
- // NOTE: You could check dataset cache at this point if you were
- // having to switch between lots of differents sets. The data
- // could be fetched from the cache instead of fetched through the
- // ajax mechanism.
- // ---------------------------------------------------------------
-
- // ---------------------------------------------------------------
- // Open busy popup
- // ---------------------------------------------------------------
-// popupBusy.show();
-
- // ---------------------------------------------------------------
- // Got to get ref to widget
- // ---------------------------------------------------------------
- TimeLineWidget tline = widget;
-
- CommandLoadDataset command = new CommandLoadDataset(this, tline, url);
- DeferredCommand.addCommand(command);
- }
-}
Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/view/TimelineView.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/view/TimelineView.java 2009-11-03 22:43:39 UTC (rev 17)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/client/view/TimelineView.java 2009-11-10 22:46:53 UTC (rev 18)
@@ -1,13 +1,10 @@
package com.tyndalehouse.step.web.client.view;
-import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.Widget;
import com.tyndalehouse.step.web.client.presenter.TimelinePresenter;
-import com.tyndalehouse.step.web.client.timeline.data.DatasetHandler;
import com.tyndalehouse.step.web.client.timeline.data.StonehengeRender;
import com.tyndalehouse.step.web.client.widgets.timeline.ITimeLineRender;
import com.tyndalehouse.step.web.client.widgets.timeline.TimeLineWidget;
@@ -48,7 +45,9 @@
simileWidget = new TimeLineWidget("100", "100", render);
panel.add(simileWidget);
panel.setAlwaysShowScrollBars(false);
- DatasetHandler.getInstance().initialise(simileWidget, "step/stonehenge.xml");
+
+ //no need to initialise here, since it is going to be initialised by the presenter
+ //DatasetHandler.getInstance().initialise(simileWidget, "step/stonehenge.xml");
simileWidget.setStyleName("timeline-default");
//simileWidget.getTimeLine().
Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/public/timelinewidget/timeline-helper.js
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/public/timelinewidget/timeline-helper.js (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/public/timelinewidget/timeline-helper.js 2009-11-10 22:46:53 UTC (rev 18)
@@ -0,0 +1,87 @@
+/*
+* These functions taken from online article here:
+* http://www.webreference.com/programming/javascript/definitive2/index.html
+* They are not included under the Apache license for the rest of the source.
+*/
+
+var TimelineHelper = function()
+{
+}
+
+/**
+ * Create a new Document object. If no arguments are specified,
+ * the document will be empty. If a root tag is specified, the document
+ * will contain that single root tag. If the root tag has a namespace
+ * prefix, the second argument must specify the URL that identifies the
+ * namespace.
+ */
+
+TimelineHelper.newDocument = function(rootTagName, namespaceURL) {
+ if (!rootTagName) rootTagName = "";
+ if (!namespaceURL) namespaceURL = "";
+ if (document.implementation && document.implementation.createDocument) {
+ // This is the W3C standard way to do it
+ return document.implementation.createDocument(namespaceURL, rootTagName, null);
+ }
+ else { // This is the IE way to do it
+ // Create an empty document as an ActiveX object
+ // If there is no root element, this is all we have to do
+ var doc = new ActiveXObject("MSXML2.DOMDocument");
+ // If there is a root tag, initialize the document
+ if (rootTagName) {
+ // Look for a namespace prefix
+ var prefix = "";
+ var tagname = rootTagName;
+ var p = rootTagName.indexOf(':');
+ if (p != -1) {
+ prefix = rootTagName.substring(0, p);
+ tagname = rootTagName.substring(p+1);
+ }
+ // If we have a namespace, we must have a namespace prefix
+ // If we don't have a namespace, we discard any prefix
+ if (namespaceURL) {
+ if (!prefix) prefix = "a0"; // What Firefox uses
+ }
+ else prefix = "";
+ // Create the root element (with optional namespace) as a
+ // string of text
+ var text = "<" + (prefix?(prefix+":"):"") + tagname +
+ (namespaceURL
+ ?(" xmlns:" + prefix + '="' + namespaceURL +'"')
+ :"") +
+ "/>";
+ // And parse that text into the empty document
+ doc.loadXML(text);
+ }
+ return doc;
+ }
+};
+
+
+/**
+ * Parse the XML document contained in the string argument and return
+ * a Document object that represents it.
+ */
+TimelineHelper.parseXML = function(text) {
+ if (typeof DOMParser != "undefined") {
+ // Mozilla, Firefox, and related browsers
+ return (new DOMParser()).parseFromString(text, "application/xml");
+ }
+ else if (typeof ActiveXObject != "undefined") {
+ // Internet Explorer.
+ var doc = TimelineHelper.newDocument(); // Create an empty document
+ doc.loadXML(text); // Parse text into it
+ return doc; // Return it
+ }
+ else {
+ // As a last resort, try loading the document from a data: URL
+ // This is supposed to work in Safari. Thanks to Manos Batsis and
+ // his Sarissa library (sarissa.sourceforge.net) for this technique.
+ var url = "data:text/xml;charset=utf-8," + encodeURIComponent(text);
+ var request = new XMLHttpRequest();
+ request.open("GET", url, false);
+ request.send(null);
+ return request.responseXML;
+ }
+};
+
Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/DbProvider.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/DbProvider.java 2009-11-03 22:43:39 UTC (rev 17)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/DbProvider.java 2009-11-10 22:46:53 UTC (rev 18)
@@ -4,24 +4,41 @@
import java.sql.DriverManager;
import java.sql.SQLException;
+import com.allen_sauer.gwt.log.client.Log;
+
+//TODO: do something about styles, checkstyle, etc.
+//TODO: make a connection pool so that we can reuse
+//db connections and gain performance
public class DbProvider {
//TODO: shove this in a properties file
- private String dbConnectionString = "jdbc:derby:StepDB";
+ private static String dbConnectionString = "jdbc:derby:StepDB";
+ private static String clientConnection = "jdbc:derby://localhost:1527//../StepDB";
public DbProvider() {
- //TODO: move this somewhere else, or make it span across the app's life
+ //TODO: somehow make this property based
+ //if dev then //
+
+ // else
+//
+// //TODO: move this somewhere else, or make it span across the app's life
+// try {
+// Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
+// } catch (ClassNotFoundException e) {
+// e.printStackTrace();
+// }
+ }
+
+ public static Connection getConnection() throws SQLException {
try {
Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
} catch (ClassNotFoundException e) {
+ // TODO Auto-generated catch block
e.printStackTrace();
}
- }
-
- public Connection getConnection() throws SQLException {
return DriverManager.getConnection(dbConnectionString );
}
- public void finaliseConnection(Connection connection) throws SQLException {
+ public static void finaliseConnection(Connection connection) throws SQLException {
if(connection != null && !connection.isClosed()) {
connection.close();
}
Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/reference/ImportanceEnum.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/reference/ImportanceEnum.java (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/db/reference/ImportanceEnum.java 2009-11-10 22:46:53 UTC (rev 18)
@@ -0,0 +1,5 @@
+package com.tyndalehouse.step.web.server.db.reference;
+
+public enum ImportanceEnum {
+
+}
Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/guice/CustomDispatchServiceServlet.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/guice/CustomDispatchServiceServlet.java (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/guice/CustomDispatchServiceServlet.java 2009-11-10 22:46:53 UTC (rev 18)
@@ -0,0 +1,32 @@
+package com.tyndalehouse.step.web.server.guice;
+
+import net.customware.gwt.dispatch.server.Dispatch;
+import net.customware.gwt.dispatch.server.service.DispatchServiceServlet;
+
+import org.apache.commons.logging.Log;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class CustomDispatchServiceServlet extends DispatchServiceServlet {
+
+ private Log logger;
+
+ @Inject
+ public CustomDispatchServiceServlet(Dispatch dispatch, Log logger) {
+ super(dispatch);
+ this.logger = logger;
+ }
+
+ @Override
+ protected void doUnexpectedFailure(Throwable e) {
+ logger.error("An unexpected error happened on the bridge between server and client", e);
+ };
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -6063357416925075136L;
+
+}
Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/guice/DispatchServletModule.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/guice/DispatchServletModule.java 2009-11-03 22:43:39 UTC (rev 17)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/guice/DispatchServletModule.java 2009-11-10 22:46:53 UTC (rev 18)
@@ -1,6 +1,5 @@
package com.tyndalehouse.step.web.server.guice;
-import net.customware.gwt.dispatch.server.service.DispatchServiceServlet;
import com.google.inject.servlet.ServletModule;
public class DispatchServletModule extends ServletModule {
@@ -8,7 +7,7 @@
@Override
public void configureServlets() {
// NOTE: the servlet context will probably need changing
- serve("/step/dispatch").with(DispatchServiceServlet.class);
+ serve("/step/dispatch").with(CustomDispatchServiceServlet.class);
}
}
\ No newline at end of file
Modified: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/guice/ServerModule.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/guice/ServerModule.java 2009-11-03 22:43:39 UTC (rev 17)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/guice/ServerModule.java 2009-11-10 22:46:53 UTC (rev 18)
@@ -9,6 +9,7 @@
import com.tyndalehouse.step.web.server.handler.GetAvailableBibleVersionsHandler;
import com.tyndalehouse.step.web.server.handler.GetBibleBooksHandler;
import com.tyndalehouse.step.web.server.handler.GetCurrentBibleTextHandler;
+import com.tyndalehouse.step.web.server.handler.GetEventsForDateRangeHandler;
import com.tyndalehouse.step.web.server.handler.GetModuleRefDataHandler;
/**
@@ -23,6 +24,8 @@
bindHandler(GetBibleBooksHandler.class);
bindHandler(GetCurrentBibleTextHandler.class);
bindHandler(GetModuleRefDataHandler.class);
+ bindHandler(GetEventsForDateRangeHandler.class);
+
bind(Log.class).toProvider(LogProvider.class).in(Singleton.class);
bind(RefDataDbCommand.class).in(Singleton.class);
Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetEventsForDateRangeHandler.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetEventsForDateRangeHandler.java (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/server/handler/GetEventsForDateRangeHandler.java 2009-11-10 22:46:53 UTC (rev 18)
@@ -0,0 +1,121 @@
+package com.tyndalehouse.step.web.server.handler;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+import net.customware.gwt.dispatch.server.ActionHandler;
+import net.customware.gwt.dispatch.server.ExecutionContext;
+import net.customware.gwt.dispatch.shared.ActionException;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.commons.logging.Log;
+
+import com.google.inject.Inject;
+import com.tyndalehouse.step.web.server.db.DbProvider;
+import com.tyndalehouse.step.web.shared.beans.TimelineEventBean;
+import com.tyndalehouse.step.web.shared.command.GetCurrentBibleTextCommand;
+import com.tyndalehouse.step.web.shared.command.GetEventsForDateRangeCommand;
+import com.tyndalehouse.step.web.shared.result.GetEventsForDateRangeResult;
+
+public class GetEventsForDateRangeHandler implements
+ ActionHandler<GetEventsForDateRangeCommand, GetEventsForDateRangeResult> {
+ private final Log logger;
+
+ @Inject
+ public GetEventsForDateRangeHandler(Log logger) {
+ this.logger = logger;
+ }
+
+ @Override
+ public GetEventsForDateRangeResult execute(
+ GetEventsForDateRangeCommand cmd, ExecutionContext arg1)
+ throws ActionException {
+
+ //TODO: do some cleaning up for DB code...
+ try {
+ Connection conn = DbProvider.getConnection();
+
+ //TODO: this needs to change to take into account the three different types of date precision
+ //but for now, let's just get something working.
+ PreparedStatement ps = conn.prepareStatement("select from_date, to_date, from_precision, to_precision, name, " +
+ "timeline_id, importance_id, " +
+ "certainty, event_type_id from step.event where ? >= from_date and ? <= to_date");
+
+ ps.setLong(1, cmd.getMinDate());
+ ps.setLong(2, cmd.getMaxDate());
+
+ ResultSet rs = ps.executeQuery();
+ GetEventsForDateRangeResult result = new GetEventsForDateRangeResult();
+
+ while(rs.next()) {
+ TimelineEventBean teb = new TimelineEventBean(
+ rs.getLong("from_date"),
+ rs.getLong("to_date"),
+ rs.getString("from_precision"),
+ rs.getString("to_precision"),
+ rs.getString("name"),
+ rs.getInt("timeline_id"),
+ rs.getInt("importance_id"),
+ rs.getString("certainty"),
+ rs.getInt("event_type_id")
+ );
+
+ result.add(teb);
+ }
+
+
+ //finally, set the xml representation---
+ //TODO: debate as to whether we want to have all the other stuff in there
+ // at the moment it's just overhead that is not used at all!
+ StringBuffer sb = new StringBuffer();
+ List<TimelineEventBean> events = result.getEvents();
+ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy G");
+
+ sb.append("<data>");
+
+ for(TimelineEventBean teb : events) {
+ sb.append("<event ");
+ sb.append("start=\"");
+ sb.append(sdf.format(new Date(teb.getFromDate())));
+ sb.append("\" ");
+
+ sb.append("title=\"");
+ sb.append(StringEscapeUtils.escapeJavaScript(teb.getName()));
+ sb.append("\"");
+
+ //will do some crazy xml parsing now just to see it work
+ //but really TODO: need to use a library or something so that we're not just building on the fly...
+
+ sb.append("></event>");
+ }
+ sb.append("</data>");
+
+ result.setXml(sb.toString());
+
+ return result;
+ } catch (SQLException e) {
+ logger.error(e);
+ throw new ActionException(e);
+ }
+ }
+
+
+
+ //This method is used to determine which type of command this handler serves I believe...
+ @Override
+ public Class<GetEventsForDateRangeCommand> getActionType() {
+ return GetEventsForDateRangeCommand.class;
+ }
+
+ @Override
+ public void rollback(GetEventsForDateRangeCommand arg0,
+ GetEventsForDateRangeResult arg1, ExecutionContext arg2)
+ throws ActionException {
+
+
+ }}
\ No newline at end of file
Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/beans/TimelineEventBean.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/beans/TimelineEventBean.java (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/beans/TimelineEventBean.java 2009-11-10 22:46:53 UTC (rev 18)
@@ -0,0 +1,136 @@
+package com.tyndalehouse.step.web.shared.beans;
+
+import java.io.Serializable;
+
+public class TimelineEventBean implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -7664806988001700477L;
+
+ private Long fromDate;
+ private Long toDate;
+ private String fromPrecision;
+ private String toPrecision;
+ private String certainty;
+ private int eventTypeId;
+ private String name;
+
+ //for serialization
+ public TimelineEventBean() {
+
+ }
+
+
+ public TimelineEventBean(Long fromDate, Long toDate,
+ String fromPrecision, String toPrecision,
+ String name,
+ int timelineId, int importanceId,
+ String certainty, int eventTypeId) {
+ this.fromDate = fromDate;
+ this.toDate = toDate;
+ this.fromPrecision = fromPrecision;
+ this.toPrecision = toPrecision;
+ this.certainty = certainty;
+ this.eventTypeId = eventTypeId;
+ this.name = name;
+
+ }
+
+ /**
+ * @return the fromDate
+ */
+ public Long getFromDate() {
+ return fromDate;
+ }
+
+ /**
+ * @param fromDate the fromDate to set
+ */
+ public void setFromDate(Long fromDate) {
+ this.fromDate = fromDate;
+ }
+
+ /**
+ * @return the toDate
+ */
+ public Long getToDate() {
+ return toDate;
+ }
+
+ /**
+ * @param toDate the toDate to set
+ */
+ public void setToDate(Long toDate) {
+ this.toDate = toDate;
+ }
+
+ /**
+ * @return the fromPrecision
+ */
+ public String getFromPrecision() {
+ return fromPrecision;
+ }
+
+ /**
+ * @param fromPrecision the fromPrecision to set
+ */
+ public void setFromPrecision(String fromPrecision) {
+ this.fromPrecision = fromPrecision;
+ }
+
+ /**
+ * @return the toPrecision
+ */
+ public String getToPrecision() {
+ return toPrecision;
+ }
+
+ /**
+ * @param toPrecision the toPrecision to set
+ */
+ public void setToPrecision(String toPrecision) {
+ this.toPrecision = toPrecision;
+ }
+
+ /**
+ * @return the certainty
+ */
+ public String getCertainty() {
+ return certainty;
+ }
+
+ /**
+ * @param certainty the certainty to set
+ */
+ public void setCertainty(String certainty) {
+ this.certainty = certainty;
+ }
+
+ /**
+ * @return the eventTypeId
+ */
+ public int getEventTypeId() {
+ return eventTypeId;
+ }
+
+ /**
+ * @param eventTypeId the eventTypeId to set
+ */
+ public void setEventTypeId(int eventTypeId) {
+ this.eventTypeId = eventTypeId;
+ }
+
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ public String getName() {
+ return name;
+ }
+}
Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/command/GetEventsForDateRangeCommand.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/command/GetEventsForDateRangeCommand.java (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/command/GetEventsForDateRangeCommand.java 2009-11-10 22:46:53 UTC (rev 18)
@@ -0,0 +1,44 @@
+ package com.tyndalehouse.step.web.shared.command;
+
+import net.customware.gwt.dispatch.shared.Action;
+
+import com.tyndalehouse.step.web.shared.result.GetAvailableBibleVersionsResult;
+import com.tyndalehouse.step.web.shared.result.GetEventsForDateRangeResult;
+
+public class GetEventsForDateRangeCommand implements Action<GetEventsForDateRangeResult> {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 5781027650600417430L;
+ private Long minDate;
+ private Long maxDate;
+
+ /**
+ * @return the minDate
+ */
+ public Long getMinDate() {
+ return minDate;
+ }
+
+ /**
+ * @return the maxDate
+ */
+ public Long getMaxDate() {
+ return maxDate;
+ }
+
+
+ public GetEventsForDateRangeCommand(Long minDate, Long maxDate) {
+ this.minDate = minDate;
+ this.maxDate = maxDate;
+
+ }
+
+ //leaving this cos it gets serialized I believe...
+ public GetEventsForDateRangeCommand() {
+
+ }
+
+
+}
Added: trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/result/GetEventsForDateRangeResult.java
===================================================================
--- trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/result/GetEventsForDateRangeResult.java (rev 0)
+++ trunk/step-web-app/src/main/java/com/tyndalehouse/step/web/shared/result/GetEventsForDateRangeResult.java 2009-11-10 22:46:53 UTC (rev 18)
@@ -0,0 +1,56 @@
+package com.tyndalehouse.step.web.shared.result;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import net.customware.gwt.dispatch.shared.Result;
+
+import com.tyndalehouse.step.web.shared.beans.TimelineEventBean;
+
+public class GetEventsForDateRangeResult implements Result {
+
+ private List<TimelineEventBean> events = new ArrayList<TimelineEventBean>();
+ private String xml;
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 7118668612721569823L;
+
+ public GetEventsForDateRangeResult() {
+
+ }
+
+ public void add(TimelineEventBean teb) {
+ getEvents().add(teb);
+
+ }
+
+ public List<TimelineEventBean> getEvents() {
+ return events;
+ }
+
+ /**
+ * @param events the events to set
+ */
+ public void setEvents(List<TimelineEventBean> events) {
+ this.events = events;
+ }
+
+ /**
+ * @param xml the xml to set
+ */
+ public void setXml(String xml) {
+ this.xml = xml;
+ }
+
+ /**
+ * @return the xml
+ */
+ public String getXml() {
+ return xml;
+ }
+
+
+
+}
Modified: trunk/step-web-app/war/Step.html
===================================================================
--- trunk/step-web-app/war/Step.html 2009-11-03 22:43:39 UTC (rev 17)
+++ trunk/step-web-app/war/Step.html 2009-11-10 22:46:53 UTC (rev 18)
@@ -30,6 +30,7 @@
<script type="text/javascript" language="javascript" src="step/step.nocache.js"></script>
<script type="text/javascript" language="javascript" src="step/timelinewidget/timeline_js/timeline-api.js"></script>
+ <script type="text/javascript" language="javascript" src="step/timelinewidget/timeline-helper.js"></script>
<!-- -->
<!-- Consider inlining CSS to reduce the number of requested files -->
Modified: trunk/step-web-app/war/StepDB/db.lck
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/log/log.ctrl
===================================================================
(Binary files differ)
Deleted: trunk/step-web-app/war/StepDB/log/log1.dat
===================================================================
(Binary files differ)
Added: trunk/step-web-app/war/StepDB/log/log9.dat
===================================================================
(Binary files differ)
Property changes on: trunk/step-web-app/war/StepDB/log/log9.dat
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/step-web-app/war/StepDB/log/logmirror.ctrl
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c101.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c111.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c121.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c130.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c141.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c150.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c161.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c171.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c180.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c191.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c1a1.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c1b1.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c20.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c230.dat
===================================================================
(Binary files differ)
Added: trunk/step-web-app/war/StepDB/seg0/c30d0.dat
===================================================================
(Binary files differ)
Property changes on: trunk/step-web-app/war/StepDB/seg0/c30d0.dat
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/step-web-app/war/StepDB/seg0/c30e0.dat
===================================================================
(Binary files differ)
Property changes on: trunk/step-web-app/war/StepDB/seg0/c30e0.dat
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/step-web-app/war/StepDB/seg0/c30f1.dat
===================================================================
(Binary files differ)
Property changes on: trunk/step-web-app/war/StepDB/seg0/c30f1.dat
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/step-web-app/war/StepDB/seg0/c31.dat
===================================================================
(Binary files differ)
Added: trunk/step-web-app/war/StepDB/seg0/c3100.dat
===================================================================
(Binary files differ)
Property changes on: trunk/step-web-app/war/StepDB/seg0/c3100.dat
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/step-web-app/war/StepDB/seg0/c3111.dat
===================================================================
(Binary files differ)
Property changes on: trunk/step-web-app/war/StepDB/seg0/c3111.dat
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/step-web-app/war/StepDB/seg0/c3120.dat
===================================================================
(Binary files differ)
Property changes on: trunk/step-web-app/war/StepDB/seg0/c3120.dat
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/step-web-app/war/StepDB/seg0/c3131.dat
===================================================================
(Binary files differ)
Property changes on: trunk/step-web-app/war/StepDB/seg0/c3131.dat
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/step-web-app/war/StepDB/seg0/c3140.dat
===================================================================
(Binary files differ)
Property changes on: trunk/step-web-app/war/StepDB/seg0/c3140.dat
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/step-web-app/war/StepDB/seg0/c3151.dat
===================================================================
(Binary files differ)
Property changes on: trunk/step-web-app/war/StepDB/seg0/c3151.dat
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/step-web-app/war/StepDB/seg0/c3160.dat
===================================================================
(Binary files differ)
Property changes on: trunk/step-web-app/war/StepDB/seg0/c3160.dat
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/step-web-app/war/StepDB/seg0/c3170.dat
===================================================================
(Binary files differ)
Property changes on: trunk/step-web-app/war/StepDB/seg0/c3170.dat
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/step-web-app/war/StepDB/seg0/c3181.dat
===================================================================
(Binary files differ)
Property changes on: trunk/step-web-app/war/StepDB/seg0/c3181.dat
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/step-web-app/war/StepDB/seg0/c41.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c51.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c60.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c71.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c81.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/c90.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/ca1.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/cb1.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/cc0.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/cd1.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/ce1.dat
===================================================================
(Binary files differ)
Modified: trunk/step-web-app/war/StepDB/seg0/cf0.dat
===================================================================
(Binary files differ)
Deleted: trunk/step-web-app/war/StepDB/seg0/d400.dat
===================================================================
(Binary files differ)
More information about the Tynstep-svn
mailing list