[jsword-svn] r1974 - trunk/jsword/src/main/java/org/crosswire/jsword/book/sword

dmsmith at crosswire.org dmsmith at crosswire.org
Fri Dec 4 19:52:38 MST 2009


Author: dmsmith
Date: 2009-12-04 19:52:38 -0700 (Fri, 04 Dec 2009)
New Revision: 1974

Modified:
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/AbstractBackend.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/AbstractKeyBackend.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/GenBookBackend.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/RawBackend.java
   trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ZVerseBackend.java
Log:
made setAliasKey and setRawText abstract in base class

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/AbstractBackend.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/AbstractBackend.java	2009-12-04 14:01:28 UTC (rev 1973)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/AbstractBackend.java	2009-12-05 02:52:38 UTC (rev 1974)
@@ -143,8 +143,7 @@
      * @throws IOException
      *             If the module data path could not be created.
      */
-    public void setRawText(Key key, String text) throws BookException, IOException {
-    }
+    public abstract void setRawText(Key key, String text) throws BookException, IOException;
 
     /**
      * Sets alias for a comment on a verse range
@@ -153,8 +152,7 @@
      * @param source Source Key
      * @throws IOException Exception when anything goes wrong on writing the alias
      */
-    public void setAliasKey(Key alias, Key source) throws IOException {
-    }
+    public abstract void setAliasKey(Key alias, Key source) throws IOException;
 
     /**
      * Create the directory to hold the Book if it does not exist.

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/AbstractKeyBackend.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/AbstractKeyBackend.java	2009-12-04 14:01:28 UTC (rev 1973)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/AbstractKeyBackend.java	2009-12-05 02:52:38 UTC (rev 1974)
@@ -21,9 +21,11 @@
  */
 package org.crosswire.jsword.book.sword;
 
+import java.io.IOException;
 import java.util.Iterator;
 import java.util.NoSuchElementException;
 
+import org.crosswire.jsword.book.BookException;
 import org.crosswire.jsword.passage.Key;
 import org.crosswire.jsword.passage.RestrictionType;
 
@@ -157,6 +159,20 @@
         throw new UnsupportedOperationException();
     }
 
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.book.sword.AbstractBackend#setAliasKey(org.crosswire.jsword.passage.Key, org.crosswire.jsword.passage.Key)
+     */
+    public void setAliasKey(Key alias, Key source) throws IOException {
+        throw new UnsupportedOperationException();
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.book.sword.AbstractBackend#setRawText(org.crosswire.jsword.passage.Key, java.lang.String)
+     */
+    public void setRawText(Key key, String text) throws BookException, IOException {
+        throw new UnsupportedOperationException();
+    }
+
     /*
      * (non-Javadoc)
      * 

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/GenBookBackend.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/GenBookBackend.java	2009-12-04 14:01:28 UTC (rev 1973)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/GenBookBackend.java	2009-12-05 02:52:38 UTC (rev 1974)
@@ -244,6 +244,20 @@
         return reply;
     }
 
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.book.sword.AbstractBackend#setAliasKey(org.crosswire.jsword.passage.Key, org.crosswire.jsword.passage.Key)
+     */
+    public void setAliasKey(Key alias, Key source) throws IOException {
+        throw new UnsupportedOperationException();
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.book.sword.AbstractBackend#setRawText(org.crosswire.jsword.passage.Key, java.lang.String)
+     */
+    public void setRawText(Key key, String text) throws BookException, IOException {
+        throw new UnsupportedOperationException();
+    }
+
     /**
      * A helper function to recursively read the entire tree.
      * 

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/RawBackend.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/RawBackend.java	2009-12-04 14:01:28 UTC (rev 1973)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/RawBackend.java	2009-12-05 02:52:38 UTC (rev 1974)
@@ -161,13 +161,11 @@
         return idxFile[SwordConstants.TESTAMENT_OLD].canRead() || idxFile[SwordConstants.TESTAMENT_NEW].canRead();
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.crosswire.jsword.book.sword.AbstractBackend#create()
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.book.sword.AbstractBackend#setAliasKey(org.crosswire.jsword.passage.Key, org.crosswire.jsword.passage.Key)
      */
-    public void create() throws IOException, BookException {
-        super.create();
+    public void setAliasKey(Key alias, Key source) throws IOException {
+        throw new UnsupportedOperationException();
     }
 
     /*

Modified: trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ZVerseBackend.java
===================================================================
--- trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ZVerseBackend.java	2009-12-04 14:01:28 UTC (rev 1973)
+++ trunk/jsword/src/main/java/org/crosswire/jsword/book/sword/ZVerseBackend.java	2009-12-05 02:52:38 UTC (rev 1974)
@@ -364,6 +364,20 @@
         }
     }
 
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.book.sword.AbstractBackend#setAliasKey(org.crosswire.jsword.passage.Key, org.crosswire.jsword.passage.Key)
+     */
+    public void setAliasKey(Key alias, Key source) throws IOException {
+        throw new UnsupportedOperationException();
+    }
+
+    /* (non-Javadoc)
+     * @see org.crosswire.jsword.book.sword.AbstractBackend#setRawText(org.crosswire.jsword.passage.Key, java.lang.String)
+     */
+    public void setRawText(Key key, String text) throws BookException, IOException {
+        throw new UnsupportedOperationException();
+    }
+
     /**
      * Helper method so we can quickly activate ourselves on access
      */




More information about the jsword-svn mailing list