Projects >> jsword >>ff05513a6c948cf96733bf9550f9ef8718213622

Chunk
Conflicting content
        final Filter filter = getFilter();

        // For all the ranges in this Passage
<<<<<<< HEAD
        Passage ref = KeyUtil.getPassage(key);
        final boolean showTitles = ref.hasRanges(RestrictionType.CHAPTER) || !allowEmpty;

        
        RawTextToXmlProcessor processor = new RawTextToXmlProcessor() {
                public void preRange(VerseRange range, List partialDom) {
                    if (showTitles) {
                        Element title = OSISUtil.factory().createTitle();
                        title.setAttribute(OSISUtil.OSIS_ATTR_TYPE, OSISUtil.GENERATED_CONTENT);
                        title.addContent(range.getName());
                        partialDom.add(title);
                    }
                }
=======
        Passage ref = KeyUtil.getPassage(key, getVersification());
        boolean showTitles = ref.hasRanges(RestrictionType.CHAPTER) || !allowEmpty;
        Iterator rit = ref.rangeIterator(RestrictionType.CHAPTER);

        while (rit.hasNext()) {
            VerseRange range = (VerseRange) rit.next();

            if (showTitles) {
                Element title = OSISUtil.factory().createTitle();
                title.setAttribute(OSISUtil.OSIS_ATTR_TYPE, OSISUtil.GENERATED_CONTENT);
                title.addContent(range.getName());
                content.add(title);
            }
>>>>>>> d4ca68f7cc4235f61a12afc1f081c3ee6f678a58

                public void postVerse(Key verse, List partialDom, String rawText) {
                 // If the verse is empty then we shouldn't add the verse tag
Solution content
        final Filter filter = getFilter();

        // For all the ranges in this Passage
        Passage ref = KeyUtil.getPassage(key, getVersification());
        final boolean showTitles = ref.hasRanges(RestrictionType.CHAPTER) || !allowEmpty;

        
        RawTextToXmlProcessor processor = new RawTextToXmlProcessor() {
            public void preRange(VerseRange range, List partialDom) {
                if (showTitles) {
                    Element title = OSISUtil.factory().createTitle();
                    title.setAttribute(OSISUtil.OSIS_ATTR_TYPE, OSISUtil.GENERATED_CONTENT);
                    title.addContent(range.getName());
                    partialDom.add(title);
                }
            }
File
AbstractPassageBook.java
Developer's decision
Combination
Kind of conflict
Cast expression
If statement
Method invocation
Variable
While statement
Chunk
Conflicting content
     */
    @Override
    public boolean contains(Key key) {
<<<<<<< HEAD
        //FIXME(CJB) can't deal with ranges, yet
        
        Verse verse = KeyUtil.getVerse(key);
=======
        checkActive();

        String v11nName = getBookMetaData().getProperty(ConfigEntryType.VERSIFICATION).toString();
        Versification v11n = Versifications.instance().getVersification(v11nName);
        Verse verse = KeyUtil.getVerse(key, v11n);
>>>>>>> d4ca68f7cc4235f61a12afc1f081c3ee6f678a58

        try {
            int index = v11n.getOrdinal(verse);
Solution content
     */
    @Override
    public boolean contains(Key key) {
        //FIXME(CJB) can't deal with ranges, yet
        
        String v11nName = getBookMetaData().getProperty(ConfigEntryType.VERSIFICATION).toString();
        Versification v11n = Versifications.instance().getVersification(v11nName);
        Verse verse = KeyUtil.getVerse(key, v11n);

        try {
            int index = v11n.getOrdinal(verse);
File
RawBackend.java
Developer's decision
Combination
Kind of conflict
Comment
Method invocation
Variable
Chunk
Conflicting content
    /* (non-Javadoc)
     * @see org.crosswire.jsword.book.sword.AbstractBackend#getRawText(org.crosswire.jsword.passage.Key)
     */
<<<<<<< HEAD
    public String readRawVerse(RawBackendState state, Verse currentVerse, String keyName) throws IOException {
            String v11nName = getBookMetaData().getProperty(ConfigEntryType.VERSIFICATION).toString();
            Versification v11n = Versifications.instance().getVersification(v11nName);
            int index = v11n.getOrdinal(currentVerse);
=======
    @Override
    public String getRawText(Key key) throws BookException {
        checkActive();

        String v11nName = getBookMetaData().getProperty(ConfigEntryType.VERSIFICATION).toString();
        Versification v11n = Versifications.instance().getVersification(v11nName);
        Verse verse = KeyUtil.getVerse(key, v11n);
        try {
            int index = v11n.getOrdinal(verse);
>>>>>>> d4ca68f7cc4235f61a12afc1f081c3ee6f678a58
            Testament testament = v11n.getTestament(index);
            index = v11n.getTestamentOrdinal(index);
            RandomAccessFile idxRaf = testament == Testament.NEW ? state.getNtIdxRaf() : state.getOtIdxRaf();
Solution content
    /* (non-Javadoc)
     * @see org.crosswire.jsword.book.sword.AbstractBackend#getRawText(org.crosswire.jsword.passage.Key)
     */
    public String readRawContent(RawBackendState state, Key key, String keyName) throws IOException {
            String v11nName = getBookMetaData().getProperty(ConfigEntryType.VERSIFICATION).toString();
            Versification v11n = Versifications.instance().getVersification(v11nName);
            Verse verse = KeyUtil.getVerse(key, v11n);
            
            int index = v11n.getOrdinal(verse);

            Testament testament = v11n.getTestament(index);
            index = v11n.getTestamentOrdinal(index);
            RandomAccessFile idxRaf = testament == Testament.NEW ? state.getNtIdxRaf() : state.getOtIdxRaf();
File
RawBackend.java
Developer's decision
Manual
Kind of conflict
Annotation
Method invocation
Method signature
Try statement
Variable
Chunk
Conflicting content
        writeTextDataFile(dataFile, textData);
    }

<<<<<<< HEAD
    public void setAliasKey(RawFileBackendState state, Key alias, Key source) throws IOException {
        Verse aliasVerse = KeyUtil.getVerse(alias);
        Verse sourceVerse = KeyUtil.getVerse(source);
=======
    @Override
    public void setAliasKey(Key alias, Key source) throws IOException {
>>>>>>> d4ca68f7cc4235f61a12afc1f081c3ee6f678a58
        String v11nName = getBookMetaData().getProperty(ConfigEntryType.VERSIFICATION).toString();
        Versification v11n = Versifications.instance().getVersification(v11nName);
        Verse aliasVerse = KeyUtil.getVerse(alias, v11n);
Solution content
        writeTextDataFile(dataFile, textData);
    }

    public void setAliasKey(RawFileBackendState state, Key alias, Key source) throws IOException {
        String v11nName = getBookMetaData().getProperty(ConfigEntryType.VERSIFICATION).toString();
        Versification v11n = Versifications.instance().getVersification(v11nName);
        Verse aliasVerse = KeyUtil.getVerse(alias, v11n);
File
RawFileBackend.java
Developer's decision
Combination
Kind of conflict
Annotation
Method invocation
Method signature
Variable
Chunk
Conflicting content
     */
    @Override
    public boolean contains(Key key) {
<<<<<<< HEAD
        // FIXME(CJB): doesn't cater for ranges... - currently experiencing a performance hit
=======
        checkActive();

        String v11nName = getBookMetaData().getProperty(ConfigEntryType.VERSIFICATION).toString();
        Versification v11n = Versifications.instance().getVersification(v11nName);
        Verse verse = KeyUtil.getVerse(key, v11n);
>>>>>>> d4ca68f7cc4235f61a12afc1f081c3ee6f678a58

        ZVerseBackendState rafBook = null;
        try {
Solution content
     */
    @Override
    public boolean contains(Key key) {
        // FIXME(CJB): doesn't cater for ranges... - currently experiencing a performance hit


        ZVerseBackendState rafBook = null;
        try {
File
ZVerseBackend.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Variable
Chunk
Conflicting content
        ZVerseBackendState rafBook = null;
        try {
<<<<<<< HEAD
            rafBook = new ZVerseBackendState(getBookMetaData(), blockType);

            Verse verse = KeyUtil.getVerse(key);
            String v11nName = getBookMetaData().getProperty(ConfigEntryType.VERSIFICATION).toString();
            Versification v11n = Versifications.instance().getVersification(v11nName);
=======
>>>>>>> d4ca68f7cc4235f61a12afc1f081c3ee6f678a58
            int index = v11n.getOrdinal(verse);
            Testament testament = v11n.getTestament(index);
            index = v11n.getTestamentOrdinal(index);
Solution content
        ZVerseBackendState rafBook = null;
        try {
            rafBook = new ZVerseBackendState(getBookMetaData(), blockType);

            String v11nName = getBookMetaData().getProperty(ConfigEntryType.VERSIFICATION).toString();
            Versification v11n = Versifications.instance().getVersification(v11nName);
            Verse verse = KeyUtil.getVerse(key, v11n);

            
            int index = v11n.getOrdinal(verse);
            Testament testament = v11n.getTestament(index);
            index = v11n.getTestamentOrdinal(index);
File
ZVerseBackend.java
Developer's decision
Manual
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
            textRaf = rafBook.getNtTextRaf();
        }

<<<<<<< HEAD
        // If Bible does not contain the desired testament, return nothing.
        if (compRaf == null) {
            return "";
        }

        // 10 because the index is 10 bytes long for each verse
        byte[] temp = SwordUtil.readRAF(compRaf, 1L * index * COMP_ENTRY_SIZE, COMP_ENTRY_SIZE);
=======
        String v11nName = getBookMetaData().getProperty(ConfigEntryType.VERSIFICATION).toString();
        Versification v11n = Versifications.instance().getVersification(v11nName);
        Verse verse = KeyUtil.getVerse(key, v11n);

        try {
            int index = v11n.getOrdinal(verse);
            Testament testament = v11n.getTestament(index);
            index = v11n.getTestamentOrdinal(index);
            RandomAccessFile compRaf = otCompRaf;
            RandomAccessFile idxRaf = otIdxRaf;
            RandomAccessFile textRaf = otTextRaf;
            if (testament == Testament.NEW) {
                compRaf = ntCompRaf;
                idxRaf = ntIdxRaf;
                textRaf = ntTextRaf;
            }
>>>>>>> d4ca68f7cc4235f61a12afc1f081c3ee6f678a58

        // If the Bible does not contain the desired verse, return nothing.
        // Some Bibles have different versification, so the requested verse
Solution content
            textRaf = rafBook.getNtTextRaf();
        }

        // If Bible does not contain the desired testament, return nothing.
        if (compRaf == null) {
            return "";
        }

        // 10 because the index is 10 bytes long for each verse
        byte[] temp = SwordUtil.readRAF(compRaf, 1L * index * COMP_ENTRY_SIZE, COMP_ENTRY_SIZE);

        // If the Bible does not contain the desired verse, return nothing.
        // Some Bibles have different versification, so the requested verse
File
ZVerseBackend.java
Developer's decision
Version 1
Kind of conflict
Comment
If statement
Method invocation
Try statement
Variable