Package org.crosswire.jsword.passage

Examples of org.crosswire.jsword.passage.Key


        }
        reference = reference.trim();
        if (reference.length() == 0) {
            return true;
        }
        Key key = null;
        try {
            key = swordBook.getKey(reference);
            if (key.getCardinality() > 0) {
                return true;
            }
        } catch (NoSuchKeyException ex) {
            return false;
        }
View Full Code Here


            return txt;
        }


        System.out.println("REF: " + reference);
        Key key = null;

        //If the reference is not valid, the next line will throw a NoSuchKeyEx
        key = swordBook.getKey(reference);

        String fullTxt = null;
        // Somewhow, the following lines always throw a BookException...
        // It seems that there is a bug in the jsword library we're using
        /*
        BookData data = new BookData(swordBook, key);
        fullTxt = OSISUtil.getCanonicalText(data.getOsis());
         */


        int cardinality = key.getCardinality();
        for (int i = 0; i < cardinality; i++) {
            BookData data = new BookData(swordBook, key);
            //The following line can throw a BookException
            fullTxt = OSISUtil.getCanonicalText(data.getOsis());
            txt.add(fullTxt);
View Full Code Here

            reference = reference.trim();
            if (reference.length() == 0) {
                return;
            }

            Key key = null;
            try {
                key = swordBook.getKey(reference);
            } catch (NoSuchKeyException ex) {
                Logger.getLogger(BibleVerseListPanel.class.getName()).log(Level.SEVERE, null, ex);
                continue;
            }
            String fullTxt = null;

            StringBuffer sb = new StringBuffer();

            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);
View Full Code Here

TOP

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

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.