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

jswordcvs at crosswire.org jswordcvs at crosswire.org
Sun Aug 14 09:06:19 MST 2005


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

Modified Files:
	VerseRange.java 
Log Message:
Added lgpl to xsl and xml files.
Fixed a problem in VerseRange.

Index: VerseRange.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage/VerseRange.java,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** VerseRange.java	13 Aug 2005 14:41:40 -0000	1.46
--- VerseRange.java	14 Aug 2005 16:06:17 -0000	1.47
***************
*** 300,306 ****
--- 300,333 ----
      public String getOsisID()
      {
+         try
+         {    
+             // This range is exactly a whole book
+             if (isWholeBook())
+             {
+                 // Just report the name of the book, we don't need to worry about the
+                 // base since we start at the start of a book, and should have been
+                 // recently normalized()
+                 return BibleInfo.getOSISName(start.getBook());
+             }
+ 
+             // If this range is exactly a whole chapter
+             if (isWholeChapter())
+             {
+                 // Just report the name of the book and the chapter
+                 return BibleInfo.getOSISName(start.getBook()) + Verse.VERSE_OSIS_DELIM + start.getChapter();
+             }
+         }
+         catch (NoSuchVerseException ex)
+         {
+             assert false : ex;
+             return "!Error!"; //$NON-NLS-1$
+         }
+ 
          int startOrdinal = start.getOrdinal();
          int endOrdinal = end.getOrdinal();
  
+         // TODO(DM): could analyze each book and chapter in the range
+         // to see if it is wholly contained in the range and output it if it is.
+ 
          // Estimate the size of the buffer: book.dd.dd (where book is 3-5, 3 typical)
          StringBuffer buf = new StringBuffer((endOrdinal - startOrdinal + 1) * 10);



More information about the jsword-svn mailing list