[jsword-svn] jsword/java/jsword/org/crosswire/jsword/passage s

jswordcvs at crosswire.org jswordcvs at crosswire.org
Fri Aug 12 14:00:29 MST 2005


Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage
In directory www.crosswire.org:/tmp/cvs-serv772/java/jsword/org/crosswire/jsword/passage

Modified Files:
	KeyFactory.java PassageKeyFactory.java 
Log Message:
Added getValidKey to KeyFactory

Index: KeyFactory.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage/KeyFactory.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** KeyFactory.java	27 Jul 2005 23:25:45 -0000	1.8
--- KeyFactory.java	12 Aug 2005 21:00:27 -0000	1.9
***************
*** 42,45 ****
--- 42,53 ----
  
      /**
+      * Get a Key for the name, if possible. Otherwise return an empty Key.
+      * 
+      * @param name
+      * @return a valid key.
+      */
+     Key getValidKey(String name);
+     
+     /**
       * Someone has typed in a reference to find, but we need a Key to actually
       * look it up.

Index: PassageKeyFactory.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage/PassageKeyFactory.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** PassageKeyFactory.java	27 Jul 2005 23:25:45 -0000	1.12
--- PassageKeyFactory.java	12 Aug 2005 21:00:27 -0000	1.13
***************
*** 82,85 ****
--- 82,100 ----
  
      /* (non-Javadoc)
+      * @see org.crosswire.jsword.passage.KeyFactory#isValidKey(java.lang.String)
+      */
+     public Key getValidKey(String name)
+     {
+         try
+         {
+             return getKey(name);
+         }
+         catch (Exception e)
+         {
+             return createEmptyKeyList();
+         }
+     }
+ 
+     /* (non-Javadoc)
       * @see org.crosswire.jsword.passage.KeyFactory#createKey(java.lang.String)
       */



More information about the jsword-svn mailing list