[Tynstep-svn] r140 - in trunk/step-web-shared: . src src/main src/main/java src/main/java/com src/main/java/com/tyndalehouse src/main/java/com/tyndalehouse/step src/main/java/com/tyndalehouse/step/web src/main/java/com/tyndalehouse/step/web/shared src/main/java/com/tyndalehouse/step/web/shared/command src/main/java/com/tyndalehouse/step/web/shared/common src/main/java/com/tyndalehouse/step/web/shared/common/maps src/main/java/com/tyndalehouse/step/web/shared/common/scripturelookup src/main/java/com/tyndalehouse/step/web/shared/common/timeline src/main/java/com/tyndalehouse/step/web/shared/result src/main/java/com/tyndalehouse/step/web/shared/result/beans src/main/java/com/tyndalehouse/step/web/shared/scripture src/main/java/com/tyndalehouse/step/web/shared/timeline

ChrisBurrell at crosswire.org ChrisBurrell at crosswire.org
Fri Jun 25 13:29:48 MST 2010


Author: ChrisBurrell
Date: 2010-06-25 13:29:48 -0700 (Fri, 25 Jun 2010)
New Revision: 140

Added:
   trunk/step-web-shared/pom.xml
   trunk/step-web-shared/src/
   trunk/step-web-shared/src/main/
   trunk/step-web-shared/src/main/java/
   trunk/step-web-shared/src/main/java/com/
   trunk/step-web-shared/src/main/java/com/tyndalehouse/
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/InternalException.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/BooksRequiredType.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetAvailableBibleVersionsCommand.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetBibleBooksCommand.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetCurrentBibleTextCommand.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetDictionaryDefinitionCommand.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetEventsForDateRangeCommand.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetLocationsCommand.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetTimelineOriginForScriptureCommand.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetTimelineUISetupCommand.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/InstallJswordModuleCommand.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/maps/
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/maps/GeoLocation.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/maps/GeoLocationType.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/maps/LatLong.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/scripturelookup/
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/scripturelookup/BibleTextLookupType.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/timeline/
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/timeline/TimeBandVisibleDate.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/timeline/TimelineBean.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/timeline/TimelineEventBean.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetAvailableBibleVersionsResult.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetBibleBooksCommandResult.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetCurrentBibleTextResult.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetDictionaryDefinitionResult.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetEventsForDateRangeResult.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetLocationsResult.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetTimelineOriginForScriptureResult.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetTimelineUISetupResult.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/InstallJswordModuleResult.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/beans/
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/beans/BibleVersion.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Milestone.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Note.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/OSISConstants.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Passage.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Text.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/TextualElement.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Title.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/TransChange.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Verse.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/VerseContent.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Word.java
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/timeline/
   trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/timeline/Unit.java
Log:
creation of shared project

