Search in sources :

Example 1 with SubjectEntries

use of com.tyndalehouse.step.core.models.search.SubjectEntries in project step by STEPBible.

the class SubjectEntryServiceImpl method getVersesForResults.

/**
 * obtains the verses for all results
 *
 * @param results  the results
 * @param versions the version in which to look it up
 * @param context  the context to expand with the reference
 * @return the verses
 */
private SubjectEntries getVersesForResults(final EntityDoc[] results, final String[] versions, final String limitingScopeReference, final int context) {
    final List<OsisWrapper> verses = new ArrayList<OsisWrapper>(32);
    boolean masterVersionSwapped = false;
    for (final EntityDoc doc : results) {
        final String references = doc.get("references");
        masterVersionSwapped |= collectVersesFromReferences(verses, versions, references, limitingScopeReference, context);
    }
    return new SubjectEntries(verses, masterVersionSwapped);
}
Also used : SubjectEntries(com.tyndalehouse.step.core.models.search.SubjectEntries) ArrayList(java.util.ArrayList) EntityDoc(com.tyndalehouse.step.core.data.EntityDoc) OsisWrapper(com.tyndalehouse.step.core.models.OsisWrapper)

Aggregations

EntityDoc (com.tyndalehouse.step.core.data.EntityDoc)1 OsisWrapper (com.tyndalehouse.step.core.models.OsisWrapper)1 SubjectEntries (com.tyndalehouse.step.core.models.search.SubjectEntries)1 ArrayList (java.util.ArrayList)1