Package org.crosswire.jsword.passage

Examples of org.crosswire.jsword.passage.Verse


            sb.append(txtArea.getText() + "\n");
        }

        try {
            for (int i = begin; i <= end; i++) {
                Verse temp = new Verse(cbBook.getSelectedIndex() + 1, cbChapter.getSelectedIndex() + 1, i);
                BookData data = new BookData(book, temp);
                String versetext = OSISUtil.getCanonicalText(data.getOsisFragment());

                // Skip blank lines (this may happen if the selected bible does not
                // contain the choosed text, it may be a New Testment only, for example)
View Full Code Here


            int cardinality = key.getCardinality();
            String localBookName = null;
            for (int i = 0; i < cardinality; i++) {
                Key k = key.get(i);
                Verse v = KeyUtil.getVerse(k);
                if (localBookName == null) {
                    int bookNum = v.getBook();
                    try {
                        localBookName = BibleInfo.getPreferredBookName(bookNum);
                    } catch (NoSuchVerseException ex) {
                        Logger.getLogger(BibleVerseListPanel.class.getName()).log(Level.SEVERE, null, ex);
                    }
                }
                BookData data = new BookData(swordBook, k);

                try {
                    //The following line can throw a BookException
                    Element xmlData = data.getOsis();
                    fullTxt = OSISUtil.getCanonicalText(xmlData);

                    if (sb.length() > 0) {
                        sb.append(splitType.getTxt());
                    }
                    switch (refStype) {
                        case Full:
                            sb.append(localBookName).append(" ").append(v.getChapter()).append(":").append(v.getVerse()).append(" ");
                            break;
                        case ChapterAndVerse:
                            sb.append(v.getChapter()).append(":").append(v.getVerse()).append(" ");
                            break;
                        case VerseOnly:
                            sb.append(v.getVerse()).append(" ");
                            break;
                    }


                    sb.append(fullTxt).append(endl);
View Full Code Here

TOP

Related Classes of org.crosswire.jsword.passage.Verse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.