Added: trunk/step-web-shared/pom.xml
===================================================================
--- trunk/step-web-shared/pom.xml	                        (rev 0)
+++ trunk/step-web-shared/pom.xml	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,34 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<groupId>com.tyndalehouse</groupId>
+		<artifactId>step-parent</artifactId>
+		<version>0.1-SNAPSHOT</version>
+		<relativePath>..</relativePath>
+	</parent>
+
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>com.tyndalehouse</groupId>
+	<artifactId>step-web-shared</artifactId>
+	<packaging>jar</packaging>
+	<name>step-web-shared</name>
+
+
+	<dependencies>
+		<dependency>
+			<groupId>net.customware.gwt.dispatch</groupId>
+			<artifactId>gwt-dispatch</artifactId>
+		</dependency>
+	</dependencies>
+
+	<build>
+	    <resources>
+	      <resource>
+	        <directory>src/main/java</directory>
+	      </resource>
+	      <resource>
+	        <directory>src/main/resources</directory>
+	      </resource>
+	    </resources>
+	</build>
+</project>

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/InternalException.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/InternalException.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/InternalException.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,27 @@
+package com.tyndalehouse.step.web.shared;
+
+public class InternalException extends RuntimeException {
+    private static final long serialVersionUID = -2887902703623569353L;
+
+    /**
+     * default internal exception without a root cause
+     * 
+     * @param message
+     *            the error message
+     */
+    public InternalException(final String message) {
+        super(message);
+    }
+
+    /**
+     * the exception with a root cause
+     * 
+     * @param message
+     *            the error message
+     * @param e
+     *            the exception that caused this
+     */
+    public InternalException(final String message, final Exception e) {
+        super(message, e);
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/BooksRequiredType.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/BooksRequiredType.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/BooksRequiredType.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,14 @@
+package com.tyndalehouse.step.web.shared.command;
+
+/**
+ * Describing what kind of book to be displayed
+ * 
+ * @author CJBurrell
+ * 
+ */
+public enum BooksRequiredType {
+    /**
+     * only retrieve bibles
+     */
+    BIBLE,
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetAvailableBibleVersionsCommand.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetAvailableBibleVersionsCommand.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetAvailableBibleVersionsCommand.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,47 @@
+package com.tyndalehouse.step.web.shared.command;
+
+import net.customware.gwt.dispatch.shared.Action;
+
+import com.tyndalehouse.step.web.shared.result.GetAvailableBibleVersionsResult;
+
+/**
+ * Commmand to get available set of books, that are installed on the server
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class GetAvailableBibleVersionsCommand implements Action<GetAvailableBibleVersionsResult> {
+    /**
+     * serial id.
+     */
+    private static final long serialVersionUID = 5781027650600417430L;
+
+    // TODO: later change that to list modules, bibles, etc.
+    /**
+     * Describes which types of modules are required to be returned.
+     */
+    private BooksRequiredType booksRequired = BooksRequiredType.BIBLE;
+
+    /**
+     * Default constructor needs to be available for GWT it seems.
+     */
+    public GetAvailableBibleVersionsCommand() {
+
+    }
+
+    /**
+     * @return the booksRequired
+     */
+    public BooksRequiredType getBooksRequired() {
+        return booksRequired;
+    }
+
+    /**
+     * @param booksRequired
+     *            the booksRequired to set
+     */
+    public void setBooksRequired(final BooksRequiredType booksRequired) {
+        this.booksRequired = booksRequired;
+    }
+
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetBibleBooksCommand.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetBibleBooksCommand.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetBibleBooksCommand.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,41 @@
+package com.tyndalehouse.step.web.shared.command;
+
+import net.customware.gwt.dispatch.shared.Action;
+
+import com.tyndalehouse.step.web.shared.result.GetBibleBooksCommandResult;
+
+/**
+ * This is currently based on the KJV and ensures that all bible books are
+ * returned to the UI.
+ * 
+ * @author CJBurrell
+ * 
+ */
+
+public class GetBibleBooksCommand implements Action<GetBibleBooksCommandResult> {
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = 2749008090105331922L;
+
+    /**
+     * Initials of version to use to lookup bible
+     */
+    private String initials;
+
+    /**
+     * @return the initials
+     */
+    public final String getInitials() {
+        return initials;
+    }
+
+    /**
+     * @param initials
+     *            the initials to set
+     */
+    public final void setInitials(final String initials) {
+        this.initials = initials;
+    }
+
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetCurrentBibleTextCommand.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetCurrentBibleTextCommand.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetCurrentBibleTextCommand.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,112 @@
+package com.tyndalehouse.step.web.shared.command;
+
+import net.customware.gwt.dispatch.shared.Action;
+
+import com.tyndalehouse.step.web.shared.common.scripturelookup.BibleTextLookupType;
+import com.tyndalehouse.step.web.shared.result.GetCurrentBibleTextResult;
+
+/**
+ * Contains the details of a request for biblical text. Such details include
+ * whether to use a plain text, a standard XSLT, or a logical form
+ * <p>
+ * For logical form (represented in Bean form) we allow the use of interlinears
+ * as well.
+ * <p>
+ * A classic interlinear is where the original text is the master copy of the
+ * text, and the translated (English, French, etc.) text is lined up underneath
+ * <p>
+ * A reverse interlinear is where the the English/French text is on top, and the
+ * original (Hebrew or Greek) is lined up underneath.
+ * 
+ * @author cjburrell
+ * 
+ */
+public class GetCurrentBibleTextCommand implements Action<GetCurrentBibleTextResult> {
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = -6828956918275592036L;
+
+    /**
+     * the biblical reference, for e.g. Gen 1:1
+     */
+    private String reference;
+
+    /**
+     * type of lookup to make
+     */
+    private BibleTextLookupType typeOfLookup;
+
+    // TODO: add validation to the handler/client to ensure that
+    // version/interlinear matches correctly
+    /**
+     * the version of the bible to use.
+     */
+    private String version;
+
+    /**
+     * default constructor TODO: can this be made private? I think so
+     */
+    public GetCurrentBibleTextCommand() {
+
+    }
+
+    /**
+     * constructor for a version,reference combo
+     * 
+     * @param version
+     *            version to be used in the lookup (intials)
+     * @param reference
+     *            reference to be used in the lookup (for e.g. Gen 1:1)
+     */
+    public GetCurrentBibleTextCommand(final String version, final String reference) {
+        this.version = version;
+        this.reference = reference;
+    }
+
+    /**
+     * @return the biblical reference (Gen 1:1-5 for example)
+     */
+    public String getReference() {
+        return reference;
+    }
+
+    /**
+     * @return the typeOfLookup
+     */
+    public final BibleTextLookupType getTypeOfLookup() {
+        return typeOfLookup;
+    }
+
+    /**
+     * @return the initials of the version to be used in the lookup
+     */
+    public String getVersion() {
+        return version;
+    }
+
+    /**
+     * @param reference
+     *            the reference to set
+     */
+    public void setReference(final String reference) {
+        this.reference = reference;
+    }
+
+    /**
+     * @param typeOfLookup
+     *            the typeOfLookup to set
+     */
+    public final void setTypeOfLookup(final BibleTextLookupType typeOfLookup) {
+        this.typeOfLookup = typeOfLookup;
+    }
+
+    /**
+     * @param version
+     *            the version to set
+     */
+    public void setVersion(final String version) {
+        this.version = version;
+    }
+
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetDictionaryDefinitionCommand.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetDictionaryDefinitionCommand.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetDictionaryDefinitionCommand.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,47 @@
+package com.tyndalehouse.step.web.shared.command;
+
+import java.util.List;
+
+import net.customware.gwt.dispatch.shared.Action;
+
+import com.tyndalehouse.step.web.shared.result.GetDictionaryDefinitionResult;
+
+/**
+ * dictionary definition command, contains the references to lookup
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class GetDictionaryDefinitionCommand implements Action<GetDictionaryDefinitionResult> {
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = -6139208624046856543L;
+
+    /**
+     * references to be looked up
+     */
+    private List<String> lookupReferencce;
+
+    /**
+     * the public constructor
+     */
+    public GetDictionaryDefinitionCommand() {
+
+    }
+
+    /**
+     * @return the lookupReferencce
+     */
+    public List<String> getLookupReferencce() {
+        return lookupReferencce;
+    }
+
+    /**
+     * @param lookupReferences
+     *            the list lookupReferencce to set
+     */
+    public void setLookupReference(final List<String> lookupReferences) {
+        this.lookupReferencce = lookupReferences;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetEventsForDateRangeCommand.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetEventsForDateRangeCommand.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetEventsForDateRangeCommand.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,81 @@
+package com.tyndalehouse.step.web.shared.command;
+
+import java.util.List;
+
+import net.customware.gwt.dispatch.shared.Action;
+
+import com.tyndalehouse.step.web.shared.common.timeline.TimeBandVisibleDate;
+import com.tyndalehouse.step.web.shared.result.GetEventsForDateRangeResult;
+
+/**
+ * Contains the details of a request for events within a particular date range.
+ * This contains a list of @see {@link TimeBandVisibleDate}, which records the
+ * portion of time to be requested from the server
+ * 
+ * @author cjburrell
+ * 
+ */
+public class GetEventsForDateRangeCommand implements Action<GetEventsForDateRangeResult> {
+    /**
+     * default uid
+     */
+    private static final long serialVersionUID = 5781027650600417430L;
+
+    /**
+     * whether to retrieve durations (this is a DEBUG flag really)
+     */
+    private boolean showDuration = true;
+
+    /**
+     * the list of timebands and the times that are currently showing
+     */
+    private List<TimeBandVisibleDate> visbleDates;
+
+    /**
+     * Used for serialization
+     */
+    public GetEventsForDateRangeCommand() {
+
+    }
+
+    /**
+     * default constructor that should be used
+     * 
+     * @param visbleDates
+     *            list of date ranges encapsulated in a TimeBandVisibleDate
+     *            object
+     */
+    public GetEventsForDateRangeCommand(final List<TimeBandVisibleDate> visbleDates) {
+        this.visbleDates = visbleDates;
+    }
+
+    /**
+     * @return the visbleDates
+     */
+    public List<TimeBandVisibleDate> getVisbleDates() {
+        return visbleDates;
+    }
+
+    /**
+     * @return the showDuration
+     */
+    public boolean isShowDuration() {
+        return showDuration;
+    }
+
+    /**
+     * @param showDuration
+     *            the showDuration to set
+     */
+    public void setShowDuration(final boolean showDuration) {
+        this.showDuration = showDuration;
+    }
+
+    /**
+     * @param visbleDates
+     *            the visbleDates to set
+     */
+    public void setVisbleDates(final List<TimeBandVisibleDate> visbleDates) {
+        this.visbleDates = visbleDates;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetLocationsCommand.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetLocationsCommand.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetLocationsCommand.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,21 @@
+package com.tyndalehouse.step.web.shared.command;
+
+import net.customware.gwt.dispatch.shared.Action;
+
+import com.tyndalehouse.step.web.shared.result.GetLocationsResult;
+
+/**
+ * This command captures the input to the handler to query the server for all
+ * locations pertaining to a particular passage
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class GetLocationsCommand implements Action<GetLocationsResult> {
+
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = -4636855791737543490L;
+
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetTimelineOriginForScriptureCommand.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetTimelineOriginForScriptureCommand.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetTimelineOriginForScriptureCommand.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,56 @@
+package com.tyndalehouse.step.web.shared.command;
+
+import net.customware.gwt.dispatch.shared.Action;
+
+import com.tyndalehouse.step.web.shared.result.GetTimelineOriginForScriptureResult;
+
+/**
+ * The command to retrieve the best event given a verse range
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class GetTimelineOriginForScriptureCommand implements Action<GetTimelineOriginForScriptureResult> {
+    /**
+	 * 
+	 */
+    private static final long serialVersionUID = -6454957611866927920L;
+    /**
+     * default uid
+     */
+
+    private String scriptureReference;
+
+    /**
+     * default constructor that should be used
+     * 
+     * @param scriptureReference
+     *            the biblical reference/range to be looked up
+     */
+    public GetTimelineOriginForScriptureCommand(final String scriptureReference) {
+        this.scriptureReference = scriptureReference;
+    }
+
+    /**
+     * Used for serialization
+     */
+    @SuppressWarnings("unused")
+    private GetTimelineOriginForScriptureCommand() {
+
+    }
+
+    /**
+     * @return the scriptureReference
+     */
+    public String getScriptureReference() {
+        return scriptureReference;
+    }
+
+    /**
+     * @param scriptureReference
+     *            the scriptureReference to set
+     */
+    public void setScriptureReference(final String scriptureReference) {
+        this.scriptureReference = scriptureReference;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetTimelineUISetupCommand.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetTimelineUISetupCommand.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/GetTimelineUISetupCommand.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,27 @@
+package com.tyndalehouse.step.web.shared.command;
+
+import net.customware.gwt.dispatch.shared.Action;
+
+import com.tyndalehouse.step.web.shared.result.GetTimelineUISetupResult;
+
+/**
+ * command to request all the initial information useful to set up a timeline
+ * component, including the list of timebands, their recommended units, etc.
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class GetTimelineUISetupCommand implements Action<GetTimelineUISetupResult> {
+
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = 7813083800240239846L;
+
+    /**
+     * public constructor
+     */
+    public GetTimelineUISetupCommand() {
+
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/InstallJswordModuleCommand.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/InstallJswordModuleCommand.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/command/InstallJswordModuleCommand.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,46 @@
+package com.tyndalehouse.step.web.shared.command;
+
+import net.customware.gwt.dispatch.shared.Action;
+
+import com.tyndalehouse.step.web.shared.result.InstallJswordModuleResult;
+
+/**
+ * Requests the server (or local server) to install a bible version
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class InstallJswordModuleCommand implements Action<InstallJswordModuleResult> {
+
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = 3416377875572322721L;
+
+    /**
+     * the initials to be used to check/install the book
+     */
+    private String initials;
+
+    /**
+     * the install jsword module command constructor
+     */
+    public InstallJswordModuleCommand() {
+
+    }
+
+    /**
+     * @return the initials of module to be installed
+     */
+    public String getInitials() {
+        return initials;
+    }
+
+    /**
+     * @param initials
+     *            the initials of the module to set
+     */
+    public void setInitials(final String initials) {
+        this.initials = initials;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/maps/GeoLocation.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/maps/GeoLocation.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/maps/GeoLocation.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,146 @@
+package com.tyndalehouse.step.web.shared.common.maps;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Serialisable POJO containing all the data pertaining to displaying the
+ * location on the screen
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class GeoLocation implements Serializable {
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = -2429722523530262993L;
+
+    /**
+     * description of the location
+     */
+    private String description;
+
+    /**
+     * value of the latitude
+     */
+    private long latitude;
+
+    /**
+     * List of lat longs
+     */
+    private List<LatLong> latlongs;
+
+    /**
+     * type of location, for e.g. a city, a memorial, a fountain, etc.
+     */
+    private GeoLocationType locationType;
+
+    /**
+     * value of the longitude
+     */
+    private long longitude;
+
+    /**
+     * Name of the place, for e.g. Golgotha
+     */
+    private String placeName;
+
+    /**
+     * default constructor
+     */
+    public GeoLocation() {
+        latlongs = new ArrayList<LatLong>();
+    }
+
+    /**
+     * @return the description
+     */
+    public final String getDescription() {
+        return description;
+    }
+
+    /**
+     * @return the latitude
+     */
+    public final long getLatitude() {
+        return latitude;
+    }
+
+    /**
+     * @return the latlongs
+     */
+    public final List<LatLong> getLatlongs() {
+        return latlongs;
+    }
+
+    /**
+     * @return the locationType
+     */
+    public final GeoLocationType getLocationType() {
+        return locationType;
+    }
+
+    /**
+     * @return the longitude
+     */
+    public final long getLongitude() {
+        return longitude;
+    }
+
+    /**
+     * @return the placeName
+     */
+    public final String getPlaceName() {
+        return placeName;
+    }
+
+    /**
+     * @param description
+     *            the description to set
+     */
+    public final void setDescription(final String description) {
+        this.description = description;
+    }
+
+    /**
+     * @param latitude
+     *            the latitude to set
+     */
+    public final void setLatitude(final long latitude) {
+        this.latitude = latitude;
+    }
+
+    /**
+     * @param latlongs
+     *            the latlongs to set
+     */
+    public final void setLatlongs(final List<LatLong> latlongs) {
+        this.latlongs = latlongs;
+    }
+
+    /**
+     * @param locationType
+     *            the locationType to set
+     */
+    public final void setLocationType(final GeoLocationType locationType) {
+        this.locationType = locationType;
+    }
+
+    /**
+     * @param longitude
+     *            the longitude to set
+     */
+    public final void setLongitude(final long longitude) {
+        this.longitude = longitude;
+    }
+
+    /**
+     * @param placeName
+     *            the placeName to set
+     */
+    public final void setPlaceName(final String placeName) {
+        this.placeName = placeName;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/maps/GeoLocationType.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/maps/GeoLocationType.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/maps/GeoLocationType.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,18 @@
+package com.tyndalehouse.step.web.shared.common.maps;
+
+/**
+ * Type of location, indicating whether the location is a city, a wall, a
+ * region, etc.
+ * 
+ * @author CJBurrell
+ * 
+ */
+public enum GeoLocationType {
+    /** CITY */
+    CITY,
+    /** A FOUNTAIN */
+    FOUNTAIN,
+    /** A REGION */
+    REGION,
+
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/maps/LatLong.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/maps/LatLong.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/maps/LatLong.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,49 @@
+package com.tyndalehouse.step.web.shared.common.maps;
+
+/**
+ * LatLong POJO containg the latitude and longitude of a point on a map
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class LatLong {
+    /**
+     * latitude of the point
+     */
+    private long latitude;
+
+    /**
+     * longitude of the point
+     */
+    private long longitude;
+
+    /**
+     * @return the latitude
+     */
+    public final long getLatitude() {
+        return latitude;
+    }
+
+    /**
+     * @return the longitude
+     */
+    public final long getLongitude() {
+        return longitude;
+    }
+
+    /**
+     * @param latitude
+     *            the latitude to set
+     */
+    public final void setLatitude(final long latitude) {
+        this.latitude = latitude;
+    }
+
+    /**
+     * @param longitude
+     *            the longitude to set
+     */
+    public final void setLongitude(final long longitude) {
+        this.longitude = longitude;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/scripturelookup/BibleTextLookupType.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/scripturelookup/BibleTextLookupType.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/scripturelookup/BibleTextLookupType.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,20 @@
+package com.tyndalehouse.step.web.shared.common.scripturelookup;
+
+/**
+ * This enum indicates what kind of lookup is required from the server
+ * 
+ * @author CJBurrell
+ * 
+ */
+public enum BibleTextLookupType {
+    /** a classic interlinear is required */
+    CLASSIC_INTERLINEAR,
+    /** a logical form, POJO form of the text is required */
+    LOGICAL,
+    /** only the text is required */
+    PLAIN_TEXT,
+    /** a reverse interlinear is required */
+    REVERSE_INTERLINEAR,
+    /** the text, using a default xslt is required */
+    XSLT,
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/timeline/TimeBandVisibleDate.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/timeline/TimeBandVisibleDate.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/timeline/TimeBandVisibleDate.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,143 @@
+package com.tyndalehouse.step.web.shared.common.timeline;
+
+import java.io.Serializable;
+
+/**
+ * This object acts as a container of the current display window on an ether.
+ * timebandId identifies the timeband and is associated with a minimum and a
+ * maximum date which are generally used to request things off the database.
+ * 
+ * TODO: harmonize capital letters to be TimebandVisibleDate
+ * 
+ * @author cjburrell
+ * 
+ */
+public class TimeBandVisibleDate implements Serializable {
+
+    /**
+     * default serial id
+     */
+    private static final long serialVersionUID = -7384255321830177509L;
+
+    /**
+     * max date visible on the timeband
+     */
+    private long maxDate;
+
+    /**
+     * min date visible on the time band
+     */
+    private long minDate;
+
+    /**
+     * true indicates no request is required on the server
+     */
+    private boolean noRequest;
+
+    /**
+     * time band id
+     */
+    private int timebandId;
+
+    /**
+     * so that
+     * 
+     * @param timebandId
+     *            the timebandId referred to in the module
+     * @param minDate
+     *            minDate in the range of dates to ask the server
+     * @param maxDate
+     *            maxDate in the range of dates to the ask the server
+     */
+    public TimeBandVisibleDate(final int timebandId, final long minDate, final long maxDate) {
+        this.timebandId = timebandId;
+        this.minDate = minDate;
+        this.maxDate = maxDate;
+        noRequest = false;
+    }
+
+    /**
+     * removing default constructor from view of other callers. Only accessible
+     * through reflection, and therefore GWT
+     */
+    private TimeBandVisibleDate() {
+    }
+
+    /**
+     * returns a TimeBandVisibleDate object tagged to indicate no request is
+     * required on the server
+     * 
+     * @return a marked TimeBandVisibleDate object, marked with a flag saying no
+     *         request is required
+     */
+    public static TimeBandVisibleDate getNoRequest() {
+        final TimeBandVisibleDate tvd = new TimeBandVisibleDate();
+        tvd.setNoRequest(true);
+        return tvd;
+    }
+
+    /**
+     * @return the maxDate
+     */
+    public long getMaxDate() {
+        return maxDate;
+    }
+
+    /**
+     * @return the minDate
+     */
+    public long getMinDate() {
+        return minDate;
+    }
+
+    /**
+     * @return the timebandId
+     */
+    public int getTimebandId() {
+        return timebandId;
+    }
+
+    /**
+     * NoRequest determines whether the values in here should be sent back.
+     * Perhaps we've got everything we need already, so we don't need to send
+     * anything back to the server
+     * 
+     * @return the noRequest
+     */
+    public boolean isNoRequest() {
+        return noRequest;
+    }
+
+    /**
+     * @param maxDate
+     *            the maxDate to set
+     */
+    public void setMaxDate(final long maxDate) {
+        this.maxDate = maxDate;
+    }
+
+    /**
+     * @param minDate
+     *            the minDate to set
+     */
+    public void setMinDate(final long minDate) {
+        this.minDate = minDate;
+    }
+
+    /**
+     * @param noRequest
+     *            the noRequest to set
+     */
+    public void setNoRequest(final boolean noRequest) {
+        this.noRequest = noRequest;
+    }
+
+    /**
+     * @param timebandId
+     *            the timebandId to set
+     */
+    public void setTimebandId(final int timebandId) {
+        this.timebandId = timebandId;
+    }
+
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/timeline/TimelineBean.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/timeline/TimelineBean.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/timeline/TimelineBean.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,133 @@
+package com.tyndalehouse.step.web.shared.common.timeline;
+
+import java.io.Serializable;
+
+/**
+ * Timeline bean represents the different timelines on which events can be
+ * found... TODO: should this be renamed timeband?
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class TimelineBean implements Serializable {
+    /**
+	 * 
+	 */
+    private static final long serialVersionUID = -1734142151232501392L;
+
+    /**
+     * Timeline description from the server layer
+     */
+    private String timelineDescription;
+
+    /**
+     * timeline id sent across the wire
+     */
+    private int timelineId;
+
+    /**
+     * unit to be used when first display the timeband
+     */
+    private String unit;
+
+    /**
+     * default constructor made public
+     */
+    public TimelineBean() {
+
+    }
+
+    /**
+     * @return the timelineDescription
+     */
+    public String getTimelineDescription() {
+        return timelineDescription;
+    }
+
+    /**
+     * @return the timelineId
+     */
+    public int getTimelineId() {
+        return timelineId;
+    }
+
+    /**
+     * @return the unit
+     */
+    public String getUnit() {
+        return unit;
+    }
+
+    /**
+     * @param timelineDescription
+     *            the timelineDescription to set
+     */
+    public void setTimelineDescription(final String timelineDescription) {
+        this.timelineDescription = timelineDescription;
+    }
+
+    /**
+     * @param timelineId
+     *            the timelineId to set
+     */
+    public void setTimelineId(final int timelineId) {
+        this.timelineId = timelineId;
+    }
+
+    /**
+     * sets the unit field
+     * 
+     * @param unit
+     *            the unit to be set
+     */
+    public void setUnit(final String unit) {
+        this.unit = unit;
+
+    }
+
+    // /**
+    // * @return the minDate
+    // */
+    // public long getMinDate() {
+    // return minDate;
+    // }
+    //
+    // /**
+    // * @param minDate the minDate to set
+    // */
+    // public void setMinDate(long minDate) {
+    // this.minDate = minDate;
+    // }
+    //
+    // /**
+    // * @return the maxDate
+    // */
+    // public long getMaxDate() {
+    // return maxDate;
+    // }
+    //
+    // /**
+    // * @param maxDate the maxDate to set
+    // */
+    // public void setMaxDate(long maxDate) {
+    // this.maxDate = maxDate;
+    // }
+
+    // /**
+    // * @return the timelineCode
+    // */
+    // public String getTimelineCode() {
+    // return timelineCode;
+    // }
+    //
+    // public void setEventCount(int eventCount) {
+    // this.eventCount = eventCount;
+    // }
+    //
+    // /**
+    // * @return the eventCount
+    // */
+    // public int getEventCount() {
+    // return eventCount;
+    // }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/timeline/TimelineEventBean.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/timeline/TimelineEventBean.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/common/timeline/TimelineEventBean.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,252 @@
+package com.tyndalehouse.step.web.shared.common.timeline;
+
+import java.io.Serializable;
+
+/**
+ * An Time Event bean, containing all the relevant fields passed from the server
+ * to the client. For e.g. the description of the event, its id, the dates, etc.
+ * 
+ * @author cjburrell
+ * 
+ */
+public class TimelineEventBean implements Serializable {
+
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = -7664806988001700477L;
+
+    /**
+     * The certainty of dating, as provided in input CSV files
+     */
+    private String certainty;
+
+    /**
+     * the event id
+     */
+    private int eventId;
+
+    /**
+     * the type of the event, where we distinguish battles, from births, etc.
+     * (TODO: still to be done)
+     */
+    private int eventTypeId;
+
+    /**
+     * the from date
+     */
+    private Long fromDate;
+
+    /**
+     * how precise the date is, whether to the day, month, etc. see schema
+     * definition for details
+     */
+    private String fromPrecision;
+
+    /**
+     * Name/Description of the event
+     */
+    private String name;
+
+    /**
+     * The timeband/timeline on which the event should be displayed
+     */
+    private int timelineId;
+
+    /**
+     * the to-date in the case of a duration
+     */
+    private Long toDate;
+
+    /**
+     * the precision of the "to-date", whether to the day, month, etc. see
+     * schema definition for details
+     */
+    private String toPrecision;
+
+    /**
+     * making public
+     */
+    public TimelineEventBean() {
+
+    }
+
+    /**
+     * a constructor to set up everything in one go
+     * 
+     * @param eventId
+     *            the event id from the database
+     * @param fromDate
+     *            the from date, at which the event starts/is
+     * @param toDate
+     *            the to date, if the date is a duratio
+     * @param fromPrecision
+     *            how precise the from date is (see schema for more details)
+     * @param toPrecision
+     *            how precise the to date is (see schema for more details)
+     * @param name
+     *            the description of the event
+     * @param timelineId
+     *            the timeband on which to be located
+     * @param importanceId
+     *            the importance id as defined in the input files
+     * @param certainty
+     *            the certainty as defined in the input files
+     * @param eventTypeId
+     *            the event type, describing different types, and therefore
+     *            different representations of the event on the UI
+     * 
+     */
+    // CHECKSTYLE:OFF
+    public TimelineEventBean(final int eventId, final Long fromDate, final Long toDate, final String fromPrecision,
+            final String toPrecision, final String name, final int timelineId, final int importanceId,
+            final String certainty, final int eventTypeId) {
+        // CHECKSTYLE:ON
+        this.eventId = eventId;
+        this.fromDate = fromDate;
+        this.toDate = toDate;
+        this.fromPrecision = fromPrecision;
+        this.toPrecision = toPrecision;
+        this.timelineId = timelineId;
+        this.certainty = certainty;
+        this.eventTypeId = eventTypeId;
+        this.name = name;
+    }
+
+    /**
+     * @return the certainty
+     */
+    public String getCertainty() {
+        return certainty;
+    }
+
+    /**
+     * @return the eventId
+     */
+    public int getEventId() {
+        return eventId;
+    }
+
+    /**
+     * @return the eventTypeId
+     */
+    public int getEventTypeId() {
+        return eventTypeId;
+    }
+
+    /**
+     * @return the fromDate
+     */
+    public Long getFromDate() {
+        return fromDate;
+    }
+
+    /**
+     * @return the fromPrecision
+     */
+    public String getFromPrecision() {
+        return fromPrecision;
+    }
+
+    /**
+     * returns the name/description of the event
+     * 
+     * @return the description of the event
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @return the timelineId
+     */
+    public int getTimelineId() {
+        return timelineId;
+    }
+
+    /**
+     * @return the toDate
+     */
+    public Long getToDate() {
+        return toDate;
+    }
+
+    /**
+     * @return the toPrecision
+     */
+    public String getToPrecision() {
+        return toPrecision;
+    }
+
+    /**
+     * @param certainty
+     *            the certainty to set
+     */
+    public void setCertainty(final String certainty) {
+        this.certainty = certainty;
+    }
+
+    /**
+     * @param eventId
+     *            the eventId to set
+     */
+    public void setEventId(final int eventId) {
+        this.eventId = eventId;
+    }
+
+    /**
+     * @param eventTypeId
+     *            the eventTypeId to set
+     */
+    public void setEventTypeId(final int eventTypeId) {
+        this.eventTypeId = eventTypeId;
+    }
+
+    /**
+     * @param fromDate
+     *            the fromDate to set
+     */
+    public void setFromDate(final Long fromDate) {
+        this.fromDate = fromDate;
+    }
+
+    /**
+     * @param fromPrecision
+     *            the fromPrecision to set
+     */
+    public void setFromPrecision(final String fromPrecision) {
+        this.fromPrecision = fromPrecision;
+    }
+
+    /**
+     * @param name
+     *            the name to set
+     */
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    /**
+     * @param timelineId
+     *            the timelineId to set
+     */
+    public void setTimelineId(final int timelineId) {
+        this.timelineId = timelineId;
+    }
+
+    /**
+     * @param toDate
+     *            the toDate to set
+     */
+    public void setToDate(final Long toDate) {
+        this.toDate = toDate;
+    }
+
+    /**
+     * @param toPrecision
+     *            the toPrecision to set
+     */
+    public void setToPrecision(final String toPrecision) {
+        this.toPrecision = toPrecision;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetAvailableBibleVersionsResult.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetAvailableBibleVersionsResult.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetAvailableBibleVersionsResult.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,38 @@
+package com.tyndalehouse.step.web.shared.result;
+
+import java.util.List;
+
+import net.customware.gwt.dispatch.shared.Result;
+
+import com.tyndalehouse.step.web.shared.result.beans.BibleVersion;
+
+/**
+ * This is in response to a @see
+ * {@link com.tyndalehouse.step.web.share.command.GetAvailableBibleVersionsCommand}
+ * In essence, this contains a sorted map of books to be displayed on the UI.
+ * The intials are the key into JSword and should be used at all times when sent
+ * back to the server.
+ * 
+ * @author cjburrell
+ * 
+ */
+public class GetAvailableBibleVersionsResult implements Result {
+    private static final long serialVersionUID = 1441380470741483969L;
+
+    List<BibleVersion> bibleVersions;
+
+    /**
+     * @return the bibleVersions
+     */
+    public List<BibleVersion> getBibleVersions() {
+        return bibleVersions;
+    }
+
+    /**
+     * @param bibleVersions
+     *            the bibleVersions to set
+     */
+    public void setBibleVersions(final List<BibleVersion> bibleVersions) {
+        this.bibleVersions = bibleVersions;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetBibleBooksCommandResult.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetBibleBooksCommandResult.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetBibleBooksCommandResult.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,53 @@
+package com.tyndalehouse.step.web.shared.result;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import net.customware.gwt.dispatch.shared.Result;
+
+/**
+ * Result from the GetBibleBooksCommand which contains the list of books
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class GetBibleBooksCommandResult implements Result {
+
+    /**
+	 * 
+	 */
+    private static final long serialVersionUID = -26170538247007172L;
+
+    /**
+     * the list of books
+     */
+    private List<String> books;
+
+    /**
+     * the list of bible books provided to the constructor
+     * 
+     * @param books
+     *            the list of books
+     */
+    public GetBibleBooksCommandResult(final List<String> books) {
+        this.books = books;
+    }
+
+    /**
+     * this constructor is used for reflection and must be present
+     */
+    @SuppressWarnings("unused")
+    private GetBibleBooksCommandResult() {
+
+    }
+
+    /**
+     * returns a list of books
+     * 
+     * @return the list of books
+     */
+    public Collection<String> getBooks() {
+        return Collections.unmodifiableList(books);
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetCurrentBibleTextResult.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetCurrentBibleTextResult.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetCurrentBibleTextResult.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,86 @@
+package com.tyndalehouse.step.web.shared.result;
+
+import net.customware.gwt.dispatch.shared.Result;
+
+import com.tyndalehouse.step.web.shared.scripture.Passage;
+
+/**
+ * Result from a command, representing a biblical text
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class GetCurrentBibleTextResult implements Result {
+
+    /**
+	 * 
+	 */
+    private static final long serialVersionUID = -5781394877510591218L;
+
+    /**
+     * the passage in logical form
+     */
+    private Passage passage;
+
+    /**
+     * the passage text
+     */
+    private String passageText;
+
+    /**
+     * The xslted text
+     */
+    private String xsltedText;
+
+    /**
+     * returns the logical form passage
+     * 
+     * @return the logical form of the passage
+     */
+    public Passage getPassage() {
+        return passage;
+    }
+
+    /**
+     * returns the passage text
+     * 
+     * @return the passage text
+     */
+    public String getPassageText() {
+        return passageText;
+    }
+
+    /**
+     * @return the xsltedText
+     */
+    public String getXsltedText() {
+        return xsltedText;
+    }
+
+    /**
+     * sets the logical form of the passage
+     * 
+     * @param p
+     *            passage
+     */
+    public void setPassage(final Passage p) {
+        this.passage = p;
+    }
+
+    /**
+     * @param passageText
+     *            the passageText to set
+     */
+    public void setPassageText(final String passageText) {
+        this.passageText = passageText;
+    }
+
+    /**
+     * @param xsltedText
+     *            the xsltedText to set
+     */
+    public void setXsltedText(final String xsltedText) {
+        this.xsltedText = xsltedText;
+    }
+
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetDictionaryDefinitionResult.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetDictionaryDefinitionResult.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetDictionaryDefinitionResult.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,55 @@
+package com.tyndalehouse.step.web.shared.result;
+
+import net.customware.gwt.dispatch.shared.Result;
+
+/**
+ * The dictionary definition that was looked up from the
+ * GetDictionaryDefinitionCommand
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class GetDictionaryDefinitionResult implements Result {
+
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = 3121326970467885008L;
+
+    /**
+     * the xslted definition of the definition that was looked up
+     */
+    private String xsltedDefinition;
+
+    /**
+     * Default constructor
+     */
+    public GetDictionaryDefinitionResult() {
+
+    }
+
+    /**
+     * @return the xsltedDefinition
+     */
+    public String getXsltedDefinition() {
+        return xsltedDefinition;
+    }
+
+    /**
+     * sets the definition
+     * 
+     * @param xsltedDefinition
+     *            the definition to be set
+     */
+    public void setDefinition(final String xsltedDefinition) {
+        this.xsltedDefinition = xsltedDefinition;
+    }
+
+    /**
+     * @param xsltedDefinition
+     *            the xsltedDefinition to set
+     */
+    public void setXsltedDefinition(final String xsltedDefinition) {
+        this.xsltedDefinition = xsltedDefinition;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetEventsForDateRangeResult.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetEventsForDateRangeResult.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetEventsForDateRangeResult.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,58 @@
+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.common.timeline.TimelineEventBean;
+
+/**
+ * Result containing all events requested within a particular date range.
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class GetEventsForDateRangeResult implements Result {
+
+    /**
+     * default serial id
+     */
+    private static final long serialVersionUID = 7118668612721569823L;
+
+    /** list of events */
+    private List<TimelineEventBean> events = new ArrayList<TimelineEventBean>();
+
+    /**
+     * public constructor
+     */
+    public GetEventsForDateRangeResult() {
+
+    }
+
+    /**
+     * Adds a new Event in Tim to the response
+     * 
+     * @param teb
+     *            the event to add to the response
+     */
+    public void add(final TimelineEventBean teb) {
+        getEvents().add(teb);
+
+    }
+
+    /**
+     * @return a list of events within a specified date range
+     */
+    public List<TimelineEventBean> getEvents() {
+        return events;
+    }
+
+    /**
+     * @param events
+     *            the events to set
+     */
+    public void setEvents(final List<TimelineEventBean> events) {
+        this.events = events;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetLocationsResult.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetLocationsResult.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetLocationsResult.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,51 @@
+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.common.maps.GeoLocation;
+
+/**
+ * This object contains the result from a geographical location, containing
+ * enough data to display a marker on the screen, and a hover over.
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class GetLocationsResult implements Result {
+
+    /**
+     * serial id for serialisation
+     */
+    private static final long serialVersionUID = 1516648078862839012L;
+
+    /**
+     * list of locations
+     */
+    private List<GeoLocation> locations;
+
+    /**
+     * default constructor
+     */
+    public GetLocationsResult() {
+        locations = new ArrayList<GeoLocation>();
+    }
+
+    /**
+     * @return the locations
+     */
+    public final List<GeoLocation> getLocations() {
+        return locations;
+    }
+
+    /**
+     * @param locations
+     *            the locations to set
+     */
+    public final void setLocations(final List<GeoLocation> locations) {
+        this.locations = locations;
+    }
+
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetTimelineOriginForScriptureResult.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetTimelineOriginForScriptureResult.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetTimelineOriginForScriptureResult.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,139 @@
+package com.tyndalehouse.step.web.shared.result;
+
+import net.customware.gwt.dispatch.shared.Result;
+
+import com.tyndalehouse.step.web.shared.timeline.Unit;
+
+/**
+ * Result from querying the server for the best event to use as the origin of
+ * the timeline. This event is the one that best suits the verse range provided
+ * by the user
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class GetTimelineOriginForScriptureResult implements Result {
+    /**
+     * generated serial version id
+     */
+    private static final long serialVersionUID = 4256230588330550554L;
+
+    /**
+     * whether no data was returned, because no events matched the biblical
+     * reference
+     */
+    private boolean isEmpty;
+
+    /**
+     * the date of the recommended
+     */
+    private Long originDate;
+
+    /**
+     * the suggested timescale the UI should use
+     */
+    private Unit suggestedTimeScale;
+
+    /**
+     * the timeband id on which this date should be used
+     */
+    private int timebandId;
+
+    /**
+     * public constructor for this result object
+     * 
+     * @param isEmpty
+     *            true if no data was found
+     */
+    public GetTimelineOriginForScriptureResult(final boolean isEmpty) {
+        this.isEmpty = isEmpty;
+    }
+
+    /**
+     * another constructor to provide the correct origin information, including
+     * 
+     * @param originDate
+     *            the date at which the timeline should be positioned
+     * @param unit
+     *            the unit that should be used for this timeband
+     * @param timebandId
+     *            the timeband id
+     */
+    public GetTimelineOriginForScriptureResult(final Long originDate, final Unit unit, final int timebandId) {
+        this.originDate = originDate;
+        this.suggestedTimeScale = unit;
+        this.timebandId = timebandId;
+        isEmpty = false;
+    }
+
+    /**
+     * private constructor, used by GWT serialisation
+     */
+    @SuppressWarnings("unused")
+    private GetTimelineOriginForScriptureResult() {
+
+    }
+
+    /**
+     * @return the originDate
+     */
+    public Long getOriginDate() {
+        return originDate;
+    }
+
+    /**
+     * @return the suggestedTimeScale
+     */
+    public Unit getSuggestedTimeScale() {
+        return suggestedTimeScale;
+    }
+
+    /**
+     * gets the timeband id
+     * 
+     * @return timebandId
+     */
+    public int getTimebandId() {
+        return timebandId;
+    }
+
+    /**
+     * @return the isEmpty
+     */
+    public boolean isEmpty() {
+        return isEmpty;
+    }
+
+    /**
+     * @param isEmpty
+     *            the isEmpty to set
+     */
+    public void setEmpty(final boolean isEmpty) {
+        this.isEmpty = isEmpty;
+    }
+
+    /**
+     * @param originDate
+     *            the originDate to set
+     */
+    public void setOriginDate(final Long originDate) {
+        this.originDate = originDate;
+    }
+
+    /**
+     * @param unit
+     *            the suggestedTimeScale to set
+     */
+    public void setSuggestedTimeScale(final Unit unit) {
+        this.suggestedTimeScale = unit;
+    }
+
+    /**
+     * @param timebandId
+     *            the timebandId to set
+     */
+    public void setTimebandId(final int timebandId) {
+        this.timebandId = timebandId;
+    }
+
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetTimelineUISetupResult.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetTimelineUISetupResult.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/GetTimelineUISetupResult.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,54 @@
+package com.tyndalehouse.step.web.shared.result;
+
+import java.util.List;
+
+import net.customware.gwt.dispatch.shared.Result;
+
+import com.tyndalehouse.step.web.shared.common.timeline.TimelineBean;
+
+/**
+ * Response from a @see
+ * {@link com.tyndalehouse.step.web.shared.command.GetTimelineUISetupCommand}
+ * This contains details on how to set up each timeband, their units, etc.
+ * 
+ * @author cjburrell
+ * 
+ */
+public class GetTimelineUISetupResult implements Result {
+
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = -566447989637280143L;
+
+    /**
+     * A list of timebands
+     */
+    private List<TimelineBean> tlb;
+
+    /**
+     * Default constructor made public
+     */
+    public GetTimelineUISetupResult() {
+
+    }
+
+    /**
+     * returns a list of timebands
+     * 
+     * @return a list of timeband beans
+     */
+    public List<TimelineBean> getTimelines() {
+        return tlb;
+    }
+
+    /**
+     * sets the list. made available for reflection
+     * 
+     * @param tlb
+     *            the list of timeline beans
+     */
+    public void setTimelines(final List<TimelineBean> tlb) {
+        this.tlb = tlb;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/InstallJswordModuleResult.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/InstallJswordModuleResult.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/InstallJswordModuleResult.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,56 @@
+package com.tyndalehouse.step.web.shared.result;
+
+import net.customware.gwt.dispatch.shared.Result;
+
+/**
+ * Response from a @see
+ * {@link com.tyndalehouse.step.web.shared.command.InstallJswordModuleCommand}
+ * indicating whether the installation was succesful
+ * 
+ * @author cjburrell
+ * 
+ */
+public class InstallJswordModuleResult implements Result {
+    /**
+     * generated serial id
+     */
+    private static final long serialVersionUID = -5063510082176727310L;
+
+    /**
+     * true if installation was successful
+     */
+    private boolean successful;
+
+    /**
+     * Default constructor made public
+     */
+    public InstallJswordModuleResult() {
+
+    }
+
+    /**
+     * Constructor with the success flag passed in
+     * 
+     * @param successful
+     *            true to indicate success
+     */
+    public InstallJswordModuleResult(final boolean successful) {
+        this.successful = successful;
+
+    }
+
+    /**
+     * @return the successful
+     */
+    public boolean isSuccessful() {
+        return successful;
+    }
+
+    /**
+     * @param successful
+     *            the successful to set
+     */
+    public void setSuccessful(final boolean successful) {
+        this.successful = successful;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/beans/BibleVersion.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/beans/BibleVersion.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/result/beans/BibleVersion.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,63 @@
+package com.tyndalehouse.step.web.shared.result.beans;
+
+import java.io.Serializable;
+
+/**
+ * Contains information about a bible version to be displayed on the screen in
+ * the UI
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class BibleVersion implements Serializable {
+    private static final long serialVersionUID = 6598606392490334637L;
+    private String initials;
+    private String name;
+    private String language;
+
+    /**
+     * @return the initials
+     */
+    public String getInitials() {
+        return initials;
+    }
+
+    /**
+     * @param initials
+     *            the initials to set
+     */
+    public void setInitials(final String initials) {
+        this.initials = initials;
+    }
+
+    /**
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     *            the name to set
+     */
+    public void setName(final String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return the language
+     */
+    public String getLanguage() {
+        return language;
+    }
+
+    /**
+     * @param language
+     *            the language to set
+     */
+    public void setLanguage(final String language) {
+        this.language = language;
+    }
+
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Milestone.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Milestone.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Milestone.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,63 @@
+package com.tyndalehouse.step.web.shared.scripture;
+
+import java.io.Serializable;
+
+/**
+ * A marker in the OSIS xml to indicate a break in the normal flow of text.
+ * Usually editors layouts, I believe.
+ * 
+ * @author cjburrell
+ * 
+ */
+public class Milestone extends Text implements TextualElement, Serializable {
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = 6444472622836494795L;
+
+    /**
+     * optional marker
+     */
+    private String marker;
+
+    /**
+     * Type of milestone, see OSIS details for clarifications
+     */
+    private String type;
+
+    /**
+     * Default constructor made public
+     */
+    public Milestone() {
+    }
+
+    /**
+     * @return the marker
+     */
+    public String getMarker() {
+        return marker;
+    }
+
+    /**
+     * @return the type
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * @param marker
+     *            the marker to set
+     */
+    public void setMarker(final String marker) {
+        this.marker = marker;
+    }
+
+    /**
+     * @param type
+     *            the type to set
+     */
+    public void setType(final String type) {
+        this.type = type;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Note.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Note.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Note.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,43 @@
+package com.tyndalehouse.step.web.shared.scripture;
+
+import java.io.Serializable;
+
+/**
+ * A logical representation of some OSIS xml. This bean is serialised and passed
+ * over the wire
+ * 
+ * @author cjburrell
+ * 
+ */
+public class Note extends Text implements TextualElement, Serializable {
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = 4592986819523938392L;
+
+    /**
+     * The type of note
+     */
+    private String type;
+
+    /**
+     * Default constructor made public
+     */
+    public Note() {
+    }
+
+    /**
+     * @return the type
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * @param type
+     *            the type to set
+     */
+    public void setType(final String type) {
+        this.type = type;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/OSISConstants.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/OSISConstants.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/OSISConstants.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,43 @@
+package com.tyndalehouse.step.web.shared.scripture;
+
+/**
+ * Some constants not defined in JSword
+ * 
+ * @author cjburrell
+ * 
+ */
+public final class OSISConstants {
+    /**
+     * A marker in the text, for formatting purposes: TODO: check this and the
+     * other two with online people
+     */
+    public static final String MARKER = "marker";
+
+    /**
+     * A milestone, between two portions of scripture
+     */
+    public static final String MILESTONE = "milestone";
+
+    /**
+     * A decision by the translator to make a change?
+     */
+    public static final String TRANS_CHANGE = "transChange";
+
+    // public static final String LEMMA = "lemma";
+    // public static final String MORPH = "morph";
+    // public static final Object NOTE = "note";
+    // public static final String OSISID = "osisID";
+    // public static final String TITLE = "title";
+
+    // public static final String TYPE = "type";
+    // public static final String VERSE = "verse";
+    // public static final String WORD = "w";
+
+    /**
+     * Making the constructor private
+     */
+    private OSISConstants() {
+
+    }
+
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Passage.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Passage.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Passage.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,76 @@
+package com.tyndalehouse.step.web.shared.scripture;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Logical form of a passage
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class Passage implements TextualElement, Serializable {
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = -3926440372519158967L;
+
+    /**
+     * List of verses/title throughout the passage
+     */
+    private List<VerseContent> verseContent;
+
+    /**
+     * making the constructor public and initialising list
+     */
+    public Passage() {
+        verseContent = new ArrayList<VerseContent>();
+    }
+
+    /**
+     * Adding a passage element, such as a {@link Verse} or a {@link Title}
+     * 
+     * @param vc
+     *            a verse or a title
+     */
+    public void addPassageElement(final VerseContent vc) {
+        verseContent.add(vc);
+    }
+
+    /**
+     * returns the text representation of a passage. This is NOT performance
+     * optimized and therefore should not be used more than once.
+     * Non-optimization is due to the fact that we won't to reduce traffic over
+     * the wire
+     * 
+     *TODO: this could be further optimized by not relying on strings in
+     * versecontent being returned as strings
+     * 
+     * @return the passage in a string form.
+     */
+    public String getText() {
+        final StringBuffer text = new StringBuffer(1024);
+        for (final VerseContent vc : verseContent) {
+            if (!(vc instanceof Title)) {
+                text.append(vc.getText());
+            }
+        }
+        return text.toString();
+    }
+
+    /**
+     * @return the verseContent list of a combination of verses and titles
+     */
+    public List<VerseContent> getVerseContent() {
+        return verseContent;
+    }
+
+    /**
+     * @param verseContent
+     *            the verseContent to set
+     */
+    public void setVerseContent(final List<VerseContent> verseContent) {
+        this.verseContent = verseContent;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Text.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Text.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Text.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,53 @@
+package com.tyndalehouse.step.web.shared.scripture;
+
+import java.io.Serializable;
+
+/**
+ * The Text class, a wrapper for String
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class Text implements TextualElement, Serializable {
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = -7068301858306124428L;
+
+    /**
+     * the string representing the portion of scripture for each OSIS element
+     */
+    private String text;
+
+    /**
+     * A simple text, default constructor made public
+     */
+    public Text() {
+    }
+
+    /**
+     * Initialising a text with a String
+     * 
+     * @param text
+     *            text is the string representation of the #text element
+     */
+    public Text(final String text) {
+        this.text = text;
+    }
+
+    /**
+     * @return the text
+     */
+    public String getText() {
+        return text;
+    }
+
+    /**
+     * @param text
+     *            the text to set
+     */
+    public void setText(final String text) {
+        this.text = text;
+    }
+
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/TextualElement.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/TextualElement.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/TextualElement.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,18 @@
+package com.tyndalehouse.step.web.shared.scripture;
+
+/**
+ * Interface being applied to anything that can contains text (directly or
+ * indirectly)
+ * 
+ * @author CJBurrell
+ * 
+ */
+public interface TextualElement {
+
+    /**
+     * returns the text
+     * 
+     * @return text to be returned
+     */
+    String getText();
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Title.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Title.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Title.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,44 @@
+package com.tyndalehouse.step.web.shared.scripture;
+
+/**
+ * Title element in the OSIS as a POJO
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class Title extends Text implements VerseContent {
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = -4362500737203594954L;
+
+    /**
+     * Type of title as defined in OSIS spec
+     */
+    private String type;
+
+    /**
+     * Making default constructor public
+     */
+    public Title() {
+    }
+
+    /**
+     * @return the type
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * type of title
+     * 
+     * @param type
+     *            title
+     */
+    public void setType(final String type) {
+        this.type = type;
+
+    }
+
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/TransChange.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/TransChange.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/TransChange.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,42 @@
+package com.tyndalehouse.step.web.shared.scripture;
+
+import java.io.Serializable;
+
+/**
+ * TODO: check OSIS details and update documentation
+ * 
+ * @author cjburrell
+ * 
+ */
+public class TransChange extends Text implements TextualElement, Serializable {
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = 4557607388014222750L;
+
+    /**
+     * Type of trans change
+     */
+    private String type;
+
+    /**
+     * Default constructor made public
+     */
+    public TransChange() {
+    }
+
+    /**
+     * @return the type
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * @param type
+     *            the type to set
+     */
+    public void setType(final String type) {
+        this.type = type;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Verse.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Verse.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Verse.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,95 @@
+package com.tyndalehouse.step.web.shared.scripture;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Logical representation of a verse from the OSIS
+ * 
+ * @author CJBurrell
+ * 
+ */
+public class Verse implements VerseContent, Serializable {
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = -7000973434382091156L;
+
+    /**
+     * the OSIS key, for e.g. gen 1:1
+     */
+    private String osisID;
+
+    /**
+     * list of textual elements that are contained in this verse
+     */
+    private List<TextualElement> verseContent;
+
+    /**
+     * public constructor to create a logical form of a verse
+     */
+    public Verse() {
+        verseContent = new ArrayList<TextualElement>();
+    }
+
+    /**
+     * adds a textual element to the verse
+     * 
+     * @param te
+     *            textual element
+     */
+    public void addTextualElement(final TextualElement te) {
+        this.verseContent.add(te);
+    }
+
+    /**
+     * @return the osisID
+     */
+    public String getOsisID() {
+        return osisID;
+    }
+
+    /**
+     * This method is not optimized for performance. It iterates through the
+     * list each time it is required. The reason it is not optimized, is that it
+     * should not be used except to display the text once.
+     * 
+     * Not storing the result of the concatenation enables us to have shorted
+     * messages going across the wire
+     * 
+     * @return the concatenated text
+     */
+    public String getText() {
+        final StringBuilder sb = new StringBuilder(128);
+        for (final TextualElement te : verseContent) {
+            if (!(te instanceof Note)) {
+                sb.append(te.getText());
+            }
+        }
+        return sb.toString();
+    }
+
+    /**
+     * @return the text
+     */
+    public List<TextualElement> getVerseContent() {
+        return verseContent;
+    }
+
+    /**
+     * @param osisID
+     *            the osisID to set
+     */
+    public void setOsisID(final String osisID) {
+        this.osisID = osisID;
+    }
+
+    /**
+     * @param text
+     *            the text to set
+     */
+    public void setVerseContent(final List<TextualElement> text) {
+        this.verseContent = text;
+    }
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/VerseContent.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/VerseContent.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/VerseContent.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,12 @@
+package com.tyndalehouse.step.web.shared.scripture;
+
+/**
+ * This interfaces marks a verse or a title which are direct children of a
+ * passage
+ * 
+ * @author CJBurrell
+ * 
+ */
+public interface VerseContent extends TextualElement {
+
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Word.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Word.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/scripture/Word.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,143 @@
+package com.tyndalehouse.step.web.shared.scripture;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A Word is a portion of a verse from the Bible. It can be several words or
+ * just one. In some versions it is associated with a list of lemmas (strong
+ * numbers which link to the Strong Hebrew or Greek Dictionary), as well as a
+ * morphological code (morph) which is a coded form of the morphology of the
+ * word/set of words (i.e. grammar form and usage in the sentence)
+ * 
+ * @author cjburrell
+ * 
+ */
+public class Word extends Text implements TextualElement, Serializable {
+    /**
+     * serial id
+     */
+    private static final long serialVersionUID = -5750252359953024623L;
+
+    /**
+     * An alternative word, such as a different language
+     */
+    private String alternativeWord;
+
+    // TODO: FIX: this is a bug, we can have several lemmas or morphologies for
+    // one translated word
+    /**
+     * a list of lemmas referring to a portion of text
+     */
+    private List<String> lemma;
+
+    /**
+     * A list of morphs referring to a portion of text. A morph is a coded
+     * string indicating the grammar and form of the original word
+     */
+    private List<String> morph;
+
+    /**
+     * default constructor initialises internal lists
+     */
+    public Word() {
+        lemma = new ArrayList<String>();
+        morph = new ArrayList<String>();
+    }
+
+    /**
+     * Adds a new lemma to the Word
+     * 
+     * @param newLemma
+     *            the lemma to set
+     */
+    public void addLemma(final String newLemma) {
+        lemma.add(newLemma);
+    }
+
+    /**
+     * Adds an array of lemmas to the Word
+     * 
+     * @param lemmas
+     *            a list of lemmas
+     */
+    public void addLemmas(final String[] lemmas) {
+        for (final String l : lemmas) {
+            this.lemma.add(l);
+        }
+    }
+
+    /**
+     * Adds an array of morphs to the Word
+     * 
+     * @param morphs
+     *            array of morphs to be associated with the Word (portion of a
+     *            verse)
+     */
+    public void addMorphs(final String[] morphs) {
+        for (final String m : morphs) {
+            this.morph.add(m);
+        }
+
+    }
+
+    /**
+     * @return the alternativeWord
+     */
+    public String getAlternativeWord() {
+        return alternativeWord;
+    }
+
+    /**
+     * @return the lemma
+     */
+    public List<String> getLemma() {
+        return lemma;
+    }
+
+    /**
+     * @return the morph
+     */
+    public List<String> getMorph() {
+        return morph;
+    }
+
+    /**
+     * sets an alternative word (such as a hebrew original word)
+     * 
+     * @param alternativeWord
+     *            a word equivalent, different language. For e.g. Hebrew word
+     * 
+     */
+    public void setAlternativeWord(final String alternativeWord) {
+        this.alternativeWord = alternativeWord;
+    }
+
+    /**
+     * @param lemma
+     *            the lemma to set
+     */
+    public void setLemma(final List<String> lemma) {
+        this.lemma = lemma;
+    }
+
+    /**
+     * @param morph
+     *            the morph to set
+     */
+    public void setMorph(final List<String> morph) {
+        this.morph = morph;
+    }
+
+    /**
+     * Adding a morph to the Word
+     * 
+     * @param newMorph
+     *            the morph to set
+     */
+    public void setMorph(final String newMorph) {
+        morph.add(newMorph);
+    }
+
+}

Added: trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/timeline/Unit.java
===================================================================
--- trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/timeline/Unit.java	                        (rev 0)
+++ trunk/step-web-shared/src/main/java/com/tyndalehouse/step/web/shared/timeline/Unit.java	2010-06-25 20:29:48 UTC (rev 140)
@@ -0,0 +1,103 @@
+package com.tyndalehouse.step.web.shared.timeline;
+
+/**
+ * Unit as used both on the server and on the ui This makes the correspondance
+ * between dates in milliseconds and their actual real dates
+ * 
+ * @author CJBurrell
+ * 
+ */
+public enum Unit {
+    /**
+     * century
+     */
+    CENTURY(10L * 10L * 365L * 24 * 3600 * 1000L, "yyyy G"),
+    /**
+     * day
+     */
+    DAY(24L * 3600L * 1000L, "dd MMM yyyy G"),
+    /**
+     * decade
+     */
+    DECADE(10L * 365L * 24 * 3600 * 1000L, "yyyy G"),
+    /**
+     * hour
+     */
+    HOUR(3600L * 1000L),
+    /**
+     * 1000 years
+     */
+    MILLENIUM(10L * 10L * 10L * 365L * 24 * 3600 * 1000L, "yyyy G"),
+    /**
+     * a minute
+     */
+    MINUTE(60L * 1000L),
+    /**
+     * a month
+     */
+    // CHECKSTYLE:OFF
+    MONTH((365L * 24L * 3600L * 1000L) / 12, "MMM yyyy G"),
+    // CHECKSTYLE:ON
+    /**
+     * a second
+     */
+    SECOND(1000L),
+    /**
+     * a week
+     * 
+     */
+    WEEK(7L * 24L * 3600L * 1000L, "dd MMM yyyy G"),
+    /**
+     * a year
+     */
+    YEAR(365L * 24 * 3600 * 1000L, "yyyy G");
+
+    /**
+     * format to be applied when displaying
+     */
+    private final String format;
+    /**
+     * length of unit in milliseconds
+     */
+    private final long milliseconds;
+
+    /**
+     * constructor to create a unit, with a default format of dd MMM YYYY G
+     * 
+     * @param milliseconds
+     *            length of unit in milliseconds
+     */
+    Unit(final long milliseconds) {
+        this(milliseconds, "dd MMM YYYY G");
+    }
+
+    /**
+     * creates a unit enum
+     * 
+     * @param milliseconds
+     *            length of unit in milliseconds
+     * @param format
+     *            format to be applied if different to default one of dd MMM
+     *            YYYY G
+     */
+    Unit(final long milliseconds, final String format) {
+        this.format = format;
+        this.milliseconds = milliseconds;
+    }
+
+    /**
+     * returns the format to be used for the unit
+     * 
+     * @return the format format
+     */
+    public String getFormat() {
+        return format;
+    }
+
+    /**
+     * @return the value In Milliseconds of the length of the unit
+     */
+    public long getMilliseconds() {
+        return milliseconds;
+    }
+}




More information about the Tynstep-svn mailing list