[jsword-svn] jsword/java/jsword/org/crosswire/jsword/passage s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Thu Aug 11 04:28:05 MST 2005
Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage
In directory www.crosswire.org:/tmp/cvs-serv14264/java/jsword/org/crosswire/jsword/passage
Modified Files:
VerseRangeFactory.java AccuracyType.java VerseFactory.java
BibleInfo.java OSISNames.properties BibleInfo.properties
Log Message:
Some corrections and additions to Bible book names.
Added java calls to simple.xsl
Index: VerseRangeFactory.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage/VerseRangeFactory.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** VerseRangeFactory.java 27 Jul 2005 23:25:45 -0000 1.8
--- VerseRangeFactory.java 11 Aug 2005 11:28:03 -0000 1.9
***************
*** 89,97 ****
{
String[] startParts = AccuracyType.tokenize(startVerseDesc);
! AccuracyType accuracyStart = AccuracyType.fromText(startParts, basis);
Verse start = accuracyStart.createStartVerse(startVerseDesc, basis, startParts);
! String[] endParts = AccuracyType.tokenize(endVerseDesc);
! AccuracyType accuracyEnd = AccuracyType.fromText(endParts, accuracyStart, basis);
Verse end = accuracyEnd.createEndVerse(endVerseDesc, start, endParts);
--- 89,106 ----
{
String[] startParts = AccuracyType.tokenize(startVerseDesc);
! AccuracyType accuracyStart = AccuracyType.fromText(original, startParts, basis);
Verse start = accuracyStart.createStartVerse(startVerseDesc, basis, startParts);
! String[] endParts;
! if (startVerseDesc.equals(endVerseDesc))
! {
! endParts = startParts;
! }
! else
! {
! endParts = AccuracyType.tokenize(endVerseDesc);
! }
!
! AccuracyType accuracyEnd = AccuracyType.fromText(original, endParts, accuracyStart, basis);
Verse end = accuracyEnd.createEndVerse(endVerseDesc, start, endParts);
Index: OSISNames.properties
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage/OSISNames.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** OSISNames.properties 14 Jun 2004 05:27:21 -0000 1.1
--- OSISNames.properties 11 Aug 2005 11:28:03 -0000 1.2
***************
*** 19,23 ****
BibleInfo.OSIS.17=Esth
BibleInfo.OSIS.18=Job
! BibleInfo.OSIS.19=Pss
BibleInfo.OSIS.20=Prov
BibleInfo.OSIS.21=Eccl
--- 19,23 ----
BibleInfo.OSIS.17=Esth
BibleInfo.OSIS.18=Job
! BibleInfo.OSIS.19=Ps
BibleInfo.OSIS.20=Prov
BibleInfo.OSIS.21=Eccl
Index: BibleInfo.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage/BibleInfo.java,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** BibleInfo.java 10 Aug 2005 20:33:01 -0000 1.36
--- BibleInfo.java 11 Aug 2005 11:28:03 -0000 1.37
***************
*** 582,586 ****
// Check the verse
! if (verse < 1 || verse > versesInChapter(book, chapter))
{
Object[] params = new Object[]
--- 582,586 ----
// Check the verse
! if (validate && (verse < 1 || verse > versesInChapter(book, chapter)))
{
Object[] params = new Object[]
***************
*** 596,599 ****
--- 596,615 ----
/**
+ * @return Returns the validate.
+ */
+ public static boolean isValidate()
+ {
+ return validate;
+ }
+
+ /**
+ * @param validate The validate to set.
+ */
+ public static void setValidate(boolean validate)
+ {
+ BibleInfo.validate = validate;
+ }
+
+ /**
* Does the following represent a real verse?
* @param ref An array of 3 ints, book, chapter, verse
***************
*** 946,949 ****
--- 962,970 ----
/**
+ * Whether validate should throw an exception.
+ */
+ private static boolean validate = true;
+
+ /**
* Handy section finder. There is a bit of moderately bad programming
* here because org.crosswire.jsword.control.map.sw*ng.GroupVerseColor
Index: VerseFactory.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage/VerseFactory.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** VerseFactory.java 27 Jul 2005 23:25:45 -0000 1.5
--- VerseFactory.java 11 Aug 2005 11:28:03 -0000 1.6
***************
*** 55,59 ****
}
String[] parts = AccuracyType.tokenize(original);
! AccuracyType accuracy = AccuracyType.fromText(parts);
assert accuracy != null;
return accuracy.createStartVerse(original, null, parts);
--- 55,59 ----
}
String[] parts = AccuracyType.tokenize(original);
! AccuracyType accuracy = AccuracyType.fromText(original, parts);
assert accuracy != null;
return accuracy.createStartVerse(original, null, parts);
***************
*** 75,79 ****
}
String[] parts = AccuracyType.tokenize(original);
! AccuracyType accuracy = AccuracyType.fromText(parts, null, verseRangeBasis);
assert accuracy != null;
return accuracy.createStartVerse(original, verseRangeBasis, parts);
--- 75,79 ----
}
String[] parts = AccuracyType.tokenize(original);
! AccuracyType accuracy = AccuracyType.fromText(original, parts, null, verseRangeBasis);
assert accuracy != null;
return accuracy.createStartVerse(original, verseRangeBasis, parts);
Index: AccuracyType.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage/AccuracyType.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** AccuracyType.java 10 Aug 2005 20:33:01 -0000 1.14
--- AccuracyType.java 11 Aug 2005 11:28:03 -0000 1.15
***************
*** 428,441 ****
/**
* Determine how closely the string defines a verse.
* @param parts is a reference split into parts
* @return what is the kind of accuracy of the string reference.
* @throws NoSuchVerseException
*/
! public static AccuracyType fromText(String[] parts) throws NoSuchVerseException
{
! return fromText(parts, null, null);
}
/**
* @param parts
* @param verseAccuracy
--- 428,443 ----
/**
* Determine how closely the string defines a verse.
+ * @param original
* @param parts is a reference split into parts
* @return what is the kind of accuracy of the string reference.
* @throws NoSuchVerseException
*/
! public static AccuracyType fromText(String original, String[] parts) throws NoSuchVerseException
{
! return fromText(original, parts, null, null);
}
/**
+ * @param original
* @param parts
* @param verseAccuracy
***************
*** 443,452 ****
* @throws NoSuchVerseException
*/
! public static AccuracyType fromText(String[] parts, AccuracyType verseAccuracy) throws NoSuchVerseException
{
! return fromText(parts, verseAccuracy, null);
}
/**
* @param parts
* @param basis
--- 445,455 ----
* @throws NoSuchVerseException
*/
! public static AccuracyType fromText(String original, String[] parts, AccuracyType verseAccuracy) throws NoSuchVerseException
{
! return fromText(original, parts, verseAccuracy, null);
}
/**
+ * @param original
* @param parts
* @param basis
***************
*** 454,460 ****
* @throws NoSuchVerseException
*/
! public static AccuracyType fromText(String[] parts, VerseRange basis) throws NoSuchVerseException
{
! return fromText(parts, null, basis);
}
--- 457,463 ----
* @throws NoSuchVerseException
*/
! public static AccuracyType fromText(String original, String[] parts, VerseRange basis) throws NoSuchVerseException
{
! return fromText(original, parts, null, basis);
}
***************
*** 475,480 ****
* @throws NoSuchVerseException
*/
! public static AccuracyType fromText(String[] parts, AccuracyType verseAccuracy, VerseRange basis) throws NoSuchVerseException
{
switch (parts.length)
{
--- 478,484 ----
* @throws NoSuchVerseException
*/
! public static AccuracyType fromText(String original, String[] parts, AccuracyType verseAccuracy, VerseRange basis) throws NoSuchVerseException
{
+ String msg = original; //$NON-NLS-1$
switch (parts.length)
{
***************
*** 512,516 ****
}
! throw new NoSuchVerseException(Msg.VERSE_PARTS, new Object[] { AccuracyType.VERSE_ALLOWED_DELIMS });
case 2:
--- 516,526 ----
}
! for (int i = 0; i < parts.length; i++)
! {
! msg += ", "; //$NON-NLS-1$
! msg += parts[1];
! }
!
! throw new NoSuchVerseException(Msg.VERSE_PARTS, new Object[] { msg }); // AccuracyType.VERSE_ALLOWED_DELIMS });
case 2:
***************
*** 538,545 ****
return BOOK_VERSE;
}
! throw new NoSuchVerseException(Msg.VERSE_PARTS, new Object[] { AccuracyType.VERSE_ALLOWED_DELIMS });
default:
! throw new NoSuchVerseException(Msg.VERSE_PARTS, new Object[] { AccuracyType.VERSE_ALLOWED_DELIMS });
}
}
--- 548,568 ----
return BOOK_VERSE;
}
!
! for (int i = 0; i < parts.length; i++)
! {
! msg += ", "; //$NON-NLS-1$
! msg += parts[1];
! }
!
! throw new NoSuchVerseException(Msg.VERSE_PARTS, new Object[] { msg }); // AccuracyType.VERSE_ALLOWED_DELIMS });
default:
! for (int i = 0; i < parts.length; i++)
! {
! msg += ", "; //$NON-NLS-1$
! msg += parts[1];
! }
!
! throw new NoSuchVerseException(Msg.VERSE_PARTS, new Object[] { msg }); // AccuracyType.VERSE_ALLOWED_DELIMS });
}
}
***************
*** 677,692 ****
args[tokenCount++] = token;
- System.out.print(input);
- System.out.print('<');
- for (int i = 0; i < tokenCount; i++)
- {
- if (i > 0)
- {
- System.out.print(',');
- }
- System.out.print(args[i]);
- }
- System.out.println('>');
-
String [] results = new String [tokenCount];
System.arraycopy(args, 0, results, 0, tokenCount);
--- 700,703 ----
Index: BibleInfo.properties
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage/BibleInfo.properties,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** BibleInfo.properties 15 Feb 2005 02:09:06 -0000 1.2
--- BibleInfo.properties 11 Aug 2005 11:28:03 -0000 1.3
***************
*** 25,44 ****
BibleInfo.Full.9=1 Samuel
BibleInfo.Short.9=1Sa
! BibleInfo.Alt.9=
BibleInfo.Full.10=2 Samuel
BibleInfo.Short.10=2Sa
! BibleInfo.Alt.10=
BibleInfo.Full.11=1 Kings
BibleInfo.Short.11=1Ki
! BibleInfo.Alt.11=1Kgs
BibleInfo.Full.12=2 Kings
BibleInfo.Short.12=2Ki
! BibleInfo.Alt.12=2Kgs
BibleInfo.Full.13=1 Chronicles
BibleInfo.Short.13=1Ch
! BibleInfo.Alt.13=1Chr
BibleInfo.Full.14=2 Chronicles
BibleInfo.Short.14=2Ch
! BibleInfo.Alt.14=2Chr
BibleInfo.Full.15=Ezra
BibleInfo.Short.15=Ezr
--- 25,44 ----
BibleInfo.Full.9=1 Samuel
BibleInfo.Short.9=1Sa
! BibleInfo.Alt.9=1 Sa
BibleInfo.Full.10=2 Samuel
BibleInfo.Short.10=2Sa
! BibleInfo.Alt.10=2 Sa
BibleInfo.Full.11=1 Kings
BibleInfo.Short.11=1Ki
! BibleInfo.Alt.11=1 Ki,1Kgs,1 Kgs
BibleInfo.Full.12=2 Kings
BibleInfo.Short.12=2Ki
! BibleInfo.Alt.12=2 Ki,2Kgs,2 Kgs
BibleInfo.Full.13=1 Chronicles
BibleInfo.Short.13=1Ch
! BibleInfo.Alt.13=1Chr,1 Chr
BibleInfo.Full.14=2 Chronicles
BibleInfo.Short.14=2Ch
! BibleInfo.Alt.14=2Chr,2 Chr
BibleInfo.Full.15=Ezra
BibleInfo.Short.15=Ezr
***************
*** 56,60 ****
BibleInfo.Short.19=Psa
BibleInfo.Alt.19=Pss,Ps
! BibleInfo.Full.20=Proberbs
BibleInfo.Short.20=Pro
BibleInfo.Alt.20=
--- 56,60 ----
BibleInfo.Short.19=Psa
BibleInfo.Alt.19=Pss,Ps
! BibleInfo.Full.20=Proverbs
BibleInfo.Short.20=Pro
BibleInfo.Alt.20=
***************
*** 63,67 ****
BibleInfo.Alt.21=Qoh
BibleInfo.Full.22=Song of Solomon
! BibleInfo.Short.22=Son
BibleInfo.Alt.22=SS,Canticle,Can
BibleInfo.Full.23=Isaiah
--- 63,67 ----
BibleInfo.Alt.21=Qoh
BibleInfo.Full.22=Song of Solomon
! BibleInfo.Short.22=Song
BibleInfo.Alt.22=SS,Canticle,Can
BibleInfo.Full.23=Isaiah
***************
*** 121,125 ****
BibleInfo.Full.41=Mark
BibleInfo.Short.41=Mar
! BibleInfo.Alt.41=Mk
BibleInfo.Full.42=Luke
BibleInfo.Short.42=Luk
--- 121,125 ----
BibleInfo.Full.41=Mark
BibleInfo.Short.41=Mar
! BibleInfo.Alt.41=Mk,Mrk
BibleInfo.Full.42=Luke
BibleInfo.Short.42=Luk
***************
*** 135,143 ****
BibleInfo.Alt.45=
BibleInfo.Full.46=1 Corinthians
! BibleInfo.Short.46=1Co
! BibleInfo.Alt.46=
BibleInfo.Full.47=2 Corinthians
! BibleInfo.Short.47=2Co
! BibleInfo.Alt.47=
BibleInfo.Full.48=Galatians
BibleInfo.Short.48=Gal
--- 135,143 ----
BibleInfo.Alt.45=
BibleInfo.Full.46=1 Corinthians
! BibleInfo.Short.46=1Cor
! BibleInfo.Alt.46=1 Cor
BibleInfo.Full.47=2 Corinthians
! BibleInfo.Short.47=2Cor
! BibleInfo.Alt.47=2 Cor
BibleInfo.Full.48=Galatians
BibleInfo.Short.48=Gal
***************
*** 154,167 ****
BibleInfo.Full.52=1 Thessalonians
BibleInfo.Short.52=1Th
! BibleInfo.Alt.52=
BibleInfo.Full.53=2 Thessalonians
BibleInfo.Short.53=2Th
! BibleInfo.Alt.53=
BibleInfo.Full.54=1 Timothy
BibleInfo.Short.54=1Ti
! BibleInfo.Alt.54=1Tm
BibleInfo.Full.55=2 Timothy
BibleInfo.Short.55=2Ti
! BibleInfo.Alt.55=2Tm
BibleInfo.Full.56=Titus
BibleInfo.Short.56=Tit
--- 154,167 ----
BibleInfo.Full.52=1 Thessalonians
BibleInfo.Short.52=1Th
! BibleInfo.Alt.52=1 Th
BibleInfo.Full.53=2 Thessalonians
BibleInfo.Short.53=2Th
! BibleInfo.Alt.53=2 Th
BibleInfo.Full.54=1 Timothy
BibleInfo.Short.54=1Ti
! BibleInfo.Alt.54=1Tm,1 Ti,1 Tm
BibleInfo.Full.55=2 Timothy
BibleInfo.Short.55=2Ti
! BibleInfo.Alt.55=2Tm,2 Ti,2 Tm
BibleInfo.Full.56=Titus
BibleInfo.Short.56=Tit
***************
*** 178,198 ****
BibleInfo.Full.60=1 Peter
BibleInfo.Short.60=1Pe
! BibleInfo.Alt.60=1Pt
BibleInfo.Full.61=2 Peter
BibleInfo.Short.61=2Pe
! BibleInfo.Alt.61=1Pt
BibleInfo.Full.62=1 John
BibleInfo.Short.62=1Jo
! BibleInfo.Alt.62=1Jn
BibleInfo.Full.63=2 John
BibleInfo.Short.63=2Jo
! BibleInfo.Alt.63=2Jn
BibleInfo.Full.64=3 John
BibleInfo.Short.64=3Jo
! BibleInfo.Alt.64=3Jn
BibleInfo.Full.65=Jude
BibleInfo.Short.65=Jude
! BibleInfo.Alt.65=
! BibleInfo.Full.66=Revelation
BibleInfo.Short.66=Rev
BibleInfo.Alt.66=Rv
--- 178,198 ----
BibleInfo.Full.60=1 Peter
BibleInfo.Short.60=1Pe
! BibleInfo.Alt.60=1Pt,1 Pe,1 Pt
BibleInfo.Full.61=2 Peter
BibleInfo.Short.61=2Pe
! BibleInfo.Alt.61=2Pt,2 Pe,2 Pt
BibleInfo.Full.62=1 John
BibleInfo.Short.62=1Jo
! BibleInfo.Alt.62=1Jn,1Jhn,1 Jn,1 Jhn,1 Jo
BibleInfo.Full.63=2 John
BibleInfo.Short.63=2Jo
! BibleInfo.Alt.63=2Jn,2Jhn,2 Jn,2 Jhn,2 Jo
BibleInfo.Full.64=3 John
BibleInfo.Short.64=3Jo
! BibleInfo.Alt.64=3Jn,3Jhn,3 Jn,3 Jhn,3 Jo
BibleInfo.Full.65=Jude
BibleInfo.Short.65=Jude
! BibleInfo.Alt.65=Jud
! BibleInfo.Full.66=Revelation of John
BibleInfo.Short.66=Rev
BibleInfo.Alt.66=Rv
More information about the jsword-svn
mailing list